mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-142217: Remove internal _Py_Identifier functions (#142219)
Remove internal functions: * _PyDict_ContainsId() * _PyDict_DelItemId() * _PyDict_GetItemIdWithError() * _PyDict_SetItemId() * _PyEval_GetBuiltinId() * _PyObject_CallMethodIdNoArgs() * _PyObject_CallMethodIdObjArgs() * _PyObject_CallMethodIdOneArg() * _PyObject_VectorcallMethodId() * _PyUnicode_EqualToASCIIId() These functions were not exported and so no usable outside CPython.
This commit is contained in:
parent
4172644d78
commit
7e5fcae09b
9 changed files with 0 additions and 172 deletions
|
|
@ -891,39 +891,6 @@ PyObject_CallMethodObjArgs(PyObject *obj, PyObject *name, ...)
|
|||
}
|
||||
|
||||
|
||||
PyObject *
|
||||
_PyObject_CallMethodIdObjArgs(PyObject *obj, _Py_Identifier *name, ...)
|
||||
{
|
||||
PyThreadState *tstate = _PyThreadState_GET();
|
||||
if (obj == NULL || name == NULL) {
|
||||
return null_error(tstate);
|
||||
}
|
||||
|
||||
PyObject *oname = _PyUnicode_FromId(name); /* borrowed */
|
||||
if (!oname) {
|
||||
return NULL;
|
||||
}
|
||||
_PyCStackRef method;
|
||||
_PyThreadState_PushCStackRef(tstate, &method);
|
||||
int is_method = _PyObject_GetMethodStackRef(tstate, obj, oname, &method.ref);
|
||||
if (PyStackRef_IsNull(method.ref)) {
|
||||
_PyThreadState_PopCStackRef(tstate, &method);
|
||||
return NULL;
|
||||
}
|
||||
PyObject *callable = PyStackRef_AsPyObjectBorrow(method.ref);
|
||||
|
||||
obj = is_method ? obj : NULL;
|
||||
|
||||
va_list vargs;
|
||||
va_start(vargs, name);
|
||||
PyObject *result = object_vacall(tstate, obj, callable, vargs);
|
||||
va_end(vargs);
|
||||
|
||||
_PyThreadState_PopCStackRef(tstate, &method);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
PyObject *
|
||||
PyObject_CallFunctionObjArgs(PyObject *callable, ...)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue