Commit 8c7c5a47 authored by Stefan Behnel's avatar Stefan Behnel

Merge branch '0.29.x'

parents ce0806ec b3c2e0d6
......@@ -116,8 +116,6 @@ Features added
* The Pythran ``shape`` attribute is supported.
Patch by Serge Guelton. (Github issue #3307)
* The ``@cython.binding`` decorator is available in Python code.
Bugs fixed
----------
......@@ -130,10 +128,6 @@ Bugs fixed
``cython.locals()``.
Patch by David Woods. (Github issues #3391, #3142)
* Creating a fused function attached it to the garbage collector before it
was fully initialised, thus risking crashes in rare failure cases.
Original patch by achernomorov. (Github issue #3215)
* Diverging from the usual behaviour, ``len(memoryview)``, ``len(char*)``
and ``len(Py_UNICODE*)`` returned an unsigned ``size_t`` value. They now
return a signed ``Py_ssize_t``, like other usages of ``len()``.
......@@ -246,10 +240,15 @@ Features added
Patch by Omer Ozarslan. (Github issue #2169)
* The ``@cython.binding`` decorator is available in Python code.
(Github issue #3505)
Bugs fixed
----------
* Creating a fused function attached it to the garbage collector before it
was fully initialised, thus risking crashes in rare failure cases.
Original patch by achernomorov. (Github issue #3215)
* The compilation cache in ``cython.inline("…")`` failed to take the language
level into account.
Patch by will-ca. (Github issue #3419)
......
......@@ -1156,7 +1156,6 @@ __pyx_FusedFunction_getitem(__pyx_FusedFunctionObject *self, PyObject *idx)
if (PyTuple_Check(idx)) {
PyObject *list = PyList_New(0);
Py_ssize_t n = PyTuple_GET_SIZE(idx);
PyObject *string = NULL;
PyObject *sep = NULL;
int i;
......@@ -1164,19 +1163,21 @@ __pyx_FusedFunction_getitem(__pyx_FusedFunctionObject *self, PyObject *idx)
return NULL;
for (i = 0; i < n; i++) {
int ret;
PyObject *string;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
PyObject *item = PyTuple_GET_ITEM(idx, i);
#else
PyObject *item = PySequence_ITEM(idx, i); if (unlikely(!item)) goto __pyx_error;
PyObject *item = PySequence_ITEM(idx, i); if (unlikely(!item)) goto __pyx_err;
#endif
string = _obj_to_str(item);
#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
Py_DECREF(item);
#endif
if (unlikely(!string) || unlikely(PyList_Append(list, string) < 0))
goto __pyx_err;
if (unlikely(!string)) goto __pyx_err;
ret = PyList_Append(list, string);
Py_DECREF(string);
if (unlikely(ret < 0)) goto __pyx_err;
}
sep = PyUnicode_FromString("|");
......
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