Message77326
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); |
|
Date |
User |
Action |
Args |
2008-12-08 16:50:00 | amaury.forgeotdarc | set | recipients:
+ amaury.forgeotdarc, loewis, georg.brandl, blakemadden |
2008-12-08 16:50:00 | amaury.forgeotdarc | set | messageid: <1228755000.86.0.0216277275439.issue4592@psf.upfronthosting.co.za> |
2008-12-08 16:50:00 | amaury.forgeotdarc | link | issue4592 messages |
2008-12-08 16:50:00 | amaury.forgeotdarc | create | |
|