Commit 02a6a713 authored by Stefan Behnel's avatar Stefan Behnel

Fix unicode iteration in the limited C-API.

parent df88d3aa
...@@ -675,10 +675,11 @@ static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, ...@@ -675,10 +675,11 @@ static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict,
#define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_READY(op) (0)
#define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GetLength(u) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GetLength(u)
#define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
#define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) (1114111) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111)
//#define __Pyx_PyUnicode_KIND(u) /* not available */ #define __Pyx_PyUnicode_KIND(u) ((void)u, (0))
//#define __Pyx_PyUnicode_DATA(u) /* not available */ // __Pyx_PyUnicode_DATA() and __Pyx_PyUnicode_READ() must go together, e.g. for iteration.
//#define __Pyx_PyUnicode_READ(k, d, i) /* not available */ #define __Pyx_PyUnicode_DATA(u) ((void*)u)
#define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
//#define __Pyx_PyUnicode_WRITE(k, d, i, ch) /* not available */ //#define __Pyx_PyUnicode_WRITE(k, d, i, ch) /* not available */
#define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u))
#elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment