[GRASS-dev] lib fn to set all of a raster row to NULL?

Hi,

is there a lib function somewhere like Rast_get_row() which populates
a row buffer, but instead of reading from a file just (re)sets all
values in the row array to NULL?

something like:
Rast_fill_row_with_nulls(void *buf, RASTER_MAP_TYPE data_type)

It's easy enough to write small for() loop to do it, but seems like the
sort of thing a lib fn might help with, so might already exist somewhere.

?

note this is for working with the cell array values, not
writing an all-null row on the disk.

thanks,
Hamish

Hamish wrote:

is there a lib function somewhere like Rast_get_row() which populates
a row buffer, but instead of reading from a file just (re)sets all
values in the row array to NULL?

something like:
Rast_fill_row_with_nulls(void *buf, RASTER_MAP_TYPE data_type)

It's easy enough to write small for() loop to do it, but seems like the
sort of thing a lib fn might help with, so might already exist somewhere.

?

nevermind, found it:

Rast_set_null_value(row_ptr, window.cols, map_type);

Hamish