[GRASS-dev] Vect_rewrite_line using off_t as line id
Radim Blazek
radim.blazek at gmail.com
Thu Sep 17 03:37:05 PDT 2015
Hi,
I see that in r55582 was changed the type of line parameter in
Vect_rewrite_line, Vect_restore_line and Vect_delete_line from int to
off_t. It makes it impossible to use those functions from an
application compiled with a compiler which has different off_t size,
which is the case for QGIS / OSGeo4W (also some Ubuntu builds). It
seems that a single function is used for two different purposes,
change a line in file by offset on level 1 and change a line by line
id on level 2. Unfortunately V2_*_line functions were also changed to
off_t.
Do you know about any workaround?
I can only imagine a dirty hack like (not sure if it would work):
typedef my_off_t <type used by GRASS compiler>
typedef int Vect_delete_line_type(struct Map_info *, my_off_t);
Vect_delete_line_type *Vect_delete_line_pointer = Vect_delete_line;
Vect_delete_line_pointer(map, line);
Can I get from GRASS includes the real type of off_t which was used
when GRASS was compiled?
Radim
More information about the grass-dev
mailing list