cpython/Python
Victor Stinner fce90ca6d1
gh-162214: Test Py_STATS macro using #ifdef (#162225)
Replace "#if Py_STATS" with "#ifdef Py_STATS".
All other C files already check for "#ifdef Py_STATS".

Example of fixed compiler warning when building Python with -Wundef:

    Python/specialize.c:33:5: warning: 'Py_STATS' is not defined,
    evaluates to '0' [-Wundef]
       33 | #if Py_STATS
          |     ^~~~~~~~

On Windows, the Py_STATS macro is now defined to 1 when it's defined.
2026-11-18 22:08:34 +01:00
..
clinic
frozen_modules
_contextvars.c
_strptime.c
_warnings.c
asdl.c
asm_trampoline_aarch64.S
asm_trampoline_riscv64.S
asm_trampoline_x86_64.S
assemble.c
ast.c
ast_preprocess.c
ast_unparse.c
bltinmodule.c
bootstrap_hash.c
brc.c
bytecodes.c gh-162214: Test Py_GIL_DISABLED macro using #ifdef (#162223) 2026-11-18 22:01:23 +01:00
ceval.c
ceval.h
ceval_gil.c
ceval_macros.h
codecs.c
codegen.c
compile.c
condvar.h
config_common.h
context.c
critical_section.c
crossinterp.c gh-161996: Fix crash in Interpreter.exec when the uncaught exception's __str__ raises (GH-162000) 2026-11-16 22:00:31 -05:00
crossinterp_data_lookup.h
crossinterp_exceptions.h
dtoa.c
dup2.c
dynamic_annotations.c
dynload_hpux.c
dynload_shlib.c
dynload_stub.c
dynload_win.c
emscripten_signal.c
emscripten_syscalls.c
errors.c
executor_cases.c.h gh-162214: Test Py_GIL_DISABLED macro using #ifdef (#162223) 2026-11-18 22:01:23 +01:00
fileutils.c
flowgraph.c
frame.c
frozen.c
frozenmain.c
future.c
gc.c
gc_free_threading.c
gc_gil.c
generated_cases.c.h gh-162214: Test Py_GIL_DISABLED macro using #ifdef (#162223) 2026-11-18 22:01:23 +01:00
getargs.c
getcompiler.c
getcopyright.c
getopt.c
getplatform.c
getversion.c
hamt.c
hashtable.c
import.c
importdl.c
index_pool.c
initconfig.c
instruction_sequence.c
instrumentation.c
interpconfig.c
intrinsics.c
jit.c
jit_publish.c
jit_unwind.c
legacy_tracing.c
lock.c gh-162214: Test Py_GIL_DISABLED macro using #ifdef (#162223) 2026-11-18 22:01:23 +01:00
marshal.c
modsupport.c gh-162214: Test Py_GIL_DISABLED macro using #ifdef (#162223) 2026-11-18 22:01:23 +01:00
mysnprintf.c
mystrtoul.c
object_stack.c
opcode_targets.h
optimizer.c
optimizer_analysis.c
optimizer_bytecodes.c
optimizer_cases.c.h
optimizer_symbols.c
parking_lot.c
pathconfig.c
perf_jit_trampoline.c gh-157695: Rename HAVE_GETDENTS64 to _Py_HAVE_GETDENTS64 (#162184) 2026-11-18 13:29:12 +01:00
perf_trampoline.c
preconfig.c
pyarena.c
pyctype.c
pyfpe.c
pyhash.c
pylifecycle.c
pymath.c
pystate.c gh-162214: Test Py_STATS macro using #ifdef (#162225) 2026-11-18 22:08:34 +01:00
pystats.c
pystrcmp.c
pystrhex.c
pystrtod.c
Python-ast.c
Python-tokenize.c
pythonrun.c
pytime.c
qsbr.c
README
record_functions.c.h
remote_debug.h gh-149584: _remote_debugging: Simplify page cache state (GH-162094) 2026-11-16 12:07:10 +00:00
remote_debugging.c
slots.c
slots.toml
slots_generated.c
specialize.c gh-162214: Test Py_STATS macro using #ifdef (#162225) 2026-11-18 22:08:34 +01:00
stackrefs.c
stdlib_module_names.h
structmember.c
suggestions.c
symtable.c
sysmodule.c
thread.c
thread_nt.h
thread_pthread.h gh-157695: Rename HAVE_GETDENTS64 to _Py_HAVE_GETDENTS64 (#162184) 2026-11-18 13:29:12 +01:00
thread_pthread_stubs.h
tier2_engine.md
traceback.c
tracemalloc.c
typecache.c
uniqueid.c
vm-state.md
wasm_trampoline.c

Miscellaneous source files for the main Python shared library.