summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2020-09-30 18:32:03 -0600
committerCharles Harris <charlesr.harris@gmail.com>2020-10-01 07:30:11 -0600
commit247245ebec0513ba1450900024db2691698f20f4 (patch)
tree297fb434ef4cfb1bde6ea1bbf9f2a86d2606d50a
parentd79cbd8c1c818d9135e1d3b69526d7f04f259922 (diff)
downloadnumpy-247245ebec0513ba1450900024db2691698f20f4.tar.gz
MAINT: Replace PyUString_ConcatAndDel in ufunc_object.c.
-rw-r--r--numpy/core/src/umath/ufunc_object.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/numpy/core/src/umath/ufunc_object.c b/numpy/core/src/umath/ufunc_object.c
index f693eb5c2..8660ee413 100644
--- a/numpy/core/src/umath/ufunc_object.c
+++ b/numpy/core/src/umath/ufunc_object.c
@@ -5977,6 +5977,7 @@ _typecharfromnum(int num) {
return ret;
}
+
static PyObject *
ufunc_get_doc(PyUFuncObject *ufunc)
{
@@ -5997,18 +5998,18 @@ ufunc_get_doc(PyUFuncObject *ufunc)
* introspection on name and nin + nout to automate the first part
* of it the doc string shouldn't need the calling convention
*/
- doc = PyObject_CallFunctionObjArgs(
- _sig_formatter, (PyObject *)ufunc, NULL);
+ doc = PyObject_CallFunctionObjArgs(_sig_formatter,
+ (PyObject *)ufunc, NULL);
if (doc == NULL) {
return NULL;
}
if (ufunc->doc != NULL) {
- PyUString_ConcatAndDel(&doc,
- PyUnicode_FromFormat("\n\n%s", ufunc->doc));
+ Py_SETREF(doc, PyUnicode_FromFormat("%S\n\n%s", doc, ufunc->doc));
}
return doc;
}
+
static PyObject *
ufunc_get_nin(PyUFuncObject *ufunc)
{