From ac43e2d91767da22958107665c41c245c9a489b2 Mon Sep 17 00:00:00 2001 From: Nick Baum Date: Wed, 4 Sep 2024 09:19:42 -1000 Subject: [PATCH] rebuild c files using cython 0.29.37 --- jsonobject/api.c | 16 +++++++------ jsonobject/base.c | 46 +++++++++++++++++++++++++++--------- jsonobject/base_properties.c | 44 ++++++++++++++++++++++++++-------- jsonobject/containers.c | 46 +++++++++++++++++++++++++++--------- jsonobject/properties.c | 42 +++++++++++++++++++++++++------- jsonobject/utils.c | 16 +++++++------ 6 files changed, 155 insertions(+), 55 deletions(-) diff --git a/jsonobject/api.c b/jsonobject/api.c index 01a0070..a2faa98 100644 --- a/jsonobject/api.c +++ b/jsonobject/api.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.35 */ +/* Generated by Cython 0.29.37 */ /* BEGIN: Cython Metadata { @@ -21,8 +21,8 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_35" -#define CYTHON_HEX_VERSION 0x001D23F0 +#define CYTHON_ABI "0_29_37" +#define CYTHON_HEX_VERSION 0x001D25F0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof @@ -97,7 +97,7 @@ END: Cython Metadata */ #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #undef CYTHON_USE_TP_FINALIZE - #define CYTHON_USE_TP_FINALIZE 0 + #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00) #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK @@ -381,9 +381,6 @@ END: Cython Metadata */ #endif #endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) - #define Py_OptimizeFlag 0 -#endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 @@ -461,6 +458,11 @@ END: Cython Metadata */ #endif #define __Pyx_DefaultClassType PyType_Type #endif +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif diff --git a/jsonobject/base.c b/jsonobject/base.c index 1c64086..3dcecf0 100644 --- a/jsonobject/base.c +++ b/jsonobject/base.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.35 */ +/* Generated by Cython 0.29.37 */ /* BEGIN: Cython Metadata { @@ -21,8 +21,8 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_35" -#define CYTHON_HEX_VERSION 0x001D23F0 +#define CYTHON_ABI "0_29_37" +#define CYTHON_HEX_VERSION 0x001D25F0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof @@ -97,7 +97,7 @@ END: Cython Metadata */ #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #undef CYTHON_USE_TP_FINALIZE - #define CYTHON_USE_TP_FINALIZE 0 + #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00) #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK @@ -381,9 +381,6 @@ END: Cython Metadata */ #endif #endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) - #define Py_OptimizeFlag 0 -#endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 @@ -461,6 +458,11 @@ END: Cython Metadata */ #endif #define __Pyx_DefaultClassType PyType_Type #endif +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif @@ -1376,6 +1378,23 @@ static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObje #define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) #endif +/* AssertionsEnabled.proto */ +#define __Pyx_init_assertions_enabled() +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) + #define __pyx_assertions_enabled() (1) +#elif PY_VERSION_HEX < 0x03080000 || CYTHON_COMPILING_IN_PYPY || defined(Py_LIMITED_API) + #define __pyx_assertions_enabled() (!Py_OptimizeFlag) +#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030900A6 + static int __pyx_assertions_enabled_flag; + #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag) + #undef __Pyx_init_assertions_enabled + static void __Pyx_init_assertions_enabled(void) { + __pyx_assertions_enabled_flag = ! _PyInterpreterState_GetConfig(__Pyx_PyThreadState_Current->interp)->optimization_level; + } +#else + #define __pyx_assertions_enabled() (!Py_OptimizeFlag) +#endif + /* PyDictContains.proto */ static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) { int result = PyDict_Contains(dict, item); @@ -4405,7 +4424,7 @@ static PyObject *__pyx_pf_10jsonobject_4base_14JsonObjectMeta___new__(CYTHON_UNU * 'You can only have one property named {0}'.format( */ #ifndef CYTHON_WITHOUT_ASSERTIONS - if (unlikely(!Py_OptimizeFlag)) { + if (unlikely(__pyx_assertions_enabled())) { __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_property_, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_14 = (__pyx_t_5 != Py_None); @@ -4428,7 +4447,7 @@ static PyObject *__pyx_pf_10jsonobject_4base_14JsonObjectMeta___new__(CYTHON_UNU * property_.name) */ #ifndef CYTHON_WITHOUT_ASSERTIONS - if (unlikely(!Py_OptimizeFlag)) { + if (unlikely(__pyx_assertions_enabled())) { __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_property_, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_14 = (__Pyx_PyDict_ContainsTF(__pyx_t_5, __pyx_v_properties_by_name, Py_NE)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 143, __pyx_L1_error) @@ -5011,7 +5030,7 @@ static PyObject *__pyx_pf_10jsonobject_4base_14JsonObjectMeta_2__configure(CYTHO * type_config = super_settings.type_config */ #ifndef CYTHON_WITHOUT_ASSERTIONS - if (unlikely(!Py_OptimizeFlag)) { + if (unlikely(__pyx_assertions_enabled())) { __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_properties); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 162, __pyx_L1_error) __pyx_t_7 = ((!__pyx_t_6) != 0); if (!__pyx_t_7) { @@ -8771,7 +8790,7 @@ static PyObject *__pyx_pf_10jsonobject_4base_14JsonObjectBase_20__setitem__(CYTH * super(JsonObjectBase, self).__setattr__(key, wrapped) */ #ifndef CYTHON_WITHOUT_ASSERTIONS - if (unlikely(!Py_OptimizeFlag)) { + if (unlikely(__pyx_assertions_enabled())) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_properties_by_attr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 306, __pyx_L1_error) @@ -12466,6 +12485,11 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { } static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { + /* AssertionsEnabled.init */ + __Pyx_init_assertions_enabled(); + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error) return 0; diff --git a/jsonobject/base_properties.c b/jsonobject/base_properties.c index de4cb0e..77f57b6 100644 --- a/jsonobject/base_properties.c +++ b/jsonobject/base_properties.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.35 */ +/* Generated by Cython 0.29.37 */ /* BEGIN: Cython Metadata { @@ -21,8 +21,8 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_35" -#define CYTHON_HEX_VERSION 0x001D23F0 +#define CYTHON_ABI "0_29_37" +#define CYTHON_HEX_VERSION 0x001D25F0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof @@ -97,7 +97,7 @@ END: Cython Metadata */ #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #undef CYTHON_USE_TP_FINALIZE - #define CYTHON_USE_TP_FINALIZE 0 + #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00) #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK @@ -381,9 +381,6 @@ END: Cython Metadata */ #endif #endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) - #define Py_OptimizeFlag 0 -#endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 @@ -461,6 +458,11 @@ END: Cython Metadata */ #endif #define __Pyx_DefaultClassType PyType_Type #endif +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif @@ -1293,6 +1295,23 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject /* RaiseException.proto */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); +/* AssertionsEnabled.proto */ +#define __Pyx_init_assertions_enabled() +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) + #define __pyx_assertions_enabled() (1) +#elif PY_VERSION_HEX < 0x03080000 || CYTHON_COMPILING_IN_PYPY || defined(Py_LIMITED_API) + #define __pyx_assertions_enabled() (!Py_OptimizeFlag) +#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030900A6 + static int __pyx_assertions_enabled_flag; + #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag) + #undef __Pyx_init_assertions_enabled + static void __Pyx_init_assertions_enabled(void) { + __pyx_assertions_enabled_flag = ! _PyInterpreterState_GetConfig(__Pyx_PyThreadState_Current->interp)->optimization_level; + } +#else + #define __pyx_assertions_enabled() (!Py_OptimizeFlag) +#endif + /* PySequenceContains.proto */ static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { int result = PySequence_Contains(seq, item); @@ -3593,7 +3612,7 @@ static PyObject *__pyx_pf_10jsonobject_15base_properties_12JsonProperty_12__get_ * else: */ #ifndef CYTHON_WITHOUT_ASSERTIONS - if (unlikely(!Py_OptimizeFlag)) { + if (unlikely(__pyx_assertions_enabled())) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_v_instance, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 73, __pyx_L1_error) @@ -3886,7 +3905,7 @@ static PyObject *__pyx_pf_10jsonobject_15base_properties_12JsonProperty_16__call * self.name = self.name or function_name(method) */ #ifndef CYTHON_WITHOUT_ASSERTIONS - if (unlikely(!Py_OptimizeFlag)) { + if (unlikely(__pyx_assertions_enabled())) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; @@ -7205,7 +7224,7 @@ static PyObject *__pyx_pf_10jsonobject_15base_properties_15DefaultProperty_wrap( * property_ = self.value_to_property(value) */ #ifndef CYTHON_WITHOUT_ASSERTIONS - if (unlikely(!Py_OptimizeFlag)) { + if (unlikely(__pyx_assertions_enabled())) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_type_config); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_string_conversions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error) @@ -11056,6 +11075,11 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { } static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { + /* AssertionsEnabled.init */ + __Pyx_init_assertions_enabled(); + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error) return 0; __pyx_L1_error:; diff --git a/jsonobject/containers.c b/jsonobject/containers.c index 6f0fda2..f854f2d 100644 --- a/jsonobject/containers.c +++ b/jsonobject/containers.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.35 */ +/* Generated by Cython 0.29.37 */ /* BEGIN: Cython Metadata { @@ -21,8 +21,8 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_35" -#define CYTHON_HEX_VERSION 0x001D23F0 +#define CYTHON_ABI "0_29_37" +#define CYTHON_HEX_VERSION 0x001D25F0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof @@ -97,7 +97,7 @@ END: Cython Metadata */ #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #undef CYTHON_USE_TP_FINALIZE - #define CYTHON_USE_TP_FINALIZE 0 + #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00) #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK @@ -381,9 +381,6 @@ END: Cython Metadata */ #endif #endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) - #define Py_OptimizeFlag 0 -#endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 @@ -461,6 +458,11 @@ END: Cython Metadata */ #endif #define __Pyx_DefaultClassType PyType_Type #endif +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif @@ -1188,6 +1190,23 @@ static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) #endif +/* AssertionsEnabled.proto */ +#define __Pyx_init_assertions_enabled() +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) + #define __pyx_assertions_enabled() (1) +#elif PY_VERSION_HEX < 0x03080000 || CYTHON_COMPILING_IN_PYPY || defined(Py_LIMITED_API) + #define __pyx_assertions_enabled() (!Py_OptimizeFlag) +#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030900A6 + static int __pyx_assertions_enabled_flag; + #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag) + #undef __Pyx_init_assertions_enabled + static void __Pyx_init_assertions_enabled(void) { + __pyx_assertions_enabled_flag = ! _PyInterpreterState_GetConfig(__Pyx_PyThreadState_Current->interp)->optimization_level; + } +#else + #define __pyx_assertions_enabled() (!Py_OptimizeFlag) +#endif + /* ListAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { @@ -2489,7 +2508,7 @@ static PyObject *__pyx_pf_10jsonobject_10containers_9JsonArray_2__init__(CYTHON_ * self._wrapper = ( */ #ifndef CYTHON_WITHOUT_ASSERTIONS - if (unlikely(!Py_OptimizeFlag)) { + if (unlikely(__pyx_assertions_enabled())) { __pyx_t_6 = (__pyx_v_type_config != Py_None); if (unlikely(!(__pyx_t_6 != 0))) { PyErr_SetNone(PyExc_AssertionError); @@ -7195,7 +7214,7 @@ static PyObject *__pyx_pf_10jsonobject_10containers_8JsonDict___init__(CYTHON_UN * self._wrapper = ( */ #ifndef CYTHON_WITHOUT_ASSERTIONS - if (unlikely(!Py_OptimizeFlag)) { + if (unlikely(__pyx_assertions_enabled())) { __pyx_t_6 = (__pyx_v_type_config != Py_None); if (unlikely(!(__pyx_t_6 != 0))) { PyErr_SetNone(PyExc_AssertionError); @@ -8949,7 +8968,7 @@ static PyObject *__pyx_pf_10jsonobject_10containers_7JsonSet___init__(CYTHON_UNU * self._wrapper = ( */ #ifndef CYTHON_WITHOUT_ASSERTIONS - if (unlikely(!Py_OptimizeFlag)) { + if (unlikely(__pyx_assertions_enabled())) { __pyx_t_5 = (__pyx_v_type_config != Py_None); if (unlikely(!(__pyx_t_5 != 0))) { PyErr_SetNone(PyExc_AssertionError); @@ -10363,7 +10382,7 @@ static PyObject *__pyx_pf_10jsonobject_10containers_7JsonSet_10pop(CYTHON_UNUSED * return wrapped */ #ifndef CYTHON_WITHOUT_ASSERTIONS - if (unlikely(!Py_OptimizeFlag)) { + if (unlikely(__pyx_assertions_enabled())) { __pyx_t_8 = (__pyx_v_wrapped == __pyx_v_wrapped_); if (unlikely(!(__pyx_t_8 != 0))) { PyErr_SetNone(PyExc_AssertionError); @@ -12846,6 +12865,11 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { } static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { + /* AssertionsEnabled.init */ + __Pyx_init_assertions_enabled(); + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_umethod_PyList_Type_pop.type = (PyObject*)&PyList_Type; if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) diff --git a/jsonobject/properties.c b/jsonobject/properties.c index 80a1b0c..132cb35 100644 --- a/jsonobject/properties.c +++ b/jsonobject/properties.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.35 */ +/* Generated by Cython 0.29.37 */ /* BEGIN: Cython Metadata { @@ -21,8 +21,8 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_35" -#define CYTHON_HEX_VERSION 0x001D23F0 +#define CYTHON_ABI "0_29_37" +#define CYTHON_HEX_VERSION 0x001D25F0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof @@ -97,7 +97,7 @@ END: Cython Metadata */ #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #undef CYTHON_USE_TP_FINALIZE - #define CYTHON_USE_TP_FINALIZE 0 + #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00) #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK @@ -381,9 +381,6 @@ END: Cython Metadata */ #endif #endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) - #define Py_OptimizeFlag 0 -#endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 @@ -461,6 +458,11 @@ END: Cython Metadata */ #endif #define __Pyx_DefaultClassType PyType_Type #endif +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif @@ -1160,6 +1162,23 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject /* PyObjectCallOneArg.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); +/* AssertionsEnabled.proto */ +#define __Pyx_init_assertions_enabled() +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) + #define __pyx_assertions_enabled() (1) +#elif PY_VERSION_HEX < 0x03080000 || CYTHON_COMPILING_IN_PYPY || defined(Py_LIMITED_API) + #define __pyx_assertions_enabled() (!Py_OptimizeFlag) +#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030900A6 + static int __pyx_assertions_enabled_flag; + #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag) + #undef __Pyx_init_assertions_enabled + static void __Pyx_init_assertions_enabled(void) { + __pyx_assertions_enabled_flag = ! _PyInterpreterState_GetConfig(__Pyx_PyThreadState_Current->interp)->optimization_level; + } +#else + #define __pyx_assertions_enabled() (!Py_OptimizeFlag) +#endif + /* SliceObject.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, @@ -2445,7 +2464,7 @@ static PyObject *__pyx_pf_10jsonobject_10properties_15DecimalProperty_2unwrap(CY * */ #ifndef CYTHON_WITHOUT_ASSERTIONS - if (unlikely(!Py_OptimizeFlag)) { + if (unlikely(__pyx_assertions_enabled())) { __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_decimal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 62, __pyx_L1_error) @@ -5033,7 +5052,7 @@ static PyObject *__pyx_pf_10jsonobject_10properties_14ObjectProperty_6unwrap(CYT * return obj, obj._obj */ #ifndef CYTHON_WITHOUT_ASSERTIONS - if (unlikely(!Py_OptimizeFlag)) { + if (unlikely(__pyx_assertions_enabled())) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_item_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 157, __pyx_L1_error) @@ -6020,6 +6039,11 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { } static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { + /* AssertionsEnabled.init */ + __Pyx_init_assertions_enabled(); + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error) diff --git a/jsonobject/utils.c b/jsonobject/utils.c index 9823274..fc9d58e 100644 --- a/jsonobject/utils.c +++ b/jsonobject/utils.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.35 */ +/* Generated by Cython 0.29.37 */ /* BEGIN: Cython Metadata { @@ -21,8 +21,8 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_35" -#define CYTHON_HEX_VERSION 0x001D23F0 +#define CYTHON_ABI "0_29_37" +#define CYTHON_HEX_VERSION 0x001D25F0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof @@ -97,7 +97,7 @@ END: Cython Metadata */ #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #undef CYTHON_USE_TP_FINALIZE - #define CYTHON_USE_TP_FINALIZE 0 + #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00) #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK @@ -381,9 +381,6 @@ END: Cython Metadata */ #endif #endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) - #define Py_OptimizeFlag 0 -#endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 @@ -461,6 +458,11 @@ END: Cython Metadata */ #endif #define __Pyx_DefaultClassType PyType_Type #endif +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif