[issue18426] Crash when extension does not use PyModule_Create()

Amaury Forgeot d'Arc report at bugs.python.org
Thu Jul 11 11:32:33 CEST 2013


Amaury Forgeot d'Arc added the comment:

I'm not sure the fix is correct: PyModule_GetDef() can return NULL without setting an error, for example when the init function returns a regular Python module.

I'm OK to require the init function to return a module created with PyModule_Create(), and fail when it's not the case. But an exception should be set.
(and a unit test would help...)

----------
nosy: +amaury.forgeotdarc

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18426>
_______________________________________


More information about the Python-bugs-list mailing list