diff options
author | Victor Stinner <vstinner@python.org> | 2022-02-28 15:03:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-28 15:03:57 (GMT) |
commit | 7496f9587306772b56ed074092c020f3ef16bf95 (patch) | |
tree | e8d235f50c066ecc4b32a3822ab586771b79b8d8 /Include/cpython/pystate.h | |
parent | 4558af5a8f8e56a9b0dc11f6e834c47e0fd05f9e (diff) | |
download | cpython-7496f9587306772b56ed074092c020f3ef16bf95.zip cpython-7496f9587306772b56ed074092c020f3ef16bf95.tar.gz cpython-7496f9587306772b56ed074092c020f3ef16bf95.tar.bz2 |
bpo-45431: Rename CFrame to _PyCFrame in the C API (GH-31584)
Rename also struct _cframe to struct _PyCFrame.
Add a comment suggesting using public functions rather than using
directly the private _PyCFrame structure.
Diffstat (limited to 'Include/cpython/pystate.h')
-rw-r--r-- | Include/cpython/pystate.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Include/cpython/pystate.h b/Include/cpython/pystate.h index 0d38604..26d6f75 100644 --- a/Include/cpython/pystate.h +++ b/Include/cpython/pystate.h @@ -33,7 +33,9 @@ typedef struct { PyCodeAddressRange bounds; // Only valid if code != NULL. } PyTraceInfo; -typedef struct _cframe { +// Internal structure: you should not use it directly, but use public functions +// like PyThreadState_EnterTracing() and PyThreadState_LeaveTracing(). +typedef struct _PyCFrame { /* This struct will be threaded through the C stack * allowing fast access to per-thread state that needs * to be accessed quickly by the interpreter, but can @@ -47,8 +49,8 @@ typedef struct _cframe { int use_tracing; /* Pointer to the currently executing frame (it can be NULL) */ struct _PyInterpreterFrame *current_frame; - struct _cframe *previous; -} CFrame; + struct _PyCFrame *previous; +} _PyCFrame; typedef struct _err_stackitem { /* This struct represents a single execution context where we might @@ -102,9 +104,9 @@ struct _ts { the trace/profile. */ int tracing; - /* Pointer to current CFrame in the C stack frame of the currently, + /* Pointer to current _PyCFrame in the C stack frame of the currently, * or most recently, executing _PyEval_EvalFrameDefault. */ - CFrame *cframe; + _PyCFrame *cframe; Py_tracefunc c_profilefunc; Py_tracefunc c_tracefunc; @@ -196,7 +198,7 @@ struct _ts { _PyErr_StackItem exc_state; /* The bottom-most frame on the stack. */ - CFrame root_cframe; + _PyCFrame root_cframe; }; |