summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-06-24 13:21:54 (GMT)
committerGitHub <noreply@github.com>2020-06-24 13:21:54 (GMT)
commit0430dfac629b4eb0e899a09b899a494aa92145f6 (patch)
tree5d71dc3e81dcd38f88e14157c0048c9acd705a29 /Include
parent80526f68411a9406a9067095fbf6a0f88047cac5 (diff)
downloadcpython-0430dfac629b4eb0e899a09b899a494aa92145f6.zip
cpython-0430dfac629b4eb0e899a09b899a494aa92145f6.tar.gz
cpython-0430dfac629b4eb0e899a09b899a494aa92145f6.tar.bz2
bpo-40521: Always create the empty tuple singleton (GH-21116)
Py_InitializeFromConfig() now always creates the empty tuple singleton as soon as possible. Optimize PyTuple_New(0): it no longer has to check if the empty tuple was created or not, it is always creatd. * Add tuple_create_empty_tuple_singleton() function. * Add tuple_get_empty() function. * Remove state parameter of tuple_alloc().
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_pylifecycle.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Include/internal/pycore_pylifecycle.h b/Include/internal/pycore_pylifecycle.h
index f29c7cb..3b21737 100644
--- a/Include/internal/pycore_pylifecycle.h
+++ b/Include/internal/pycore_pylifecycle.h
@@ -34,6 +34,7 @@ PyAPI_FUNC(int) _Py_IsLocaleCoercionTarget(const char *ctype_loc);
extern PyStatus _PyUnicode_Init(PyThreadState *tstate);
extern int _PyStructSequence_Init(void);
extern int _PyLong_Init(PyThreadState *tstate);
+extern PyStatus _PyTuple_Init(PyThreadState *tstate);
extern PyStatus _PyFaulthandler_Init(int enable);
extern int _PyTraceMalloc_Init(int enable);
extern PyObject * _PyBuiltin_Init(PyThreadState *tstate);