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

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy