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

Merge branch '0.29.x'

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