Author: Matti Picus <matti.pi...@gmail.com> Branch: Changeset: r92120:4b21dcb59a60 Date: 2017-08-10 23:36 +0300 http://bitbucket.org/pypy/pypy/changeset/4b21dcb59a60/
Log: char * -> const char *, fixes issue #2626 diff --git a/pypy/module/cpyext/unicodeobject.py b/pypy/module/cpyext/unicodeobject.py --- a/pypy/module/cpyext/unicodeobject.py +++ b/pypy/module/cpyext/unicodeobject.py @@ -520,7 +520,7 @@ if sys.platform == 'win32': make_conversion_functions('MBCS', 'mbcs') -@cpython_api([rffi.CCHARP, Py_ssize_t, CONST_STRING, rffi.INTP], PyObject) +@cpython_api([CONST_STRING, Py_ssize_t, CONST_STRING, rffi.INTP], PyObject) def PyUnicode_DecodeUTF16(space, s, size, llerrors, pbyteorder): """Decode length bytes from a UTF-16 encoded buffer string and return the corresponding Unicode object. errors (if non-NULL) defines the error @@ -574,7 +574,7 @@ return space.newunicode(result) -@cpython_api([rffi.CCHARP, Py_ssize_t, rffi.CCHARP, rffi.INTP], PyObject) +@cpython_api([CONST_STRING, Py_ssize_t, CONST_STRING, rffi.INTP], PyObject) def PyUnicode_DecodeUTF32(space, s, size, llerrors, pbyteorder): """Decode length bytes from a UTF-32 encoded buffer string and return the corresponding Unicode object. errors (if non-NULL) @@ -630,7 +630,7 @@ return space.newunicode(result) -@cpython_api([rffi.CWCHARP, Py_ssize_t, rffi.CCHARP, rffi.CCHARP], +@cpython_api([rffi.CWCHARP, Py_ssize_t, rffi.CCHARP, CONST_STRING], rffi.INT_real, error=-1) def PyUnicode_EncodeDecimal(space, s, length, output, llerrors): """Takes a Unicode string holding a decimal value and writes it _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit