summaryrefslogtreecommitdiffstats
path: root/Objects/typeobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/typeobject.c')
-rw-r--r--Objects/typeobject.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 304066f..eb3560b 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -1179,6 +1179,8 @@ PyType_IsSubtype(PyTypeObject *a, PyTypeObject *b)
when the _PyType_Lookup() call fails;
- lookup_method() always raises an exception upon errors.
+
+ - _PyObject_LookupSpecial() exported for the benefit of other places.
*/
static PyObject *
@@ -1211,6 +1213,12 @@ lookup_method(PyObject *self, char *attrstr, PyObject **attrobj)
return res;
}
+PyObject *
+_PyObject_LookupSpecial(PyObject *self, char *attrstr, PyObject **attrobj)
+{
+ return lookup_maybe(self, attrstr, attrobj);
+}
+
/* A variation of PyObject_CallMethod that uses lookup_method()
instead of PyObject_GetAttrString(). This uses the same convention
as lookup_method to cache the interned name string object. */