From 057cb7a3a6f2cbba6118e75974b035074d081cfd Mon Sep 17 00:00:00 2001 From: Krasimir Angelov Date: Fri, 27 Jan 2023 09:40:43 +0100 Subject: [PATCH] fix the marshaller as well --- src/runtime/python/ffi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/runtime/python/ffi.c b/src/runtime/python/ffi.c index 2b133c65b..2c1a46c4d 100644 --- a/src/runtime/python/ffi.c +++ b/src/runtime/python/ffi.c @@ -474,7 +474,7 @@ match_lit(PgfMarshaller *this, PgfUnmarshaller *u, PgfLiteral lit) PyObject *pyobj = (PyObject *)lit; if (PyLong_Check(pyobj)) { - PyObject *intShifter = PyLong_FromUnsignedLong(LINT_BASE); + PyObject *intShifter = PyLong_FromUnsignedLongLong(LINT_BASE); if (!intShifter) return 0; @@ -525,7 +525,7 @@ match_lit(PgfMarshaller *this, PgfUnmarshaller *u, PgfLiteral lit) Py_DECREF(intShifter); return 0; } - i[n] = PyLong_AsUnsignedLong(rem); + i[n] = PyLong_AsUnsignedLongLong(rem); Py_DECREF(rem); PyObject *tmp = PyNumber_FloorDivide(x, intShifter); Py_DECREF(x); @@ -541,9 +541,9 @@ match_lit(PgfMarshaller *this, PgfUnmarshaller *u, PgfLiteral lit) // first chunk, re-applying polarity if (isPos) - i[0] = PyLong_AsLong(x); + i[0] = PyLong_AsLongLong(x); else - i[0] = -PyLong_AsLong(x); + i[0] = -PyLong_AsLongLong(x); Py_DECREF(x);