mirror of
https://github.com/python/cpython.git
synced 2026-03-06 13:00:50 +00:00
bpo-37493: use _PyObject_CallNoArg in more places (GH-14575)
This commit is contained in:
parent
196a530e00
commit
7f41c8e0dd
6 changed files with 15 additions and 16 deletions
|
|
@ -1001,8 +1001,8 @@ PyCPointerType_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
|||
stgdict items size, align, length contain info about pointers itself,
|
||||
stgdict->proto has info about the pointed to type!
|
||||
*/
|
||||
stgdict = (StgDictObject *)PyObject_CallObject(
|
||||
(PyObject *)&PyCStgDict_Type, NULL);
|
||||
stgdict = (StgDictObject *)_PyObject_CallNoArg(
|
||||
(PyObject *)&PyCStgDict_Type);
|
||||
if (!stgdict)
|
||||
return NULL;
|
||||
stgdict->size = sizeof(void *);
|
||||
|
|
@ -1489,8 +1489,8 @@ PyCArrayType_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
|||
goto error;
|
||||
}
|
||||
|
||||
stgdict = (StgDictObject *)PyObject_CallObject(
|
||||
(PyObject *)&PyCStgDict_Type, NULL);
|
||||
stgdict = (StgDictObject *)_PyObject_CallNoArg(
|
||||
(PyObject *)&PyCStgDict_Type);
|
||||
if (!stgdict)
|
||||
goto error;
|
||||
|
||||
|
|
@ -1946,8 +1946,8 @@ static PyObject *CreateSwappedType(PyTypeObject *type, PyObject *args, PyObject
|
|||
if (result == NULL)
|
||||
return NULL;
|
||||
|
||||
stgdict = (StgDictObject *)PyObject_CallObject(
|
||||
(PyObject *)&PyCStgDict_Type, NULL);
|
||||
stgdict = (StgDictObject *)_PyObject_CallNoArg(
|
||||
(PyObject *)&PyCStgDict_Type);
|
||||
if (!stgdict) {
|
||||
Py_DECREF(result);
|
||||
return NULL;
|
||||
|
|
@ -2060,8 +2060,8 @@ PyCSimpleType_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
|||
goto error;
|
||||
}
|
||||
|
||||
stgdict = (StgDictObject *)PyObject_CallObject(
|
||||
(PyObject *)&PyCStgDict_Type, NULL);
|
||||
stgdict = (StgDictObject *)_PyObject_CallNoArg(
|
||||
(PyObject *)&PyCStgDict_Type);
|
||||
if (!stgdict)
|
||||
goto error;
|
||||
|
||||
|
|
@ -2454,8 +2454,8 @@ PyCFuncPtrType_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
|||
PyTypeObject *result;
|
||||
StgDictObject *stgdict;
|
||||
|
||||
stgdict = (StgDictObject *)PyObject_CallObject(
|
||||
(PyObject *)&PyCStgDict_Type, NULL);
|
||||
stgdict = (StgDictObject *)_PyObject_CallNoArg(
|
||||
(PyObject *)&PyCStgDict_Type);
|
||||
if (!stgdict)
|
||||
return NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -60,8 +60,7 @@ PyCField_FromDesc(PyObject *desc, Py_ssize_t index,
|
|||
#define CONT_BITFIELD 2
|
||||
#define EXPAND_BITFIELD 3
|
||||
|
||||
self = (CFieldObject *)PyObject_CallObject((PyObject *)&PyCField_Type,
|
||||
NULL);
|
||||
self = (CFieldObject *)_PyObject_CallNoArg((PyObject *)&PyCField_Type);
|
||||
if (self == NULL)
|
||||
return NULL;
|
||||
dict = PyType_stgdict(desc);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue