reduce the aliasing warnings (when compiling with CFLAGS='-O2 -Wstrict-aliasing=2') to the minimum, ie, enums and pointer to functions

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8883 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-02-23 21:43:33 +00:00
commit a2c99f619d
6 changed files with 34 additions and 23 deletions

View file

@ -8,9 +8,7 @@
SWIGINTERNINLINE PyObject*
SWIG_From_dec(bool)(bool value)
{
PyObject *obj = value ? Py_True : Py_False;
Py_INCREF(obj);
return obj;
return PyBool_FromLong(value ? 1 : 0);
}
}