Implement PEP 366

This commit is contained in:
Nick Coghlan 2007-12-03 12:55:17 +00:00
parent f19b951126
commit ef01d822aa
7 changed files with 212 additions and 81 deletions

View file

@ -30,6 +30,8 @@ PyModule_New(const char *name)
goto fail;
if (PyDict_SetItemString(m->md_dict, "__doc__", Py_None) != 0)
goto fail;
if (PyDict_SetItemString(m->md_dict, "__package__", Py_None) != 0)
goto fail;
Py_DECREF(nameobj);
PyObject_GC_Track(m);
return (PyObject *)m;