diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2006-02-16 06:54:25 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2006-02-16 06:54:25 (GMT) |
commit | 2c95cc6d72957296c46bb11362359675a47e2085 (patch) | |
tree | 9e6e78432b2aef86240297833b644d4d60d771a7 /Objects/funcobject.c | |
parent | 26efe402c2a5dba441dc2feae2f15fea6be452ba (diff) | |
download | cpython-2c95cc6d72957296c46bb11362359675a47e2085.zip cpython-2c95cc6d72957296c46bb11362359675a47e2085.tar.gz cpython-2c95cc6d72957296c46bb11362359675a47e2085.tar.bz2 |
Support %zd in PyErr_Format and PyString_FromFormat.
Diffstat (limited to 'Objects/funcobject.c')
-rw-r--r-- | Objects/funcobject.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/funcobject.c b/Objects/funcobject.c index d644001..ff70baf 100644 --- a/Objects/funcobject.c +++ b/Objects/funcobject.c @@ -248,8 +248,8 @@ func_set_code(PyFunctionObject *op, PyObject *value) PyTuple_GET_SIZE(op->func_closure)); if (nclosure != nfree) { PyErr_Format(PyExc_ValueError, - "%s() requires a code object with %ld free vars," - " not %ld", + "%s() requires a code object with %zd free vars," + " not %zd", PyString_AsString(op->func_name), (long)nclosure, (long)nfree); return -1; @@ -401,7 +401,7 @@ func_new(PyTypeObject* type, PyObject* args, PyObject* kw) nclosure = closure == Py_None ? 0 : PyTuple_GET_SIZE(closure); if (nfree != nclosure) return PyErr_Format(PyExc_ValueError, - "%s requires closure of length %ld, not %ld", + "%s requires closure of length %zd, not %zd", PyString_AS_STRING(code->co_name), (long)nfree, (long)nclosure); if (nclosure) { |