| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7661185 commit ef3d02e
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -61,7 +61,7 @@ extern long PyOS_GetLastModificationTime(); /* In getmtime.c */ | |||
| 61 | 61 | /* New way to come up with the magic number: (YEAR-1995), MONTH, DAY */ | |
| 62 | 62 | #define MAGIC (20121 | ((long)'\r'<<16) | ((long)'\n'<<24)) | |
| 63 | 63 | ||
| 64 | - PyObject *_PyImport_Modules; /* This becomes sys.modules */ | ||
| 64 | + static PyObject *_PyImport_Modules; /* This becomes sys.modules */ | ||
| 65 | 65 | ||
| 66 | 66 | ||
| 67 | 67 | /* Initialize things */ | |
@@ -461,7 +461,7 @@ find_module(name, path, buf, buflen, p_fp) | |||
| 461 | 461 | if (!PyString_Check(v)) | |
| 462 | 462 | continue; | |
| 463 | 463 | len = PyString_Size(v); | |
| 464 | - if (len + 2 + namelen + _PyImport_MaxSuffixSize >= buflen) | ||
| 464 | + if (len + 2 + namelen + MAXSUFFIXSIZE >= buflen) | ||
| 465 | 465 | continue; /* Too long */ | |
| 466 | 466 | strcpy(buf, PyString_AsString(v)); | |
| 467 | 467 | if ((int)strlen(buf) != len) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -126,6 +126,7 @@ typedef void (*dl_funcptr)(); | |||
| 126 | 126 | #endif | |
| 127 | 127 | ||
| 128 | 128 | #ifdef _AIX | |
| 129 | + #undef USE_SHLIB /* AIX 4.2 and higher have dlfcn.h but we don't want it */ | ||
| 129 | 130 | #define DYNAMIC_LINK | |
| 130 | 131 | #define SHORT_EXT ".so" | |
| 131 | 132 | #define LONG_EXT "module.so" | |
@@ -201,14 +202,6 @@ extern char *Py_GetProgramName(); | |||
| 201 | 202 | ||
| 202 | 203 | #endif /* DYNAMIC_LINK */ | |
| 203 | 204 | ||
| 204 | - /* Max length of module suffix searched for -- accommodates "module.slb" */ | ||
| 205 | - #ifndef MAXSUFFIXSIZE | ||
| 206 | - #define MAXSUFFIXSIZE 12 | ||
| 207 | - #endif | ||
| 208 | - | ||
| 209 | - /* Pass it on to import.c */ | ||
| 210 | - int _PyImport_MaxSuffixSize = MAXSUFFIXSIZE; | ||
| 211 | - | ||
| 212 | 205 | struct filedescr _PyImport_Filetab[] = { | |
| 213 | 206 | #ifdef SHORT_EXT | |
| 214 | 207 | {SHORT_EXT, "rb", C_EXTENSION}, | |
@@ -527,7 +520,7 @@ _PyImport_LoadDynamicModule(name, pathname, fp) | |||
| 527 | 520 | (*p)(); | |
| 528 | 521 | /* XXX Need check for err_occurred() here */ | |
| 529 | 522 | ||
| 530 | - m = PyDict_GetItemString(_PyImport_Modules, name); | ||
| 523 | + m = PyDict_GetItemString(PyImport_GetModuleDict(), name); | ||
| 531 | 524 | if (m == NULL) { | |
| 532 | 525 | if (PyErr_Occurred() == NULL) | |
| 533 | 526 | PyErr_SetString(PyExc_SystemError, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -42,9 +42,8 @@ extern struct filedescr { | |||
| 42 | 42 | enum filetype type; | |
| 43 | 43 | } _PyImport_Filetab[]; | |
| 44 | 44 | ||
| 45 | - extern PyObject *_PyImport_Modules; | ||
| 46 | - | ||
| 47 | 45 | extern PyObject *_PyImport_LoadDynamicModule | |
| 48 | 46 | Py_PROTO((char *name, char *pathname, FILE *)); | |
| 49 | 47 | ||
| 50 | - extern int _PyImport_MaxSuffixSize; | ||
| 48 | + /* Max length of module suffix searched for -- accommodates "module.slb" */ | ||
| 49 | + #define MAXSUFFIXSIZE 12 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments