Message77326
| 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: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 |
|