diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2006-02-16 14:32:27 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2006-02-16 14:32:27 (GMT) |
commit | eb079f1c2533bcefcab3ef4c07b800e5bd37239f (patch) | |
tree | 32ce8e1eafb2e93ef977649e3cb60a3c0ec0fc00 /Objects/methodobject.c | |
parent | ad0a4629beac0600c4c4c3167b0d68be57ca674e (diff) | |
download | cpython-eb079f1c2533bcefcab3ef4c07b800e5bd37239f.zip cpython-eb079f1c2533bcefcab3ef4c07b800e5bd37239f.tar.gz cpython-eb079f1c2533bcefcab3ef4c07b800e5bd37239f.tar.bz2 |
Use Py_ssize_t for counts and sizes.
Convert Py_ssize_t using PyInt_FromSsize_t
Diffstat (limited to 'Objects/methodobject.c')
-rw-r--r-- | Objects/methodobject.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/methodobject.c b/Objects/methodobject.c index 5e920a2..8e3bf86 100644 --- a/Objects/methodobject.c +++ b/Objects/methodobject.c @@ -65,7 +65,7 @@ PyCFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) PyCFunctionObject* f = (PyCFunctionObject*)func; PyCFunction meth = PyCFunction_GET_FUNCTION(func); PyObject *self = PyCFunction_GET_SELF(func); - long size; + Py_ssize_t size; switch (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) { case METH_VARARGS: @@ -81,7 +81,7 @@ PyCFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) if (size == 0) return (*meth)(self, NULL); PyErr_Format(PyExc_TypeError, - "%.200s() takes no arguments (%ld given)", + "%.200s() takes no arguments (%zd given)", f->m_ml->ml_name, size); return NULL; } @@ -92,7 +92,7 @@ PyCFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) if (size == 1) return (*meth)(self, PyTuple_GET_ITEM(arg, 0)); PyErr_Format(PyExc_TypeError, - "%.200s() takes exactly one argument (%ld given)", + "%.200s() takes exactly one argument (%zd given)", f->m_ml->ml_name, size); return NULL; } |