Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-120686: remove unused internal c api functions #120687

Merged
merged 4 commits into from
Jun 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
gh-120686: remove unused internal c api functions
  • Loading branch information
iritkatriel committed Jun 18, 2024
commit 6123c18e81841b256fbfece30c26ff6e8b1e4436
20 changes: 0 additions & 20 deletions Include/internal/pycore_identifier.h

This file was deleted.

11 changes: 0 additions & 11 deletions Objects/object.c
Original file line number Diff line number Diff line change
@@ -1124,17 +1124,6 @@ _PyObject_GetAttrId(PyObject *v, _Py_Identifier *name)
return result;
}

int
_PyObject_SetAttrId(PyObject *v, _Py_Identifier *name, PyObject *w)
{
int result;
PyObject *oname = _PyUnicode_FromId(name); /* borrowed */
if (!oname)
return -1;
result = PyObject_SetAttr(v, oname, w);
return result;
}

int
_PyObject_SetAttributeErrorContext(PyObject* v, PyObject* name)
{
19 changes: 0 additions & 19 deletions Objects/typeobject.c
Original file line number Diff line number Diff line change
@@ -2705,15 +2705,6 @@ _PyObject_LookupSpecial(PyObject *self, PyObject *attr)
return res;
}

PyObject *
_PyObject_LookupSpecialId(PyObject *self, _Py_Identifier *attrid)
{
PyObject *attr = _PyUnicode_FromId(attrid); /* borrowed */
if (attr == NULL)
return NULL;
return _PyObject_LookupSpecial(self, attr);
}

static PyObject *
lookup_maybe_method(PyObject *self, PyObject *attr, int *unbound)
{
@@ -5497,16 +5488,6 @@ _PyType_Lookup(PyTypeObject *type, PyObject *name)
return res;
}

PyObject *
_PyType_LookupId(PyTypeObject *type, _Py_Identifier *name)
{
PyObject *oname;
oname = _PyUnicode_FromId(name); /* borrowed */
if (oname == NULL)
return NULL;
return _PyType_Lookup(type, oname);
}

static void
set_flags(PyTypeObject *self, unsigned long mask, unsigned long flags)
{