Commit 86f14e2b authored by Stefan Behnel's avatar Stefan Behnel

undo Py3.3 surrogates support fixes - breaks too many special cases with strings

parent db2166de
......@@ -17,11 +17,7 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
while (t->p) {
#if PY_MAJOR_VERSION < 3
if (t->is_unicode) {
#if CYTHON_COMPILING_IN_PYPY
*t->p = PyUnicode_Decode(t->s, t->n - 1, "unicode-escape", NULL);
#else
*t->p = PyUnicode_DecodeUnicodeEscape(t->s, t->n - 1, NULL);
#endif
} else if (t->intern) {
*t->p = PyString_InternFromString(t->s);
} else {
......@@ -32,11 +28,7 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
if (unlikely(t->encoding)) {
*t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
} else {
#if CYTHON_COMPILING_IN_PYPY
*t->p = PyUnicode_Decode(t->s, t->n - 1, "unicode-escape", NULL);
#else
*t->p = PyUnicode_DecodeUnicodeEscape(t->s, t->n - 1, NULL);
#endif
}
if (t->intern && likely(*t->p)) {
PyUnicode_InternInPlace(t->p);
......
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