* stdwinmodule.c (stdwin_done): interface to shutdown stdwin (now this is
no longer done by config.c).
* stdwinmodule.c (initstdwin), config.c (initall): get command line
arguments from sys.argv instead of special-casing stdwin in config.c
* import.c (get_module): fix core dump when foomodule.o does not define
initfoo().
* ChangeLog: documented changes by Sjoerd.
diff --git a/Python/import.c b/Python/import.c
index 284d881..4d01daf 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -191,20 +191,22 @@
p = (dl_funcptr) dlsym(handle, funcname);
}
#else
+ if (verbose)
+ fprintf(stderr,
+ "import %s # dynamically loaded from \"%s\"\n",
+ name, namebuf);
p = dl_loadmod(argv0, namebuf, funcname);
#endif /* SUN_SHLIB */
if (p == NULL) {
- D(fprintf(stderr, "dl_loadmod failed\n"));
+ err_setstr(SystemError,
+ "dynamic module does not define init function");
+ return NULL;
} else {
- if (verbose)
- fprintf(stderr,
- "import %s # dynamically loaded from \"%s\"\n",
- name, namebuf);
(*p)();
*m_ret = m = dictlookup(modules, name);
if (m == NULL) {
err_setstr(SystemError,
- "dynamic module missing");
+ "dynamic module not initialized properly");
return NULL;
} else {
D(fprintf(stderr,