8000 gh-105858: Expose some union-related objects as internal APIs (GH-116… · adorilson/cpython@7eb8096 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7eb8096

Browse files
JelleZijlstraadorilson
authored andcommitted
pythongh-105858: Expose some union-related objects as internal APIs (pythonGH-116025)
We now use these in the AST parsing code after pythongh-105880. A few comparable types (e.g., NoneType) are already exposed as internal APIs.
1 parent 44286f7 commit 7eb8096

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Include/internal/pycore_unionobject.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ extern "C" {
88
# error "this header requires Py_BUILD_CORE define"
99
#endif
1010

11-
extern PyTypeObject _PyUnion_Type;
11+
// For extensions created by test_peg_generator
12+
PyAPI_DATA(PyTypeObject) _PyUnion_Type;
13+
PyAPI_FUNC(PyObject *) _Py_union_type_or(PyObject *, PyObject *);
14+
1215
#define _PyUnion_Check(op) Py_IS_TYPE((op), &_PyUnion_Type)
13-
extern PyObject *_Py_union_type_or(PyObject *, PyObject *);
1416

1517
#define _PyGenericAlias_Check(op) PyObject_TypeCheck((op), &Py_GenericAliasType)
1618
extern PyObject *_Py_subs_parameters(PyObject *, PyObject *, PyObject *, PyObject *);

0 commit comments

Comments
 (0)
0