summaryrefslogtreecommitdiffstats
path: root/Include/moduleobject.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-03-03 22:06:55 (GMT)
committerGitHub <noreply@github.com>2022-03-03 22:06:55 (GMT)
commit0b63215bb152c06404cecbd5303b1a50969a9f9f (patch)
treeb9f9fede81b88f86dbc90fd22268c6a2b359e798 /Include/moduleobject.h
parent4173d677a1d7c72bb32d292fbff1b4cf073d615c (diff)
downloadcpython-0b63215bb152c06404cecbd5303b1a50969a9f9f.zip
cpython-0b63215bb152c06404cecbd5303b1a50969a9f9f.tar.gz
cpython-0b63215bb152c06404cecbd5303b1a50969a9f9f.tar.bz2
bpo-45459: Fix PyModuleDef_Slot type in the limited C API (GH-31668)
Move the type definition to pytypedefs.h.
Diffstat (limited to 'Include/moduleobject.h')
-rw-r--r--Include/moduleobject.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/Include/moduleobject.h b/Include/moduleobject.h
index 2d41f76..8b62c45 100644
--- a/Include/moduleobject.h
+++ b/Include/moduleobject.h
@@ -55,14 +55,12 @@ typedef struct PyModuleDef_Base {
NULL, /* m_copy */ \
}
-struct PyModuleDef_Slot;
-
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
/* New in 3.5 */
-typedef struct PyModuleDef_Slot{
+struct PyModuleDef_Slot {
int slot;
void *value;
-} PyModuleDef_Slot;
+};
#define Py_mod_create 1
#define Py_mod_exec 2