summaryrefslogtreecommitdiff
path: root/Include
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-07-17 14:10:21 -0700
committerGitHub <noreply@github.com>2021-07-18 00:10:21 +0300
commit03aad3049d1591c76a219dfe089e5367f88f167e (patch)
tree175acc35bac01a1cf8c7ef160096cc33f2e0064f /Include
parent2d055ce13250a4074f66a945381a149a3cf8c46f (diff)
downloadcpython-git-03aad3049d1591c76a219dfe089e5367f88f167e.tar.gz
[3.10] bpo-44654: Refactor and clean up the union type implementation (GH-27196) (GH-27219)
(cherry picked from commit 0fd27375cabd12e68a2f12cfeca11a2d5043429e)
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_unionobject.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/Include/internal/pycore_unionobject.h b/Include/internal/pycore_unionobject.h
index faa17e0a96..ec6cc01c09 100644
--- a/Include/internal/pycore_unionobject.h
+++ b/Include/internal/pycore_unionobject.h
@@ -8,10 +8,11 @@ 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);
+extern 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)
PyObject *_Py_subs_parameters(PyObject *, PyObject *, PyObject *, PyObject *);
PyObject *_Py_make_parameters(PyObject *);