mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
fix the marshaller as well
This commit is contained in:
@@ -474,7 +474,7 @@ match_lit(PgfMarshaller *this, PgfUnmarshaller *u, PgfLiteral lit)
|
|||||||
PyObject *pyobj = (PyObject *)lit;
|
PyObject *pyobj = (PyObject *)lit;
|
||||||
|
|
||||||
if (PyLong_Check(pyobj)) {
|
if (PyLong_Check(pyobj)) {
|
||||||
PyObject *intShifter = PyLong_FromUnsignedLong(LINT_BASE);
|
PyObject *intShifter = PyLong_FromUnsignedLongLong(LINT_BASE);
|
||||||
if (!intShifter)
|
if (!intShifter)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@@ -525,7 +525,7 @@ match_lit(PgfMarshaller *this, PgfUnmarshaller *u, PgfLiteral lit)
|
|||||||
Py_DECREF(intShifter);
|
Py_DECREF(intShifter);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
i[n] = PyLong_AsUnsignedLong(rem);
|
i[n] = PyLong_AsUnsignedLongLong(rem);
|
||||||
Py_DECREF(rem);
|
Py_DECREF(rem);
|
||||||
PyObject *tmp = PyNumber_FloorDivide(x, intShifter);
|
PyObject *tmp = PyNumber_FloorDivide(x, intShifter);
|
||||||
Py_DECREF(x);
|
Py_DECREF(x);
|
||||||
@@ -541,9 +541,9 @@ match_lit(PgfMarshaller *this, PgfUnmarshaller *u, PgfLiteral lit)
|
|||||||
|
|
||||||
// first chunk, re-applying polarity
|
// first chunk, re-applying polarity
|
||||||
if (isPos)
|
if (isPos)
|
||||||
i[0] = PyLong_AsLong(x);
|
i[0] = PyLong_AsLongLong(x);
|
||||||
else
|
else
|
||||||
i[0] = -PyLong_AsLong(x);
|
i[0] = -PyLong_AsLongLong(x);
|
||||||
|
|
||||||
Py_DECREF(x);
|
Py_DECREF(x);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user