mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
bpo-44654: Refactor and clean up the union type implementation (GH-27196)
This commit is contained in:
parent
f88e138a1a
commit
0fd27375ca
9 changed files with 88 additions and 125 deletions
|
|
@ -8,9 +8,13 @@ extern "C" {
|
|||
# error "this header requires Py_BUILD_CORE define"
|
||||
#endif
|
||||
|
||||
PyAPI_FUNC(PyObject *) _Py_Union(PyObject *args);
|
||||
PyAPI_DATA(PyTypeObject) _Py_UnionType;
|
||||
PyAPI_FUNC(PyObject *) _Py_union_type_or(PyObject* self, PyObject* param);
|
||||
PyAPI_DATA(PyTypeObject) _PyUnion_Type;
|
||||
#define _PyUnion_Check(op) Py_IS_TYPE(op, &_PyUnion_Type)
|
||||
PyAPI_FUNC(PyObject *) _Py_union_type_or(PyObject *, PyObject *);
|
||||
|
||||
#define _PyGenericAlias_Check(op) PyObject_TypeCheck(op, &Py_GenericAliasType)
|
||||
PyAPI_FUNC(PyObject *) _Py_subs_parameters(PyObject *, PyObject *, PyObject *, PyObject *);
|
||||
PyAPI_FUNC(PyObject *) _Py_make_parameters(PyObject *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue