fix bool AsVal

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7817 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-11-07 11:13:16 +00:00
commit d6f0a99b3e

View file

@ -27,7 +27,7 @@ SWIG_AsVal_dec(bool)(PyObject *obj, bool *val)
return SWIG_OK;
} else {
long v = 0;
int res = SWIG_AsVal(long)(obj, &v);
int res = SWIG_AsVal(long)(obj, val ? &v : 0);
if (res == SWIG_OK && val) *val = v ? true : false;
return res;
}