From 96fde4d1551ee7e0ea32c77039769cf2b3a051a7 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sat, 11 May 2013 07:31:02 +0200 Subject: [PATCH] use new Py3.x signature for PyUnicode_DecodeMBCSStateful() declaration --- Cython/Includes/cpython/unicode.pxd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cython/Includes/cpython/unicode.pxd b/Cython/Includes/cpython/unicode.pxd index 97452c6..350fdf9 100644 --- a/Cython/Includes/cpython/unicode.pxd +++ b/Cython/Includes/cpython/unicode.pxd @@ -377,7 +377,8 @@ cdef extern from *: # consumed is not NULL, PyUnicode_DecodeMBCSStateful() will not # decode trailing lead byte and the number of bytes that have been # decoded will be stored in consumed. New in version 2.5. - object PyUnicode_DecodeMBCSStateful(char *s, int size, char *errors, int *consumed) + # NOTE: Python 2.x uses 'int' values for 'size' and 'consumed' (changed in 3.0) + object PyUnicode_DecodeMBCSStateful(char *s, Py_ssize_t size, char *errors, Py_ssize_t *consumed) # Encode the Py_UNICODE buffer of the given size using MBCS and # return a Python string object. Return NULL if an exception was -- 2.7.4