summaryrefslogtreecommitdiffstats
path: root/Include/internal
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2022-02-24 19:34:57 (GMT)
committerGitHub <noreply@github.com>2022-02-24 19:34:57 (GMT)
commit2a6ece572ca38f989fca66f4c053cb16550bccd4 (patch)
treeb2e8b0c278ff66a19d0696b9f4f06c95568220bc /Include/internal
parent4dc746310bd37ad6b381f9176acd167d445f4385 (diff)
downloadcpython-2a6ece572ca38f989fca66f4c053cb16550bccd4.zip
cpython-2a6ece572ca38f989fca66f4c053cb16550bccd4.tar.gz
cpython-2a6ece572ca38f989fca66f4c053cb16550bccd4.tar.bz2
bpo-45107: Specialize `LOAD_METHOD` for instances with dict. (GH-31531)
Diffstat (limited to 'Include/internal')
-rw-r--r--Include/internal/pycore_object.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Include/internal/pycore_object.h b/Include/internal/pycore_object.h
index 65abc18..06671b5 100644
--- a/Include/internal/pycore_object.h
+++ b/Include/internal/pycore_object.h
@@ -227,6 +227,8 @@ static inline PyObject **_PyObject_ManagedDictPointer(PyObject *obj)
return ((PyObject **)obj)-3;
}
+#define MANAGED_DICT_OFFSET (((int)sizeof(PyObject *))*-3)
+
extern PyObject ** _PyObject_DictPointer(PyObject *);
extern int _PyObject_VisitInstanceAttributes(PyObject *self, visitproc visit, void *arg);
extern void _PyObject_ClearInstanceAttributes(PyObject *self);