diff options
author | Guido van Rossum <guido@python.org> | 1999-12-22 14:09:35 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1999-12-22 14:09:35 (GMT) |
commit | 96a8fb7e99aa8d612473a1dd87e4c1deb8408898 (patch) | |
tree | 0fb56af511a85378667bf868ec96cc8335615dca /Python/import.c | |
parent | 6a90b5e4d0503ce56217795ff7c35a901e4f85a2 (diff) | |
download | cpython-96a8fb7e99aa8d612473a1dd87e4c1deb8408898.zip cpython-96a8fb7e99aa8d612473a1dd87e4c1deb8408898.tar.gz cpython-96a8fb7e99aa8d612473a1dd87e4c1deb8408898.tar.bz2 |
Cleanup patches from Greg Stein:
* in import.c, #ifdef out references to dynamic loading based on
HAVE_DYNAMIC_LOADING
* clean out the platform-specific crud from importdl.c.
[ maybe fold this function into import.c and drop the importdl.c file? Greg.]
* change GetDynLoadFunc's "funcname" parameter to "shortname". change
"name" to "fqname" for clarification.
* each GetDynLoadFunc now creates its own funcname value.
WARNING: as I mentioned previously, we may run into an issue with a
missing "_" on some platforms. Testing will show this pretty quickly,
however.
* move pathname munging into dynload_shlib.c
Diffstat (limited to 'Python/import.c')
-rw-r--r-- | Python/import.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Python/import.c b/Python/import.c index e10463b..bce1b57 100644 --- a/Python/import.c +++ b/Python/import.c @@ -1234,9 +1234,11 @@ load_module(name, fp, buf, type) m = load_compiled_module(name, buf, fp); break; +#ifdef HAVE_DYNAMIC_LOADING case C_EXTENSION: m = _PyImport_LoadDynamicModule(name, buf, fp); break; +#endif #ifdef macintosh case PY_RESOURCE: @@ -2158,6 +2160,8 @@ imp_load_compiled(self, args) return m; } +#ifdef HAVE_DYNAMIC_LOADING + static PyObject * imp_load_dynamic(self, args) PyObject *self; @@ -2180,6 +2184,8 @@ imp_load_dynamic(self, args) return m; } +#endif /* HAVE_DYNAMIC_LOADING */ + static PyObject * imp_load_source(self, args) PyObject *self; @@ -2330,7 +2336,9 @@ static PyMethodDef imp_methods[] = { {"is_builtin", imp_is_builtin, 1}, {"is_frozen", imp_is_frozen, 1}, {"load_compiled", imp_load_compiled, 1}, +#ifdef HAVE_DYNAMIC_LOADING {"load_dynamic", imp_load_dynamic, 1}, +#endif {"load_package", imp_load_package, 1}, #ifdef macintosh {"load_resource", imp_load_resource, 1}, |