FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-29548: no longer use PyEval_Call* functions by jdemeyer · Pull Request #14683 · python/cpython · GitHub

/ cpython Public
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .c  (4) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
2 changes: 1 addition & 1 deletion Modules/pyexpat.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ call_with_frame(const char *funcname, int lineno, PyObject* func, PyObject* args
{
PyObject *res;

res = PyEval_CallObject(func, args);
res = PyObject_Call(func, args, NULL);
if (res == NULL) {
_PyTraceback_Add(funcname, __FILE__, lineno);
XML_StopParser(self->itself, XML_FALSE);
Expand Down
3 changes: 1 addition & 2 deletions Modules/signalmodule.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -1667,8 +1667,7 @@ _PyErr_CheckSignals(void)
_Py_atomic_store_relaxed(&Handlers[i].tripped, 0);

if (arglist) {
result = PyEval_CallObject(Handlers[i].func,
arglist);
result = PyObject_Call(Handlers[i].func, arglist, NULL);
Py_DECREF(arglist);
}
if (!result) {
Expand Down
11 changes: 10 additions & 1 deletion Objects/call.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,16 @@ PyEval_CallObjectWithKeywords(PyObject *callable,
PyObject *
PyObject_CallObject(PyObject *callable, PyObject *args)
{
return PyEval_CallObjectWithKeywords(callable, args, NULL);
assert(!PyErr_Occurred());
if (args == NULL) {
return _PyObject_CallNoArg(callable);
}
if (!PyTuple_Check(args)) {
PyErr_SetString(PyExc_TypeError,
"argument list must be a tuple");
return NULL;
}
return PyObject_Call(callable, args, NULL);
}


Expand Down
4 changes: 2 additions & 2 deletions Python/codecs.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ _PyCodec_EncodeInternal(PyObject *object,
if (args == NULL)
goto onError;

result = PyEval_CallObject(encoder, args);
result = PyObject_Call(encoder, args, NULL);
if (result == NULL) {
wrap_codec_error("encoding", encoding);
goto onError;
Expand Down Expand Up @@ -462,7 +462,7 @@ _PyCodec_DecodeInternal(PyObject *object,
if (args == NULL)
goto onError;

result = PyEval_CallObject(decoder,args);
result = PyObject_Call(decoder, args, NULL);
if (result == NULL) {
wrap_codec_error("decoding", encoding);
goto onError;
Expand Down

Back | FazBrowse Home | New Git URL