Browse Source

Remove unnecessary patch from Cython

shadchin 1 year ago
parent
commit
927f38ced6

+ 3 - 10
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

+ 1 - 1
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

+ 0 - 43
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