From: William S F. <ws...@fu...> - 2012-08-10 18:15:26
|
On 07/08/12 22:54, Gerald Wodni wrote: > Hi all, > > I am working on a Forth module for SWIG since 2008, and finally want to fix > some remaining bugs and clean up the source to apply for svn access. > > One thing that puzzles me is that constants with the value NULL do not call > the constantWrapper, e.g: > #define number_0 0 > calls the wrapper, but > #define number_null NULL > does not. > > Can you elaborate why that is, or how to circumvent this? Neither the C compiler nor SWIG understands what anything is unless you tell it what it is. The C compiler requires stddef.h for the definition of NULL. I'd just use this for SWIG: %ignore NULL; #define NULL 0 /* Then your code... */ #define number_0 0 #define number_null NULL William |