]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-115441: Fix missing braces warning (#115460)
authorSam Gross <colesbury@gmail.com>
Wed, 14 Feb 2024 17:27:39 +0000 (12:27 -0500)
committerGitHub <noreply@github.com>
Wed, 14 Feb 2024 17:27:39 +0000 (12:27 -0500)
Removes `_py_object_state_INIT`. We want to initialize the `object_state` field to zero.

Include/internal/pycore_runtime_init.h

index 571a7d612c94e2559515fdde42149adc8aaf9251..7a05c105d7bf1285a8402ebb0a833c4bf43064dc 100644 (file)
@@ -169,7 +169,6 @@ extern PyTypeObject _PyExc_MemoryError;
                 { .threshold = 10, }, \
             }, \
         }, \
-        .object_state = _py_object_state_INIT(INTERP), \
         .dtoa = _dtoa_state_INIT(&(INTERP)), \
         .dict_state = _dict_state_INIT, \
         .func_state = { \
@@ -206,16 +205,6 @@ extern PyTypeObject _PyExc_MemoryError;
         .context_ver = 1, \
     }
 
-#ifdef Py_TRACE_REFS
-# define _py_object_state_INIT(INTERP) \
-    { \
-        .refchain = NULL, \
-    }
-#else
-# define _py_object_state_INIT(INTERP) \
-    { 0 }
-#endif
-
 
 // global objects