{ \
buf b; \
char *p; \
- int sz; \
+ Py_ssize_t sz; \
PyObject *rc = 0; \
mp *x; \
\
{
int r = 0;
char *p;
- int len;
+ Py_ssize_t len;
PyObject *z = 0;
mp *zz;
mptext_stringctx sc;
sc.buf = p; sc.lim = p + len;
if ((zz = mp_read(MP_NEW, r, &mptext_stringops, &sc)) == 0)
VALERR("bad integer");
- z = Py_BuildValue("(Ns#)", mp_pywrap(zz), sc.buf, (int)(sc.lim - sc.buf));
+ z = Py_BuildValue("(Ns#)", mp_pywrap(zz),
+ sc.buf, (Py_ssize_t)(sc.lim - sc.buf));
end:
return (z);
}
static PyObject *meth__##py##_##name(PyObject *me, PyObject *arg) \
{ \
char *p; \
- int len; \
+ Py_ssize_t len; \
if (!PyArg_ParseTuple(arg, "Os#:" #name, &me, &p, &len)) return (0); \
return (pre##_pywrap(mp_##name(MP_NEW, p, len))); \
}
{
int r = 0;
char *p;
- int len;
+ Py_ssize_t len;
PyObject *z = 0;
mp *zz;
mptext_stringctx sc;
if (zz) MP_DROP(zz);
VALERR("bad binary polynomial");
}
- z = Py_BuildValue("(Ns#)", gf_pywrap(zz), sc.buf, (int)(sc.lim - sc.buf));
+ z = Py_BuildValue("(Ns#)", gf_pywrap(zz),
+ sc.buf, (Py_ssize_t)(sc.lim - sc.buf));
end:
return (z);
}