diff options
author | shadchin <shadchin@yandex-team.com> | 2023-08-17 11:03:28 +0300 |
---|---|---|
committer | shadchin <shadchin@yandex-team.com> | 2023-08-17 13:26:56 +0300 |
commit | 927f38ced6a8eec2b30ffcdc6ccf74a2a2b3c450 (patch) | |
tree | ed15ad7b45042428e011a8bc874b36153d859394 /contrib/tools/cython | |
parent | 2c1c42926da1c9de23cac9f100df8b3706dd6377 (diff) | |
download | ydb-927f38ced6a8eec2b30ffcdc6ccf74a2a2b3c450.tar.gz |
Remove unnecessary patch from Cython
Diffstat (limited to 'contrib/tools/cython')
-rw-r--r-- | contrib/tools/cython/Cython/Utility/Profile.c | 13 | ||||
-rwxr-xr-x | contrib/tools/cython/cython.py | 2 | ||||
-rw-r--r-- | contrib/tools/cython/patches/all-changes.patch | 43 |
3 files changed, 4 insertions, 54 deletions
diff --git a/contrib/tools/cython/Cython/Utility/Profile.c b/contrib/tools/cython/Cython/Utility/Profile.c index 662f968040..a0ab1fa989 100644 --- a/contrib/tools/cython/Cython/Utility/Profile.c +++ b/contrib/tools/cython/Cython/Utility/Profile.c @@ -235,8 +235,6 @@ #ifdef WITH_THREAD #define __Pyx_TraceLine(lineno, nogil, goto_error) \ if (likely(!__Pyx_use_tracing)); else { \ - // mark error label as used to avoid compiler warnings \ - if ((1)); else goto_error; \ if (nogil) { \ if (CYTHON_TRACE_NOGIL) { \ int ret = 0; \ @@ -247,28 +245,23 @@ ret = __Pyx_call_line_trace_func(tstate, $frame_cname, lineno); \ } \ PyGILState_Release(state); \ - // XXX https://github.com/cython/cython/issues/2274 \ - if (unlikely(ret)) { fprintf(stderr, "cython: line_trace_func returned %d\n", ret); } \ + if (unlikely(ret)) goto_error; \ } \ } else { \ PyThreadState* tstate = __Pyx_PyThreadState_Current; \ if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && $frame_cname->f_trace) { \ int ret = __Pyx_call_line_trace_func(tstate, $frame_cname, lineno); \ - // XXX https://github.com/cython/cython/issues/2274 \ - if (unlikely(ret)) { fprintf(stderr, "cython: line_trace_func returned %d\n", ret); } \ + if (unlikely(ret)) goto_error; \ } \ } \ } #else #define __Pyx_TraceLine(lineno, nogil, goto_error) \ if (likely(!__Pyx_use_tracing)); else { \ - // mark error label as used to avoid compiler warnings \ - if ((1)); else goto_error; \ PyThreadState* tstate = __Pyx_PyThreadState_Current; \ if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && $frame_cname->f_trace) { \ int ret = __Pyx_call_line_trace_func(tstate, $frame_cname, lineno); \ - // XXX https://github.com/cython/cython/issues/2274 \ - if (unlikely(ret)) { fprintf(stderr, "cython: line_trace_func returned %d\n", ret); } \ + if (unlikely(ret)) goto_error; \ } \ } #endif diff --git a/contrib/tools/cython/cython.py b/contrib/tools/cython/cython.py index 30315749d3..8265a60947 100755 --- a/contrib/tools/cython/cython.py +++ b/contrib/tools/cython/cython.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Change content of this file to change uids for cython programs - cython 0.29.36 r0 +# Change content of this file to change uids for cython programs - cython 0.29.36 r1 # # Cython -- Main Program, generic diff --git a/contrib/tools/cython/patches/all-changes.patch b/contrib/tools/cython/patches/all-changes.patch index b9424c7ac4..d08d171601 100644 --- a/contrib/tools/cython/patches/all-changes.patch +++ b/contrib/tools/cython/patches/all-changes.patch @@ -863,49 +863,6 @@ return PyFloat_FromDouble(result); {{endif}} } ---- contrib/tools/cython/Cython/Utility/Profile.c (index) -+++ contrib/tools/cython/Cython/Utility/Profile.c (working tree) -@@ -235,6 +235,8 @@ - #ifdef WITH_THREAD - #define __Pyx_TraceLine(lineno, nogil, goto_error) \ - if (likely(!__Pyx_use_tracing)); else { \ -+ // mark error label as used to avoid compiler warnings \ -+ if ((1)); else goto_error; \ - if (nogil) { \ - if (CYTHON_TRACE_NOGIL) { \ - int ret = 0; \ -@@ -245,23 +247,28 @@ - ret = __Pyx_call_line_trace_func(tstate, $frame_cname, lineno); \ - } \ - PyGILState_Release(state); \ -- if (unlikely(ret)) goto_error; \ -+ // XXX https://github.com/cython/cython/issues/2274 \ -+ if (unlikely(ret)) { fprintf(stderr, "cython: line_trace_func returned %d\n", ret); } \ - } \ - } else { \ - PyThreadState* tstate = __Pyx_PyThreadState_Current; \ - if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && $frame_cname->f_trace) { \ - int ret = __Pyx_call_line_trace_func(tstate, $frame_cname, lineno); \ -- if (unlikely(ret)) goto_error; \ -+ // XXX https://github.com/cython/cython/issues/2274 \ -+ if (unlikely(ret)) { fprintf(stderr, "cython: line_trace_func returned %d\n", ret); } \ - } \ - } \ - } - #else - #define __Pyx_TraceLine(lineno, nogil, goto_error) \ - if (likely(!__Pyx_use_tracing)); else { \ -+ // mark error label as used to avoid compiler warnings \ -+ if ((1)); else goto_error; \ - PyThreadState* tstate = __Pyx_PyThreadState_Current; \ - if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && $frame_cname->f_trace) { \ - int ret = __Pyx_call_line_trace_func(tstate, $frame_cname, lineno); \ -- if (unlikely(ret)) goto_error; \ -+ // XXX https://github.com/cython/cython/issues/2274 \ -+ if (unlikely(ret)) { fprintf(stderr, "cython: line_trace_func returned %d\n", ret); } \ - } \ - } - #endif --- contrib/tools/cython/Cython/Utility/StringTools.c (index) +++ contrib/tools/cython/Cython/Utility/StringTools.c (working tree) @@ -454,7 +454,7 @@ static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_s |