mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
gh-131238: Move _Py_VISIT_STACKREF() to pycore_stackref.h (#131560)
* Move _Py_VISIT_STACKREF() from pycore_gc.h to pycore_stackref.h. * Remove pycore_interpframe.h include from pycore_genobject.h. * Remove now useless includes from C files. * Add pycore_interpframe_structs.h to Makefile.pre.in and pythoncore.vcxproj.
This commit is contained in:
parent
cf9d1a4b6b
commit
7101cba6bf
11 changed files with 40 additions and 35 deletions
|
@ -658,6 +658,16 @@ _Py_TryIncrefCompareStackRef(PyObject **src, PyObject *op, _PyStackRef *out)
|
|||
|
||||
#endif
|
||||
|
||||
// Like Py_VISIT but for _PyStackRef fields
|
||||
#define _Py_VISIT_STACKREF(ref) \
|
||||
do { \
|
||||
if (!PyStackRef_IsNull(ref)) { \
|
||||
int vret = _PyGC_VisitStackRef(&(ref), visit, arg); \
|
||||
if (vret) \
|
||||
return vret; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue