diff options
Diffstat (limited to 'meta-python')
| -rw-r--r-- | meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4/0001-Update-Cython-version-to-fix-NanoSVG-issues-with-Pyt.patch | 861 | ||||
| -rw-r--r-- | meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4/not-overwrite-cflags-cxxflags.patch | 28 | ||||
| -rw-r--r-- | meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4/sip-fix-override-functions.patch | 35 | ||||
| -rw-r--r-- | meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4_4.2.0.bb (renamed from meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4_4.1.1.bb) | 15 |
4 files changed, 35 insertions, 904 deletions
diff --git a/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4/0001-Update-Cython-version-to-fix-NanoSVG-issues-with-Pyt.patch b/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4/0001-Update-Cython-version-to-fix-NanoSVG-issues-with-Pyt.patch deleted file mode 100644 index 6be56cb908..0000000000 --- a/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4/0001-Update-Cython-version-to-fix-NanoSVG-issues-with-Pyt.patch +++ /dev/null | |||
| @@ -1,861 +0,0 @@ | |||
| 1 | Upstream-Status: Backport [https://github.com/wxWidgets/Phoenix/commit/b40ab0f8] | ||
| 2 | |||
| 3 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
| 4 | |||
| 5 | From b40ab0f806bdf7aa0c0a51a8c4876ac47754515d Mon Sep 17 00:00:00 2001 | ||
| 6 | From: Scott Talbert <swt@techie.net> | ||
| 7 | Date: Thu, 7 Oct 2021 17:53:05 -0400 | ||
| 8 | Subject: [PATCH] Update Cython version to fix NanoSVG issues with Python 3.10 | ||
| 9 | |||
| 10 | --- | ||
| 11 | requirements/devel.txt | 2 +- | ||
| 12 | wx/svg/_nanosvg.c | 554 ++++++++++++++++++++++++++--------------- | ||
| 13 | 2 files changed, 359 insertions(+), 197 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/requirements/devel.txt b/requirements/devel.txt | ||
| 16 | index 1d427be0..18164bdc 100644 | ||
| 17 | --- a/requirements/devel.txt | ||
| 18 | +++ b/requirements/devel.txt | ||
| 19 | @@ -9,7 +9,7 @@ wheel | ||
| 20 | twine | ||
| 21 | requests | ||
| 22 | requests[security] | ||
| 23 | -cython==0.29.21 | ||
| 24 | +cython==0.29.24 | ||
| 25 | pytest | ||
| 26 | pytest-xdist | ||
| 27 | pytest-forked | ||
| 28 | diff --git a/wx/svg/_nanosvg.c b/wx/svg/_nanosvg.c | ||
| 29 | index d8f1e158..fd4a5a67 100644 | ||
| 30 | --- a/wx/svg/_nanosvg.c | ||
| 31 | +++ b/wx/svg/_nanosvg.c | ||
| 32 | @@ -1,4 +1,4 @@ | ||
| 33 | -/* Generated by Cython 0.29.21 */ | ||
| 34 | +/* Generated by Cython 0.29.24 */ | ||
| 35 | |||
| 36 | /* BEGIN: Cython Metadata | ||
| 37 | { | ||
| 38 | @@ -33,15 +33,17 @@ | ||
| 39 | } | ||
| 40 | END: Cython Metadata */ | ||
| 41 | |||
| 42 | +#ifndef PY_SSIZE_T_CLEAN | ||
| 43 | #define PY_SSIZE_T_CLEAN | ||
| 44 | +#endif /* PY_SSIZE_T_CLEAN */ | ||
| 45 | #include "Python.h" | ||
| 46 | #ifndef Py_PYTHON_H | ||
| 47 | #error Python headers needed to compile C extensions, please install development version of Python. | ||
| 48 | #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) | ||
| 49 | #error Cython requires Python 2.6+ or Python 3.3+. | ||
| 50 | #else | ||
| 51 | -#define CYTHON_ABI "0_29_21" | ||
| 52 | -#define CYTHON_HEX_VERSION 0x001D15F0 | ||
| 53 | +#define CYTHON_ABI "0_29_24" | ||
| 54 | +#define CYTHON_HEX_VERSION 0x001D18F0 | ||
| 55 | #define CYTHON_FUTURE_DIVISION 0 | ||
| 56 | #include <stddef.h> | ||
| 57 | #ifndef offsetof | ||
| 58 | @@ -459,8 +461,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { | ||
| 59 | #endif | ||
| 60 | #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) | ||
| 61 | #define CYTHON_PEP393_ENABLED 1 | ||
| 62 | + #if defined(PyUnicode_IS_READY) | ||
| 63 | #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ | ||
| 64 | 0 : _PyUnicode_Ready((PyObject *)(op))) | ||
| 65 | + #else | ||
| 66 | + #define __Pyx_PyUnicode_READY(op) (0) | ||
| 67 | + #endif | ||
| 68 | #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) | ||
| 69 | #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) | ||
| 70 | #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) | ||
| 71 | @@ -469,7 +475,11 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { | ||
| 72 | #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) | ||
| 73 | #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) | ||
| 74 | #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) | ||
| 75 | + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 | ||
| 76 | + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) | ||
| 77 | + #else | ||
| 78 | #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) | ||
| 79 | + #endif | ||
| 80 | #else | ||
| 81 | #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) | ||
| 82 | #endif | ||
| 83 | @@ -1736,33 +1746,38 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); | ||
| 84 | static void __Pyx_AddTraceback(const char *funcname, int c_line, | ||
| 85 | int py_line, const char *filename); | ||
| 86 | |||
| 87 | +/* GCCDiagnostics.proto */ | ||
| 88 | +#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) | ||
| 89 | +#define __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 90 | +#endif | ||
| 91 | + | ||
| 92 | /* CIntToPy.proto */ | ||
| 93 | static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); | ||
| 94 | |||
| 95 | +/* CIntFromPy.proto */ | ||
| 96 | +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); | ||
| 97 | + | ||
| 98 | /* CIntToPy.proto */ | ||
| 99 | static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); | ||
| 100 | |||
| 101 | /* CIntToPy.proto */ | ||
| 102 | static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value); | ||
| 103 | |||
| 104 | +/* CIntFromPy.proto */ | ||
| 105 | +static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *); | ||
| 106 | + | ||
| 107 | /* CIntToPy.proto */ | ||
| 108 | static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_char(unsigned char value); | ||
| 109 | |||
| 110 | +/* CIntFromPy.proto */ | ||
| 111 | +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); | ||
| 112 | + | ||
| 113 | /* CIntToPy.proto */ | ||
| 114 | static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGpaintType(enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType value); | ||
| 115 | |||
| 116 | /* CIntToPy.proto */ | ||
| 117 | static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value); | ||
| 118 | |||
| 119 | -/* CIntFromPy.proto */ | ||
| 120 | -static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); | ||
| 121 | - | ||
| 122 | -/* CIntFromPy.proto */ | ||
| 123 | -static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *); | ||
| 124 | - | ||
| 125 | -/* CIntFromPy.proto */ | ||
| 126 | -static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); | ||
| 127 | - | ||
| 128 | /* CIntToPy.proto */ | ||
| 129 | static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGfillRule(enum __pyx_t_2wx_3svg_8_nanosvg_SVGfillRule value); | ||
| 130 | |||
| 131 | @@ -1844,6 +1859,7 @@ typedef struct { | ||
| 132 | PyObject *gi_qualname; | ||
| 133 | PyObject *gi_modulename; | ||
| 134 | PyObject *gi_code; | ||
| 135 | + PyObject *gi_frame; | ||
| 136 | int resume_label; | ||
| 137 | char is_running; | ||
| 138 | } __pyx_CoroutineObject; | ||
| 139 | @@ -14641,11 +14657,9 @@ if (!__Pyx_RefNanny) { | ||
| 140 | #endif | ||
| 141 | /*--- Library function declarations ---*/ | ||
| 142 | /*--- Threads initialization code ---*/ | ||
| 143 | - #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS | ||
| 144 | - #ifdef WITH_THREAD /* Python build with threading support? */ | ||
| 145 | + #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS | ||
| 146 | PyEval_InitThreads(); | ||
| 147 | #endif | ||
| 148 | - #endif | ||
| 149 | /*--- Module creation code ---*/ | ||
| 150 | #if CYTHON_PEP489_MULTI_PHASE_INIT | ||
| 151 | __pyx_m = __pyx_pyinit_module; | ||
| 152 | @@ -16766,7 +16780,7 @@ invalid_keyword: | ||
| 153 | #if CYTHON_COMPILING_IN_CPYTHON | ||
| 154 | static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { | ||
| 155 | PyObject *result; | ||
| 156 | - ternaryfunc call = func->ob_type->tp_call; | ||
| 157 | + ternaryfunc call = Py_TYPE(func)->tp_call; | ||
| 158 | if (unlikely(!call)) | ||
| 159 | return PyObject_Call(func, arg, kw); | ||
| 160 | if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) | ||
| 161 | @@ -17149,7 +17163,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec | ||
| 162 | if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { | ||
| 163 | return __Pyx_PyObject_CallMethO(func, arg); | ||
| 164 | #if CYTHON_FAST_PYCCALL | ||
| 165 | - } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { | ||
| 166 | + } else if (__Pyx_PyFastCFunction_Check(func)) { | ||
| 167 | return __Pyx_PyCFunction_FastCall(func, &arg, 1); | ||
| 168 | #endif | ||
| 169 | } | ||
| 170 | @@ -18800,7 +18814,8 @@ static PyObject * | ||
| 171 | __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) | ||
| 172 | { | ||
| 173 | #if PY_MAJOR_VERSION >= 3 | ||
| 174 | - return PyUnicode_FromString(m->func.m_ml->ml_name); | ||
| 175 | + Py_INCREF(m->func_qualname); | ||
| 176 | + return m->func_qualname; | ||
| 177 | #else | ||
| 178 | return PyString_FromString(m->func.m_ml->ml_name); | ||
| 179 | #endif | ||
| 180 | @@ -19443,37 +19458,6 @@ bad: | ||
| 181 | Py_XDECREF(py_frame); | ||
| 182 | } | ||
| 183 | |||
| 184 | -/* CIntToPy */ | ||
| 185 | -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { | ||
| 186 | - const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; | ||
| 187 | - const int is_unsigned = neg_one > const_zero; | ||
| 188 | - if (is_unsigned) { | ||
| 189 | - if (sizeof(long) < sizeof(long)) { | ||
| 190 | - return PyInt_FromLong((long) value); | ||
| 191 | - } else if (sizeof(long) <= sizeof(unsigned long)) { | ||
| 192 | - return PyLong_FromUnsignedLong((unsigned long) value); | ||
| 193 | -#ifdef HAVE_LONG_LONG | ||
| 194 | - } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { | ||
| 195 | - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); | ||
| 196 | -#endif | ||
| 197 | - } | ||
| 198 | - } else { | ||
| 199 | - if (sizeof(long) <= sizeof(long)) { | ||
| 200 | - return PyInt_FromLong((long) value); | ||
| 201 | -#ifdef HAVE_LONG_LONG | ||
| 202 | - } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { | ||
| 203 | - return PyLong_FromLongLong((PY_LONG_LONG) value); | ||
| 204 | -#endif | ||
| 205 | - } | ||
| 206 | - } | ||
| 207 | - { | ||
| 208 | - int one = 1; int little = (int)*(unsigned char *)&one; | ||
| 209 | - unsigned char *bytes = (unsigned char *)&value; | ||
| 210 | - return _PyLong_FromByteArray(bytes, sizeof(long), | ||
| 211 | - little, !is_unsigned); | ||
| 212 | - } | ||
| 213 | -} | ||
| 214 | - | ||
| 215 | /* CIntFromPyVerify */ | ||
| 216 | #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ | ||
| 217 | __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) | ||
| 218 | @@ -19497,148 +19481,31 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { | ||
| 219 | } | ||
| 220 | |||
| 221 | /* CIntToPy */ | ||
| 222 | -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { | ||
| 223 | - const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; | ||
| 224 | - const int is_unsigned = neg_one > const_zero; | ||
| 225 | - if (is_unsigned) { | ||
| 226 | - if (sizeof(int) < sizeof(long)) { | ||
| 227 | - return PyInt_FromLong((long) value); | ||
| 228 | - } else if (sizeof(int) <= sizeof(unsigned long)) { | ||
| 229 | - return PyLong_FromUnsignedLong((unsigned long) value); | ||
| 230 | -#ifdef HAVE_LONG_LONG | ||
| 231 | - } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { | ||
| 232 | - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); | ||
| 233 | -#endif | ||
| 234 | - } | ||
| 235 | - } else { | ||
| 236 | - if (sizeof(int) <= sizeof(long)) { | ||
| 237 | - return PyInt_FromLong((long) value); | ||
| 238 | -#ifdef HAVE_LONG_LONG | ||
| 239 | - } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { | ||
| 240 | - return PyLong_FromLongLong((PY_LONG_LONG) value); | ||
| 241 | -#endif | ||
| 242 | - } | ||
| 243 | - } | ||
| 244 | - { | ||
| 245 | - int one = 1; int little = (int)*(unsigned char *)&one; | ||
| 246 | - unsigned char *bytes = (unsigned char *)&value; | ||
| 247 | - return _PyLong_FromByteArray(bytes, sizeof(int), | ||
| 248 | - little, !is_unsigned); | ||
| 249 | - } | ||
| 250 | -} | ||
| 251 | - | ||
| 252 | -/* CIntToPy */ | ||
| 253 | -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value) { | ||
| 254 | - const char neg_one = (char) ((char) 0 - (char) 1), const_zero = (char) 0; | ||
| 255 | - const int is_unsigned = neg_one > const_zero; | ||
| 256 | - if (is_unsigned) { | ||
| 257 | - if (sizeof(char) < sizeof(long)) { | ||
| 258 | - return PyInt_FromLong((long) value); | ||
| 259 | - } else if (sizeof(char) <= sizeof(unsigned long)) { | ||
| 260 | - return PyLong_FromUnsignedLong((unsigned long) value); | ||
| 261 | -#ifdef HAVE_LONG_LONG | ||
| 262 | - } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) { | ||
| 263 | - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); | ||
| 264 | -#endif | ||
| 265 | - } | ||
| 266 | - } else { | ||
| 267 | - if (sizeof(char) <= sizeof(long)) { | ||
| 268 | - return PyInt_FromLong((long) value); | ||
| 269 | -#ifdef HAVE_LONG_LONG | ||
| 270 | - } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) { | ||
| 271 | - return PyLong_FromLongLong((PY_LONG_LONG) value); | ||
| 272 | -#endif | ||
| 273 | - } | ||
| 274 | - } | ||
| 275 | - { | ||
| 276 | - int one = 1; int little = (int)*(unsigned char *)&one; | ||
| 277 | - unsigned char *bytes = (unsigned char *)&value; | ||
| 278 | - return _PyLong_FromByteArray(bytes, sizeof(char), | ||
| 279 | - little, !is_unsigned); | ||
| 280 | - } | ||
| 281 | -} | ||
| 282 | - | ||
| 283 | -/* CIntToPy */ | ||
| 284 | -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_char(unsigned char value) { | ||
| 285 | - const unsigned char neg_one = (unsigned char) ((unsigned char) 0 - (unsigned char) 1), const_zero = (unsigned char) 0; | ||
| 286 | - const int is_unsigned = neg_one > const_zero; | ||
| 287 | - if (is_unsigned) { | ||
| 288 | - if (sizeof(unsigned char) < sizeof(long)) { | ||
| 289 | - return PyInt_FromLong((long) value); | ||
| 290 | - } else if (sizeof(unsigned char) <= sizeof(unsigned long)) { | ||
| 291 | - return PyLong_FromUnsignedLong((unsigned long) value); | ||
| 292 | -#ifdef HAVE_LONG_LONG | ||
| 293 | - } else if (sizeof(unsigned char) <= sizeof(unsigned PY_LONG_LONG)) { | ||
| 294 | - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); | ||
| 295 | -#endif | ||
| 296 | - } | ||
| 297 | - } else { | ||
| 298 | - if (sizeof(unsigned char) <= sizeof(long)) { | ||
| 299 | - return PyInt_FromLong((long) value); | ||
| 300 | -#ifdef HAVE_LONG_LONG | ||
| 301 | - } else if (sizeof(unsigned char) <= sizeof(PY_LONG_LONG)) { | ||
| 302 | - return PyLong_FromLongLong((PY_LONG_LONG) value); | ||
| 303 | -#endif | ||
| 304 | - } | ||
| 305 | - } | ||
| 306 | - { | ||
| 307 | - int one = 1; int little = (int)*(unsigned char *)&one; | ||
| 308 | - unsigned char *bytes = (unsigned char *)&value; | ||
| 309 | - return _PyLong_FromByteArray(bytes, sizeof(unsigned char), | ||
| 310 | - little, !is_unsigned); | ||
| 311 | - } | ||
| 312 | -} | ||
| 313 | - | ||
| 314 | -/* CIntToPy */ | ||
| 315 | -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGpaintType(enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType value) { | ||
| 316 | - const enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType neg_one = (enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType) ((enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType) 0 - (enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType) 1), const_zero = (enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType) 0; | ||
| 317 | - const int is_unsigned = neg_one > const_zero; | ||
| 318 | - if (is_unsigned) { | ||
| 319 | - if (sizeof(enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType) < sizeof(long)) { | ||
| 320 | - return PyInt_FromLong((long) value); | ||
| 321 | - } else if (sizeof(enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType) <= sizeof(unsigned long)) { | ||
| 322 | - return PyLong_FromUnsignedLong((unsigned long) value); | ||
| 323 | -#ifdef HAVE_LONG_LONG | ||
| 324 | - } else if (sizeof(enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType) <= sizeof(unsigned PY_LONG_LONG)) { | ||
| 325 | - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); | ||
| 326 | +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { | ||
| 327 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 328 | +#pragma GCC diagnostic push | ||
| 329 | +#pragma GCC diagnostic ignored "-Wconversion" | ||
| 330 | #endif | ||
| 331 | - } | ||
| 332 | - } else { | ||
| 333 | - if (sizeof(enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType) <= sizeof(long)) { | ||
| 334 | - return PyInt_FromLong((long) value); | ||
| 335 | -#ifdef HAVE_LONG_LONG | ||
| 336 | - } else if (sizeof(enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType) <= sizeof(PY_LONG_LONG)) { | ||
| 337 | - return PyLong_FromLongLong((PY_LONG_LONG) value); | ||
| 338 | + const long neg_one = (long) -1, const_zero = (long) 0; | ||
| 339 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 340 | +#pragma GCC diagnostic pop | ||
| 341 | #endif | ||
| 342 | - } | ||
| 343 | - } | ||
| 344 | - { | ||
| 345 | - int one = 1; int little = (int)*(unsigned char *)&one; | ||
| 346 | - unsigned char *bytes = (unsigned char *)&value; | ||
| 347 | - return _PyLong_FromByteArray(bytes, sizeof(enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType), | ||
| 348 | - little, !is_unsigned); | ||
| 349 | - } | ||
| 350 | -} | ||
| 351 | - | ||
| 352 | -/* CIntToPy */ | ||
| 353 | -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) { | ||
| 354 | - const unsigned int neg_one = (unsigned int) ((unsigned int) 0 - (unsigned int) 1), const_zero = (unsigned int) 0; | ||
| 355 | const int is_unsigned = neg_one > const_zero; | ||
| 356 | if (is_unsigned) { | ||
| 357 | - if (sizeof(unsigned int) < sizeof(long)) { | ||
| 358 | + if (sizeof(long) < sizeof(long)) { | ||
| 359 | return PyInt_FromLong((long) value); | ||
| 360 | - } else if (sizeof(unsigned int) <= sizeof(unsigned long)) { | ||
| 361 | + } else if (sizeof(long) <= sizeof(unsigned long)) { | ||
| 362 | return PyLong_FromUnsignedLong((unsigned long) value); | ||
| 363 | #ifdef HAVE_LONG_LONG | ||
| 364 | - } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) { | ||
| 365 | + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { | ||
| 366 | return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); | ||
| 367 | #endif | ||
| 368 | } | ||
| 369 | } else { | ||
| 370 | - if (sizeof(unsigned int) <= sizeof(long)) { | ||
| 371 | + if (sizeof(long) <= sizeof(long)) { | ||
| 372 | return PyInt_FromLong((long) value); | ||
| 373 | #ifdef HAVE_LONG_LONG | ||
| 374 | - } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) { | ||
| 375 | + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { | ||
| 376 | return PyLong_FromLongLong((PY_LONG_LONG) value); | ||
| 377 | #endif | ||
| 378 | } | ||
| 379 | @@ -19646,14 +19513,21 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) | ||
| 380 | { | ||
| 381 | int one = 1; int little = (int)*(unsigned char *)&one; | ||
| 382 | unsigned char *bytes = (unsigned char *)&value; | ||
| 383 | - return _PyLong_FromByteArray(bytes, sizeof(unsigned int), | ||
| 384 | + return _PyLong_FromByteArray(bytes, sizeof(long), | ||
| 385 | little, !is_unsigned); | ||
| 386 | } | ||
| 387 | } | ||
| 388 | |||
| 389 | /* CIntFromPy */ | ||
| 390 | static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { | ||
| 391 | - const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; | ||
| 392 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 393 | +#pragma GCC diagnostic push | ||
| 394 | +#pragma GCC diagnostic ignored "-Wconversion" | ||
| 395 | +#endif | ||
| 396 | + const int neg_one = (int) -1, const_zero = (int) 0; | ||
| 397 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 398 | +#pragma GCC diagnostic pop | ||
| 399 | +#endif | ||
| 400 | const int is_unsigned = neg_one > const_zero; | ||
| 401 | #if PY_MAJOR_VERSION < 3 | ||
| 402 | if (likely(PyInt_Check(x))) { | ||
| 403 | @@ -19840,9 +19714,92 @@ raise_neg_overflow: | ||
| 404 | return (int) -1; | ||
| 405 | } | ||
| 406 | |||
| 407 | +/* CIntToPy */ | ||
| 408 | +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { | ||
| 409 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 410 | +#pragma GCC diagnostic push | ||
| 411 | +#pragma GCC diagnostic ignored "-Wconversion" | ||
| 412 | +#endif | ||
| 413 | + const int neg_one = (int) -1, const_zero = (int) 0; | ||
| 414 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 415 | +#pragma GCC diagnostic pop | ||
| 416 | +#endif | ||
| 417 | + const int is_unsigned = neg_one > const_zero; | ||
| 418 | + if (is_unsigned) { | ||
| 419 | + if (sizeof(int) < sizeof(long)) { | ||
| 420 | + return PyInt_FromLong((long) value); | ||
| 421 | + } else if (sizeof(int) <= sizeof(unsigned long)) { | ||
| 422 | + return PyLong_FromUnsignedLong((unsigned long) value); | ||
| 423 | +#ifdef HAVE_LONG_LONG | ||
| 424 | + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { | ||
| 425 | + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); | ||
| 426 | +#endif | ||
| 427 | + } | ||
| 428 | + } else { | ||
| 429 | + if (sizeof(int) <= sizeof(long)) { | ||
| 430 | + return PyInt_FromLong((long) value); | ||
| 431 | +#ifdef HAVE_LONG_LONG | ||
| 432 | + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { | ||
| 433 | + return PyLong_FromLongLong((PY_LONG_LONG) value); | ||
| 434 | +#endif | ||
| 435 | + } | ||
| 436 | + } | ||
| 437 | + { | ||
| 438 | + int one = 1; int little = (int)*(unsigned char *)&one; | ||
| 439 | + unsigned char *bytes = (unsigned char *)&value; | ||
| 440 | + return _PyLong_FromByteArray(bytes, sizeof(int), | ||
| 441 | + little, !is_unsigned); | ||
| 442 | + } | ||
| 443 | +} | ||
| 444 | + | ||
| 445 | +/* CIntToPy */ | ||
| 446 | +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value) { | ||
| 447 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 448 | +#pragma GCC diagnostic push | ||
| 449 | +#pragma GCC diagnostic ignored "-Wconversion" | ||
| 450 | +#endif | ||
| 451 | + const char neg_one = (char) -1, const_zero = (char) 0; | ||
| 452 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 453 | +#pragma GCC diagnostic pop | ||
| 454 | +#endif | ||
| 455 | + const int is_unsigned = neg_one > const_zero; | ||
| 456 | + if (is_unsigned) { | ||
| 457 | + if (sizeof(char) < sizeof(long)) { | ||
| 458 | + return PyInt_FromLong((long) value); | ||
| 459 | + } else if (sizeof(char) <= sizeof(unsigned long)) { | ||
| 460 | + return PyLong_FromUnsignedLong((unsigned long) value); | ||
| 461 | +#ifdef HAVE_LONG_LONG | ||
| 462 | + } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) { | ||
| 463 | + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); | ||
| 464 | +#endif | ||
| 465 | + } | ||
| 466 | + } else { | ||
| 467 | + if (sizeof(char) <= sizeof(long)) { | ||
| 468 | + return PyInt_FromLong((long) value); | ||
| 469 | +#ifdef HAVE_LONG_LONG | ||
| 470 | + } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) { | ||
| 471 | + return PyLong_FromLongLong((PY_LONG_LONG) value); | ||
| 472 | +#endif | ||
| 473 | + } | ||
| 474 | + } | ||
| 475 | + { | ||
| 476 | + int one = 1; int little = (int)*(unsigned char *)&one; | ||
| 477 | + unsigned char *bytes = (unsigned char *)&value; | ||
| 478 | + return _PyLong_FromByteArray(bytes, sizeof(char), | ||
| 479 | + little, !is_unsigned); | ||
| 480 | + } | ||
| 481 | +} | ||
| 482 | + | ||
| 483 | /* CIntFromPy */ | ||
| 484 | static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) { | ||
| 485 | - const char neg_one = (char) ((char) 0 - (char) 1), const_zero = (char) 0; | ||
| 486 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 487 | +#pragma GCC diagnostic push | ||
| 488 | +#pragma GCC diagnostic ignored "-Wconversion" | ||
| 489 | +#endif | ||
| 490 | + const char neg_one = (char) -1, const_zero = (char) 0; | ||
| 491 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 492 | +#pragma GCC diagnostic pop | ||
| 493 | +#endif | ||
| 494 | const int is_unsigned = neg_one > const_zero; | ||
| 495 | #if PY_MAJOR_VERSION < 3 | ||
| 496 | if (likely(PyInt_Check(x))) { | ||
| 497 | @@ -20029,9 +19986,54 @@ raise_neg_overflow: | ||
| 498 | return (char) -1; | ||
| 499 | } | ||
| 500 | |||
| 501 | +/* CIntToPy */ | ||
| 502 | +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_char(unsigned char value) { | ||
| 503 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 504 | +#pragma GCC diagnostic push | ||
| 505 | +#pragma GCC diagnostic ignored "-Wconversion" | ||
| 506 | +#endif | ||
| 507 | + const unsigned char neg_one = (unsigned char) -1, const_zero = (unsigned char) 0; | ||
| 508 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 509 | +#pragma GCC diagnostic pop | ||
| 510 | +#endif | ||
| 511 | + const int is_unsigned = neg_one > const_zero; | ||
| 512 | + if (is_unsigned) { | ||
| 513 | + if (sizeof(unsigned char) < sizeof(long)) { | ||
| 514 | + return PyInt_FromLong((long) value); | ||
| 515 | + } else if (sizeof(unsigned char) <= sizeof(unsigned long)) { | ||
| 516 | + return PyLong_FromUnsignedLong((unsigned long) value); | ||
| 517 | +#ifdef HAVE_LONG_LONG | ||
| 518 | + } else if (sizeof(unsigned char) <= sizeof(unsigned PY_LONG_LONG)) { | ||
| 519 | + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); | ||
| 520 | +#endif | ||
| 521 | + } | ||
| 522 | + } else { | ||
| 523 | + if (sizeof(unsigned char) <= sizeof(long)) { | ||
| 524 | + return PyInt_FromLong((long) value); | ||
| 525 | +#ifdef HAVE_LONG_LONG | ||
| 526 | + } else if (sizeof(unsigned char) <= sizeof(PY_LONG_LONG)) { | ||
| 527 | + return PyLong_FromLongLong((PY_LONG_LONG) value); | ||
| 528 | +#endif | ||
| 529 | + } | ||
| 530 | + } | ||
| 531 | + { | ||
| 532 | + int one = 1; int little = (int)*(unsigned char *)&one; | ||
| 533 | + unsigned char *bytes = (unsigned char *)&value; | ||
| 534 | + return _PyLong_FromByteArray(bytes, sizeof(unsigned char), | ||
| 535 | + little, !is_unsigned); | ||
| 536 | + } | ||
| 537 | +} | ||
| 538 | + | ||
| 539 | /* CIntFromPy */ | ||
| 540 | static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { | ||
| 541 | - const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; | ||
| 542 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 543 | +#pragma GCC diagnostic push | ||
| 544 | +#pragma GCC diagnostic ignored "-Wconversion" | ||
| 545 | +#endif | ||
| 546 | + const long neg_one = (long) -1, const_zero = (long) 0; | ||
| 547 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 548 | +#pragma GCC diagnostic pop | ||
| 549 | +#endif | ||
| 550 | const int is_unsigned = neg_one > const_zero; | ||
| 551 | #if PY_MAJOR_VERSION < 3 | ||
| 552 | if (likely(PyInt_Check(x))) { | ||
| 553 | @@ -20218,9 +20220,92 @@ raise_neg_overflow: | ||
| 554 | return (long) -1; | ||
| 555 | } | ||
| 556 | |||
| 557 | +/* CIntToPy */ | ||
| 558 | +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGpaintType(enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType value) { | ||
| 559 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 560 | +#pragma GCC diagnostic push | ||
| 561 | +#pragma GCC diagnostic ignored "-Wconversion" | ||
| 562 | +#endif | ||
| 563 | + const enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType neg_one = (enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType) -1, const_zero = (enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType) 0; | ||
| 564 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 565 | +#pragma GCC diagnostic pop | ||
| 566 | +#endif | ||
| 567 | + const int is_unsigned = neg_one > const_zero; | ||
| 568 | + if (is_unsigned) { | ||
| 569 | + if (sizeof(enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType) < sizeof(long)) { | ||
| 570 | + return PyInt_FromLong((long) value); | ||
| 571 | + } else if (sizeof(enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType) <= sizeof(unsigned long)) { | ||
| 572 | + return PyLong_FromUnsignedLong((unsigned long) value); | ||
| 573 | +#ifdef HAVE_LONG_LONG | ||
| 574 | + } else if (sizeof(enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType) <= sizeof(unsigned PY_LONG_LONG)) { | ||
| 575 | + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); | ||
| 576 | +#endif | ||
| 577 | + } | ||
| 578 | + } else { | ||
| 579 | + if (sizeof(enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType) <= sizeof(long)) { | ||
| 580 | + return PyInt_FromLong((long) value); | ||
| 581 | +#ifdef HAVE_LONG_LONG | ||
| 582 | + } else if (sizeof(enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType) <= sizeof(PY_LONG_LONG)) { | ||
| 583 | + return PyLong_FromLongLong((PY_LONG_LONG) value); | ||
| 584 | +#endif | ||
| 585 | + } | ||
| 586 | + } | ||
| 587 | + { | ||
| 588 | + int one = 1; int little = (int)*(unsigned char *)&one; | ||
| 589 | + unsigned char *bytes = (unsigned char *)&value; | ||
| 590 | + return _PyLong_FromByteArray(bytes, sizeof(enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType), | ||
| 591 | + little, !is_unsigned); | ||
| 592 | + } | ||
| 593 | +} | ||
| 594 | + | ||
| 595 | +/* CIntToPy */ | ||
| 596 | +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) { | ||
| 597 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 598 | +#pragma GCC diagnostic push | ||
| 599 | +#pragma GCC diagnostic ignored "-Wconversion" | ||
| 600 | +#endif | ||
| 601 | + const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0; | ||
| 602 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 603 | +#pragma GCC diagnostic pop | ||
| 604 | +#endif | ||
| 605 | + const int is_unsigned = neg_one > const_zero; | ||
| 606 | + if (is_unsigned) { | ||
| 607 | + if (sizeof(unsigned int) < sizeof(long)) { | ||
| 608 | + return PyInt_FromLong((long) value); | ||
| 609 | + } else if (sizeof(unsigned int) <= sizeof(unsigned long)) { | ||
| 610 | + return PyLong_FromUnsignedLong((unsigned long) value); | ||
| 611 | +#ifdef HAVE_LONG_LONG | ||
| 612 | + } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) { | ||
| 613 | + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); | ||
| 614 | +#endif | ||
| 615 | + } | ||
| 616 | + } else { | ||
| 617 | + if (sizeof(unsigned int) <= sizeof(long)) { | ||
| 618 | + return PyInt_FromLong((long) value); | ||
| 619 | +#ifdef HAVE_LONG_LONG | ||
| 620 | + } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) { | ||
| 621 | + return PyLong_FromLongLong((PY_LONG_LONG) value); | ||
| 622 | +#endif | ||
| 623 | + } | ||
| 624 | + } | ||
| 625 | + { | ||
| 626 | + int one = 1; int little = (int)*(unsigned char *)&one; | ||
| 627 | + unsigned char *bytes = (unsigned char *)&value; | ||
| 628 | + return _PyLong_FromByteArray(bytes, sizeof(unsigned int), | ||
| 629 | + little, !is_unsigned); | ||
| 630 | + } | ||
| 631 | +} | ||
| 632 | + | ||
| 633 | /* CIntToPy */ | ||
| 634 | static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGfillRule(enum __pyx_t_2wx_3svg_8_nanosvg_SVGfillRule value) { | ||
| 635 | - const enum __pyx_t_2wx_3svg_8_nanosvg_SVGfillRule neg_one = (enum __pyx_t_2wx_3svg_8_nanosvg_SVGfillRule) ((enum __pyx_t_2wx_3svg_8_nanosvg_SVGfillRule) 0 - (enum __pyx_t_2wx_3svg_8_nanosvg_SVGfillRule) 1), const_zero = (enum __pyx_t_2wx_3svg_8_nanosvg_SVGfillRule) 0; | ||
| 636 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 637 | +#pragma GCC diagnostic push | ||
| 638 | +#pragma GCC diagnostic ignored "-Wconversion" | ||
| 639 | +#endif | ||
| 640 | + const enum __pyx_t_2wx_3svg_8_nanosvg_SVGfillRule neg_one = (enum __pyx_t_2wx_3svg_8_nanosvg_SVGfillRule) -1, const_zero = (enum __pyx_t_2wx_3svg_8_nanosvg_SVGfillRule) 0; | ||
| 641 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 642 | +#pragma GCC diagnostic pop | ||
| 643 | +#endif | ||
| 644 | const int is_unsigned = neg_one > const_zero; | ||
| 645 | if (is_unsigned) { | ||
| 646 | if (sizeof(enum __pyx_t_2wx_3svg_8_nanosvg_SVGfillRule) < sizeof(long)) { | ||
| 647 | @@ -20251,7 +20336,14 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg | ||
| 648 | |||
| 649 | /* CIntToPy */ | ||
| 650 | static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGflags(enum __pyx_t_2wx_3svg_8_nanosvg_SVGflags value) { | ||
| 651 | - const enum __pyx_t_2wx_3svg_8_nanosvg_SVGflags neg_one = (enum __pyx_t_2wx_3svg_8_nanosvg_SVGflags) ((enum __pyx_t_2wx_3svg_8_nanosvg_SVGflags) 0 - (enum __pyx_t_2wx_3svg_8_nanosvg_SVGflags) 1), const_zero = (enum __pyx_t_2wx_3svg_8_nanosvg_SVGflags) 0; | ||
| 652 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 653 | +#pragma GCC diagnostic push | ||
| 654 | +#pragma GCC diagnostic ignored "-Wconversion" | ||
| 655 | +#endif | ||
| 656 | + const enum __pyx_t_2wx_3svg_8_nanosvg_SVGflags neg_one = (enum __pyx_t_2wx_3svg_8_nanosvg_SVGflags) -1, const_zero = (enum __pyx_t_2wx_3svg_8_nanosvg_SVGflags) 0; | ||
| 657 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 658 | +#pragma GCC diagnostic pop | ||
| 659 | +#endif | ||
| 660 | const int is_unsigned = neg_one > const_zero; | ||
| 661 | if (is_unsigned) { | ||
| 662 | if (sizeof(enum __pyx_t_2wx_3svg_8_nanosvg_SVGflags) < sizeof(long)) { | ||
| 663 | @@ -20282,7 +20374,14 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg | ||
| 664 | |||
| 665 | /* CIntToPy */ | ||
| 666 | static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGlineCap(enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineCap value) { | ||
| 667 | - const enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineCap neg_one = (enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineCap) ((enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineCap) 0 - (enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineCap) 1), const_zero = (enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineCap) 0; | ||
| 668 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 669 | +#pragma GCC diagnostic push | ||
| 670 | +#pragma GCC diagnostic ignored "-Wconversion" | ||
| 671 | +#endif | ||
| 672 | + const enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineCap neg_one = (enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineCap) -1, const_zero = (enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineCap) 0; | ||
| 673 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 674 | +#pragma GCC diagnostic pop | ||
| 675 | +#endif | ||
| 676 | const int is_unsigned = neg_one > const_zero; | ||
| 677 | if (is_unsigned) { | ||
| 678 | if (sizeof(enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineCap) < sizeof(long)) { | ||
| 679 | @@ -20313,7 +20412,14 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg | ||
| 680 | |||
| 681 | /* CIntToPy */ | ||
| 682 | static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGlineJoin(enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineJoin value) { | ||
| 683 | - const enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineJoin neg_one = (enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineJoin) ((enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineJoin) 0 - (enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineJoin) 1), const_zero = (enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineJoin) 0; | ||
| 684 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 685 | +#pragma GCC diagnostic push | ||
| 686 | +#pragma GCC diagnostic ignored "-Wconversion" | ||
| 687 | +#endif | ||
| 688 | + const enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineJoin neg_one = (enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineJoin) -1, const_zero = (enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineJoin) 0; | ||
| 689 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 690 | +#pragma GCC diagnostic pop | ||
| 691 | +#endif | ||
| 692 | const int is_unsigned = neg_one > const_zero; | ||
| 693 | if (is_unsigned) { | ||
| 694 | if (sizeof(enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineJoin) < sizeof(long)) { | ||
| 695 | @@ -20344,7 +20450,14 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg | ||
| 696 | |||
| 697 | /* CIntToPy */ | ||
| 698 | static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGspreadType(enum __pyx_t_2wx_3svg_8_nanosvg_SVGspreadType value) { | ||
| 699 | - const enum __pyx_t_2wx_3svg_8_nanosvg_SVGspreadType neg_one = (enum __pyx_t_2wx_3svg_8_nanosvg_SVGspreadType) ((enum __pyx_t_2wx_3svg_8_nanosvg_SVGspreadType) 0 - (enum __pyx_t_2wx_3svg_8_nanosvg_SVGspreadType) 1), const_zero = (enum __pyx_t_2wx_3svg_8_nanosvg_SVGspreadType) 0; | ||
| 700 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 701 | +#pragma GCC diagnostic push | ||
| 702 | +#pragma GCC diagnostic ignored "-Wconversion" | ||
| 703 | +#endif | ||
| 704 | + const enum __pyx_t_2wx_3svg_8_nanosvg_SVGspreadType neg_one = (enum __pyx_t_2wx_3svg_8_nanosvg_SVGspreadType) -1, const_zero = (enum __pyx_t_2wx_3svg_8_nanosvg_SVGspreadType) 0; | ||
| 705 | +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC | ||
| 706 | +#pragma GCC diagnostic pop | ||
| 707 | +#endif | ||
| 708 | const int is_unsigned = neg_one > const_zero; | ||
| 709 | if (is_unsigned) { | ||
| 710 | if (sizeof(enum __pyx_t_2wx_3svg_8_nanosvg_SVGspreadType) < sizeof(long)) { | ||
| 711 | @@ -20907,6 +21020,30 @@ PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *re | ||
| 712 | } | ||
| 713 | return retval; | ||
| 714 | } | ||
| 715 | +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) | ||
| 716 | +static CYTHON_INLINE | ||
| 717 | +PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) { | ||
| 718 | +#if PY_VERSION_HEX <= 0x030A00A1 | ||
| 719 | + return _PyGen_Send(gen, arg); | ||
| 720 | +#else | ||
| 721 | + PyObject *result; | ||
| 722 | + if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) { | ||
| 723 | + if (PyAsyncGen_CheckExact(gen)) { | ||
| 724 | + assert(result == Py_None); | ||
| 725 | + PyErr_SetNone(PyExc_StopAsyncIteration); | ||
| 726 | + } | ||
| 727 | + else if (result == Py_None) { | ||
| 728 | + PyErr_SetNone(PyExc_StopIteration); | ||
| 729 | + } | ||
| 730 | + else { | ||
| 731 | + _PyGen_SetStopIterationValue(result); | ||
| 732 | + } | ||
| 733 | + Py_CLEAR(result); | ||
| 734 | + } | ||
| 735 | + return result; | ||
| 736 | +#endif | ||
| 737 | +} | ||
| 738 | +#endif | ||
| 739 | static CYTHON_INLINE | ||
| 740 | PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) { | ||
| 741 | PyObject *ret; | ||
| 742 | @@ -20943,12 +21080,12 @@ static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) { | ||
| 743 | #endif | ||
| 744 | #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) | ||
| 745 | if (PyGen_CheckExact(yf)) { | ||
| 746 | - ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); | ||
| 747 | + ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); | ||
| 748 | } else | ||
| 749 | #endif | ||
| 750 | #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) | ||
| 751 | if (PyCoro_CheckExact(yf)) { | ||
| 752 | - ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); | ||
| 753 | + ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); | ||
| 754 | } else | ||
| 755 | #endif | ||
| 756 | { | ||
| 757 | @@ -21032,7 +21169,7 @@ static PyObject *__Pyx_Generator_Next(PyObject *self) { | ||
| 758 | #endif | ||
| 759 | #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) | ||
| 760 | if (PyGen_CheckExact(yf)) { | ||
| 761 | - ret = _PyGen_Send((PyGenObject*)yf, NULL); | ||
| 762 | + ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL); | ||
| 763 | } else | ||
| 764 | #endif | ||
| 765 | #ifdef __Pyx_Coroutine_USED | ||
| 766 | @@ -21192,6 +21329,7 @@ static int __Pyx_Coroutine_clear(PyObject *self) { | ||
| 767 | } | ||
| 768 | #endif | ||
| 769 | Py_CLEAR(gen->gi_code); | ||
| 770 | + Py_CLEAR(gen->gi_frame); | ||
| 771 | Py_CLEAR(gen->gi_name); | ||
| 772 | Py_CLEAR(gen->gi_qualname); | ||
| 773 | Py_CLEAR(gen->gi_modulename); | ||
| 774 | @@ -21208,7 +21346,7 @@ static void __Pyx_Coroutine_dealloc(PyObject *self) { | ||
| 775 | if (PyObject_CallFinalizerFromDealloc(self)) | ||
| 776 | #else | ||
| 777 | Py_TYPE(gen)->tp_del(self); | ||
| 778 | - if (self->ob_refcnt > 0) | ||
| 779 | + if (Py_REFCNT(self) > 0) | ||
| 780 | #endif | ||
| 781 | { | ||
| 782 | return; | ||
| 783 | @@ -21235,7 +21373,7 @@ static void __Pyx_Coroutine_del(PyObject *self) { | ||
| 784 | } | ||
| 785 | #if !CYTHON_USE_TP_FINALIZE | ||
| 786 | assert(self->ob_refcnt == 0); | ||
| 787 | - self->ob_refcnt = 1; | ||
| 788 | + __Pyx_SET_REFCNT(self, 1); | ||
| 789 | #endif | ||
| 790 | __Pyx_PyThreadState_assign | ||
| 791 | __Pyx_ErrFetch(&error_type, &error_value, &error_traceback); | ||
| 792 | @@ -21302,17 +21440,17 @@ static void __Pyx_Coroutine_del(PyObject *self) { | ||
| 793 | } | ||
| 794 | __Pyx_ErrRestore(error_type, error_value, error_traceback); | ||
| 795 | #if !CYTHON_USE_TP_FINALIZE | ||
| 796 | - assert(self->ob_refcnt > 0); | ||
| 797 | + assert(Py_REFCNT(self) > 0); | ||
| 798 | if (--self->ob_refcnt == 0) { | ||
| 799 | return; | ||
| 800 | } | ||
| 801 | { | ||
| 802 | - Py_ssize_t refcnt = self->ob_refcnt; | ||
| 803 | + Py_ssize_t refcnt = Py_REFCNT(self); | ||
| 804 | _Py_NewReference(self); | ||
| 805 | - self->ob_refcnt = refcnt; | ||
| 806 | + __Pyx_SET_REFCNT(self, refcnt); | ||
| 807 | } | ||
| 808 | #if CYTHON_COMPILING_IN_CPYTHON | ||
| 809 | - assert(PyType_IS_GC(self->ob_type) && | ||
| 810 | + assert(PyType_IS_GC(Py_TYPE(self)) && | ||
| 811 | _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED); | ||
| 812 | _Py_DEC_REFTOTAL; | ||
| 813 | #endif | ||
| 814 | @@ -21378,6 +21516,27 @@ __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHO | ||
| 815 | Py_XDECREF(tmp); | ||
| 816 | return 0; | ||
| 817 | } | ||
| 818 | +static PyObject * | ||
| 819 | +__Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context) | ||
| 820 | +{ | ||
| 821 | + PyObject *frame = self->gi_frame; | ||
| 822 | + if (!frame) { | ||
| 823 | + if (unlikely(!self->gi_code)) { | ||
| 824 | + Py_RETURN_NONE; | ||
| 825 | + } | ||
| 826 | + frame = (PyObject *) PyFrame_New( | ||
| 827 | + PyThreadState_Get(), /*PyThreadState *tstate,*/ | ||
| 828 | + (PyCodeObject*) self->gi_code, /*PyCodeObject *code,*/ | ||
| 829 | + __pyx_d, /*PyObject *globals,*/ | ||
| 830 | + 0 /*PyObject *locals*/ | ||
| 831 | + ); | ||
| 832 | + if (unlikely(!frame)) | ||
| 833 | + return NULL; | ||
| 834 | + self->gi_frame = frame; | ||
| 835 | + } | ||
| 836 | + Py_INCREF(frame); | ||
| 837 | + return frame; | ||
| 838 | +} | ||
| 839 | static __pyx_CoroutineObject *__Pyx__Coroutine_New( | ||
| 840 | PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, | ||
| 841 | PyObject *name, PyObject *qualname, PyObject *module_name) { | ||
| 842 | @@ -21411,6 +21570,7 @@ static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( | ||
| 843 | gen->gi_modulename = module_name; | ||
| 844 | Py_XINCREF(code); | ||
| 845 | gen->gi_code = code; | ||
| 846 | + gen->gi_frame = NULL; | ||
| 847 | PyObject_GC_Track(gen); | ||
| 848 | return gen; | ||
| 849 | } | ||
| 850 | @@ -21534,6 +21694,8 @@ static PyGetSetDef __pyx_Generator_getsets[] = { | ||
| 851 | (char*) PyDoc_STR("name of the generator"), 0}, | ||
| 852 | {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, | ||
| 853 | (char*) PyDoc_STR("qualified name of the generator"), 0}, | ||
| 854 | + {(char *) "gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL, | ||
| 855 | + (char*) PyDoc_STR("Frame of the generator"), 0}, | ||
| 856 | {0, 0, 0, 0, 0} | ||
| 857 | }; | ||
| 858 | static PyTypeObject __pyx_GeneratorType_type = { | ||
| 859 | -- | ||
| 860 | 2.33.0 | ||
| 861 | |||
diff --git a/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4/not-overwrite-cflags-cxxflags.patch b/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4/not-overwrite-cflags-cxxflags.patch new file mode 100644 index 0000000000..67f7949b38 --- /dev/null +++ b/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4/not-overwrite-cflags-cxxflags.patch | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | Not overwrite CFLAGS and CXXFLAGS. It also avoid buildpaths qa issue: | ||
| 2 | |||
| 3 | WARNING: python3-wxgtk4-4.2.0-r0 do_package_qa: QA Issue: File | ||
| 4 | /usr/lib64/python3.11/site-packages/wx/.debug/_xml.cpython-311-aarch64-linux-gnu.so | ||
| 5 | in package python3-wxgtk4-dbg contains reference to TMPDIR [buildpaths] | ||
| 6 | |||
| 7 | Upstream-Status: Pending [oe specific] | ||
| 8 | |||
| 9 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
| 10 | --- | ||
| 11 | wscript | 4 ++-- | ||
| 12 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/wscript b/wscript | ||
| 15 | index 067b307..50d96d1 100644 | ||
| 16 | --- a/wscript | ||
| 17 | +++ b/wscript | ||
| 18 | @@ -195,8 +195,8 @@ def configure(conf): | ||
| 19 | cfg.finishSetup(conf.env.wx_config, conf.env.debug, | ||
| 20 | 'mingw32' if isWindows and not conf.env.use_msvc else None) | ||
| 21 | |||
| 22 | - conf.env.CFLAGS = cfg.cflags[:] | ||
| 23 | - conf.env.CXXFLAGS = cfg.cxxflags[:] | ||
| 24 | + #conf.env.CFLAGS = cfg.cflags[:] | ||
| 25 | + #conf.env.CXXFLAGS = cfg.cxxflags[:] | ||
| 26 | conf.env.CFLAGS_WX = list() | ||
| 27 | conf.env.CXXFLAGS_WX = list() | ||
| 28 | conf.env.CFLAGS_WXPY = list() | ||
diff --git a/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4/sip-fix-override-functions.patch b/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4/sip-fix-override-functions.patch deleted file mode 100644 index 51b9a462b1..0000000000 --- a/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4/sip-fix-override-functions.patch +++ /dev/null | |||
| @@ -1,35 +0,0 @@ | |||
| 1 | It fails to compile with errors: | ||
| 2 | |||
| 3 | | ../../../../sip/cpp/sip_gridwxGridEvent.cpp:35:9: error: 'int sipwxGridEvent::GetRow()' | ||
| 4 | marked 'override', but does not override | ||
| 5 | | 35 | int GetRow() SIP_OVERRIDE; | ||
| 6 | | | ^~~~~~ | ||
| 7 | | ../../../../sip/cpp/sip_gridwxGridEvent.cpp:36:9: error: 'int sipwxGridEvent::GetCol()' | ||
| 8 | marked 'override', but does not over ride | ||
| 9 | | 36 | int GetCol() SIP_OVERRIDE; | ||
| 10 | | | ^~~~~~ | ||
| 11 | |||
| 12 | Make these functions non-override. | ||
| 13 | |||
| 14 | Upstream-Status: Pending | ||
| 15 | |||
| 16 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
| 17 | --- | ||
| 18 | sip/cpp/sip_gridwxGridEvent.cpp | 4 ++-- | ||
| 19 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 20 | |||
| 21 | diff --git a/sip/cpp/sip_gridwxGridEvent.cpp b/sip/cpp/sip_gridwxGridEvent.cpp | ||
| 22 | index 0830b677..314aec94 100644 | ||
| 23 | --- a/sip/cpp/sip_gridwxGridEvent.cpp | ||
| 24 | +++ b/sip/cpp/sip_gridwxGridEvent.cpp | ||
| 25 | @@ -32,8 +32,8 @@ public: | ||
| 26 | * this class. | ||
| 27 | */ | ||
| 28 | protected: | ||
| 29 | - int GetRow() SIP_OVERRIDE; | ||
| 30 | - int GetCol() SIP_OVERRIDE; | ||
| 31 | + int GetRow() ; | ||
| 32 | + int GetCol() ; | ||
| 33 | ::wxEvent* Clone() const SIP_OVERRIDE; | ||
| 34 | ::wxEventCategory GetEventCategory() const SIP_OVERRIDE; | ||
| 35 | |||
diff --git a/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4_4.1.1.bb b/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4_4.2.0.bb index 842c576464..faea437775 100644 --- a/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4_4.1.1.bb +++ b/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4_4.2.0.bb | |||
| @@ -1,19 +1,20 @@ | |||
| 1 | DESCRIPTION = "Python3 interface to the wxWidgets Cross-platform C++ GUI toolkit." | 1 | DESCRIPTION = "Python3 interface to the wxWidgets Cross-platform C++ GUI toolkit." |
| 2 | HOMEPAGE = "http://www.wxpython.org" | 2 | HOMEPAGE = "http://www.wxpython.org" |
| 3 | 3 | ||
| 4 | LICENSE = "WXwindows" | 4 | LICENSE = "LGPL-2.0-only & WXwindows" |
| 5 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=fce1d18e2d633d41786c0a8dfbc80917" | 5 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=bdabf9e11191e2b9d3b6aef5f338ec00" |
| 6 | 6 | ||
| 7 | DEPENDS = "wxwidgets-native wxwidgets" | 7 | DEPENDS = "python3-attrdict3-native python3-six-native wxwidgets-native \ |
| 8 | wxwidgets \ | ||
| 9 | " | ||
| 8 | 10 | ||
| 9 | PYPI_PACKAGE = "wxPython" | 11 | PYPI_PACKAGE = "wxPython" |
| 10 | 12 | ||
| 11 | SRC_URI += "file://add-back-option-build-base.patch \ | 13 | SRC_URI += "file://add-back-option-build-base.patch \ |
| 12 | file://wxgtk-fixup-build-scripts.patch \ | 14 | file://wxgtk-fixup-build-scripts.patch \ |
| 13 | file://sip-fix-override-functions.patch \ | 15 | file://not-overwrite-cflags-cxxflags.patch \ |
| 14 | file://0001-Update-Cython-version-to-fix-NanoSVG-issues-with-Pyt.patch \ | ||
| 15 | " | 16 | " |
| 16 | SRC_URI[sha256sum] = "00e5e3180ac7f2852f342ad341d57c44e7e4326de0b550b9a5c4a8361b6c3528" | 17 | SRC_URI[sha256sum] = "663cebc4509d7e5d113518865fe274f77f95434c5d57bc386ed58d65ceed86c7" |
| 17 | 18 | ||
| 18 | S = "${WORKDIR}/wxPython-${PV}" | 19 | S = "${WORKDIR}/wxPython-${PV}" |
| 19 | 20 | ||
| @@ -33,5 +34,3 @@ RDEPENDS:${PN} = "\ | |||
| 33 | python3-six \ | 34 | python3-six \ |
| 34 | python3-xml \ | 35 | python3-xml \ |
| 35 | " | 36 | " |
| 36 | |||
| 37 | SKIP_RECIPE[python3-wxgtk4] ?= "Not compatible with py3.11; needs version update for both itself and wxwidgets" | ||
