Skip to content

Commit 6f7acaa

Browse files
authored
gh-120686: remove unused internal c api functions (#120687)
1 parent 12af8ec commit 6f7acaa

7 files changed

+0
-54
lines changed

Include/internal/pycore_call.h

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ extern "C" {
88
# error "this header requires Py_BUILD_CORE define"
99
#endif
1010

11-
#include "pycore_identifier.h" // _Py_Identifier
1211
#include "pycore_pystate.h" // _PyThreadState_GET()
1312

1413
/* Suggested size (number of positional arguments) for arrays of PyObject*

Include/internal/pycore_dict.h

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ extern "C" {
99
#endif
1010

1111
#include "pycore_freelist.h" // _PyFreeListState
12-
#include "pycore_identifier.h" // _Py_Identifier
1312
#include "pycore_object.h" // PyManagedDictPointer
1413
#include "pycore_pyatomic_ft_wrappers.h" // FT_ATOMIC_LOAD_SSIZE_ACQUIRE
1514

Include/internal/pycore_identifier.h

-20
This file was deleted.

Include/internal/pycore_unicodeobject.h

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ extern "C" {
1010

1111
#include "pycore_lock.h" // PyMutex
1212
#include "pycore_fileutils.h" // _Py_error_handler
13-
#include "pycore_identifier.h" // _Py_Identifier
1413
#include "pycore_ucnhash.h" // _PyUnicode_Name_CAPI
1514
#include "pycore_global_objects.h" // _Py_SINGLETON
1615

Makefile.pre.in

-1
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,6 @@ PYTHON_HEADERS= \
11781178
$(srcdir)/Include/internal/pycore_global_strings.h \
11791179
$(srcdir)/Include/internal/pycore_hamt.h \
11801180
$(srcdir)/Include/internal/pycore_hashtable.h \
1181-
$(srcdir)/Include/internal/pycore_identifier.h \
11821181
$(srcdir)/Include/internal/pycore_import.h \
11831182
$(srcdir)/Include/internal/pycore_importdl.h \
11841183
$(srcdir)/Include/internal/pycore_initconfig.h \

Objects/object.c

-11
Original file line numberDiff line numberDiff line change
@@ -1124,17 +1124,6 @@ _PyObject_GetAttrId(PyObject *v, _Py_Identifier *name)
11241124
return result;
11251125
}
11261126

1127-
int
1128-
_PyObject_SetAttrId(PyObject *v, _Py_Identifier *name, PyObject *w)
1129-
{
1130-
int result;
1131-
PyObject *oname = _PyUnicode_FromId(name); /* borrowed */
1132-
if (!oname)
1133-
return -1;
1134-
result = PyObject_SetAttr(v, oname, w);
1135-
return result;
1136-
}
1137-
11381127
int
11391128
_PyObject_SetAttributeErrorContext(PyObject* v, PyObject* name)
11401129
{

Objects/typeobject.c

-19
Original file line numberDiff line numberDiff line change
@@ -2699,15 +2699,6 @@ _PyObject_LookupSpecialMethod(PyObject *self, PyObject *attr, PyObject **self_or
26992699
return res;
27002700
}
27012701

2702-
PyObject *
2703-
_PyObject_LookupSpecialId(PyObject *self, _Py_Identifier *attrid)
2704-
{
2705-
PyObject *attr = _PyUnicode_FromId(attrid); /* borrowed */
2706-
if (attr == NULL)
2707-
return NULL;
2708-
return _PyObject_LookupSpecial(self, attr);
2709-
}
2710-
27112702
static PyObject *
27122703
lookup_maybe_method(PyObject *self, PyObject *attr, int *unbound)
27132704
{
@@ -5490,16 +5481,6 @@ _PyType_Lookup(PyTypeObject *type, PyObject *name)
54905481
return res;
54915482
}
54925483

5493-
PyObject *
5494-
_PyType_LookupId(PyTypeObject *type, _Py_Identifier *name)
5495-
{
5496-
PyObject *oname;
5497-
oname = _PyUnicode_FromId(name); /* borrowed */
5498-
if (oname == NULL)
5499-
return NULL;
5500-
return _PyType_Lookup(type, oname);
5501-
}
5502-
55035484
static void
55045485
set_flags(PyTypeObject *self, unsigned long mask, unsigned long flags)
55055486
{

0 commit comments

Comments
 (0)