diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2014-09-17 16:12:40 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2014-09-17 16:12:40 +0000 |
| commit | 818896dec204a23a6bed43c00c68b36dcde9dcb7 (patch) | |
| tree | 9df435dffe27bba51d016ea555a4c68492eb28ca /src/runtime | |
| parent | 3e3178abfa67951051e6347d84edb7286f931d87 (diff) | |
fix a portability problem with the Python binding (found by Prasanth)
Diffstat (limited to 'src/runtime')
| -rw-r--r-- | src/runtime/python/pypgf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/python/pypgf.c b/src/runtime/python/pypgf.c index d31c3e77e..e1df97cd1 100644 --- a/src/runtime/python/pypgf.c +++ b/src/runtime/python/pypgf.c @@ -1,3 +1,4 @@ +#define PY_SSIZE_T_CLEAN #include <Python.h> #include "structmember.h" @@ -6,7 +7,6 @@ #include <gu/file.h> #include <pgf/pgf.h> #include <pgf/linearizer.h> -#include <pgf/reader.h> static PyObject* PGFError; @@ -2681,7 +2681,7 @@ pgf_readPGF(PyObject *self, PyObject *args) static ExprObject* pgf_readExpr(PyObject *self, PyObject *args) { - size_t len; + Py_ssize_t len; const uint8_t *buf; if (!PyArg_ParseTuple(args, "s#", &buf, &len)) return NULL; @@ -2711,7 +2711,7 @@ pgf_readExpr(PyObject *self, PyObject *args) { static TypeObject* pgf_readType(PyObject *self, PyObject *args) { - size_t len; + Py_ssize_t len; const uint8_t *buf; if (!PyArg_ParseTuple(args, "s#", &buf, &len)) return NULL; |
