This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, blakemadden, georg.brandl, loewis
Date 2008-12-08.16:50:00
SpamBayes Score 2.6271091e-05
Marked as misclassified No
Message-id <1228755000.86.0.0216277275439.issue4592@psf.upfronthosting.co.za>
In-reply-to
Content
In python2.6, Py_InitModule4() calls PyImport_AddModule().
Why doesn't python3.0's PyModule_Create() do the same?

Index: Objects/moduleobject.c
===================================================================
--- Objects/moduleobject.c      (revision 67577)
+++ Objects/moduleobject.c      (working copy)
@@ -103,8 +103,9 @@
                        _Py_PackageContext = NULL;
                }
        }
-       if ((m = (PyModuleObject*)PyModule_New(name)) == NULL)
+       if ((m = (PyModuleObject*)PyImport_AddModule(name)) == NULL)
                return NULL;
+       Py_INCREF(m);

        if (module->m_size > 0) {
                m->md_state = PyMem_MALLOC(module->m_size);
History
Date User Action Args
2008-12-08 16:50:00amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, loewis, georg.brandl, blakemadden
2008-12-08 16:50:00amaury.forgeotdarcsetmessageid: <1228755000.86.0.0216277275439.issue4592@psf.upfronthosting.co.za>
2008-12-08 16:50:00amaury.forgeotdarclinkissue4592 messages
2008-12-08 16:50:00amaury.forgeotdarccreate