Implement PEP 3121: new module initialization and finalization API.

This commit is contained in:
Martin v. Löwis 2008-06-11 05:26:20 +00:00
parent cdf94635d7
commit 1a21451b1d
113 changed files with 2230 additions and 855 deletions

View file

@ -34,7 +34,7 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
PyErr_SetString(PyExc_ImportError, buf);
return NULL;
}
PyOS_snprintf(funcname, sizeof(funcname), "init%.200s", shortname);
PyOS_snprintf(funcname, sizeof(funcname), "PyInit_%.200s", shortname);
if (Py_VerboseFlag)
printf("get_symbol_address %s\n", funcname);
if (get_symbol_address(lib, funcname, -1, &p) < 0) {