mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
Avoid calling functions with an empty string as format string
Directly pass NULL rather than an empty string.
This commit is contained in:
parent
ad8c83ad6b
commit
3466bde1cc
13 changed files with 34 additions and 34 deletions
|
|
@ -2137,7 +2137,7 @@ _make_call(void *callable)
|
|||
PyObject *rc;
|
||||
int success;
|
||||
PyGILState_STATE s = PyGILState_Ensure();
|
||||
rc = PyObject_CallFunction((PyObject *)callable, "");
|
||||
rc = _PyObject_CallNoArg((PyObject *)callable);
|
||||
success = (rc != NULL);
|
||||
Py_XDECREF(rc);
|
||||
PyGILState_Release(s);
|
||||
|
|
@ -3406,7 +3406,7 @@ temporary_c_thread(void *data)
|
|||
/* Allocate a Python thread state for this thread */
|
||||
state = PyGILState_Ensure();
|
||||
|
||||
res = PyObject_CallFunction(test_c_thread->callback, "", NULL);
|
||||
res = _PyObject_CallNoArg(test_c_thread->callback);
|
||||
Py_CLEAR(test_c_thread->callback);
|
||||
|
||||
if (res == NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue