summaryrefslogtreecommitdiffstats
path: root/Include/internal
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2021-02-18 18:20:16 (GMT)
committerGitHub <noreply@github.com>2021-02-18 18:20:16 (GMT)
commit44085a3fc9a150478aec1872dd1079c60dcc42f6 (patch)
tree1120f81009d599e9d5db25978e25ea4d757bc875 /Include/internal
parentcc96231f0a59cc7393943064800ecb6c18892662 (diff)
downloadcpython-44085a3fc9a150478aec1872dd1079c60dcc42f6.zip
cpython-44085a3fc9a150478aec1872dd1079c60dcc42f6.tar.gz
cpython-44085a3fc9a150478aec1872dd1079c60dcc42f6.tar.bz2
bpo-42990: Refactor _PyFrame_New_NoTrack() (GH-24566)
* Refactor _PyFrame_New_NoTrack() and PyFunction_NewWithQualName() code. * PyFrame_New() checks for _PyEval_BuiltinsFromGlobals() failure. * Fix a ref leak in _PyEval_BuiltinsFromGlobals() error path. * Complete PyFunction_GetModule() documentation: it returns a borrowed reference and it can return NULL. * Move _PyEval_BuiltinsFromGlobals() definition to the internal C API. * PyFunction_NewWithQualName() uses _Py_IDENTIFIER() API for the "__name__" string to make it compatible with subinterpreters.
Diffstat (limited to 'Include/internal')
-rw-r--r--Include/internal/pycore_ceval.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/Include/internal/pycore_ceval.h b/Include/internal/pycore_ceval.h
index 0491d48..bb22322 100644
--- a/Include/internal/pycore_ceval.h
+++ b/Include/internal/pycore_ceval.h
@@ -31,9 +31,12 @@ PyAPI_FUNC(void) _PyEval_SetCoroutineOriginTrackingDepth(
PyThreadState *tstate,
int new_depth);
-/* Private function */
void _PyEval_Fini(void);
+
+extern PyObject *_PyEval_BuiltinsFromGlobals(PyObject *globals);
+
+
static inline PyObject*
_PyEval_EvalFrame(PyThreadState *tstate, PyFrameObject *f, int throwflag)
{