Skip to content

Commit d53560d

Browse files
gh-105858: Expose some union-related objects as internal APIs (GH-116025)
We now use these in the AST parsing code after gh-105880. A few comparable types (e.g., NoneType) are already exposed as internal APIs.
1 parent e72576c commit d53560d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Include/internal/pycore_unionobject.h

+4-2
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)