Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.2k
bpo-29548: Fix some inefficient call API usage#97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -2417,7 +2417,7 @@ PythonCmd(ClientData clientData, Tcl_Interp *interp, int argc, const char *argv[ | ||
} | ||
PyTuple_SET_ITEM(arg, i, s); | ||
} | ||
res =PyObject_Call(func, arg, NULL); | ||
Py_DECREF(arg); | ||
if (res == NULL) | ||
@@ -2661,16 +2661,13 @@ static void | ||
FileHandler(ClientData clientData, int mask) | ||
{ | ||
FileHandler_ClientData *data = (FileHandler_ClientData *)clientData; | ||
PyObject *func, *file, *res; | ||
ENTER_PYTHON | ||
func = data->func; | ||
file = data->file; | ||
res = PyObject_CallFunction(func, "Oi", file, mask); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. arg variable is no more used and can be removed, no? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Thank you. I missed it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more.
Right, I spotted it as well, but then I forgot to report it, sorry :-) Hopefully you fixed it! | ||
if (res == NULL) { | ||
errorInCmd = 1; | ||
PyErr_Fetch(&excInCmd, &valInCmd, &trbInCmd); | ||
@@ -2840,7 +2837,7 @@ TimerHandler(ClientData clientData) | ||
ENTER_PYTHON | ||
res= _PyObject_CallNoArg(func); | ||
Py_DECREF(func); | ||
Py_DECREF(v); /* See Tktt_New() */ | ||