mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 796858 - TypeError: in method 'qof_query_int32_predicate',...
argument 2 of type 'gint32' on gnucash.gnucash_core.QueryInt32Predicate Add gint32 to typemap. Also replace a couple of PyString_ calls leftover from Py2.
This commit is contained in:
parent
10811b8a43
commit
0cf42a75b3
@ -178,6 +178,7 @@ typedef char gchar;
|
|||||||
%apply int { gint };
|
%apply int { gint };
|
||||||
%apply unsigned int { guint };
|
%apply unsigned int { guint };
|
||||||
%apply long { glong };
|
%apply long { glong };
|
||||||
|
%apply int32_t { gint32 };
|
||||||
%apply int64_t { gint64 };
|
%apply int64_t { gint64 };
|
||||||
%apply unsigned long { gulong };
|
%apply unsigned long { gulong };
|
||||||
%apply uint64_t { guint64 };
|
%apply uint64_t { guint64 };
|
||||||
@ -250,8 +251,8 @@ typedef char gchar;
|
|||||||
int size = PyList_Size($input);
|
int size = PyList_Size($input);
|
||||||
for (i = size-1; i >= 0; i--) {
|
for (i = size-1; i >= 0; i--) {
|
||||||
PyObject *o = PyList_GetItem($input, i);
|
PyObject *o = PyList_GetItem($input, i);
|
||||||
if (PyString_Check(o)) {
|
if (PyUnicode_Check(o)) {
|
||||||
$1 = g_slist_prepend($1,PyString_AsString(PyList_GetItem($input, i)));
|
$1 = g_slist_prepend($1,PyUnicode_AsUTF8(PyList_GetItem($input, i)));
|
||||||
} else {
|
} else {
|
||||||
PyErr_SetString(PyExc_TypeError, "list must contain strings");
|
PyErr_SetString(PyExc_TypeError, "list must contain strings");
|
||||||
g_slist_free($1);
|
g_slist_free($1);
|
||||||
|
Loading…
Reference in New Issue
Block a user