@@ -8102,17 +8102,17 @@ slot_tp_call(PyObject *self, PyObject *args, PyObject *kwds)
81028102
81038103/* There are two slot dispatch functions for tp_getattro.
81048104
8105- - slot_tp_getattro () is used when __getattribute__ is overridden
8105+ - _Py_slot_tp_getattro () is used when __getattribute__ is overridden
81068106 but no __getattr__ hook is present;
81078107
8108- - slot_tp_getattr_hook () is used when a __getattr__ hook is present.
8108+ - _Py_slot_tp_getattr_hook () is used when a __getattr__ hook is present.
81098109
8110- The code in update_one_slot() always installs slot_tp_getattr_hook (); this
8111- detects the absence of __getattr__ and then installs the simpler slot if
8112- necessary. */
8110+ The code in update_one_slot() always installs _Py_slot_tp_getattr_hook ();
8111+ this detects the absence of __getattr__ and then installs the simpler
8112+ slot if necessary. */
81138113
8114- static PyObject *
8115- slot_tp_getattro (PyObject * self , PyObject * name )
8114+ PyObject *
8115+ _Py_slot_tp_getattro (PyObject * self , PyObject * name )
81168116{
81178117 PyObject * stack [2 ] = {self , name };
81188118 return vectorcall_method (& _Py_ID (__getattribute__ ), stack , 2 );
@@ -8143,8 +8143,8 @@ call_attribute(PyObject *self, PyObject *attr, PyObject *name)
81438143 return res ;
81448144}
81458145
8146- static PyObject *
8147- slot_tp_getattr_hook (PyObject * self , PyObject * name )
8146+ PyObject *
8147+ _Py_slot_tp_getattr_hook (PyObject * self , PyObject * name )
81488148{
81498149 PyTypeObject * tp = Py_TYPE (self );
81508150 PyObject * getattr , * getattribute , * res ;
@@ -8157,8 +8157,8 @@ slot_tp_getattr_hook(PyObject *self, PyObject *name)
81578157 getattr = _PyType_Lookup (tp , & _Py_ID (__getattr__ ));
81588158 if (getattr == NULL ) {
81598159 /* No __getattr__ hook: use a simpler dispatcher */
8160- tp -> tp_getattro = slot_tp_getattro ;
8161- return slot_tp_getattro (self , name );
8160+ tp -> tp_getattro = _Py_slot_tp_getattro ;
8161+ return _Py_slot_tp_getattro (self , name );
81628162 }
81638163 Py_INCREF (getattr );
81648164 /* speed hack: we could use lookup_maybe, but that would resolve the
@@ -8519,10 +8519,10 @@ static slotdef slotdefs[] = {
85198519 PyWrapperFlag_KEYWORDS ),
85208520 TPSLOT ("__str__" , tp_str , slot_tp_str , wrap_unaryfunc ,
85218521 "__str__($self, /)\n--\n\nReturn str(self)." ),
8522- TPSLOT ("__getattribute__" , tp_getattro , slot_tp_getattr_hook ,
8522+ TPSLOT ("__getattribute__" , tp_getattro , _Py_slot_tp_getattr_hook ,
85238523 wrap_binaryfunc ,
85248524 "__getattribute__($self, name, /)\n--\n\nReturn getattr(self, name)." ),
8525- TPSLOT ("__getattr__" , tp_getattro , slot_tp_getattr_hook , NULL , "" ),
8525+ TPSLOT ("__getattr__" , tp_getattro , _Py_slot_tp_getattr_hook , NULL , "" ),
85268526 TPSLOT ("__setattr__" , tp_setattro , slot_tp_setattro , wrap_setattr ,
85278527 "__setattr__($self, name, value, /)\n--\n\nImplement setattr(self, name, value)." ),
85288528 TPSLOT ("__delattr__" , tp_setattro , slot_tp_setattro , wrap_delattr ,
0 commit comments