Mercurial > cpython-lru_cache-weakref
comparison Python/pythonrun.c @ 19343:7257e87e0720 legacy-trunk
Patch #445762: Support --disable-unicode
- Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled
- check for Py_USING_UNICODE in all places that use Unicode functions
- disables unicode literals, and the builtin functions
- add the types.StringTypes list
- remove Unicode literals from most tests.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Fri, 17 Aug 2001 18:39:25 +0000 |
| parents | 1069090b124e |
| children | c0a44829bcd5 |
comparison
equal
deleted
inserted
replaced
| 19342:8144722dc076 | 19343:7257e87e0720 |
|---|---|
| 123 Py_FatalError("Py_Initialize: can't make modules dictionary"); | 123 Py_FatalError("Py_Initialize: can't make modules dictionary"); |
| 124 | 124 |
| 125 /* Init codec registry */ | 125 /* Init codec registry */ |
| 126 _PyCodecRegistry_Init(); | 126 _PyCodecRegistry_Init(); |
| 127 | 127 |
| 128 #ifdef Py_USING_UNICODE | |
| 128 /* Init Unicode implementation; relies on the codec registry */ | 129 /* Init Unicode implementation; relies on the codec registry */ |
| 129 _PyUnicode_Init(); | 130 _PyUnicode_Init(); |
| 131 #endif | |
| 130 | 132 |
| 131 bimod = _PyBuiltin_Init(); | 133 bimod = _PyBuiltin_Init(); |
| 132 if (bimod == NULL) | 134 if (bimod == NULL) |
| 133 Py_FatalError("Py_Initialize: can't initialize __builtin__"); | 135 Py_FatalError("Py_Initialize: can't initialize __builtin__"); |
| 134 interp->builtins = PyModule_GetDict(bimod); | 136 interp->builtins = PyModule_GetDict(bimod); |
| 204 interp = tstate->interp; | 206 interp = tstate->interp; |
| 205 | 207 |
| 206 /* Disable signal handling */ | 208 /* Disable signal handling */ |
| 207 PyOS_FiniInterrupts(); | 209 PyOS_FiniInterrupts(); |
| 208 | 210 |
| 211 #ifdef Py_USING_UNICODE | |
| 209 /* Cleanup Unicode implementation */ | 212 /* Cleanup Unicode implementation */ |
| 210 _PyUnicode_Fini(); | 213 _PyUnicode_Fini(); |
| 214 #endif | |
| 211 | 215 |
| 212 /* Cleanup Codec registry */ | 216 /* Cleanup Codec registry */ |
| 213 _PyCodecRegistry_Fini(); | 217 _PyCodecRegistry_Fini(); |
| 214 | 218 |
| 215 /* Destroy all modules */ | 219 /* Destroy all modules */ |
