Author koubaa
Recipients corona10, eric.snow, koubaa, terry.reedy, vstinner
Date 2020-09-07.19:07:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1599505623.9.0.597985807538.issue40600@roundup.psfhosted.org>
In-reply-to
Content
What about a new PyModuleDef_Slot function?


```
static int my_can_create(/*need any arg??, InterpreterState, etc?*/) {
    if (test_global_condition()) {
        return -1; //Don't allow creation
    }
    return 0; //Allow creation
};

static PyModuleDef_Slot signal_slots[] = {
    {Py_mod_exec, my_exec},
    {Py_mod_can_create, my_can_create},
    {0,0}
};

```
History
Date User Action Args
2020-09-07 19:07:03koubaasetrecipients: + koubaa, terry.reedy, vstinner, eric.snow, corona10
2020-09-07 19:07:03koubaasetmessageid: <1599505623.9.0.597985807538.issue40600@roundup.psfhosted.org>
2020-09-07 19:07:03koubaalinkissue40600 messages
2020-09-07 19:07:03koubaacreate