]> granicus.if.org Git - python/commitdiff
Issue #13093: Fix _testcapi.unicode_encodedecimal()
authorVictor Stinner <victor.stinner@haypocalc.com>
Mon, 28 Nov 2011 23:53:09 +0000 (00:53 +0100)
committerVictor Stinner <victor.stinner@haypocalc.com>
Mon, 28 Nov 2011 23:53:09 +0000 (00:53 +0100)
_testcapimodule.c is not "ssize_t" safe in Python 2.7: the length argument type
is int, not Py_ssize_t.

Modules/_testcapimodule.c

index bb1cc83830ecea0567a0bba1df1f622208e60af3..f1968e2a70cb959b12d4c2ed6f17b9722265bf54 100644 (file)
@@ -1109,7 +1109,7 @@ static PyObject *
 unicode_encodedecimal(PyObject *self, PyObject *args)
 {
     Py_UNICODE *unicode;
-    Py_ssize_t length;
+    int length;
     char *errors = NULL;
     PyObject *decimal;
     Py_ssize_t decimal_length, new_length;