Commit 80579d55 authored by Vitja Makarov's avatar Vitja Makarov

Set cyfunction's func_doc attribute through temp var, thanks to Stefan

parent 5cde8bc9
...@@ -8763,16 +8763,13 @@ __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) ...@@ -8763,16 +8763,13 @@ __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure)
static int static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value) __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
{ {
if (value == NULL) { PyObject *tmp = op->func_doc;
Py_XDECREF(op->func_doc); if (value == NULL)
Py_INCREF(Py_None);
op->func_doc = Py_None; /* Mark as deleted */ op->func_doc = Py_None; /* Mark as deleted */
} else { else
PyObject *tmp = op->func_doc;
op->func_doc = value; op->func_doc = value;
Py_INCREF(value); Py_INCREF(op->func_doc);
Py_XDECREF(tmp); Py_XDECREF(tmp);
}
return 0; return 0;
} }
......
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