mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
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.
This commit is contained in:
parent
1f8014c5b4
commit
500c146387
7 changed files with 30 additions and 54 deletions
|
@ -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 *);
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue