mirror of
https://github.com/python/cpython.git
synced 2025-07-19 09:15:34 +00:00
bpo-46836: Rename InterpreterFrame to _PyInterpreterFrame (GH-31583)
Rename also struct _interpreter_frame to struct _PyInterpreterFrame. Reduce risk of name conflicts if a project includes pycore_frame.h.
This commit is contained in:
parent
f780d9690f
commit
87af12bff3
15 changed files with 138 additions and 138 deletions
|
@ -59,7 +59,7 @@ static PyObject * do_call_core(
|
|||
#ifdef LLTRACE
|
||||
static int lltrace;
|
||||
static int prtrace(PyThreadState *, PyObject *, const char *);
|
||||
static void lltrace_instruction(InterpreterFrame *frame, int opcode, int oparg)
|
||||
static void lltrace_instruction(_PyInterpreterFrame *frame, int opcode, int oparg)
|
||||
{
|
||||
if (HAS_ARG(opcode)) {
|
||||
printf("%d: %d, %d\n",
|
||||
|
@ -72,20 +72,20 @@ static void lltrace_instruction(InterpreterFrame *frame, int opcode, int oparg)
|
|||
}
|
||||
#endif
|
||||
static int call_trace(Py_tracefunc, PyObject *,
|
||||
PyThreadState *, InterpreterFrame *,
|
||||
PyThreadState *, _PyInterpreterFrame *,
|
||||
int, PyObject *);
|
||||
static int call_trace_protected(Py_tracefunc, PyObject *,
|
||||
PyThreadState *, InterpreterFrame *,
|
||||
PyThreadState *, _PyInterpreterFrame *,
|
||||
int, PyObject *);
|
||||
static void call_exc_trace(Py_tracefunc, PyObject *,
|
||||
PyThreadState *, InterpreterFrame *);
|
||||
PyThreadState *, _PyInterpreterFrame *);
|
||||
static int maybe_call_line_trace(Py_tracefunc, PyObject *,
|
||||
PyThreadState *, InterpreterFrame *, int);
|
||||
static void maybe_dtrace_line(InterpreterFrame *, PyTraceInfo *, int);
|
||||
static void dtrace_function_entry(InterpreterFrame *);
|
||||
static void dtrace_function_return(InterpreterFrame *);
|
||||
PyThreadState *, _PyInterpreterFrame *, int);
|
||||
static void maybe_dtrace_line(_PyInterpreterFrame *, PyTraceInfo *, int);
|
||||
static void dtrace_function_entry(_PyInterpreterFrame *);
|
||||
static void dtrace_function_return(_PyInterpreterFrame *);
|
||||
|
||||
static PyObject * import_name(PyThreadState *, InterpreterFrame *,
|
||||
static PyObject * import_name(PyThreadState *, _PyInterpreterFrame *,
|
||||
PyObject *, PyObject *, PyObject *);
|
||||
static PyObject * import_from(PyThreadState *, PyObject *, PyObject *);
|
||||
static int import_all_from(PyThreadState *, PyObject *, PyObject *);
|
||||
|
@ -97,12 +97,12 @@ static int check_except_star_type_valid(PyThreadState *tstate, PyObject* right);
|
|||
static void format_kwargs_error(PyThreadState *, PyObject *func, PyObject *kwargs);
|
||||
static void format_awaitable_error(PyThreadState *, PyTypeObject *, int, int);
|
||||
static int get_exception_handler(PyCodeObject *, int, int*, int*, int*);
|
||||
static InterpreterFrame *
|
||||
static _PyInterpreterFrame *
|
||||
_PyEvalFramePushAndInit(PyThreadState *tstate, PyFunctionObject *func,
|
||||
PyObject *locals, PyObject* const* args,
|
||||
size_t argcount, PyObject *kwnames);
|
||||
static void
|
||||
_PyEvalFrameClearAndPop(PyThreadState *tstate, InterpreterFrame *frame);
|
||||
_PyEvalFrameClearAndPop(PyThreadState *tstate, _PyInterpreterFrame *frame);
|
||||
|
||||
#define NAME_ERROR_MSG \
|
||||
"name '%.200s' is not defined"
|
||||
|
@ -1509,7 +1509,7 @@ eval_frame_handle_pending(PyThreadState *tstate)
|
|||
|
||||
|
||||
static int
|
||||
trace_function_entry(PyThreadState *tstate, InterpreterFrame *frame)
|
||||
trace_function_entry(PyThreadState *tstate, _PyInterpreterFrame *frame)
|
||||
{
|
||||
if (tstate->c_tracefunc != NULL) {
|
||||
/* tstate->c_tracefunc, if defined, is a
|
||||
|
@ -1548,7 +1548,7 @@ trace_function_entry(PyThreadState *tstate, InterpreterFrame *frame)
|
|||
}
|
||||
|
||||
static int
|
||||
trace_function_exit(PyThreadState *tstate, InterpreterFrame *frame, PyObject *retval)
|
||||
trace_function_exit(PyThreadState *tstate, _PyInterpreterFrame *frame, PyObject *retval)
|
||||
{
|
||||
if (tstate->c_tracefunc) {
|
||||
if (call_trace_protected(tstate->c_tracefunc, tstate->c_traceobj,
|
||||
|
@ -1575,10 +1575,10 @@ skip_backwards_over_extended_args(PyCodeObject *code, int offset)
|
|||
return offset;
|
||||
}
|
||||
|
||||
static InterpreterFrame *
|
||||
pop_frame(PyThreadState *tstate, InterpreterFrame *frame)
|
||||
static _PyInterpreterFrame *
|
||||
pop_frame(PyThreadState *tstate, _PyInterpreterFrame *frame)
|
||||
{
|
||||
InterpreterFrame *prev_frame = frame->previous;
|
||||
_PyInterpreterFrame *prev_frame = frame->previous;
|
||||
_PyEvalFrameClearAndPop(tstate, frame);
|
||||
return prev_frame;
|
||||
}
|
||||
|
@ -1599,7 +1599,7 @@ is_method(PyObject **stack_pointer, int args) {
|
|||
(call_shape.kwnames == NULL ? 0 : ((int)PyTuple_GET_SIZE(call_shape.kwnames)))
|
||||
|
||||
PyObject* _Py_HOT_FUNCTION
|
||||
_PyEval_EvalFrameDefault(PyThreadState *tstate, InterpreterFrame *frame, int throwflag)
|
||||
_PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int throwflag)
|
||||
{
|
||||
_Py_EnsureTstateNotNULL(tstate);
|
||||
CALL_STAT_INC(pyeval_calls);
|
||||
|
@ -2203,7 +2203,7 @@ handle_eval_breaker:
|
|||
PyCodeObject *code = (PyCodeObject *)getitem->func_code;
|
||||
size_t size = code->co_nlocalsplus + code->co_stacksize + FRAME_SPECIALS_SIZE;
|
||||
assert(code->co_argcount == 2);
|
||||
InterpreterFrame *new_frame = _PyThreadState_BumpFramePointer(tstate, size);
|
||||
_PyInterpreterFrame *new_frame = _PyThreadState_BumpFramePointer(tstate, size);
|
||||
if (new_frame == NULL) {
|
||||
goto error;
|
||||
}
|
||||
|
@ -4644,7 +4644,7 @@ handle_eval_breaker:
|
|||
int code_flags = ((PyCodeObject*)PyFunction_GET_CODE(function))->co_flags;
|
||||
PyObject *locals = code_flags & CO_OPTIMIZED ? NULL : PyFunction_GET_GLOBALS(function);
|
||||
STACK_SHRINK(total_args);
|
||||
InterpreterFrame *new_frame = _PyEvalFramePushAndInit(
|
||||
_PyInterpreterFrame *new_frame = _PyEvalFramePushAndInit(
|
||||
tstate, (PyFunctionObject *)function, locals,
|
||||
stack_pointer, positional_args, call_shape.kwnames
|
||||
);
|
||||
|
@ -4753,7 +4753,7 @@ handle_eval_breaker:
|
|||
PyCodeObject *code = (PyCodeObject *)func->func_code;
|
||||
DEOPT_IF(code->co_argcount != argcount, CALL);
|
||||
STAT_INC(CALL, hit);
|
||||
InterpreterFrame *new_frame = _PyFrame_Push(tstate, func);
|
||||
_PyInterpreterFrame *new_frame = _PyFrame_Push(tstate, func);
|
||||
if (new_frame == NULL) {
|
||||
goto error;
|
||||
}
|
||||
|
@ -4788,7 +4788,7 @@ handle_eval_breaker:
|
|||
int minargs = cache1->min_args;
|
||||
DEOPT_IF(argcount < minargs, CALL);
|
||||
STAT_INC(CALL, hit);
|
||||
InterpreterFrame *new_frame = _PyFrame_Push(tstate, func);
|
||||
_PyInterpreterFrame *new_frame = _PyFrame_Push(tstate, func);
|
||||
if (new_frame == NULL) {
|
||||
goto error;
|
||||
}
|
||||
|
@ -5306,7 +5306,7 @@ handle_eval_breaker:
|
|||
}
|
||||
assert(EMPTY());
|
||||
_PyFrame_SetStackPointer(frame, stack_pointer);
|
||||
InterpreterFrame *gen_frame = (InterpreterFrame *)gen->gi_iframe;
|
||||
_PyInterpreterFrame *gen_frame = (_PyInterpreterFrame *)gen->gi_iframe;
|
||||
_PyFrame_Copy(frame, gen_frame);
|
||||
assert(frame->frame_obj == NULL);
|
||||
gen->gi_frame_valid = 1;
|
||||
|
@ -5314,7 +5314,7 @@ handle_eval_breaker:
|
|||
gen_frame->f_state = FRAME_CREATED;
|
||||
_Py_LeaveRecursiveCall(tstate);
|
||||
if (!frame->is_entry) {
|
||||
InterpreterFrame *prev = frame->previous;
|
||||
_PyInterpreterFrame *prev = frame->previous;
|
||||
_PyThreadState_PopFrame(tstate, frame);
|
||||
frame = cframe.current_frame = prev;
|
||||
_PyFrame_StackPush(frame, (PyObject *)gen);
|
||||
|
@ -6292,7 +6292,7 @@ fail_post_args:
|
|||
}
|
||||
|
||||
/* Consumes references to func and all the args */
|
||||
static InterpreterFrame *
|
||||
static _PyInterpreterFrame *
|
||||
_PyEvalFramePushAndInit(PyThreadState *tstate, PyFunctionObject *func,
|
||||
PyObject *locals, PyObject* const* args,
|
||||
size_t argcount, PyObject *kwnames)
|
||||
|
@ -6300,7 +6300,7 @@ _PyEvalFramePushAndInit(PyThreadState *tstate, PyFunctionObject *func,
|
|||
PyCodeObject * code = (PyCodeObject *)func->func_code;
|
||||
size_t size = code->co_nlocalsplus + code->co_stacksize + FRAME_SPECIALS_SIZE;
|
||||
CALL_STAT_INC(frames_pushed);
|
||||
InterpreterFrame *frame = _PyThreadState_BumpFramePointer(tstate, size);
|
||||
_PyInterpreterFrame *frame = _PyThreadState_BumpFramePointer(tstate, size);
|
||||
if (frame == NULL) {
|
||||
goto fail;
|
||||
}
|
||||
|
@ -6330,7 +6330,7 @@ fail:
|
|||
}
|
||||
|
||||
static void
|
||||
_PyEvalFrameClearAndPop(PyThreadState *tstate, InterpreterFrame * frame)
|
||||
_PyEvalFrameClearAndPop(PyThreadState *tstate, _PyInterpreterFrame * frame)
|
||||
{
|
||||
tstate->recursion_remaining--;
|
||||
assert(frame->frame_obj == NULL || frame->frame_obj->f_owns_frame == 0);
|
||||
|
@ -6357,7 +6357,7 @@ _PyEval_Vector(PyThreadState *tstate, PyFunctionObject *func,
|
|||
Py_INCREF(args[i+argcount]);
|
||||
}
|
||||
}
|
||||
InterpreterFrame *frame = _PyEvalFramePushAndInit(
|
||||
_PyInterpreterFrame *frame = _PyEvalFramePushAndInit(
|
||||
tstate, func, locals, args, argcount, kwnames);
|
||||
if (frame == NULL) {
|
||||
return NULL;
|
||||
|
@ -6726,7 +6726,7 @@ prtrace(PyThreadState *tstate, PyObject *v, const char *str)
|
|||
static void
|
||||
call_exc_trace(Py_tracefunc func, PyObject *self,
|
||||
PyThreadState *tstate,
|
||||
InterpreterFrame *f)
|
||||
_PyInterpreterFrame *f)
|
||||
{
|
||||
PyObject *type, *value, *traceback, *orig_traceback, *arg;
|
||||
int err;
|
||||
|
@ -6756,7 +6756,7 @@ call_exc_trace(Py_tracefunc func, PyObject *self,
|
|||
|
||||
static int
|
||||
call_trace_protected(Py_tracefunc func, PyObject *obj,
|
||||
PyThreadState *tstate, InterpreterFrame *frame,
|
||||
PyThreadState *tstate, _PyInterpreterFrame *frame,
|
||||
int what, PyObject *arg)
|
||||
{
|
||||
PyObject *type, *value, *traceback;
|
||||
|
@ -6777,7 +6777,7 @@ call_trace_protected(Py_tracefunc func, PyObject *obj,
|
|||
}
|
||||
|
||||
static void
|
||||
initialize_trace_info(PyTraceInfo *trace_info, InterpreterFrame *frame)
|
||||
initialize_trace_info(PyTraceInfo *trace_info, _PyInterpreterFrame *frame)
|
||||
{
|
||||
PyCodeObject *code = frame->f_code;
|
||||
if (trace_info->code != code) {
|
||||
|
@ -6788,7 +6788,7 @@ initialize_trace_info(PyTraceInfo *trace_info, InterpreterFrame *frame)
|
|||
|
||||
static int
|
||||
call_trace(Py_tracefunc func, PyObject *obj,
|
||||
PyThreadState *tstate, InterpreterFrame *frame,
|
||||
PyThreadState *tstate, _PyInterpreterFrame *frame,
|
||||
int what, PyObject *arg)
|
||||
{
|
||||
int result;
|
||||
|
@ -6829,7 +6829,7 @@ _PyEval_CallTracing(PyObject *func, PyObject *args)
|
|||
/* See Objects/lnotab_notes.txt for a description of how tracing works. */
|
||||
static int
|
||||
maybe_call_line_trace(Py_tracefunc func, PyObject *obj,
|
||||
PyThreadState *tstate, InterpreterFrame *frame, int instr_prev)
|
||||
PyThreadState *tstate, _PyInterpreterFrame *frame, int instr_prev)
|
||||
{
|
||||
int result = 0;
|
||||
|
||||
|
@ -7007,7 +7007,7 @@ _PyEval_GetAsyncGenFinalizer(void)
|
|||
return tstate->async_gen_finalizer;
|
||||
}
|
||||
|
||||
InterpreterFrame *
|
||||
_PyInterpreterFrame *
|
||||
_PyEval_GetFrame(void)
|
||||
{
|
||||
PyThreadState *tstate = _PyThreadState_GET();
|
||||
|
@ -7031,7 +7031,7 @@ PyEval_GetFrame(void)
|
|||
PyObject *
|
||||
_PyEval_GetBuiltins(PyThreadState *tstate)
|
||||
{
|
||||
InterpreterFrame *frame = tstate->cframe->current_frame;
|
||||
_PyInterpreterFrame *frame = tstate->cframe->current_frame;
|
||||
if (frame != NULL) {
|
||||
return frame->f_builtins;
|
||||
}
|
||||
|
@ -7070,7 +7070,7 @@ PyObject *
|
|||
PyEval_GetLocals(void)
|
||||
{
|
||||
PyThreadState *tstate = _PyThreadState_GET();
|
||||
InterpreterFrame *current_frame = tstate->cframe->current_frame;
|
||||
_PyInterpreterFrame *current_frame = tstate->cframe->current_frame;
|
||||
if (current_frame == NULL) {
|
||||
_PyErr_SetString(tstate, PyExc_SystemError, "frame does not exist");
|
||||
return NULL;
|
||||
|
@ -7089,7 +7089,7 @@ PyObject *
|
|||
PyEval_GetGlobals(void)
|
||||
{
|
||||
PyThreadState *tstate = _PyThreadState_GET();
|
||||
InterpreterFrame *current_frame = tstate->cframe->current_frame;
|
||||
_PyInterpreterFrame *current_frame = tstate->cframe->current_frame;
|
||||
if (current_frame == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
@ -7100,7 +7100,7 @@ int
|
|||
PyEval_MergeCompilerFlags(PyCompilerFlags *cf)
|
||||
{
|
||||
PyThreadState *tstate = _PyThreadState_GET();
|
||||
InterpreterFrame *current_frame = tstate->cframe->current_frame;
|
||||
_PyInterpreterFrame *current_frame = tstate->cframe->current_frame;
|
||||
int result = cf->cf_flags != 0;
|
||||
|
||||
if (current_frame != NULL) {
|
||||
|
@ -7304,7 +7304,7 @@ _PyEval_SliceIndexNotNone(PyObject *v, Py_ssize_t *pi)
|
|||
}
|
||||
|
||||
static PyObject *
|
||||
import_name(PyThreadState *tstate, InterpreterFrame *frame,
|
||||
import_name(PyThreadState *tstate, _PyInterpreterFrame *frame,
|
||||
PyObject *name, PyObject *fromlist, PyObject *level)
|
||||
{
|
||||
PyObject *import_func, *res;
|
||||
|
@ -7775,7 +7775,7 @@ _PyEval_RequestCodeExtraIndex(freefunc free)
|
|||
}
|
||||
|
||||
static void
|
||||
dtrace_function_entry(InterpreterFrame *frame)
|
||||
dtrace_function_entry(_PyInterpreterFrame *frame)
|
||||
{
|
||||
const char *filename;
|
||||
const char *funcname;
|
||||
|
@ -7790,7 +7790,7 @@ dtrace_function_entry(InterpreterFrame *frame)
|
|||
}
|
||||
|
||||
static void
|
||||
dtrace_function_return(InterpreterFrame *frame)
|
||||
dtrace_function_return(_PyInterpreterFrame *frame)
|
||||
{
|
||||
const char *filename;
|
||||
const char *funcname;
|
||||
|
@ -7806,7 +7806,7 @@ dtrace_function_return(InterpreterFrame *frame)
|
|||
|
||||
/* DTrace equivalent of maybe_call_line_trace. */
|
||||
static void
|
||||
maybe_dtrace_line(InterpreterFrame *frame,
|
||||
maybe_dtrace_line(_PyInterpreterFrame *frame,
|
||||
PyTraceInfo *trace_info,
|
||||
int instr_prev)
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "opcode.h"
|
||||
|
||||
int
|
||||
_PyFrame_Traverse(InterpreterFrame *frame, visitproc visit, void *arg)
|
||||
_PyFrame_Traverse(_PyInterpreterFrame *frame, visitproc visit, void *arg)
|
||||
{
|
||||
Py_VISIT(frame->frame_obj);
|
||||
Py_VISIT(frame->f_locals);
|
||||
|
@ -24,7 +24,7 @@ _PyFrame_Traverse(InterpreterFrame *frame, visitproc visit, void *arg)
|
|||
}
|
||||
|
||||
PyFrameObject *
|
||||
_PyFrame_MakeAndSetFrameObject(InterpreterFrame *frame)
|
||||
_PyFrame_MakeAndSetFrameObject(_PyInterpreterFrame *frame)
|
||||
{
|
||||
assert(frame->frame_obj == NULL);
|
||||
PyObject *error_type, *error_value, *error_traceback;
|
||||
|
@ -46,7 +46,7 @@ _PyFrame_MakeAndSetFrameObject(InterpreterFrame *frame)
|
|||
}
|
||||
|
||||
void
|
||||
_PyFrame_Copy(InterpreterFrame *src, InterpreterFrame *dest)
|
||||
_PyFrame_Copy(_PyInterpreterFrame *src, _PyInterpreterFrame *dest)
|
||||
{
|
||||
assert(src->stacktop >= src->f_code->co_nlocalsplus);
|
||||
Py_ssize_t size = ((char*)&src->localsplus[src->stacktop]) - (char *)src;
|
||||
|
@ -55,17 +55,17 @@ _PyFrame_Copy(InterpreterFrame *src, InterpreterFrame *dest)
|
|||
|
||||
|
||||
static void
|
||||
take_ownership(PyFrameObject *f, InterpreterFrame *frame)
|
||||
take_ownership(PyFrameObject *f, _PyInterpreterFrame *frame)
|
||||
{
|
||||
assert(f->f_owns_frame == 0);
|
||||
Py_ssize_t size = ((char*)&frame->localsplus[frame->stacktop]) - (char *)frame;
|
||||
memcpy((InterpreterFrame *)f->_f_frame_data, frame, size);
|
||||
frame = (InterpreterFrame *)f->_f_frame_data;
|
||||
memcpy((_PyInterpreterFrame *)f->_f_frame_data, frame, size);
|
||||
frame = (_PyInterpreterFrame *)f->_f_frame_data;
|
||||
f->f_owns_frame = 1;
|
||||
f->f_frame = frame;
|
||||
assert(f->f_back == NULL);
|
||||
if (frame->previous != NULL) {
|
||||
/* Link PyFrameObjects.f_back and remove link through InterpreterFrame.previous */
|
||||
/* Link PyFrameObjects.f_back and remove link through _PyInterpreterFrame.previous */
|
||||
PyFrameObject *back = _PyFrame_GetFrameObject(frame->previous);
|
||||
if (back == NULL) {
|
||||
/* Memory error here. */
|
||||
|
@ -84,7 +84,7 @@ take_ownership(PyFrameObject *f, InterpreterFrame *frame)
|
|||
}
|
||||
|
||||
void
|
||||
_PyFrame_Clear(InterpreterFrame *frame)
|
||||
_PyFrame_Clear(_PyInterpreterFrame *frame)
|
||||
{
|
||||
/* It is the responsibility of the owning generator/coroutine
|
||||
* to have cleared the enclosing generator, if any. */
|
||||
|
@ -110,13 +110,13 @@ _PyFrame_Clear(InterpreterFrame *frame)
|
|||
}
|
||||
|
||||
/* Consumes reference to func */
|
||||
InterpreterFrame *
|
||||
_PyInterpreterFrame *
|
||||
_PyFrame_Push(PyThreadState *tstate, PyFunctionObject *func)
|
||||
{
|
||||
PyCodeObject *code = (PyCodeObject *)func->func_code;
|
||||
size_t size = code->co_nlocalsplus + code->co_stacksize + FRAME_SPECIALS_SIZE;
|
||||
CALL_STAT_INC(frames_pushed);
|
||||
InterpreterFrame *new_frame = _PyThreadState_BumpFramePointer(tstate, size);
|
||||
_PyInterpreterFrame *new_frame = _PyThreadState_BumpFramePointer(tstate, size);
|
||||
if (new_frame == NULL) {
|
||||
Py_DECREF(func);
|
||||
return NULL;
|
||||
|
|
|
@ -1410,7 +1410,7 @@ _PyThread_CurrentFrames(void)
|
|||
for (i = runtime->interpreters.head; i != NULL; i = i->next) {
|
||||
PyThreadState *t;
|
||||
for (t = i->threads.head; t != NULL; t = t->next) {
|
||||
InterpreterFrame *frame = t->cframe->current_frame;
|
||||
_PyInterpreterFrame *frame = t->cframe->current_frame;
|
||||
if (frame == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
@ -2197,7 +2197,7 @@ push_chunk(PyThreadState *tstate, int size)
|
|||
return res;
|
||||
}
|
||||
|
||||
InterpreterFrame *
|
||||
_PyInterpreterFrame *
|
||||
_PyThreadState_BumpFramePointerSlow(PyThreadState *tstate, size_t size)
|
||||
{
|
||||
assert(size < INT_MAX/sizeof(PyObject *));
|
||||
|
@ -2209,11 +2209,11 @@ _PyThreadState_BumpFramePointerSlow(PyThreadState *tstate, size_t size)
|
|||
else {
|
||||
tstate->datastack_top = top;
|
||||
}
|
||||
return (InterpreterFrame *)base;
|
||||
return (_PyInterpreterFrame *)base;
|
||||
}
|
||||
|
||||
void
|
||||
_PyThreadState_PopFrame(PyThreadState *tstate, InterpreterFrame * frame)
|
||||
_PyThreadState_PopFrame(PyThreadState *tstate, _PyInterpreterFrame * frame)
|
||||
{
|
||||
assert(tstate->datastack_chunk);
|
||||
PyObject **base = (PyObject **)frame;
|
||||
|
|
|
@ -18,7 +18,7 @@ Data members:
|
|||
#include "pycore_call.h" // _PyObject_CallNoArgs()
|
||||
#include "pycore_ceval.h" // _Py_RecursionLimitLowerWaterMark()
|
||||
#include "pycore_code.h" // _Py_QuickenedCount
|
||||
#include "pycore_frame.h" // InterpreterFrame
|
||||
#include "pycore_frame.h" // _PyInterpreterFrame
|
||||
#include "pycore_initconfig.h" // _PyStatus_EXCEPTION()
|
||||
#include "pycore_namespace.h" // _PyNamespace_New()
|
||||
#include "pycore_object.h" // _PyObject_IS_GC()
|
||||
|
@ -1807,7 +1807,7 @@ sys__getframe_impl(PyObject *module, int depth)
|
|||
/*[clinic end generated code: output=d438776c04d59804 input=c1be8a6464b11ee5]*/
|
||||
{
|
||||
PyThreadState *tstate = _PyThreadState_GET();
|
||||
InterpreterFrame *frame = tstate->cframe->current_frame;
|
||||
_PyInterpreterFrame *frame = tstate->cframe->current_frame;
|
||||
|
||||
if (_PySys_Audit(tstate, "sys._getframe", NULL) < 0) {
|
||||
return NULL;
|
||||
|
|
|
@ -1167,7 +1167,7 @@ done:
|
|||
This function is signal safe. */
|
||||
|
||||
static void
|
||||
dump_frame(int fd, InterpreterFrame *frame)
|
||||
dump_frame(int fd, _PyInterpreterFrame *frame)
|
||||
{
|
||||
PyCodeObject *code = frame->f_code;
|
||||
PUTS(fd, " File ");
|
||||
|
@ -1205,7 +1205,7 @@ dump_frame(int fd, InterpreterFrame *frame)
|
|||
static void
|
||||
dump_traceback(int fd, PyThreadState *tstate, int write_header)
|
||||
{
|
||||
InterpreterFrame *frame;
|
||||
_PyInterpreterFrame *frame;
|
||||
unsigned int depth;
|
||||
|
||||
if (write_header) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue