summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-10-18 11:44:47 (GMT)
committerGuido van Rossum <guido@python.org>1993-10-18 11:44:47 (GMT)
commitcacd9579d48cb1e2acc3536c9701987b118edf8c (patch)
treea3d31a150228428d44866f8a5e6fe496c5c9dbff /Python
parent842d2ccdcd540399501a918b9724d2eaf5599f39 (diff)
downloadcpython-cacd9579d48cb1e2acc3536c9701987b118edf8c.zip
cpython-cacd9579d48cb1e2acc3536c9701987b118edf8c.tar.gz
cpython-cacd9579d48cb1e2acc3536c9701987b118edf8c.tar.bz2
* 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.
Diffstat (limited to 'Python')
-rw-r--r--Python/import.c14
1 files changed, 8 insertions, 6 deletions
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 @@ get_module(m, name, m_ret)
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,