Commit 659b7413 authored by Stefan Behnel's avatar Stefan Behnel

work around missing C-API function PyBytes_FromFormat() in pypy3

parent 9fa412f2
...@@ -1101,8 +1101,12 @@ static void __Pyx_Coroutine_check_and_dealloc(PyObject *self) { ...@@ -1101,8 +1101,12 @@ static void __Pyx_Coroutine_check_and_dealloc(PyObject *self) {
#if PY_VERSION_HEX >= 0x03030000 || defined(PyErr_WarnFormat) #if PY_VERSION_HEX >= 0x03030000 || defined(PyErr_WarnFormat)
PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname); PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname);
#else #else
PyObject *msg, *qualname; PyObject *msg;
char *cname, *cmsg; char *cname, *cmsg;
#if CYTHON_COMPILING_IN_PYPY
msg = NULL;
#else
PyObject *qualname;
#if PY_MAJOR_VERSION >= 3 #if PY_MAJOR_VERSION >= 3
qualname = PyUnicode_AsUTF8String(gen->gi_qualname); qualname = PyUnicode_AsUTF8String(gen->gi_qualname);
if (likely(qualname)) { if (likely(qualname)) {
...@@ -1122,6 +1126,7 @@ static void __Pyx_Coroutine_check_and_dealloc(PyObject *self) { ...@@ -1122,6 +1126,7 @@ static void __Pyx_Coroutine_check_and_dealloc(PyObject *self) {
#if PY_MAJOR_VERSION >= 3 #if PY_MAJOR_VERSION >= 3
Py_XDECREF(qualname); Py_XDECREF(qualname);
#endif #endif
#endif
if (unlikely(!msg)) { if (unlikely(!msg)) {
PyErr_Clear(); PyErr_Clear();
......
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