summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_testmultiphase.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/Modules/_testmultiphase.c b/Modules/_testmultiphase.c
index ad60f32..e0ed77d 100644
--- a/Modules/_testmultiphase.c
+++ b/Modules/_testmultiphase.c
@@ -844,6 +844,28 @@ PyInit__testmultiphase_meth_state_access(PyObject *spec)
return PyModuleDef_Init(&def_meth_state_access);
}
+static PyModuleDef def_module_state_shared = {
+ PyModuleDef_HEAD_INIT,
+ .m_name = "_test_module_state_shared",
+ .m_doc = PyDoc_STR("Regression Test module for single-phase init."),
+ .m_size = -1,
+};
+
+PyMODINIT_FUNC
+PyInit__test_module_state_shared(PyObject *spec)
+{
+ PyObject *module = PyModule_Create(&def_module_state_shared);
+ if (module == NULL) {
+ return NULL;
+ }
+
+ if (PyModule_AddObjectRef(module, "Error", PyExc_Exception) < 0) {
+ Py_DECREF(module);
+ return NULL;
+ }
+ return module;
+}
+
/*** Helper for imp test ***/