mirror of
https://github.com/python/cpython.git
synced 2025-12-09 18:48:05 +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
|
|
@ -305,7 +305,7 @@ hashtable_compare_traceback(const void *key1, const void *key2)
|
|||
|
||||
|
||||
static void
|
||||
tracemalloc_get_frame(InterpreterFrame *pyframe, frame_t *frame)
|
||||
tracemalloc_get_frame(_PyInterpreterFrame *pyframe, frame_t *frame)
|
||||
{
|
||||
frame->filename = &_Py_STR(anon_unknown);
|
||||
int lineno = PyCode_Addr2Line(pyframe->f_code, pyframe->f_lasti*sizeof(_Py_CODEUNIT));
|
||||
|
|
@ -399,7 +399,7 @@ traceback_get_frames(traceback_t *traceback)
|
|||
return;
|
||||
}
|
||||
|
||||
InterpreterFrame *pyframe = tstate->cframe->current_frame;
|
||||
_PyInterpreterFrame *pyframe = tstate->cframe->current_frame;
|
||||
for (; pyframe != NULL;) {
|
||||
if (traceback->nframe < _Py_tracemalloc_config.max_nframe) {
|
||||
tracemalloc_get_frame(pyframe, &traceback->frames[traceback->nframe]);
|
||||
|
|
@ -410,7 +410,7 @@ traceback_get_frames(traceback_t *traceback)
|
|||
traceback->total_nframe++;
|
||||
}
|
||||
|
||||
InterpreterFrame *back = pyframe->previous;
|
||||
_PyInterpreterFrame *back = pyframe->previous;
|
||||
pyframe = back;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1839,7 +1839,7 @@ _is_running(PyInterpreterState *interp)
|
|||
}
|
||||
|
||||
assert(!PyErr_Occurred());
|
||||
InterpreterFrame *frame = tstate->cframe->current_frame;
|
||||
_PyInterpreterFrame *frame = tstate->cframe->current_frame;
|
||||
if (frame == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
#include "pycore_call.h" // _PyObject_Call()
|
||||
#include "pycore_ceval.h" // _PyEval_SignalReceived()
|
||||
#include "pycore_fileutils.h" // _Py_BEGIN_SUPPRESS_IPH
|
||||
#include "pycore_frame.h" // InterpreterFrame
|
||||
#include "pycore_frame.h" // _PyInterpreterFrame
|
||||
#include "pycore_moduleobject.h" // _PyModule_GetState()
|
||||
#include "pycore_pyerrors.h" // _PyErr_SetString()
|
||||
#include "pycore_pylifecycle.h" // NSIG
|
||||
|
|
@ -1809,7 +1809,7 @@ _PyErr_CheckSignalsTstate(PyThreadState *tstate)
|
|||
*/
|
||||
_Py_atomic_store(&is_tripped, 0);
|
||||
|
||||
InterpreterFrame *frame = tstate->cframe->current_frame;
|
||||
_PyInterpreterFrame *frame = tstate->cframe->current_frame;
|
||||
signal_state_t *state = &signal_global_state;
|
||||
for (int i = 1; i < NSIG; i++) {
|
||||
if (!_Py_atomic_load_relaxed(&Handlers[i].tripped)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue