[issue40600] Add option to disallow > 1 instance of an extension module
mohamed koubaa
report at bugs.python.org
Thu Sep 10 09:48:12 EDT 2020
mohamed koubaa <koubaa.m at gmail.com> added the comment:
Something like this?
```
static PyObject *def;
PyMODINIT_FUNC
PyInit_mymod(void)
{
if (def == NULL) {
def = PyModuleDef_Init(&mymod);
}
return def;
}
```
Then add a flag to PyModuleDef to indicate it is already exec?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40600>
_______________________________________
More information about the Python-bugs-list
mailing list