Avoid warning returning a boolean result in python bindings.

Getting "dereferencing type-punned pointer" doing Py_INCREF on Py_True and Py_False.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21603 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Mike Alexander 2011-11-21 05:43:29 +00:00
parent da217aa506
commit ce3143c4be

View File

@ -118,13 +118,13 @@ typedef char gchar;
%typemap(out) gboolean {
if ($1 == TRUE)
{
Py_INCREF(Py_True);
$result = Py_True;
Py_INCREF($result);
}
else if ($1 == FALSE)
{
Py_INCREF(Py_False);
$result = Py_False;
Py_INCREF($result);
}
else
{