From include/parrot/parrot.h:

/* weird architectures might need this, s. C-FAQ 5.17
*
* the SET_NULL macros are only for system, where a NULL pointer
* isn't represented by zeroes, so don't use these, for resetting
* non-null pointers
*/

#ifdef HAS_NON_ZERO_NULL
#  define SET_NULL(x) x = NULL
#  define SET_NULL_P(x, s) x = (s)NULL
#else
#  define SET_NULL(x)
#  define SET_NULL_P(x, s)
#endif /* HAS_NON_ZERO_NULL */


This seems very wrong. SET_NULL() isn't actually setting any values if not HAS_NON_ZERO_NULL. Is there some reason it's not actually

#  define SET_NULL(x)      x = 0
#  define SET_NULL_P(x, s) x = (s)NULL

And for that matter, what's wrong with just using x = NULL everywhere? Why do we need a macro to do this?

xoxo,
Andy


--
Andy Lester => [EMAIL PROTECTED] => www.petdance.com => AIM:petdance




Reply via email to