Calling PyState_AddModule in module init?
Sept. 13, 2019
3:58 p.m.
Hello, Currently it's not necessary to call PyState_AddModule in a module PyInit_* function. For single-phase init modules, Python calls it automatically. However, documentation of PyState_FindModule sugests that you need to call PyState_AddModule.
I wrote what I think is the expected behavior in PR 16101, but I'm not sure that's actually it. If anyone who knows the original intent is reading this, could you chime in? :)
2405
Age (days ago)
2416
Last active (days ago)
5 comments
3 participants
participants (3)
-
Eddie Elizondo -
Nick Coghlan -
Petr Viktorin