mirror of
https://github.com/python/cpython.git
synced 2025-11-09 18:11:38 +00:00
gh-134043: use stackrefs for dict lookup in _PyObject_GetMethodStackRef (#136412)
Co-authored-by: Sam Gross <colesbury@gmail.com>
This commit is contained in:
parent
1e9b8f2f85
commit
cbe6ebe15b
4 changed files with 90 additions and 31 deletions
|
|
@ -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 { \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue