From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Fri, 7 Nov 2025 21:05:21 +0000 (+0000) Subject: reduce diff X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10fa14aabba2d89572dd440322c013af60906fcb;p=thirdparty%2FPython%2Fcpython.git reduce diff --- diff --git a/Include/internal/pycore_code.h b/Include/internal/pycore_code.h index 7970d674440c..2d7d81d491c1 100644 --- a/Include/internal/pycore_code.h +++ b/Include/internal/pycore_code.h @@ -672,8 +672,6 @@ PyAPI_FUNC(int) _PyCode_ReturnsOnlyNone(PyCodeObject *); * compare bytes and str which can raise a BytesWarning exception. */ extern PyObject* _PyCode_ConstantKey(PyObject *obj); -#define NO_LOC_4 (128 | (PY_CODE_LOCATION_INFO_NONE << 3) | 3) - #ifdef __cplusplus } diff --git a/Python/specialize.c b/Python/specialize.c index 8a7ba00e2e10..a1c5dedd6156 100644 --- a/Python/specialize.c +++ b/Python/specialize.c @@ -3196,6 +3196,12 @@ _Py_GatherStats_GetIter(_PyStackRef iterable) * be lifted. */ +#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 Py_GIL_DISABLED static _PyCodeArray init_cleanup_tlbc = { @@ -3204,11 +3210,6 @@ 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),