gh-134043: use stackrefs for dict lookup in _PyObject_GetMethodStackRef (#136412)

Co-authored-by: Sam Gross <colesbury@gmail.com>
This commit is contained in:
Kumar Aditya 2025-07-28 22:04:57 +05:30 committed by GitHub
parent 1e9b8f2f85
commit cbe6ebe15b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 90 additions and 31 deletions

View file

@ -839,6 +839,13 @@ _Py_TryXGetStackRef(PyObject **src, _PyStackRef *out)
#endif
#define PyStackRef_XSETREF(dst, src) \
do { \
_PyStackRef _tmp_dst_ref = (dst); \
(dst) = (src); \
PyStackRef_XCLOSE(_tmp_dst_ref); \
} while(0)
// Like Py_VISIT but for _PyStackRef fields
#define _Py_VISIT_STACKREF(ref) \
do { \