diff Objects/funcobject.c @ 36510:0f3894bb2ada legacy-trunk

Support %zd in PyErr_Format and PyString_FromFormat.
author Martin v. Löwis <martin@v.loewis.de>
date Thu, 16 Feb 2006 06:54:25 +0000
parents 13e98e369abd
children 1596ff5c79b5
line wrap: on
line diff
--- a/Objects/funcobject.c	Thu Feb 16 06:21:57 2006 +0000
+++ b/Objects/funcobject.c	Thu Feb 16 06:54:25 2006 +0000
@@ -248,8 +248,8 @@
 		    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 @@
 	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) {