diff options
author | Victor Stinner <vstinner@python.org> | 2022-01-22 17:55:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-22 17:55:48 (GMT) |
commit | 500c146387b01ea797b52e6a54caf228384e184c (patch) | |
tree | b10c015f37540da45ed534d0b4f9711c12a19f3e /Include | |
parent | 1f8014c5b4ea7acee069ca453f6fbcad5990ebf0 (diff) | |
download | cpython-500c146387b01ea797b52e6a54caf228384e184c.zip cpython-500c146387b01ea797b52e6a54caf228384e184c.tar.gz cpython-500c146387b01ea797b52e6a54caf228384e184c.tar.bz2 |
bpo-46417: Clear more static types (GH-30796)
* Move PyContext static types into object.c static_types list.
* Rename PyContextTokenMissing_Type to _PyContextTokenMissing_Type
and declare it in pycore_context.h.
* _PyHamtItems types are no long exported: replace PyAPI_DATA() with
extern.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/internal/pycore_context.h | 4 | ||||
-rw-r--r-- | Include/internal/pycore_hamt.h | 18 |
2 files changed, 11 insertions, 11 deletions
diff --git a/Include/internal/pycore_context.h b/Include/internal/pycore_context.h index 31ca0a4..1bf4e8f 100644 --- a/Include/internal/pycore_context.h +++ b/Include/internal/pycore_context.h @@ -8,9 +8,11 @@ #include "pycore_hamt.h" /* PyHamtObject */ +extern PyTypeObject _PyContextTokenMissing_Type; + /* runtime lifecycle */ -PyStatus _PyContext_InitTypes(PyInterpreterState *); +PyStatus _PyContext_Init(PyInterpreterState *); void _PyContext_Fini(PyInterpreterState *); diff --git a/Include/internal/pycore_hamt.h b/Include/internal/pycore_hamt.h index cf9c19e..85e35c5 100644 --- a/Include/internal/pycore_hamt.h +++ b/Include/internal/pycore_hamt.h @@ -8,9 +8,16 @@ #define _Py_HAMT_MAX_TREE_DEPTH 7 +extern PyTypeObject _PyHamt_Type; +extern PyTypeObject _PyHamt_ArrayNode_Type; +extern PyTypeObject _PyHamt_BitmapNode_Type; +extern PyTypeObject _PyHamt_CollisionNode_Type; +extern PyTypeObject _PyHamtKeys_Type; +extern PyTypeObject _PyHamtValues_Type; +extern PyTypeObject _PyHamtItems_Type; + /* runtime lifecycle */ -PyStatus _PyHamt_InitTypes(PyInterpreterState *); void _PyHamt_Fini(PyInterpreterState *); @@ -69,15 +76,6 @@ typedef struct { } PyHamtIterator; -PyAPI_DATA(PyTypeObject) _PyHamt_Type; -PyAPI_DATA(PyTypeObject) _PyHamt_ArrayNode_Type; -PyAPI_DATA(PyTypeObject) _PyHamt_BitmapNode_Type; -PyAPI_DATA(PyTypeObject) _PyHamt_CollisionNode_Type; -PyAPI_DATA(PyTypeObject) _PyHamtKeys_Type; -PyAPI_DATA(PyTypeObject) _PyHamtValues_Type; -PyAPI_DATA(PyTypeObject) _PyHamtItems_Type; - - /* Create a new HAMT immutable mapping. */ PyHamtObject * _PyHamt_New(void); |