diff options
author | Georg Brandl <georg@python.org> | 2007-08-23 18:08:06 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-08-23 18:08:06 (GMT) |
commit | add36e5fdf2272c9f2c7fb9239bc4a6621e46d2d (patch) | |
tree | d6c54ed220bf118a5c73c8d2e6aa120e4741e833 /Python | |
parent | 7cf40799ef5f323117920cc58d3dea258d8f2bce (diff) | |
download | cpython-add36e5fdf2272c9f2c7fb9239bc4a6621e46d2d.zip cpython-add36e5fdf2272c9f2c7fb9239bc4a6621e46d2d.tar.gz cpython-add36e5fdf2272c9f2c7fb9239bc4a6621e46d2d.tar.bz2 |
Second half of #1752175: #ifdef out references to PyImport_DynLoadFiletab if HAVE_DYNAMIC_LOADING is not defined.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/import.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Python/import.c b/Python/import.c index 678a30b..e5f7cc6 100644 --- a/Python/import.c +++ b/Python/import.c @@ -119,15 +119,19 @@ _PyImport_Init(void) /* prepare _PyImport_Filetab: copy entries from _PyImport_DynLoadFiletab and _PyImport_StandardFiletab. */ +#ifdef HAVE_DYNAMIC_LOADING for (scan = _PyImport_DynLoadFiletab; scan->suffix != NULL; ++scan) ++countD; +#endif for (scan = _PyImport_StandardFiletab; scan->suffix != NULL; ++scan) ++countS; filetab = PyMem_NEW(struct filedescr, countD + countS + 1); if (filetab == NULL) Py_FatalError("Can't initialize import file table."); +#ifdef HAVE_DYNAMIC_LOADING memcpy(filetab, _PyImport_DynLoadFiletab, countD * sizeof(struct filedescr)); +#endif memcpy(filetab + countD, _PyImport_StandardFiletab, countS * sizeof(struct filedescr)); filetab[countD + countS].suffix = NULL; @@ -1364,7 +1368,7 @@ find_module(char *fullname, char *subname, PyObject *path, char *buf, saved_namelen = namelen; #endif /* PYOS_OS2 */ for (fdp = _PyImport_Filetab; fdp->suffix != NULL; fdp++) { -#if defined(PYOS_OS2) +#if defined(PYOS_OS2) && defined(HAVE_DYNAMIC_LOADING) /* OS/2 limits DLLs to 8 character names (w/o extension) * so if the name is longer than that and its a |