gnucash stable: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Sat Aug 8 20:17:36 EDT 2026


Updated	 via  https://github.com/Gnucash/gnucash/commit/4b5c0d02 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/17bb7f9e (commit)
	from  https://github.com/Gnucash/gnucash/commit/fd43b293 (commit)



commit 4b5c0d02186448a981520912dac3365e9199bac7
Merge: fd43b2935d 17bb7f9e3f
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Aug 8 17:15:09 2026 -0700

    Merge Jitka Plesnikova's 'swig-4.5' into stable.


commit 17bb7f9e3f8fd8f69dd5a989bbdd6e352bd673da
Author: Gwyn Ciesla <gwync at protonmail.com>
Date:   Tue Jul 28 13:41:19 2026 -0500

    Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility
    Author: Jitka Plesnikova <jplesnik at redhat.com>

diff --git a/bindings/python/gnucash_core.i b/bindings/python/gnucash_core.i
index b328293f19..58d2835113 100644
--- a/bindings/python/gnucash_core.i
+++ b/bindings/python/gnucash_core.i
@@ -198,7 +198,7 @@ GNC_ACCEPT_WRAPPER(GncEntry)
 %typemap(out) GncOwner * {
     GncOwnerType owner_type = gncOwnerGetType($1);
     PyObject * owner_tuple = PyTuple_New(2);
-    PyTuple_SetItem(owner_tuple, 0, PyInt_FromLong( (long) owner_type ) );
+    PyTuple_SetItem(owner_tuple, 0, PyLong_FromLong( (long) owner_type ) );
     PyObject * swig_wrapper_object;
     if (owner_type == GNC_OWNER_CUSTOMER ){
         swig_wrapper_object = SWIG_NewPointerObj(
diff --git a/bindings/python/time64.i b/bindings/python/time64.i
index 3f85448ded..a9b70966c0 100644
--- a/bindings/python/time64.i
+++ b/bindings/python/time64.i
@@ -35,7 +35,7 @@
 %typemap(in) time64 {
     PyDateTime_IMPORT;
 
-    if (!PyDate_Check($input) && !PyInt_Check($input)) {
+    if (!PyDate_Check($input) && !PyLong_Check($input)) {
         PyErr_SetString(PyExc_ValueError,"date, datetime or integer expected");
         return NULL;
     }
@@ -49,7 +49,7 @@
                           PyDateTime_GET_YEAR($input) - 1900};
         $1 = gnc_mktime(&time);
     } else {
-        $1 = PyInt_AsLong($input);
+        $1 = PyLong_AsLong($input);
     }
 }
 
@@ -79,7 +79,7 @@
 %typemap(in) time64 * (time64 secs) {
     PyDateTime_IMPORT;
 
-    if (!PyDate_Check($input) && !PyInt_Check($input)) {
+    if (!PyDate_Check($input) && !PyLong_Check($input)) {
         PyErr_SetString(PyExc_ValueError,"date, datetime or integer expected");
         return NULL;
     }
@@ -94,7 +94,7 @@
         time64 secs = gnc_mktime(&time);
         $1 = &secs;
     } else {
-        time64 secs = PyInt_AsLong($input);
+        time64 secs = PyLong_AsLong($input);
         $1 = &secs;
     }
 }



Summary of changes:
 bindings/python/gnucash_core.i | 2 +-
 bindings/python/time64.i       | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)



More information about the gnucash-changes mailing list