Commit 033344ce authored by Stefan Behnel's avatar Stefan Behnel

make missing PyObject_ASCII() function sort-of available in Py2 (to be used by f-strings)

parent faa9ed0a
...@@ -133,6 +133,10 @@ ...@@ -133,6 +133,10 @@
#define __Pyx_PyString_Format(a, b) PyString_Format(a, b) #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
#endif #endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
#define PyObject_ASCII(o) PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3 #if PY_MAJOR_VERSION >= 3
#define PyBaseString_Type PyUnicode_Type #define PyBaseString_Type PyUnicode_Type
#define PyStringObject PyUnicodeObject #define PyStringObject PyUnicodeObject
......
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