debian/patches/python3-PyUnicode_EncodeRawUnicodeEscape-fix-1042977
raw| 1 | --- a/plugins/cfpython/cjson.c |
| 2 | +++ b/plugins/cfpython/cjson.c |
| 3 | @@ -1260,13 +1260,7 @@ |
| 4 | return NULL; |
| 5 | |
| 6 | if (PyUnicode_Check(string)) { |
| 7 | -#ifdef IS_PY3K |
| 8 | - /* HACK: Workaround for crash bug in Python3's PyUnicode_AsRawUnicodeEscapeString... */ |
| 9 | - str = PyUnicode_EncodeRawUnicodeEscape(PyUnicode_AS_UNICODE(string), |
| 10 | - PyUnicode_GET_SIZE(string)); |
| 11 | -#else |
| 12 | str = PyUnicode_AsRawUnicodeEscapeString(string); |
| 13 | -#endif |
| 14 | if (str == NULL) { |
| 15 | return NULL; |
| 16 | } |