[GRASS-dev] GRASS 7 scripts overhaul
Glynn Clements
glynn at gclements.plus.com
Wed Sep 14 07:04:29 EDT 2011
Markus Neteler wrote:
> Warning: Macro "GS_NEAR_EQUAL" depends on an unknown identifier
> "GS_BETWEEN". Macro "GS_NEAR_EQUAL" will not be output
> Warning: Macro "GS_NEAR_EQUAL" depends on an unknown identifier
> "GS_BETWEEN". Macro "GS_NEAR_EQUAL" will not be output
gsurf.h has:
#define BETWEEN(x, a, b) (((x) > (a) && (x) < (b)) || ((x) > (b) && (x) < (a)))
#define GS_NEAR_EQUAL(x, y, ratio) ((x) == (y) || ((x) == 0.0? \
GS_BETWEEN((x), (y)+(y)*(ratio), (y)-(y)*(ratio)):\
GS_BETWEEN((y), (x)+(x)*(ratio), (x)-(x)*(ratio))))
If any C code used GS_NEAR_EQUAL, you'd get an "undefined symbol"
error for GS_BETWEEN, but the compiler won't care about errors in
macros which are never used.
However, ctypes translates macros to Python functions, so it has to
parse the macro body.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list