mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
parent
da217aa506
commit
ce3143c4be
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user