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:
parent
220a0ad055
commit
a2c99f619d
6 changed files with 34 additions and 23 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue