diff options
author | Pieter Eendebak <pieter.eendebak@gmail.com> | 2022-12-23 15:23:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-23 15:23:36 (GMT) |
commit | 7fc7909677759fd0cb9d30cd7ff839afd3973325 (patch) | |
tree | 00d3924e5d43ea919fd12982eec2948cf08b5563 /Include | |
parent | 49f6ff719c4e0beeafd6c42edd696601acf72764 (diff) | |
download | cpython-7fc7909677759fd0cb9d30cd7ff839afd3973325.zip cpython-7fc7909677759fd0cb9d30cd7ff839afd3973325.tar.gz cpython-7fc7909677759fd0cb9d30cd7ff839afd3973325.tar.bz2 |
gh-92216: improve performance of `hasattr` for type objects (GH-99979)
Diffstat (limited to 'Include')
-rw-r--r-- | Include/internal/pycore_typeobject.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Include/internal/pycore_typeobject.h b/Include/internal/pycore_typeobject.h index c207ce6..4d70574 100644 --- a/Include/internal/pycore_typeobject.h +++ b/Include/internal/pycore_typeobject.h @@ -74,6 +74,10 @@ extern static_builtin_state * _PyStaticType_GetState(PyTypeObject *); extern void _PyStaticType_ClearWeakRefs(PyTypeObject *type); extern void _PyStaticType_Dealloc(PyTypeObject *type); +PyObject * +_Py_type_getattro_impl(PyTypeObject *type, PyObject *name, int *suppress_missing_attribute); +PyObject * +_Py_type_getattro(PyTypeObject *type, PyObject *name); PyObject *_Py_slot_tp_getattro(PyObject *self, PyObject *name); PyObject *_Py_slot_tp_getattr_hook(PyObject *self, PyObject *name); |