summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_asynciomodule.c12
-rw-r--r--Modules/_ctypes/_ctypes.c8
-rw-r--r--Modules/_ctypes/stgdict.c2
-rw-r--r--Modules/_decimal/_decimal.c16
-rw-r--r--Modules/_functoolsmodule.c2
-rw-r--r--Modules/_testcapimodule.c2
-rw-r--r--Modules/main.c2
7 files changed, 22 insertions, 22 deletions
diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c
index ea02a5e9c0..67794c3fa5 100644
--- a/Modules/_asynciomodule.c
+++ b/Modules/_asynciomodule.c
@@ -141,7 +141,7 @@ future_init(FutureObj *fut, PyObject *loop)
_Py_IDENTIFIER(get_debug);
if (loop == NULL || loop == Py_None) {
- loop = PyObject_CallObject(asyncio_get_event_loop, NULL);
+ loop = _PyObject_CallNoArg(asyncio_get_event_loop);
if (loop == NULL) {
return -1;
}
@@ -158,7 +158,7 @@ future_init(FutureObj *fut, PyObject *loop)
}
if (PyObject_IsTrue(res)) {
Py_CLEAR(res);
- fut->fut_source_tb = PyObject_CallObject(traceback_extract_stack, NULL);
+ fut->fut_source_tb = _PyObject_CallNoArg(traceback_extract_stack);
if (fut->fut_source_tb == NULL) {
return -1;
}
@@ -204,7 +204,7 @@ future_set_exception(FutureObj *fut, PyObject *exc)
}
if (PyExceptionClass_Check(exc)) {
- exc_val = PyObject_CallObject(exc, NULL);
+ exc_val = _PyObject_CallNoArg(exc);
if (exc_val == NULL) {
return NULL;
}
@@ -1429,7 +1429,7 @@ _asyncio_Task_current_task_impl(PyTypeObject *type, PyObject *loop)
PyObject *res;
if (loop == NULL) {
- loop = PyObject_CallObject(asyncio_get_event_loop, NULL);
+ loop = _PyObject_CallNoArg(asyncio_get_event_loop);
if (loop == NULL) {
return NULL;
}
@@ -1514,7 +1514,7 @@ _asyncio_Task_all_tasks_impl(PyTypeObject *type, PyObject *loop)
PyObject *res;
if (loop == NULL) {
- loop = PyObject_CallObject(asyncio_get_event_loop, NULL);
+ loop = _PyObject_CallNoArg(asyncio_get_event_loop);
if (loop == NULL) {
return NULL;
}
@@ -2387,7 +2387,7 @@ module_init(void)
WITH_MOD("weakref")
GET_MOD_ATTR(cls, "WeakSet")
- all_tasks = PyObject_CallObject(cls, NULL);
+ all_tasks = _PyObject_CallNoArg(cls);
Py_CLEAR(cls);
if (all_tasks == NULL) {
goto fail;
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c
index 0a9201e3f4..5048d9c544 100644
--- a/Modules/_ctypes/_ctypes.c
+++ b/Modules/_ctypes/_ctypes.c
@@ -211,7 +211,7 @@ PyDict_SetItemProxy(PyObject *dict, PyObject *key, PyObject *item)
PyObject *proxy;
int result;
- obj = PyObject_CallObject((PyObject *)&DictRemover_Type, NULL);
+ obj = _PyObject_CallNoArg((PyObject *)&DictRemover_Type);
if (obj == NULL)
return -1;
@@ -373,7 +373,7 @@ StructUnionType_new(PyTypeObject *type, PyObject *args, PyObject *kwds, int isSt
if (PyDict_GetItemString(result->tp_dict, "_abstract_"))
return (PyObject *)result;
- dict = (StgDictObject *)PyObject_CallObject((PyObject *)&PyCStgDict_Type, NULL);
+ dict = (StgDictObject *)_PyObject_CallNoArg((PyObject *)&PyCStgDict_Type);
if (!dict) {
Py_DECREF(result);
return NULL;
@@ -3654,10 +3654,10 @@ _build_callargs(PyCFuncPtrObject *self, PyObject *argtypes,
goto error;
}
if (PyCArrayTypeObject_Check(ob))
- ob = PyObject_CallObject(ob, NULL);
+ ob = _PyObject_CallNoArg(ob);
else
/* Create an instance of the pointed-to type */
- ob = PyObject_CallObject(dict->proto, NULL);
+ ob = _PyObject_CallNoArg(dict->proto);
/*
XXX Is the following correct any longer?
We must not pass a byref() to the array then but
diff --git a/Modules/_ctypes/stgdict.c b/Modules/_ctypes/stgdict.c
index 53cfa79864..1ccaf2fd9b 100644
--- a/Modules/_ctypes/stgdict.c
+++ b/Modules/_ctypes/stgdict.c
@@ -228,7 +228,7 @@ MakeFields(PyObject *type, CFieldObject *descr,
}
continue;
}
- new_descr = (CFieldObject *)PyObject_CallObject((PyObject *)&PyCField_Type, NULL);
+ new_descr = (CFieldObject *)_PyObject_CallNoArg((PyObject *)&PyCField_Type);
if (new_descr == NULL) {
Py_DECREF(fdescr);
Py_DECREF(fieldlist);
diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c
index 9956786339..9797089538 100644
--- a/Modules/_decimal/_decimal.c
+++ b/Modules/_decimal/_decimal.c
@@ -1194,13 +1194,13 @@ context_new(PyTypeObject *type, PyObject *args UNUSED, PyObject *kwds UNUSED)
return NULL;
}
- self->traps = PyObject_CallObject((PyObject *)PyDecSignalDict_Type, NULL);
+ self->traps = _PyObject_CallNoArg((PyObject *)PyDecSignalDict_Type);
if (self->traps == NULL) {
self->flags = NULL;
Py_DECREF(self);
return NULL;
}
- self->flags = PyObject_CallObject((PyObject *)PyDecSignalDict_Type, NULL);
+ self->flags = _PyObject_CallNoArg((PyObject *)PyDecSignalDict_Type);
if (self->flags == NULL) {
Py_DECREF(self);
return NULL;
@@ -1395,7 +1395,7 @@ ieee_context(PyObject *dummy UNUSED, PyObject *v)
goto error;
}
- context = PyObject_CallObject((PyObject *)&PyDecContext_Type, NULL);
+ context = _PyObject_CallNoArg((PyObject *)&PyDecContext_Type);
if (context == NULL) {
return NULL;
}
@@ -1417,7 +1417,7 @@ context_copy(PyObject *self, PyObject *args UNUSED)
{
PyObject *copy;
- copy = PyObject_CallObject((PyObject *)&PyDecContext_Type, NULL);
+ copy = _PyObject_CallNoArg((PyObject *)&PyDecContext_Type);
if (copy == NULL) {
return NULL;
}
@@ -5835,7 +5835,7 @@ PyInit__decimal(void)
/* Init default context template first */
ASSIGN_PTR(default_context_template,
- PyObject_CallObject((PyObject *)&PyDecContext_Type, NULL));
+ _PyObject_CallNoArg((PyObject *)&PyDecContext_Type));
Py_INCREF(default_context_template);
CHECK_INT(PyModule_AddObject(m, "DefaultContext",
default_context_template));
@@ -5843,7 +5843,7 @@ PyInit__decimal(void)
#ifdef WITHOUT_THREADS
/* Init module context */
ASSIGN_PTR(module_context,
- PyObject_CallObject((PyObject *)&PyDecContext_Type, NULL));
+ _PyObject_CallNoArg((PyObject *)&PyDecContext_Type));
Py_INCREF(Py_False);
CHECK_INT(PyModule_AddObject(m, "HAVE_THREADS", Py_False));
#else
@@ -5854,7 +5854,7 @@ PyInit__decimal(void)
/* Init basic context template */
ASSIGN_PTR(basic_context_template,
- PyObject_CallObject((PyObject *)&PyDecContext_Type, NULL));
+ _PyObject_CallNoArg((PyObject *)&PyDecContext_Type));
init_basic_context(basic_context_template);
Py_INCREF(basic_context_template);
CHECK_INT(PyModule_AddObject(m, "BasicContext",
@@ -5862,7 +5862,7 @@ PyInit__decimal(void)
/* Init extended context template */
ASSIGN_PTR(extended_context_template,
- PyObject_CallObject((PyObject *)&PyDecContext_Type, NULL));
+ _PyObject_CallNoArg((PyObject *)&PyDecContext_Type));
init_extended_context(extended_context_template);
Py_INCREF(extended_context_template);
CHECK_INT(PyModule_AddObject(m, "ExtendedContext",
diff --git a/Modules/_functoolsmodule.c b/Modules/_functoolsmodule.c
index 2269d05da8..19ca65becc 100644
--- a/Modules/_functoolsmodule.c
+++ b/Modules/_functoolsmodule.c
@@ -1246,7 +1246,7 @@ PyInit__functools(void)
if (m == NULL)
return NULL;
- kwd_mark = PyObject_CallObject((PyObject *)&PyBaseObject_Type, NULL);
+ kwd_mark = _PyObject_CallNoArg((PyObject *)&PyBaseObject_Type);
if (!kwd_mark) {
Py_DECREF(m);
return NULL;
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index 8ad54dd4f1..06e6ebe386 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -2277,7 +2277,7 @@ static int _pending_callback(void *arg)
{
/* we assume the argument is callable object to which we own a reference */
PyObject *callable = (PyObject *)arg;
- PyObject *r = PyObject_CallObject(callable, NULL);
+ PyObject *r = _PyObject_CallNoArg(callable);
Py_DECREF(callable);
Py_XDECREF(r);
return r != NULL ? 0 : -1;
diff --git a/Modules/main.c b/Modules/main.c
index d75f64a65f..8691d153d7 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -157,7 +157,7 @@ static void RunInteractiveHook(void)
if (hook == NULL)
PyErr_Clear();
else {
- result = PyObject_CallObject(hook, NULL);
+ result = _PyObject_CallNoArg(hook);
Py_DECREF(hook);
if (result == NULL)
goto error;