summaryrefslogtreecommitdiff
path: root/Python/codecs.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-12-05 17:04:32 +0100
committerVictor Stinner <victor.stinner@gmail.com>2016-12-05 17:04:32 +0100
commit7bfb42d5b7721ca26e33050d025fec5c43c00058 (patch)
treec1c91a2a34361474de2c02388c8f91d4333f2ea5 /Python/codecs.c
parentd77e5b7211e8daf22f2b3e0df124393bca504c38 (diff)
downloadcpython-git-7bfb42d5b7721ca26e33050d025fec5c43c00058.tar.gz
Issue #28858: Remove _PyObject_CallArg1() macro
Replace _PyObject_CallArg1(func, arg) with PyObject_CallFunctionObjArgs(func, arg, NULL) Using the _PyObject_CallArg1() macro increases the usage of the C stack, which was unexpected and unwanted. PyObject_CallFunctionObjArgs() doesn't have this issue.
Diffstat (limited to 'Python/codecs.c')
-rw-r--r--Python/codecs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/codecs.c b/Python/codecs.c
index 55f6ca85e3..688a40bd6f 100644
--- a/Python/codecs.c
+++ b/Python/codecs.c
@@ -322,7 +322,7 @@ PyObject *codec_getstreamcodec(const char *encoding,
if (errors != NULL)
streamcodec = PyObject_CallFunction(codeccls, "Os", stream, errors);
else
- streamcodec = _PyObject_CallArg1(codeccls, stream);
+ streamcodec = PyObject_CallFunctionObjArgs(codeccls, stream, NULL);
Py_DECREF(codecs);
return streamcodec;
}