mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
gh-104549: Set __module__ on TypeAliasType (#104550)
This commit is contained in:
parent
1c55e8d007
commit
b9dce3aec4
9 changed files with 93 additions and 34 deletions
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "Python.h"
|
||||
#include "internal/pycore_interp.h"
|
||||
#include "internal/pycore_typevarobject.h"
|
||||
#include "clinic/_typingmodule.c.h"
|
||||
|
||||
/*[clinic input]
|
||||
|
|
@ -56,9 +57,11 @@ _typing_exec(PyObject *m)
|
|||
EXPORT_TYPE("ParamSpec", paramspec_type);
|
||||
EXPORT_TYPE("ParamSpecArgs", paramspecargs_type);
|
||||
EXPORT_TYPE("ParamSpecKwargs", paramspeckwargs_type);
|
||||
EXPORT_TYPE("TypeAliasType", typealias_type);
|
||||
EXPORT_TYPE("Generic", generic_type);
|
||||
#undef EXPORT_TYPE
|
||||
if (PyModule_AddObjectRef(m, "TypeAliasType", (PyObject *)&_PyTypeAlias_Type) < 0) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue