now 'defined' as variable name is fixed

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6573 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-10-30 21:28:36 +00:00
commit 53306bdc3e
3 changed files with 33 additions and 14 deletions

View file

@ -270,9 +270,17 @@ inline const char* mangle ## #@__VA_ARGS__ () {
#define three THREE(42)
#if defined(one)
/* hello */
#else
/* chiao */
#endif;
#ifdef SWIGRUBY
%rename(ddefined) defined;
#endif
%inline %{
int endif = 0;
int define = 0;
/* this is not working */
/* int defined = 0; */
const int endif = 1;
const int define = 1;
const int defined = 1;
%}

View file

@ -0,0 +1,10 @@
import preproc
if preproc.endif != 1:
raise RuntimeError
if preproc.define != 1:
raise RuntimeError
if preproc.defined != 1:
raise RuntimeError