This commit is contained in:
Kovid Goyal 2019-04-02 10:37:41 +05:30
parent ffb5160f3c
commit 6272e4db9d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -208,6 +208,7 @@ static PyObject *unicode_to_number(PyObject *src) {
const char *utf8_data;
#if PY_MAJOR_VERSION >= 3
utf8_data = PyUnicode_AsUTF8(src);
if (!utf8_data) return NULL;
#else
PyObject *utf_8_temp = PyUnicode_AsUTF8String(src);
if (utf_8_temp == NULL) return NULL;