[mypyc] Use PyObject_CallNoArgs and PyObject_CallOneArg instead of PyObject_CallFunctionObjArgs by 97littleleaf11 · Pull Request #12862 · python/mypy · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mypyc/lib-rt/exc_ops.c
4 changes: 2 additions & 2 deletions mypyc/lib-rt/misc_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ int CPy_YieldFromErrorHandle(PyObject *iter, PyObject **outp)
if (PyErr_GivenExceptionMatches(exc_type, PyExc_GeneratorExit)) {
_m = _PyObject_GetAttrId(iter, &PyId_close);
if (_m) {
res = PyObject_CallFunctionObjArgs(_m, NULL);
res = PyObject_CallNoArgs(_m);
Py_DECREF(_m);
if (!res)
return 2;
Expand Down Expand Up @@ -360,7 +360,7 @@ CPyDataclass_SleightOfHand(PyObject *dataclass_dec, PyObject *tp,
}

/* Run the @dataclass descriptor */
res = PyObject_CallFunctionObjArgs(dataclass_dec, tp, NULL);
res = PyObject_CallOneArg(dataclass_dec, tp);
if (!res) {
goto fail;
}
Expand Down
8 changes: 2 additions & 6 deletions mypyc/lib-rt/pythonsupport.h