Use CYTHON_FORMAT_SSIZE_T
authorcgohlke <cgohlke@uci.edu>
Thu, 30 Aug 2012 23:23:38 +0000 (16:23 -0700)
committercgohlke <cgohlke@uci.edu>
Thu, 30 Aug 2012 23:23:38 +0000 (16:23 -0700)
Cython/Compiler/ExprNodes.py

index 3ddfd27..2ef54e8 100755 (executable)
@@ -3547,7 +3547,7 @@ class SliceIndexNode(ExprNode):
             check = stop
         if check:
             code.putln("if (unlikely((%s) != %d)) {" % (check, target_size))
-            code.putln('PyErr_Format(PyExc_ValueError, "Assignment to slice of wrong length, expected %%" PY_FORMAT_SIZE_T "d, got %%" PY_FORMAT_SIZE_T "d", (Py_ssize_t)%d, (Py_ssize_t)(%s));' % (
+            code.putln('PyErr_Format(PyExc_ValueError, "Assignment to slice of wrong length, expected %%" CYTHON_FORMAT_SSIZE_T "d, got %%" CYTHON_FORMAT_SSIZE_T "d", (Py_ssize_t)%d, (Py_ssize_t)(%s));' % (
                         target_size, check))
             code.putln(code.error_goto(self.pos))
             code.putln("}")