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 19exec_prefix 20module_search_path 21prefix 22progpath 23 24# Modules/main.c 25orig_argc 26orig_argv 27 28# Python/getopt.c 29opt_ptr 30_PyOS_optarg 31_PyOS_opterr 32_PyOS_optind 33 34 35####################################### 36# REPL 37 38# Parser/myreadline.c 39PyOS_InputHook 40PyOS_ReadlineFunctionPointer 41_PyOS_ReadlineLock 42_PyOS_ReadlineTState 43 44 45####################################### 46# state 47 48# Python/dtoa.c 49p5s 50pmem_next # very slight race 51private_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. 56import_lock 57import_lock_level 58import_lock_thread 59 60# Python/pylifecycle.c 61_PyRuntime 62 63 64#--------------------------------- 65# module globals (PyObject) 66 67# Modules/_functoolsmodule.c 68kwd_mark 69 70# Modules/_localemodule.c 71Error 72 73# Modules/_threadmodule.c 74ThreadError 75 76# Modules/_tracemalloc.c 77unknown_filename 78 79# Modules/gcmodule.c 80gc_str 81 82# Modules/posixmodule.c 83billion 84posix_putenv_garbage 85 86# Modules/signalmodule.c 87DefaultHandler 88IgnoreHandler 89IntHandler 90ItimerError 91 92# Modules/zipimport.c 93ZipImportError 94zip_directory_cache 95 96 97#--------------------------------- 98# module globals (other) 99 100# Modules/_tracemalloc.c 101allocators 102tables_lock 103tracemalloc_config 104tracemalloc_empty_traceback 105tracemalloc_filenames 106tracemalloc_peak_traced_memory 107tracemalloc_reentrant_key 108tracemalloc_traceback 109tracemalloc_tracebacks 110tracemalloc_traced_memory 111tracemalloc_traces 112 113# Modules/faulthandler.c 114fatal_error 115faulthandler_handlers 116old_stack 117stack 118thread 119user_signals 120 121# Modules/posixmodule.c 122posix_constants_confstr 123posix_constants_pathconf 124posix_constants_sysconf 125structseq_new 126ticks_per_second 127 128# Modules/signalmodule.c 129Handlers # main thread only 130is_tripped # main thread only 131main_pid 132main_thread 133old_siginthandler 134wakeup_fd # main thread only 135 136# Modules/zipimport.c 137zip_searchorder 138 139# Python/bltinmodule.c 140Py_FileSystemDefaultEncodeErrors 141Py_FileSystemDefaultEncoding 142Py_HasFileSystemDefaultEncoding 143 144# Python/sysmodule.c 145_PySys_ImplCacheTag 146_PySys_ImplName 147 148 149#--------------------------------- 150# freelists 151 152# Modules/_collectionsmodule.c 153freeblocks 154numfreeblocks 155 156# Objects/classobject.c 157free_list 158numfree 159 160# Objects/dictobject.c 161free_list 162keys_free_list 163numfree 164numfreekeys 165 166# Objects/exceptions.c 167memerrors_freelist 168memerrors_numfree 169 170# Objects/floatobject.c 171free_list 172numfree 173 174# Objects/frameobject.c 175free_list 176numfree 177 178# Objects/genobject.c 179ag_asend_freelist 180ag_asend_freelist_free 181ag_value_freelist 182ag_value_freelist_free 183 184# Objects/listobject.c 185free_list 186numfree 187 188# Objects/methodobject.c 189free_list 190numfree 191 192# Objects/sliceobject.c 193slice_cache # slight race 194 195# Objects/tupleobject.c 196free_list 197numfree 198 199# Python/dtoa.c 200freelist # very slight race 201 202 203#--------------------------------- 204# caches (PyObject) 205 206# Objects/typeobject.c 207method_cache # only for static types 208next_version_tag # only for static types 209 210# Python/dynload_shlib.c 211handles # slight race during import 212nhandles # slight race during import 213 214# Python/import.c 215extensions # slight race on init during import 216 217 218#--------------------------------- 219# caches (other) 220 221# Python/bootstrap_hash.c 222urandom_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 232null_strings 233one_strings 234 235# Objects/dictobject.c 236pydict_global_version 237 238# Objects/moduleobject.c 239max_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 270empty_keys_struct 271empty_values 272 273# Objects/floatobject.c 274detected_double_format 275detected_float_format 276double_format 277float_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 292PyStructSequence_UnnamedField 293 294# Objects/typeobject.c 295name_op 296slotdefs # almost 297slotdefs_initialized # almost 298subtype_getsets_dict_only 299subtype_getsets_full 300subtype_getsets_weakref_only 301tp_new_methoddef 302 303# Objects/unicodeobject.c 304bloom_linebreak 305static_strings # slight race 306 307# Parser/tokenizer.c 308_PyParser_TokenNames 309 310# Python/Python-ast.c 311alias_fields 312 313# Python/codecs.c 314Py_hexdigits 315ucnhash_CAPI # slight performance-only race 316 317# Python/dynload_shlib.c 318_PyImport_DynLoadFiletab 319 320# Python/fileutils.c 321_Py_open_cloexec_works 322force_ascii 323 324# Python/frozen.c 325M___hello__ 326PyImport_FrozenModules 327 328# Python/graminit.c 329_PyParser_Grammar 330dfas 331labels 332 333# Python/import.c 334PyImport_Inittab 335 336# Python/pylifecycle.c 337_TARGET_LOCALES 338 339 340#--------------------------------- 341# initialized (PyObject) 342 343# Objects/bytesobject.c 344characters 345nullstring 346 347# Objects/exceptions.c 348PyExc_RecursionErrorInst 349errnomap 350 351# Objects/longobject.c 352_PyLong_One 353_PyLong_Zero 354small_ints 355 356# Objects/setobject.c 357emptyfrozenset 358 359# Objects/unicodeobject.c 360interned # slight race on init in PyUnicode_InternInPlace() 361unicode_empty 362unicode_latin1 363 364 365#--------------------------------- 366# initialized (other) 367 368# Python/getargs.c 369static_arg_parsers 370 371# Python/pyhash.c 372PyHash_Func 373_Py_HashSecret 374_Py_HashSecret_Initialized 375 376# Python/pylifecycle.c 377_Py_StandardStreamEncoding 378_Py_StandardStreamErrors 379default_home 380env_home 381progname 382Py_BytesWarningFlag 383Py_DebugFlag 384Py_DontWriteBytecodeFlag 385Py_FrozenFlag 386Py_HashRandomizationFlag 387Py_IgnoreEnvironmentFlag 388Py_InspectFlag 389Py_InteractiveFlag 390Py_IsolatedFlag 391Py_NoSiteFlag 392Py_NoUserSiteDirectory 393Py_OptimizeFlag 394Py_QuietFlag 395Py_UnbufferedStdioFlag 396Py_VerboseFlag 397 398 399#--------------------------------- 400# types 401 402# Modules/_threadmodule.c 403Locktype 404RLocktype 405localdummytype 406localtype 407 408# Objects/exceptions.c 409PyExc_BaseException 410PyExc_Exception 411PyExc_GeneratorExit 412PyExc_KeyboardInterrupt 413PyExc_StopAsyncIteration 414PyExc_StopIteration 415PyExc_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 460str_dict 461 462# Objects/boolobject.c 463false_str 464true_str 465 466# Objects/listobject.c 467indexerr 468 469# Python/symtable.c 470__class__ 471dictcomp 472genexpr 473lambda 474listcomp 475setcomp 476top 477 478# Python/sysmodule.c 479whatstrings 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 493