]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
make windows happy
authorKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Wed, 29 Oct 2025 14:51:33 +0000 (14:51 +0000)
committerKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Wed, 29 Oct 2025 14:51:33 +0000 (14:51 +0000)
Include/internal/pycore_code.h
Python/ceval.c
Python/specialize.c

index 434f47374f793fb00372b2bfe2d72fc79f9427dd..7970d674440c935b5475d1fe3b93cb4a538363fe 100644 (file)
@@ -674,10 +674,6 @@ extern PyObject* _PyCode_ConstantKey(PyObject *obj);
 
 #define NO_LOC_4 (128 | (PY_CODE_LOCATION_INFO_NONE << 3) | 3)
 
-static const PyBytesObject no_location = {
-    PyVarObject_HEAD_INIT(&PyBytes_Type, 1)
-    .ob_sval = { NO_LOC_4 }
-};
 
 #ifdef __cplusplus
 }
index f2dd8fc6e8d79265164693521b0427b753c248a1..09fd30b0c8a030d523805ffe5b320a8ff1efa3d1 100644 (file)
@@ -931,6 +931,10 @@ int _Py_CheckRecursiveCallPy(
     return 0;
 }
 
+static const PyBytesObject no_location = {
+    PyVarObject_HEAD_INIT(&PyBytes_Type, 1)
+    .ob_sval = { NO_LOC_4 }
+};
 
 #ifdef Py_GIL_DISABLED
 static _PyCodeArray emtry_cleanup_tlbc = {
index 0583873e09d2be13091ad7f165b5b543f919bc38..8a7ba00e2e101d003bd5f27f9740dff79be6a370 100644 (file)
@@ -3204,6 +3204,11 @@ static _PyCodeArray init_cleanup_tlbc = {
 };
 #endif
 
+static const PyBytesObject no_location = {
+    PyVarObject_HEAD_INIT(&PyBytes_Type, 1)
+    .ob_sval = { NO_LOC_4 }
+};
+
 const struct _PyCode8 _Py_InitCleanup = {
     _PyVarObject_HEAD_INIT(&PyCode_Type, 3),
     .co_consts = (PyObject *)&_Py_SINGLETON(tuple_empty),