]> granicus.if.org Git - python/commitdiff
Use %zd format characters for Py_ssize_t types.
authorThomas Wouters <thomas@python.org>
Wed, 1 Mar 2006 05:38:39 +0000 (05:38 +0000)
committerThomas Wouters <thomas@python.org>
Wed, 1 Mar 2006 05:38:39 +0000 (05:38 +0000)
Python/getargs.c

index e14a07b2269eb5325e31a44f8cf3129e72d7d1be..4f4164e9da1ba822aa8779a5024d1f8e74eef706 100644 (file)
@@ -1686,13 +1686,13 @@ PyArg_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t m
                if (name != NULL)
                        PyErr_Format(
                            PyExc_TypeError,
-                           "%s expected %s%d arguments, got %d", 
+                           "%s expected %s%zd arguments, got %zd", 
                            name, (min == max ? "" : "at least "), min, l);
                else
                        PyErr_Format(
                            PyExc_TypeError,
-                           "unpacked tuple should have %s%d elements,"
-                           " but has %d", 
+                           "unpacked tuple should have %s%zd elements,"
+                           " but has %zd", 
                            (min == max ? "" : "at least "), min, l);
                va_end(vargs);
                return 0;
@@ -1701,13 +1701,13 @@ PyArg_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t m
                if (name != NULL)
                        PyErr_Format(
                            PyExc_TypeError,
-                           "%s expected %s%d arguments, got %d", 
+                           "%s expected %s%zd arguments, got %zd", 
                            name, (min == max ? "" : "at most "), max, l);
                else
                        PyErr_Format(
                            PyExc_TypeError,
-                           "unpacked tuple should have %s%d elements,"
-                           " but has %d", 
+                           "unpacked tuple should have %s%zd elements,"
+                           " but has %zd", 
                            (min == max ? "" : "at most "), max, l);
                va_end(vargs);
                return 0;