From fb5b37060bd6f1ff7860d9e6c0890ab528b0412c Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Thu, 15 Sep 2022 12:14:26 +0100 Subject: [PATCH] gh-96803: Export _PyInterpreterFrame_GetLine as a private API symbol Signed-off-by: Pablo Galindo --- Include/internal/pycore_frame.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Include/internal/pycore_frame.h b/Include/internal/pycore_frame.h index 5bd0a7f2f517ef..6f4f940ae047f5 100644 --- a/Include/internal/pycore_frame.h +++ b/Include/internal/pycore_frame.h @@ -70,6 +70,9 @@ typedef struct _PyInterpreterFrame { #define _PyInterpreterFrame_LASTI(IF) \ ((int)((IF)->prev_instr - _PyCode_CODE((IF)->f_code))) +#define _PyInterpreterFrame_CODE(IF) \ + ((PyObject*)((IF)->f_code)) + static inline PyObject **_PyFrame_Stackbase(_PyInterpreterFrame *f) { return f->localsplus + f->f_code->co_nlocalsplus; } @@ -222,7 +225,7 @@ _PyFrame_PushUnchecked(PyThreadState *tstate, PyFunctionObject *func) return new_frame; } -int _PyInterpreterFrame_GetLine(_PyInterpreterFrame *frame); +PyAPI_FUNC(int) _PyInterpreterFrame_GetLine(_PyInterpreterFrame *frame); static inline PyGenObject *_PyFrame_GetGenerator(_PyInterpreterFrame *frame)