Mercurial > cpython-lru_cache-weakref
comparison Python/import.c @ 22651:f3a416b178c4 legacy-trunk
Remove the CACHE_HASH and INTERN_STRINGS preprocessor symbols.
| author | Tim Peters <tim.peters@gmail.com> |
|---|---|
| date | Fri, 29 Mar 2002 03:29:08 +0000 |
| parents | 5cbcfde3ad55 |
| children | 8703d2052339 |
comparison
equal
deleted
inserted
replaced
| 22650:2288c724fe2b | 22651:f3a416b178c4 |
|---|---|
| 976 continue; /* Too long */ | 976 continue; /* Too long */ |
| 977 strcpy(buf, PyString_AsString(v)); | 977 strcpy(buf, PyString_AsString(v)); |
| 978 if (strlen(buf) != len) | 978 if (strlen(buf) != len) |
| 979 continue; /* v contains '\0' */ | 979 continue; /* v contains '\0' */ |
| 980 #ifdef macintosh | 980 #ifdef macintosh |
| 981 #ifdef INTERN_STRINGS | |
| 982 /* | 981 /* |
| 983 ** Speedup: each sys.path item is interned, and | 982 ** Speedup: each sys.path item is interned, and |
| 984 ** FindResourceModule remembers which items refer to | 983 ** FindResourceModule remembers which items refer to |
| 985 ** folders (so we don't have to bother trying to look | 984 ** folders (so we don't have to bother trying to look |
| 986 ** into them for resources). | 985 ** into them for resources). |
| 987 */ | 986 */ |
| 988 PyString_InternInPlace(&PyList_GET_ITEM(path, i)); | 987 PyString_InternInPlace(&PyList_GET_ITEM(path, i)); |
| 989 v = PyList_GET_ITEM(path, i); | 988 v = PyList_GET_ITEM(path, i); |
| 990 #endif | |
| 991 if (PyMac_FindResourceModule((PyStringObject *)v, name, buf)) { | 989 if (PyMac_FindResourceModule((PyStringObject *)v, name, buf)) { |
| 992 static struct filedescr resfiledescr = | 990 static struct filedescr resfiledescr = |
| 993 {"", "", PY_RESOURCE}; | 991 {"", "", PY_RESOURCE}; |
| 994 | 992 |
| 995 return &resfiledescr; | 993 return &resfiledescr; |
