mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
bpo-37483: add _PyObject_CallOneArg() function (#14558)
This commit is contained in:
parent
9d40554e0d
commit
196a530e00
44 changed files with 128 additions and 146 deletions
|
@ -1962,7 +1962,7 @@ struct_get_unpacker(const char *fmt, Py_ssize_t itemsize)
|
|||
if (format == NULL)
|
||||
goto error;
|
||||
|
||||
structobj = PyObject_CallFunctionObjArgs(Struct, format, NULL);
|
||||
structobj = _PyObject_CallOneArg(Struct, format);
|
||||
if (structobj == NULL)
|
||||
goto error;
|
||||
|
||||
|
@ -2001,7 +2001,7 @@ struct_unpack_single(const char *ptr, struct unpacker *x)
|
|||
PyObject *v;
|
||||
|
||||
memcpy(x->item, ptr, x->itemsize);
|
||||
v = PyObject_CallFunctionObjArgs(x->unpack_from, x->mview, NULL);
|
||||
v = _PyObject_CallOneArg(x->unpack_from, x->mview);
|
||||
if (v == NULL)
|
||||
return NULL;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue