Skip to content

Commit 72368ed

Browse files
make windows happy
1 parent 84ee07b commit 72368ed

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

Include/internal/pycore_code.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -674,10 +674,6 @@ extern PyObject* _PyCode_ConstantKey(PyObject *obj);
674674

675675
#define NO_LOC_4 (128 | (PY_CODE_LOCATION_INFO_NONE << 3) | 3)
676676

677-
static const PyBytesObject no_location = {
678-
PyVarObject_HEAD_INIT(&PyBytes_Type, 1)
679-
.ob_sval = { NO_LOC_4 }
680-
};
681677

682678
#ifdef __cplusplus
683679
}

Python/ceval.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -931,6 +931,10 @@ int _Py_CheckRecursiveCallPy(
931931
return 0;
932932
}
933933

934+
static const PyBytesObject no_location = {
935+
PyVarObject_HEAD_INIT(&PyBytes_Type, 1)
936+
.ob_sval = { NO_LOC_4 }
937+
};
934938

935939
#ifdef Py_GIL_DISABLED
936940
static _PyCodeArray emtry_cleanup_tlbc = {

Python/specialize.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3204,6 +3204,11 @@ static _PyCodeArray init_cleanup_tlbc = {
32043204
};
32053205
#endif
32063206

3207+
static const PyBytesObject no_location = {
3208+
PyVarObject_HEAD_INIT(&PyBytes_Type, 1)
3209+
.ob_sval = { NO_LOC_4 }
3210+
};
3211+
32073212
const struct _PyCode8 _Py_InitCleanup = {
32083213
_PyVarObject_HEAD_INIT(&PyCode_Type, 3),
32093214
.co_consts = (PyObject *)&_Py_SINGLETON(tuple_empty),

0 commit comments

Comments
 (0)