diff options
author | Victor Stinner <vstinner@python.org> | 2020-03-20 16:46:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-20 16:46:56 (GMT) |
commit | 6723e933c4d90a408cf3818362a0e4de6d84c932 (patch) | |
tree | fd3c18220235a2ad81a97a1a4728cb145c4fe4c8 /Python/pystate.c | |
parent | fd1e1a18fa3befe5b6eeac32e0561e15c7e5164b (diff) | |
download | cpython-6723e933c4d90a408cf3818362a0e4de6d84c932.zip cpython-6723e933c4d90a408cf3818362a0e4de6d84c932.tar.gz cpython-6723e933c4d90a408cf3818362a0e4de6d84c932.tar.bz2 |
bpo-39946: Remove _PyThreadState_GetFrame (GH-19094)
Remove _PyRuntime.getframe hook and remove _PyThreadState_GetFrame
macro which was an alias to _PyRuntime.getframe. They were only
exposed by the internal C API. Remove also PyThreadFrameGetter type.
Diffstat (limited to 'Python/pystate.c')
-rw-r--r-- | Python/pystate.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/Python/pystate.c b/Python/pystate.c index eea666b..6331a85 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -546,13 +546,6 @@ PyInterpreterState_GetDict(PyInterpreterState *interp) return interp->dict; } -/* Default implementation for _PyThreadState_GetFrame */ -static struct _frame * -threadstate_getframe(PyThreadState *self) -{ - return self->frame; -} - static PyThreadState * new_threadstate(PyInterpreterState *interp, int init) { @@ -562,10 +555,6 @@ new_threadstate(PyInterpreterState *interp, int init) return NULL; } - if (_PyThreadState_GetFrame == NULL) { - _PyThreadState_GetFrame = threadstate_getframe; - } - tstate->interp = interp; tstate->frame = NULL; @@ -1000,9 +989,6 @@ PyInterpreterState * PyThreadState_GetInterpreter(PyThreadState *tstate) { assert(tstate != NULL); - if (tstate == NULL) { - return NULL; - } return tstate->interp; } @@ -1011,7 +997,7 @@ struct _frame* PyThreadState_GetFrame(PyThreadState *tstate) { assert(tstate != NULL); - return _PyThreadState_GetFrame(tstate); + return tstate->frame; } |