Python 3: Fix a string function
This commit is contained in:
parent
a4b1749c3c
commit
70b9d765bc
|
@ -24,7 +24,7 @@ typedef int Py_ssize_t;
|
|||
|
||||
// Python 3 has removed PyString and related functions, in favor of PyBytes & PyUnicode.
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
#define PyString_AsString PyUnicode_AsUnicode
|
||||
#define PyString_AsString PyUnicode_AsUTF8
|
||||
#define PyString_Check PyUnicode_Check
|
||||
#define PyString_FromFormat PyUnicode_FromFormat
|
||||
#define PyString_FromString PyUnicode_FromString
|
||||
|
|
Loading…
Reference in New Issue