Use safe Py_None in Windows or when using -DSWIG_PYTHON_SAFE_NONE

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8021 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-12-21 02:09:13 +00:00
commit c09006dbdd
2 changed files with 18 additions and 10 deletions

View file

@ -401,7 +401,7 @@ public:
}
/* Set comparison with none for ConstructorToFunction */
setSubclassInstanceCheck(NewString("$arg != SWIG_Py_None()"));
setSubclassInstanceCheck(NewString("$arg != Py_None"));
/* Initialize all of the output files */
String *outfile = Getattr(n,"outfile");
@ -1725,7 +1725,7 @@ public:
/*
if (constructor && (Getattr(n, "wrap:self") != 0)) {
Wrapper_add_local(f, "subclassed", "int subclassed = 0");
Printf(f->code, "subclassed = (arg1 != SWIG_Py_None());\n");
Printf(f->code, "subclassed = (arg1 != Py_None);\n");
}
*/