From 660dd95cf2ec8f915686a69bf90c46edb6059298 Mon Sep 17 00:00:00 2001 From: Krasimir Angelov Date: Fri, 27 Jan 2023 09:31:25 +0100 Subject: [PATCH] fix the marshaller for integers on Windows --- src/runtime/python/ffi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/runtime/python/ffi.c b/src/runtime/python/ffi.c index 8b3884ae3..2b133c65b 100644 --- a/src/runtime/python/ffi.c +++ b/src/runtime/python/ffi.c @@ -346,12 +346,12 @@ lint(PgfUnmarshaller *this, size_t size, uintmax_t *v) return (PgfLiteral) PyLong_FromLong(0); } else { intmax_t *v0 = (intmax_t *)v; - PyObject *i = PyLong_FromLong(*v0); + PyObject *i = PyLong_FromLongLong(*v0); if (!i) return 0; if (size > 1) { - PyObject *intShifter = PyLong_FromUnsignedLong(LINT_BASE); + PyObject *intShifter = PyLong_FromUnsignedLongLong(LINT_BASE); if (!intShifter) { Py_DECREF(i); return 0; @@ -365,7 +365,7 @@ lint(PgfUnmarshaller *this, size_t size, uintmax_t *v) break; } - PyObject *py_v = PyLong_FromUnsignedLong(v[n]); + PyObject *py_v = PyLong_FromUnsignedLongLong(v[n]); if (!py_v) { Py_DECREF(i); i = NULL;