Eric Snow | 2ebc5ce | 2017-09-07 23:51:28 -0600 | [diff] [blame] | 1 | # All variables declared here are shared between all interpreters |
| 2 | # in a single process. That means that they must not be changed |
| 3 | # unless that change should apply to all interpreters. |
| 4 | # |
| 5 | # See check-c-globals.py. |
| 6 | # |
| 7 | # Many generic names are handled via the script: |
| 8 | # |
| 9 | # * most exceptions and all warnings handled via _is_exception() |
| 10 | # * for builtin modules, generic names are handled via _is_module() |
| 11 | # * generic names for static types handled via _is_type_var() |
| 12 | # * AST vars handled via _is_compiler() |
| 13 | |
| 14 | |
| 15 | ####################################### |
| 16 | # main |
| 17 | |
| 18 | # Modules/getpath.c |
| 19 | exec_prefix |
| 20 | module_search_path |
| 21 | prefix |
| 22 | progpath |
| 23 | |
| 24 | # Modules/main.c |
| 25 | orig_argc |
| 26 | orig_argv |
| 27 | |
| 28 | # Python/getopt.c |
| 29 | opt_ptr |
| 30 | _PyOS_optarg |
| 31 | _PyOS_opterr |
| 32 | _PyOS_optind |
| 33 | |
| 34 | |
| 35 | ####################################### |
| 36 | # REPL |
| 37 | |
| 38 | # Parser/myreadline.c |
| 39 | PyOS_InputHook |
| 40 | PyOS_ReadlineFunctionPointer |
| 41 | _PyOS_ReadlineLock |
| 42 | _PyOS_ReadlineTState |
| 43 | |
| 44 | |
| 45 | ####################################### |
| 46 | # state |
| 47 | |
| 48 | # Python/dtoa.c |
| 49 | p5s |
| 50 | pmem_next # very slight race |
| 51 | private_mem # very slight race |
| 52 | |
| 53 | # Python/import.c |
| 54 | # For the moment the import lock stays global. Ultimately there should |
| 55 | # be a global lock for extension modules and a per-interpreter lock. |
| 56 | import_lock |
| 57 | import_lock_level |
| 58 | import_lock_thread |
| 59 | |
| 60 | # Python/pylifecycle.c |
| 61 | _PyRuntime |
| 62 | |
| 63 | |
| 64 | #--------------------------------- |
| 65 | # module globals (PyObject) |
| 66 | |
| 67 | # Modules/_functoolsmodule.c |
| 68 | kwd_mark |
| 69 | |
| 70 | # Modules/_localemodule.c |
| 71 | Error |
| 72 | |
| 73 | # Modules/_threadmodule.c |
| 74 | ThreadError |
| 75 | |
| 76 | # Modules/_tracemalloc.c |
| 77 | unknown_filename |
| 78 | |
| 79 | # Modules/gcmodule.c |
| 80 | gc_str |
| 81 | |
| 82 | # Modules/posixmodule.c |
| 83 | billion |
| 84 | posix_putenv_garbage |
| 85 | |
| 86 | # Modules/signalmodule.c |
| 87 | DefaultHandler |
| 88 | IgnoreHandler |
| 89 | IntHandler |
| 90 | ItimerError |
| 91 | |
| 92 | # Modules/zipimport.c |
| 93 | ZipImportError |
| 94 | zip_directory_cache |
| 95 | |
| 96 | |
| 97 | #--------------------------------- |
| 98 | # module globals (other) |
| 99 | |
| 100 | # Modules/_tracemalloc.c |
| 101 | allocators |
| 102 | tables_lock |
| 103 | tracemalloc_config |
| 104 | tracemalloc_empty_traceback |
| 105 | tracemalloc_filenames |
| 106 | tracemalloc_peak_traced_memory |
| 107 | tracemalloc_reentrant_key |
| 108 | tracemalloc_traceback |
| 109 | tracemalloc_tracebacks |
| 110 | tracemalloc_traced_memory |
| 111 | tracemalloc_traces |
| 112 | |
| 113 | # Modules/faulthandler.c |
| 114 | fatal_error |
| 115 | faulthandler_handlers |
| 116 | old_stack |
| 117 | stack |
| 118 | thread |
| 119 | user_signals |
| 120 | |
| 121 | # Modules/posixmodule.c |
| 122 | posix_constants_confstr |
| 123 | posix_constants_pathconf |
| 124 | posix_constants_sysconf |
Eric Snow | 2ebc5ce | 2017-09-07 23:51:28 -0600 | [diff] [blame] | 125 | structseq_new |
| 126 | ticks_per_second |
| 127 | |
| 128 | # Modules/signalmodule.c |
| 129 | Handlers # main thread only |
| 130 | is_tripped # main thread only |
| 131 | main_pid |
| 132 | main_thread |
| 133 | old_siginthandler |
| 134 | wakeup_fd # main thread only |
| 135 | |
| 136 | # Modules/zipimport.c |
| 137 | zip_searchorder |
| 138 | |
| 139 | # Python/bltinmodule.c |
| 140 | Py_FileSystemDefaultEncodeErrors |
| 141 | Py_FileSystemDefaultEncoding |
| 142 | Py_HasFileSystemDefaultEncoding |
| 143 | |
| 144 | # Python/sysmodule.c |
| 145 | _PySys_ImplCacheTag |
| 146 | _PySys_ImplName |
| 147 | |
| 148 | |
| 149 | #--------------------------------- |
| 150 | # freelists |
| 151 | |
| 152 | # Modules/_collectionsmodule.c |
| 153 | freeblocks |
| 154 | numfreeblocks |
| 155 | |
| 156 | # Objects/classobject.c |
| 157 | free_list |
| 158 | numfree |
| 159 | |
| 160 | # Objects/dictobject.c |
| 161 | free_list |
| 162 | keys_free_list |
| 163 | numfree |
| 164 | numfreekeys |
| 165 | |
| 166 | # Objects/exceptions.c |
| 167 | memerrors_freelist |
| 168 | memerrors_numfree |
| 169 | |
| 170 | # Objects/floatobject.c |
| 171 | free_list |
| 172 | numfree |
| 173 | |
| 174 | # Objects/frameobject.c |
| 175 | free_list |
| 176 | numfree |
| 177 | |
| 178 | # Objects/genobject.c |
| 179 | ag_asend_freelist |
| 180 | ag_asend_freelist_free |
| 181 | ag_value_freelist |
| 182 | ag_value_freelist_free |
| 183 | |
| 184 | # Objects/listobject.c |
| 185 | free_list |
| 186 | numfree |
| 187 | |
| 188 | # Objects/methodobject.c |
| 189 | free_list |
| 190 | numfree |
| 191 | |
| 192 | # Objects/sliceobject.c |
| 193 | slice_cache # slight race |
| 194 | |
| 195 | # Objects/tupleobject.c |
| 196 | free_list |
| 197 | numfree |
| 198 | |
| 199 | # Python/dtoa.c |
| 200 | freelist # very slight race |
| 201 | |
| 202 | |
| 203 | #--------------------------------- |
| 204 | # caches (PyObject) |
| 205 | |
| 206 | # Objects/typeobject.c |
| 207 | method_cache # only for static types |
| 208 | next_version_tag # only for static types |
| 209 | |
| 210 | # Python/dynload_shlib.c |
| 211 | handles # slight race during import |
| 212 | nhandles # slight race during import |
| 213 | |
| 214 | # Python/import.c |
| 215 | extensions # slight race on init during import |
| 216 | |
| 217 | |
| 218 | #--------------------------------- |
| 219 | # caches (other) |
| 220 | |
| 221 | # Python/bootstrap_hash.c |
| 222 | urandom_cache |
| 223 | |
| 224 | # Python/modsupport.c |
| 225 | _Py_PackageContext # Slight race during import! Move to PyThreadState? |
| 226 | |
| 227 | |
| 228 | #--------------------------------- |
| 229 | # counters |
| 230 | |
| 231 | # Objects/bytesobject.c |
| 232 | null_strings |
| 233 | one_strings |
| 234 | |
| 235 | # Objects/dictobject.c |
| 236 | pydict_global_version |
| 237 | |
| 238 | # Objects/moduleobject.c |
| 239 | max_module_number # slight race during import |
| 240 | |
| 241 | |
| 242 | ####################################### |
| 243 | # constants |
| 244 | |
| 245 | #--------------------------------- |
| 246 | # singletons |
| 247 | |
| 248 | # Objects/boolobject.c |
| 249 | _Py_FalseStruct |
| 250 | _Py_TrueStruct |
| 251 | |
| 252 | # Objects/object.c |
| 253 | _Py_NoneStruct |
| 254 | _Py_NotImplementedStruct |
| 255 | |
| 256 | # Objects/sliceobject.c |
| 257 | _Py_EllipsisObject |
| 258 | |
| 259 | |
| 260 | #--------------------------------- |
| 261 | # constants (other) |
| 262 | |
| 263 | # Modules/config.c |
| 264 | _PyImport_Inittab |
| 265 | |
| 266 | # Objects/bytearrayobject.c |
| 267 | _PyByteArray_empty_string |
| 268 | |
| 269 | # Objects/dictobject.c |
| 270 | empty_keys_struct |
| 271 | empty_values |
| 272 | |
| 273 | # Objects/floatobject.c |
| 274 | detected_double_format |
| 275 | detected_float_format |
| 276 | double_format |
| 277 | float_format |
| 278 | |
| 279 | # Objects/longobject.c |
| 280 | _PyLong_DigitValue |
| 281 | |
| 282 | # Objects/object.c |
| 283 | _Py_SwappedOp |
| 284 | |
| 285 | # Objects/obmalloc.c |
| 286 | _PyMem_Debug |
| 287 | |
| 288 | # Objects/setobject.c |
| 289 | _dummy_struct |
| 290 | |
| 291 | # Objects/structseq.c |
| 292 | PyStructSequence_UnnamedField |
| 293 | |
| 294 | # Objects/typeobject.c |
| 295 | name_op |
| 296 | slotdefs # almost |
| 297 | slotdefs_initialized # almost |
| 298 | subtype_getsets_dict_only |
| 299 | subtype_getsets_full |
| 300 | subtype_getsets_weakref_only |
| 301 | tp_new_methoddef |
| 302 | |
| 303 | # Objects/unicodeobject.c |
| 304 | bloom_linebreak |
| 305 | static_strings # slight race |
| 306 | |
| 307 | # Parser/tokenizer.c |
| 308 | _PyParser_TokenNames |
| 309 | |
| 310 | # Python/Python-ast.c |
| 311 | alias_fields |
| 312 | |
| 313 | # Python/codecs.c |
| 314 | Py_hexdigits |
| 315 | ucnhash_CAPI # slight performance-only race |
| 316 | |
| 317 | # Python/dynload_shlib.c |
| 318 | _PyImport_DynLoadFiletab |
| 319 | |
| 320 | # Python/fileutils.c |
| 321 | _Py_open_cloexec_works |
| 322 | force_ascii |
| 323 | |
| 324 | # Python/frozen.c |
| 325 | M___hello__ |
| 326 | PyImport_FrozenModules |
| 327 | |
| 328 | # Python/graminit.c |
| 329 | _PyParser_Grammar |
| 330 | dfas |
| 331 | labels |
| 332 | |
| 333 | # Python/import.c |
| 334 | PyImport_Inittab |
| 335 | |
| 336 | # Python/pylifecycle.c |
| 337 | _TARGET_LOCALES |
| 338 | |
| 339 | |
| 340 | #--------------------------------- |
| 341 | # initialized (PyObject) |
| 342 | |
| 343 | # Objects/bytesobject.c |
| 344 | characters |
| 345 | nullstring |
| 346 | |
| 347 | # Objects/exceptions.c |
| 348 | PyExc_RecursionErrorInst |
| 349 | errnomap |
| 350 | |
| 351 | # Objects/longobject.c |
| 352 | _PyLong_One |
| 353 | _PyLong_Zero |
| 354 | small_ints |
| 355 | |
| 356 | # Objects/setobject.c |
| 357 | emptyfrozenset |
| 358 | |
| 359 | # Objects/unicodeobject.c |
| 360 | interned # slight race on init in PyUnicode_InternInPlace() |
| 361 | unicode_empty |
| 362 | unicode_latin1 |
| 363 | |
| 364 | |
| 365 | #--------------------------------- |
| 366 | # initialized (other) |
| 367 | |
| 368 | # Python/getargs.c |
| 369 | static_arg_parsers |
| 370 | |
| 371 | # Python/pyhash.c |
| 372 | PyHash_Func |
| 373 | _Py_HashSecret |
| 374 | _Py_HashSecret_Initialized |
| 375 | |
| 376 | # Python/pylifecycle.c |
| 377 | _Py_StandardStreamEncoding |
| 378 | _Py_StandardStreamErrors |
| 379 | default_home |
| 380 | env_home |
| 381 | progname |
| 382 | Py_BytesWarningFlag |
| 383 | Py_DebugFlag |
| 384 | Py_DontWriteBytecodeFlag |
| 385 | Py_FrozenFlag |
| 386 | Py_HashRandomizationFlag |
| 387 | Py_IgnoreEnvironmentFlag |
| 388 | Py_InspectFlag |
| 389 | Py_InteractiveFlag |
| 390 | Py_IsolatedFlag |
| 391 | Py_NoSiteFlag |
| 392 | Py_NoUserSiteDirectory |
| 393 | Py_OptimizeFlag |
| 394 | Py_QuietFlag |
| 395 | Py_UnbufferedStdioFlag |
Eric Snow | 2ebc5ce | 2017-09-07 23:51:28 -0600 | [diff] [blame] | 396 | Py_VerboseFlag |
| 397 | |
| 398 | |
| 399 | #--------------------------------- |
| 400 | # types |
| 401 | |
| 402 | # Modules/_threadmodule.c |
| 403 | Locktype |
| 404 | RLocktype |
| 405 | localdummytype |
| 406 | localtype |
| 407 | |
| 408 | # Objects/exceptions.c |
| 409 | PyExc_BaseException |
| 410 | PyExc_Exception |
| 411 | PyExc_GeneratorExit |
| 412 | PyExc_KeyboardInterrupt |
| 413 | PyExc_StopAsyncIteration |
| 414 | PyExc_StopIteration |
| 415 | PyExc_SystemExit |
| 416 | _PyExc_BaseException |
| 417 | _PyExc_Exception |
| 418 | _PyExc_GeneratorExit |
| 419 | _PyExc_KeyboardInterrupt |
| 420 | _PyExc_StopAsyncIteration |
| 421 | _PyExc_StopIteration |
| 422 | _PyExc_SystemExit |
| 423 | |
| 424 | # Objects/structseq.c |
| 425 | _struct_sequence_template |
| 426 | |
| 427 | |
| 428 | #--------------------------------- |
| 429 | # interned strings/bytes |
| 430 | |
| 431 | # Modules/_io/_iomodule.c |
| 432 | _PyIO_empty_bytes |
| 433 | _PyIO_empty_str |
| 434 | _PyIO_str_close |
| 435 | _PyIO_str_closed |
| 436 | _PyIO_str_decode |
| 437 | _PyIO_str_encode |
| 438 | _PyIO_str_fileno |
| 439 | _PyIO_str_flush |
| 440 | _PyIO_str_getstate |
| 441 | _PyIO_str_isatty |
| 442 | _PyIO_str_newlines |
| 443 | _PyIO_str_nl |
| 444 | _PyIO_str_read |
| 445 | _PyIO_str_read1 |
| 446 | _PyIO_str_readable |
| 447 | _PyIO_str_readall |
| 448 | _PyIO_str_readinto |
| 449 | _PyIO_str_readline |
| 450 | _PyIO_str_reset |
| 451 | _PyIO_str_seek |
| 452 | _PyIO_str_seekable |
| 453 | _PyIO_str_setstate |
| 454 | _PyIO_str_tell |
| 455 | _PyIO_str_truncate |
| 456 | _PyIO_str_writable |
| 457 | _PyIO_str_write |
| 458 | |
| 459 | # Modules/_threadmodule.c |
| 460 | str_dict |
| 461 | |
| 462 | # Objects/boolobject.c |
| 463 | false_str |
| 464 | true_str |
| 465 | |
| 466 | # Objects/listobject.c |
| 467 | indexerr |
| 468 | |
| 469 | # Python/symtable.c |
| 470 | __class__ |
| 471 | dictcomp |
| 472 | genexpr |
| 473 | lambda |
| 474 | listcomp |
| 475 | setcomp |
| 476 | top |
| 477 | |
| 478 | # Python/sysmodule.c |
| 479 | whatstrings |
| 480 | |
| 481 | |
| 482 | ####################################### |
| 483 | # hacks |
| 484 | |
| 485 | # Objects/object.c |
| 486 | _Py_abstract_hack |
| 487 | |
| 488 | # Objects/setobject.c |
| 489 | _PySet_Dummy |
| 490 | |
| 491 | # Python/pylifecycle.c |
| 492 | _PyOS_mystrnicmp_hack |