fonttools 4.58.2__cp310-cp310-win32.whl → 4.58.3__cp310-cp310-win32.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fonttools might be problematic. Click here for more details.
- fontTools/__init__.py +1 -1
- fontTools/cu2qu/cu2qu.c +280 -92
- fontTools/cu2qu/cu2qu.cp310-win32.pyd +0 -0
- fontTools/feaLib/ast.py +2 -2
- fontTools/feaLib/lexer.c +238 -62
- fontTools/feaLib/lexer.cp310-win32.pyd +0 -0
- fontTools/misc/bezierTools.c +390 -202
- fontTools/misc/bezierTools.cp310-win32.pyd +0 -0
- fontTools/pens/momentsPen.c +222 -46
- fontTools/pens/momentsPen.cp310-win32.pyd +0 -0
- fontTools/qu2cu/qu2cu.c +293 -105
- fontTools/qu2cu/qu2cu.cp310-win32.pyd +0 -0
- fontTools/varLib/iup.c +260 -72
- fontTools/varLib/iup.cp310-win32.pyd +0 -0
- {fonttools-4.58.2.dist-info → fonttools-4.58.3.dist-info}/METADATA +6 -1
- {fonttools-4.58.2.dist-info → fonttools-4.58.3.dist-info}/RECORD +22 -22
- {fonttools-4.58.2.data → fonttools-4.58.3.data}/data/share/man/man1/ttx.1 +0 -0
- {fonttools-4.58.2.dist-info → fonttools-4.58.3.dist-info}/WHEEL +0 -0
- {fonttools-4.58.2.dist-info → fonttools-4.58.3.dist-info}/entry_points.txt +0 -0
- {fonttools-4.58.2.dist-info → fonttools-4.58.3.dist-info}/licenses/LICENSE +0 -0
- {fonttools-4.58.2.dist-info → fonttools-4.58.3.dist-info}/licenses/LICENSE.external +0 -0
- {fonttools-4.58.2.dist-info → fonttools-4.58.3.dist-info}/top_level.txt +0 -0
fontTools/cu2qu/cu2qu.c
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Generated by Cython 3.1.
|
|
1
|
+
/* Generated by Cython 3.1.2 */
|
|
2
2
|
|
|
3
3
|
/* BEGIN: Cython Metadata
|
|
4
4
|
{
|
|
@@ -32,8 +32,8 @@ END: Cython Metadata */
|
|
|
32
32
|
#elif PY_VERSION_HEX < 0x03080000
|
|
33
33
|
#error Cython requires Python 3.8+.
|
|
34
34
|
#else
|
|
35
|
-
#define __PYX_ABI_VERSION "
|
|
36
|
-
#define CYTHON_HEX_VERSION
|
|
35
|
+
#define __PYX_ABI_VERSION "3_1_2"
|
|
36
|
+
#define CYTHON_HEX_VERSION 0x030102F0
|
|
37
37
|
#define CYTHON_FUTURE_DIVISION 1
|
|
38
38
|
/* CModulePreamble */
|
|
39
39
|
#include <stddef.h>
|
|
@@ -448,7 +448,7 @@ END: Cython Metadata */
|
|
|
448
448
|
#define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
|
|
449
449
|
#endif
|
|
450
450
|
#ifndef CYTHON_NCP_UNUSED
|
|
451
|
-
# if CYTHON_COMPILING_IN_CPYTHON
|
|
451
|
+
# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
|
|
452
452
|
# define CYTHON_NCP_UNUSED
|
|
453
453
|
# else
|
|
454
454
|
# define CYTHON_NCP_UNUSED CYTHON_UNUSED
|
|
@@ -893,11 +893,19 @@ static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict,
|
|
|
893
893
|
#define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
|
|
894
894
|
#define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
|
|
895
895
|
#endif
|
|
896
|
-
#if
|
|
896
|
+
#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
|
|
897
897
|
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
|
|
898
898
|
#define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
|
|
899
|
+
#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
|
|
900
|
+
#define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
|
|
899
901
|
#else
|
|
900
|
-
#define __Pyx_PyList_GetItemRef(o, i)
|
|
902
|
+
#define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i)
|
|
903
|
+
#endif
|
|
904
|
+
#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
|
|
905
|
+
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
|
|
906
|
+
#define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
|
|
907
|
+
#else
|
|
908
|
+
#define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i))
|
|
901
909
|
#endif
|
|
902
910
|
#else
|
|
903
911
|
#define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i))
|
|
@@ -1305,7 +1313,9 @@ static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
|
|
|
1305
1313
|
#endif /* __GNUC__ */
|
|
1306
1314
|
/* PretendToInitialize */
|
|
1307
1315
|
#ifdef __cplusplus
|
|
1316
|
+
#if __cplusplus > 201103L
|
|
1308
1317
|
#include <type_traits>
|
|
1318
|
+
#endif
|
|
1309
1319
|
template <typename T>
|
|
1310
1320
|
static void __Pyx_pretend_to_initialize(T* ptr) {
|
|
1311
1321
|
#if __cplusplus > 201103L
|
|
@@ -1722,18 +1732,18 @@ static CYTHON_INLINE int __Pyx_IterFinish(void);
|
|
|
1722
1732
|
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
|
|
1723
1733
|
|
|
1724
1734
|
/* GetItemInt.proto */
|
|
1725
|
-
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
|
|
1735
|
+
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\
|
|
1726
1736
|
(__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
|
|
1727
1737
|
__Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
|
|
1728
1738
|
(is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
|
|
1729
1739
|
__Pyx_GetItemInt_Generic(o, to_py_func(i))))
|
|
1730
|
-
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
|
|
1740
|
+
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\
|
|
1731
1741
|
(__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
|
|
1732
1742
|
__Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
|
|
1733
1743
|
(PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
|
|
1734
1744
|
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
|
|
1735
1745
|
int wraparound, int boundscheck);
|
|
1736
|
-
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
|
|
1746
|
+
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\
|
|
1737
1747
|
(__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
|
|
1738
1748
|
__Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
|
|
1739
1749
|
(PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
|
|
@@ -2075,7 +2085,7 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject
|
|
|
2075
2085
|
#endif
|
|
2076
2086
|
|
|
2077
2087
|
/* SetItemInt.proto */
|
|
2078
|
-
#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
|
|
2088
|
+
#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\
|
|
2079
2089
|
(__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
|
|
2080
2090
|
__Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
|
|
2081
2091
|
(is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
|
|
@@ -2087,6 +2097,15 @@ static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObje
|
|
|
2087
2097
|
/* ModInt[long].proto */
|
|
2088
2098
|
static CYTHON_INLINE long __Pyx_mod_long(long, long, int b_is_constant);
|
|
2089
2099
|
|
|
2100
|
+
/* LimitedApiGetTypeDict.proto */
|
|
2101
|
+
#if CYTHON_COMPILING_IN_LIMITED_API
|
|
2102
|
+
static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp);
|
|
2103
|
+
#endif
|
|
2104
|
+
|
|
2105
|
+
/* SetItemOnTypeDict.proto */
|
|
2106
|
+
static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v);
|
|
2107
|
+
#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v)
|
|
2108
|
+
|
|
2090
2109
|
/* FixUpExtensionType.proto */
|
|
2091
2110
|
static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);
|
|
2092
2111
|
|
|
@@ -2289,7 +2308,11 @@ static PyObject *__Pyx_FetchSharedCythonABIModule(void);
|
|
|
2289
2308
|
static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, int is_safe_type);
|
|
2290
2309
|
|
|
2291
2310
|
/* FetchCommonType.proto */
|
|
2292
|
-
static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases);
|
|
2311
|
+
static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases);
|
|
2312
|
+
|
|
2313
|
+
/* CommonTypesMetaclass.proto */
|
|
2314
|
+
static int __pyx_CommonTypesMetaclass_init(PyObject *module);
|
|
2315
|
+
#define __Pyx_CommonTypesMetaclass_USED
|
|
2293
2316
|
|
|
2294
2317
|
/* CallTypeTraverse.proto */
|
|
2295
2318
|
#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
|
|
@@ -2670,6 +2693,7 @@ static PyObject *__Pyx_Coroutine_get_is_running_getter(PyObject *gen, void *clos
|
|
|
2670
2693
|
#if __PYX_HAS_PY_AM_SEND == 2
|
|
2671
2694
|
static void __Pyx_SetBackportTypeAmSend(PyTypeObject *type, __Pyx_PyAsyncMethodsStruct *static_amsend_methods, __Pyx_pyiter_sendfunc am_send);
|
|
2672
2695
|
#endif
|
|
2696
|
+
static PyObject *__Pyx_Coroutine_fail_reduce_ex(PyObject *self, PyObject *arg);
|
|
2673
2697
|
|
|
2674
2698
|
/* Generator.proto */
|
|
2675
2699
|
#define __Pyx_Generator_USED
|
|
@@ -2821,6 +2845,7 @@ static const char __pyx_k_max_err[] = "max_err";
|
|
|
2821
2845
|
static const char __pyx_k_splines[] = "splines";
|
|
2822
2846
|
static const char __pyx_k_COMPILED[] = "COMPILED";
|
|
2823
2847
|
static const char __pyx_k_qualname[] = "__qualname__";
|
|
2848
|
+
static const char __pyx_k_set_name[] = "__set_name__";
|
|
2824
2849
|
static const char __pyx_k_isenabled[] = "isenabled";
|
|
2825
2850
|
static const char __pyx_k_Cu2QuError[] = "Cu2QuError";
|
|
2826
2851
|
static const char __pyx_k_max_errors[] = "max_errors";
|
|
@@ -2890,7 +2915,7 @@ typedef struct {
|
|
|
2890
2915
|
PyTypeObject *__pyx_ptype_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen;
|
|
2891
2916
|
__Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop;
|
|
2892
2917
|
PyObject *__pyx_codeobj_tab[3];
|
|
2893
|
-
PyObject *__pyx_string_tab[
|
|
2918
|
+
PyObject *__pyx_string_tab[79];
|
|
2894
2919
|
PyObject *__pyx_int_1;
|
|
2895
2920
|
PyObject *__pyx_int_2;
|
|
2896
2921
|
PyObject *__pyx_int_3;
|
|
@@ -2908,6 +2933,9 @@ PyObject *__Pyx_GetBuiltinNext_LimitedAPI_cache;
|
|
|
2908
2933
|
struct __pyx_obj_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen *__pyx_freelist_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen[8];
|
|
2909
2934
|
int __pyx_freecount_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen;
|
|
2910
2935
|
#endif
|
|
2936
|
+
/* CommonTypesMetaclass.module_state_decls */
|
|
2937
|
+
PyTypeObject *__pyx_CommonTypesMetaclassType;
|
|
2938
|
+
|
|
2911
2939
|
/* CachedMethodType.module_state_decls */
|
|
2912
2940
|
#if CYTHON_COMPILING_IN_LIMITED_API
|
|
2913
2941
|
PyObject *__Pyx_CachedMethodType;
|
|
@@ -3010,15 +3038,16 @@ static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_stati
|
|
|
3010
3038
|
#define __pyx_n_u_real __pyx_string_tab[66]
|
|
3011
3039
|
#define __pyx_n_u_s __pyx_string_tab[67]
|
|
3012
3040
|
#define __pyx_n_u_send __pyx_string_tab[68]
|
|
3013
|
-
#define
|
|
3014
|
-
#define
|
|
3015
|
-
#define
|
|
3016
|
-
#define
|
|
3017
|
-
#define
|
|
3018
|
-
#define
|
|
3019
|
-
#define
|
|
3020
|
-
#define
|
|
3021
|
-
#define
|
|
3041
|
+
#define __pyx_n_u_set_name __pyx_string_tab[69]
|
|
3042
|
+
#define __pyx_n_u_spec __pyx_string_tab[70]
|
|
3043
|
+
#define __pyx_n_u_spline __pyx_string_tab[71]
|
|
3044
|
+
#define __pyx_n_u_splines __pyx_string_tab[72]
|
|
3045
|
+
#define __pyx_n_u_split_cubic_into_n_gen __pyx_string_tab[73]
|
|
3046
|
+
#define __pyx_n_u_t1 __pyx_string_tab[74]
|
|
3047
|
+
#define __pyx_n_u_t1_2 __pyx_string_tab[75]
|
|
3048
|
+
#define __pyx_n_u_test __pyx_string_tab[76]
|
|
3049
|
+
#define __pyx_n_u_throw __pyx_string_tab[77]
|
|
3050
|
+
#define __pyx_n_u_value __pyx_string_tab[78]
|
|
3022
3051
|
/* #### Code section: module_state_clear ### */
|
|
3023
3052
|
#if CYTHON_USE_MODULE_STATE
|
|
3024
3053
|
static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) {
|
|
@@ -3042,7 +3071,7 @@ static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) {
|
|
|
3042
3071
|
Py_CLEAR(clear_module_state->__pyx_ptype_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen);
|
|
3043
3072
|
Py_CLEAR(clear_module_state->__pyx_type_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen);
|
|
3044
3073
|
for (int i=0; i<3; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); }
|
|
3045
|
-
for (int i=0; i<
|
|
3074
|
+
for (int i=0; i<79; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
|
|
3046
3075
|
Py_CLEAR(clear_module_state->__pyx_int_1);
|
|
3047
3076
|
Py_CLEAR(clear_module_state->__pyx_int_2);
|
|
3048
3077
|
Py_CLEAR(clear_module_state->__pyx_int_3);
|
|
@@ -3072,7 +3101,7 @@ static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void
|
|
|
3072
3101
|
Py_VISIT(traverse_module_state->__pyx_ptype_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen);
|
|
3073
3102
|
Py_VISIT(traverse_module_state->__pyx_type_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen);
|
|
3074
3103
|
for (int i=0; i<3; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); }
|
|
3075
|
-
for (int i=0; i<
|
|
3104
|
+
for (int i=0; i<79; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
|
|
3076
3105
|
__Pyx_VISIT_CONST(traverse_module_state->__pyx_int_1);
|
|
3077
3106
|
__Pyx_VISIT_CONST(traverse_module_state->__pyx_int_2);
|
|
3078
3107
|
__Pyx_VISIT_CONST(traverse_module_state->__pyx_int_3);
|
|
@@ -3561,19 +3590,19 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3561
3590
|
* + split_cubic_into_two(b[0], b[1], b[2], b[3])
|
|
3562
3591
|
* )
|
|
3563
3592
|
*/
|
|
3564
|
-
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_a, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
|
|
3593
|
+
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_a, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
|
|
3565
3594
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3566
3595
|
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L1_error)
|
|
3567
3596
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3568
|
-
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_a, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
|
|
3597
|
+
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_a, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
|
|
3569
3598
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3570
3599
|
__pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L1_error)
|
|
3571
3600
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3572
|
-
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_a, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
|
|
3601
|
+
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_a, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
|
|
3573
3602
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3574
3603
|
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L1_error)
|
|
3575
3604
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3576
|
-
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_a, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
|
|
3605
|
+
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_a, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
|
|
3577
3606
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3578
3607
|
__pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L1_error)
|
|
3579
3608
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
@@ -3587,19 +3616,19 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3587
3616
|
* )
|
|
3588
3617
|
* if n == 6:
|
|
3589
3618
|
*/
|
|
3590
|
-
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
|
|
3619
|
+
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
|
|
3591
3620
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3592
3621
|
__pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L1_error)
|
|
3593
3622
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
3594
|
-
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
|
|
3623
|
+
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
|
|
3595
3624
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3596
3625
|
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L1_error)
|
|
3597
3626
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
3598
|
-
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
|
|
3627
|
+
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
|
|
3599
3628
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3600
3629
|
__pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L1_error)
|
|
3601
3630
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
3602
|
-
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
|
|
3631
|
+
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
|
|
3603
3632
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3604
3633
|
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L1_error)
|
|
3605
3634
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
@@ -3723,19 +3752,19 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3723
3752
|
* + split_cubic_into_three(b[0], b[1], b[2], b[3])
|
|
3724
3753
|
* )
|
|
3725
3754
|
*/
|
|
3726
|
-
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_a, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error)
|
|
3755
|
+
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_a, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error)
|
|
3727
3756
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3728
3757
|
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 117, __pyx_L1_error)
|
|
3729
3758
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
3730
|
-
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_a, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error)
|
|
3759
|
+
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_a, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error)
|
|
3731
3760
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3732
3761
|
__pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 117, __pyx_L1_error)
|
|
3733
3762
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
3734
|
-
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_a, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error)
|
|
3763
|
+
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_a, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error)
|
|
3735
3764
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3736
3765
|
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 117, __pyx_L1_error)
|
|
3737
3766
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
3738
|
-
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_a, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error)
|
|
3767
|
+
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_a, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error)
|
|
3739
3768
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3740
3769
|
__pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 117, __pyx_L1_error)
|
|
3741
3770
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
@@ -3749,19 +3778,19 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3749
3778
|
* )
|
|
3750
3779
|
*
|
|
3751
3780
|
*/
|
|
3752
|
-
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
|
|
3781
|
+
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
|
|
3753
3782
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3754
3783
|
__pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L1_error)
|
|
3755
3784
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3756
|
-
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
|
|
3785
|
+
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
|
|
3757
3786
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3758
3787
|
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L1_error)
|
|
3759
3788
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3760
|
-
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
|
|
3789
|
+
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
|
|
3761
3790
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3762
3791
|
__pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L1_error)
|
|
3763
3792
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3764
|
-
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
|
|
3793
|
+
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
|
|
3765
3794
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3766
3795
|
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L1_error)
|
|
3767
3796
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
@@ -5162,19 +5191,19 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5162
5191
|
* if math.isnan(q1.imag):
|
|
5163
5192
|
* return None
|
|
5164
5193
|
*/
|
|
5165
|
-
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
|
|
5194
|
+
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
|
|
5166
5195
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5167
5196
|
__pyx_t_2 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L1_error)
|
|
5168
5197
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
5169
|
-
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
|
|
5198
|
+
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
|
|
5170
5199
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5171
5200
|
__pyx_t_3 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L1_error)
|
|
5172
5201
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
5173
|
-
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
|
|
5202
|
+
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
|
|
5174
5203
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5175
5204
|
__pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L1_error)
|
|
5176
5205
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
5177
|
-
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
|
|
5206
|
+
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
|
|
5178
5207
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5179
5208
|
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L1_error)
|
|
5180
5209
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
@@ -5248,7 +5277,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5248
5277
|
* c3 = cubic[3]
|
|
5249
5278
|
* c1 = c0 + (q1 - c0) * (2 / 3)
|
|
5250
5279
|
*/
|
|
5251
|
-
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error)
|
|
5280
|
+
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error)
|
|
5252
5281
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5253
5282
|
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 349, __pyx_L1_error)
|
|
5254
5283
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
@@ -5261,7 +5290,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5261
5290
|
* c1 = c0 + (q1 - c0) * (2 / 3)
|
|
5262
5291
|
* c2 = c3 + (q1 - c3) * (2 / 3)
|
|
5263
5292
|
*/
|
|
5264
|
-
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 350, __pyx_L1_error)
|
|
5293
|
+
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 350, __pyx_L1_error)
|
|
5265
5294
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5266
5295
|
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 350, __pyx_L1_error)
|
|
5267
5296
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
@@ -5294,7 +5323,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5294
5323
|
*/
|
|
5295
5324
|
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_c1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
|
|
5296
5325
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5297
|
-
__pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 353, __pyx_L1_error)
|
|
5326
|
+
__pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 353, __pyx_L1_error)
|
|
5298
5327
|
__Pyx_GOTREF(__pyx_t_9);
|
|
5299
5328
|
__pyx_t_8 = PyNumber_Subtract(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 353, __pyx_L1_error)
|
|
5300
5329
|
__Pyx_GOTREF(__pyx_t_8);
|
|
@@ -5304,7 +5333,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5304
5333
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
5305
5334
|
__pyx_t_8 = __pyx_PyComplex_FromComplex(__pyx_v_c2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 353, __pyx_L1_error)
|
|
5306
5335
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5307
|
-
__pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 353, __pyx_L1_error)
|
|
5336
|
+
__pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 353, __pyx_L1_error)
|
|
5308
5337
|
__Pyx_GOTREF(__pyx_t_9);
|
|
5309
5338
|
__pyx_t_1 = PyNumber_Subtract(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
|
|
5310
5339
|
__Pyx_GOTREF(__pyx_t_1);
|
|
@@ -5515,19 +5544,19 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5515
5544
|
*
|
|
5516
5545
|
* # calculate the spline of quadratics and check errors at the same time.
|
|
5517
5546
|
*/
|
|
5518
|
-
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error)
|
|
5547
|
+
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error)
|
|
5519
5548
|
__Pyx_GOTREF(__pyx_t_2);
|
|
5520
5549
|
__pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 392, __pyx_L1_error)
|
|
5521
5550
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
5522
|
-
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error)
|
|
5551
|
+
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error)
|
|
5523
5552
|
__Pyx_GOTREF(__pyx_t_2);
|
|
5524
5553
|
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 392, __pyx_L1_error)
|
|
5525
5554
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
5526
|
-
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error)
|
|
5555
|
+
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error)
|
|
5527
5556
|
__Pyx_GOTREF(__pyx_t_2);
|
|
5528
5557
|
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 392, __pyx_L1_error)
|
|
5529
5558
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
5530
|
-
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error)
|
|
5559
|
+
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error)
|
|
5531
5560
|
__Pyx_GOTREF(__pyx_t_2);
|
|
5532
5561
|
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 392, __pyx_L1_error)
|
|
5533
5562
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
@@ -5558,19 +5587,19 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5558
5587
|
* )
|
|
5559
5588
|
* q2 = cubic[0]
|
|
5560
5589
|
*/
|
|
5561
|
-
__pyx_t_8 = __Pyx_GetItemInt(__pyx_v_next_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 397, __pyx_L1_error)
|
|
5590
|
+
__pyx_t_8 = __Pyx_GetItemInt(__pyx_v_next_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 397, __pyx_L1_error)
|
|
5562
5591
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5563
5592
|
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 397, __pyx_L1_error)
|
|
5564
5593
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
5565
|
-
__pyx_t_8 = __Pyx_GetItemInt(__pyx_v_next_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 397, __pyx_L1_error)
|
|
5594
|
+
__pyx_t_8 = __Pyx_GetItemInt(__pyx_v_next_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 397, __pyx_L1_error)
|
|
5566
5595
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5567
5596
|
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 397, __pyx_L1_error)
|
|
5568
5597
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
5569
|
-
__pyx_t_8 = __Pyx_GetItemInt(__pyx_v_next_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 397, __pyx_L1_error)
|
|
5598
|
+
__pyx_t_8 = __Pyx_GetItemInt(__pyx_v_next_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 397, __pyx_L1_error)
|
|
5570
5599
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5571
5600
|
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 397, __pyx_L1_error)
|
|
5572
5601
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
5573
|
-
__pyx_t_8 = __Pyx_GetItemInt(__pyx_v_next_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 397, __pyx_L1_error)
|
|
5602
|
+
__pyx_t_8 = __Pyx_GetItemInt(__pyx_v_next_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 397, __pyx_L1_error)
|
|
5574
5603
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5575
5604
|
__pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 397, __pyx_L1_error)
|
|
5576
5605
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
@@ -5592,7 +5621,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5592
5621
|
* d1 = 0j
|
|
5593
5622
|
* spline = [cubic[0], next_q1]
|
|
5594
5623
|
*/
|
|
5595
|
-
__pyx_t_8 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 399, __pyx_L1_error)
|
|
5624
|
+
__pyx_t_8 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 399, __pyx_L1_error)
|
|
5596
5625
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5597
5626
|
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 399, __pyx_L1_error)
|
|
5598
5627
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
@@ -5614,7 +5643,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5614
5643
|
* for i in range(1, n + 1):
|
|
5615
5644
|
* # Current cubic to convert
|
|
5616
5645
|
*/
|
|
5617
|
-
__pyx_t_8 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 401, __pyx_L1_error)
|
|
5646
|
+
__pyx_t_8 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 401, __pyx_L1_error)
|
|
5618
5647
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5619
5648
|
__pyx_t_2 = __pyx_PyComplex_FromComplex(__pyx_v_next_q1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 401, __pyx_L1_error)
|
|
5620
5649
|
__Pyx_GOTREF(__pyx_t_2);
|
|
@@ -5778,19 +5807,19 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5778
5807
|
PyErr_SetString(PyExc_ZeroDivisionError, "float division");
|
|
5779
5808
|
__PYX_ERR(0, 412, __pyx_L1_error)
|
|
5780
5809
|
}
|
|
5781
|
-
__pyx_t_14 = __Pyx_GetItemInt(__pyx_v_next_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 412, __pyx_L1_error)
|
|
5810
|
+
__pyx_t_14 = __Pyx_GetItemInt(__pyx_v_next_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 412, __pyx_L1_error)
|
|
5782
5811
|
__Pyx_GOTREF(__pyx_t_14);
|
|
5783
5812
|
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 412, __pyx_L1_error)
|
|
5784
5813
|
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
|
|
5785
|
-
__pyx_t_14 = __Pyx_GetItemInt(__pyx_v_next_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 412, __pyx_L1_error)
|
|
5814
|
+
__pyx_t_14 = __Pyx_GetItemInt(__pyx_v_next_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 412, __pyx_L1_error)
|
|
5786
5815
|
__Pyx_GOTREF(__pyx_t_14);
|
|
5787
5816
|
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 412, __pyx_L1_error)
|
|
5788
5817
|
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
|
|
5789
|
-
__pyx_t_14 = __Pyx_GetItemInt(__pyx_v_next_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 412, __pyx_L1_error)
|
|
5818
|
+
__pyx_t_14 = __Pyx_GetItemInt(__pyx_v_next_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 412, __pyx_L1_error)
|
|
5790
5819
|
__Pyx_GOTREF(__pyx_t_14);
|
|
5791
5820
|
__pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 412, __pyx_L1_error)
|
|
5792
5821
|
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
|
|
5793
|
-
__pyx_t_14 = __Pyx_GetItemInt(__pyx_v_next_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 412, __pyx_L1_error)
|
|
5822
|
+
__pyx_t_14 = __Pyx_GetItemInt(__pyx_v_next_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 412, __pyx_L1_error)
|
|
5794
5823
|
__Pyx_GOTREF(__pyx_t_14);
|
|
5795
5824
|
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 412, __pyx_L1_error)
|
|
5796
5825
|
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
|
|
@@ -5929,7 +5958,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5929
5958
|
*
|
|
5930
5959
|
* return spline
|
|
5931
5960
|
*/
|
|
5932
|
-
__pyx_t_14 = __Pyx_GetItemInt(__pyx_v_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 431, __pyx_L1_error)
|
|
5961
|
+
__pyx_t_14 = __Pyx_GetItemInt(__pyx_v_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 431, __pyx_L1_error)
|
|
5933
5962
|
__Pyx_GOTREF(__pyx_t_14);
|
|
5934
5963
|
__pyx_t_18 = __Pyx_PyList_Append(__pyx_v_spline, __pyx_t_14); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 431, __pyx_L1_error)
|
|
5935
5964
|
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
|
|
@@ -5988,7 +6017,7 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
|
5988
6017
|
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
5989
6018
|
#endif
|
|
5990
6019
|
); /*proto*/
|
|
5991
|
-
PyDoc_STRVAR(__pyx_doc_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic, "curve_to_quadratic(curve, double max_err, int all_quadratic=True)\nApproximate a cubic Bezier curve with a spline of n quadratics.\n\nArgs:\n cubic (sequence): Four 2D tuples representing control points of\n the cubic Bezier curve.\n max_err (double): Permitted deviation from the original curve.\n all_quadratic (bool): If True (default) returned value is a\n quadratic spline. If False, it's either a single quadratic\n curve or a single cubic curve.\n\nReturns:\n If all_quadratic is True: A list of 2D tuples, representing\n control points of the quadratic spline if it fits within the\n given tolerance, or ``None`` if no suitable spline could be\n calculated.\n\n If all_quadratic is False: Either a quadratic curve (if length\n of output is 3), or a cubic curve (if length of output is 4).");
|
|
6020
|
+
PyDoc_STRVAR(__pyx_doc_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic, "curve_to_quadratic(curve, double max_err, int all_quadratic=True)\n\nApproximate a cubic Bezier curve with a spline of n quadratics.\n\nArgs:\n cubic (sequence): Four 2D tuples representing control points of\n the cubic Bezier curve.\n max_err (double): Permitted deviation from the original curve.\n all_quadratic (bool): If True (default) returned value is a\n quadratic spline. If False, it's either a single quadratic\n curve or a single cubic curve.\n\nReturns:\n If all_quadratic is True: A list of 2D tuples, representing\n control points of the quadratic spline if it fits within the\n given tolerance, or ``None`` if no suitable spline could be\n calculated.\n\n If all_quadratic is False: Either a quadratic curve (if length\n of output is 3), or a cubic curve (if length of output is 4).");
|
|
5992
6021
|
static PyMethodDef __pyx_mdef_9fontTools_5cu2qu_5cu2qu_4curve_to_quadratic = {"curve_to_quadratic", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_5cu2qu_5cu2qu_4curve_to_quadratic, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic};
|
|
5993
6022
|
static PyObject *__pyx_pw_9fontTools_5cu2qu_5cu2qu_4curve_to_quadratic(PyObject *__pyx_self,
|
|
5994
6023
|
#if CYTHON_METH_FASTCALL
|
|
@@ -6428,7 +6457,7 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
|
6428
6457
|
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
6429
6458
|
#endif
|
|
6430
6459
|
); /*proto*/
|
|
6431
|
-
PyDoc_STRVAR(__pyx_doc_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic, "curves_to_quadratic(curves, max_errors, int all_quadratic=True)\nReturn quadratic Bezier splines approximating the input cubic Beziers.\n\nArgs:\n curves: A sequence of *n* curves, each curve being a sequence of four\n 2D tuples.\n max_errors: A sequence of *n* floats representing the maximum permissible\n deviation from each of the cubic Bezier curves.\n all_quadratic (bool): If True (default) returned values are a\n quadratic spline. If False, they are either a single quadratic\n curve or a single cubic curve.\n\nExample::\n\n >>> curves_to_quadratic( [\n ... [ (50,50), (100,100), (150,100), (200,50) ],\n ... [ (75,50), (120,100), (150,75), (200,60) ]\n ... ], [1,1] )\n [[(50.0, 50.0), (75.0, 75.0), (125.0, 91.66666666666666), (175.0, 75.0), (200.0, 50.0)], [(75.0, 50.0), (97.5, 75.0), (135.41666666666666, 82.08333333333333), (175.0, 67.5), (200.0, 60.0)]]\n\nThe returned splines have \"implied oncurve points\" suitable for use in\nTrueType ``glif`` outlines - i.e. in the first spline returned above,\nthe first quadratic segment runs from (50,50) to\n( (75 + 125)/2 , (120 + 91.666..)/2 ) = (100, 83.333...).\n\nReturns:\n If all_quadratic is True, a list of splines, each spline being a list\n of 2D tuples.\n\n If all_quadratic is False, a list of curves, each curve being a quadratic\n (length 3), or cubic (length 4).\n\nRaises:\n fontTools.cu2qu.Errors.ApproxNotFoundError: if no suitable approximation\n can be found for all curves with the given parameters.");
|
|
6460
|
+
PyDoc_STRVAR(__pyx_doc_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic, "curves_to_quadratic(curves, max_errors, int all_quadratic=True)\n\nReturn quadratic Bezier splines approximating the input cubic Beziers.\n\nArgs:\n curves: A sequence of *n* curves, each curve being a sequence of four\n 2D tuples.\n max_errors: A sequence of *n* floats representing the maximum permissible\n deviation from each of the cubic Bezier curves.\n all_quadratic (bool): If True (default) returned values are a\n quadratic spline. If False, they are either a single quadratic\n curve or a single cubic curve.\n\nExample::\n\n >>> curves_to_quadratic( [\n ... [ (50,50), (100,100), (150,100), (200,50) ],\n ... [ (75,50), (120,100), (150,75), (200,60) ]\n ... ], [1,1] )\n [[(50.0, 50.0), (75.0, 75.0), (125.0, 91.66666666666666), (175.0, 75.0), (200.0, 50.0)], [(75.0, 50.0), (97.5, 75.0), (135.41666666666666, 82.08333333333333), (175.0, 67.5), (200.0, 60.0)]]\n\nThe returned splines have \"implied oncurve points\" suitable for use in\nTrueType ``glif`` outlines - i.e. in the first spline returned above,\nthe first quadratic segment runs from (50,50) to\n( (75 + 125)/2 , (120 + 91.666..)/2 ) = (100, 83.333...).\n\nReturns:\n If all_quadratic is True, a list of splines, each spline being a list\n of 2D tuples.\n\n If all_quadratic is False, a list of curves, each curve being a quadratic\n (length 3), or cubic (length 4).\n\nRaises:\n fontTools.cu2qu.Errors.ApproxNotFoundError: if no suitable approximation\n can be found for all curves with the given parameters.");
|
|
6432
6461
|
static PyMethodDef __pyx_mdef_9fontTools_5cu2qu_5cu2qu_6curves_to_quadratic = {"curves_to_quadratic", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_5cu2qu_5cu2qu_6curves_to_quadratic, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic};
|
|
6433
6462
|
static PyObject *__pyx_pw_9fontTools_5cu2qu_5cu2qu_6curves_to_quadratic(PyObject *__pyx_self,
|
|
6434
6463
|
#if CYTHON_METH_FASTCALL
|
|
@@ -6813,10 +6842,10 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6813
6842
|
* if spline is None:
|
|
6814
6843
|
* if n == MAX_N:
|
|
6815
6844
|
*/
|
|
6816
|
-
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_curves, __pyx_v_i, int, 1, __Pyx_PyLong_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error)
|
|
6845
|
+
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_curves, __pyx_v_i, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error)
|
|
6817
6846
|
__Pyx_GOTREF(__pyx_t_1);
|
|
6818
6847
|
__pyx_t_12 = __Pyx_PyLong_As_int(__pyx_v_n); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 518, __pyx_L1_error)
|
|
6819
|
-
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_max_errors, __pyx_v_i, int, 1, __Pyx_PyLong_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L1_error)
|
|
6848
|
+
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_max_errors, __pyx_v_i, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L1_error)
|
|
6820
6849
|
__Pyx_GOTREF(__pyx_t_2);
|
|
6821
6850
|
__pyx_t_13 = __Pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 518, __pyx_L1_error)
|
|
6822
6851
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
@@ -6915,7 +6944,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6915
6944
|
* i = (i + 1) % l
|
|
6916
6945
|
* if i == last_i:
|
|
6917
6946
|
*/
|
|
6918
|
-
if (unlikely((__Pyx_SetItemInt(__pyx_v_splines, __pyx_v_i, __pyx_v_spline, int, 1, __Pyx_PyLong_From_int, 1, 1, 1) < 0))) __PYX_ERR(0, 525, __pyx_L1_error)
|
|
6947
|
+
if (unlikely((__Pyx_SetItemInt(__pyx_v_splines, __pyx_v_i, __pyx_v_spline, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1) < 0))) __PYX_ERR(0, 525, __pyx_L1_error)
|
|
6919
6948
|
|
|
6920
6949
|
/* "fontTools/cu2qu/cu2qu.py":526
|
|
6921
6950
|
* continue
|
|
@@ -7618,6 +7647,13 @@ __Pyx_RefNannySetupContext("PyInit_cu2qu", 0);
|
|
|
7618
7647
|
__pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
7619
7648
|
__pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
7620
7649
|
__pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
7650
|
+
/*--- Initialize various global constants etc. ---*/
|
|
7651
|
+
if (__Pyx_InitConstants(__pyx_mstate) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
7652
|
+
stringtab_initialized = 1;
|
|
7653
|
+
if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
7654
|
+
#if 0 || defined(__Pyx_CyFunction_USED) || defined(__Pyx_FusedFunction_USED) || defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED) || defined(__Pyx_AsyncGen_USED)
|
|
7655
|
+
if (__pyx_CommonTypesMetaclass_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
7656
|
+
#endif
|
|
7621
7657
|
#ifdef __Pyx_CyFunction_USED
|
|
7622
7658
|
if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
7623
7659
|
#endif
|
|
@@ -7634,10 +7670,6 @@ __Pyx_RefNannySetupContext("PyInit_cu2qu", 0);
|
|
|
7634
7670
|
if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
7635
7671
|
#endif
|
|
7636
7672
|
/*--- Library function declarations ---*/
|
|
7637
|
-
/*--- Initialize various global constants etc. ---*/
|
|
7638
|
-
if (__Pyx_InitConstants(__pyx_mstate) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
7639
|
-
stringtab_initialized = 1;
|
|
7640
|
-
if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
7641
7673
|
if (__pyx_module_is_main_fontTools__cu2qu__cu2qu) {
|
|
7642
7674
|
if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
7643
7675
|
}
|
|
@@ -7965,6 +7997,7 @@ static const __Pyx_StringTabEntry __pyx_string_tab[] = {
|
|
|
7965
7997
|
{__pyx_k_real, sizeof(__pyx_k_real), 0, 1, 1}, /* PyObject cname: __pyx_n_u_real */
|
|
7966
7998
|
{__pyx_k_s, sizeof(__pyx_k_s), 0, 1, 1}, /* PyObject cname: __pyx_n_u_s */
|
|
7967
7999
|
{__pyx_k_send, sizeof(__pyx_k_send), 0, 1, 1}, /* PyObject cname: __pyx_n_u_send */
|
|
8000
|
+
{__pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_set_name */
|
|
7968
8001
|
{__pyx_k_spec, sizeof(__pyx_k_spec), 0, 1, 1}, /* PyObject cname: __pyx_n_u_spec */
|
|
7969
8002
|
{__pyx_k_spline, sizeof(__pyx_k_spline), 0, 1, 1}, /* PyObject cname: __pyx_n_u_spline */
|
|
7970
8003
|
{__pyx_k_splines, sizeof(__pyx_k_splines), 0, 1, 1}, /* PyObject cname: __pyx_n_u_splines */
|
|
@@ -10171,24 +10204,83 @@ static CYTHON_INLINE long __Pyx_mod_long(long a, long b, int b_is_constant) {
|
|
|
10171
10204
|
return r + adapt_python * b;
|
|
10172
10205
|
}
|
|
10173
10206
|
|
|
10207
|
+
/* LimitedApiGetTypeDict */
|
|
10208
|
+
#if CYTHON_COMPILING_IN_LIMITED_API
|
|
10209
|
+
static Py_ssize_t __Pyx_GetTypeDictOffset(void) {
|
|
10210
|
+
PyObject *tp_dictoffset_o;
|
|
10211
|
+
Py_ssize_t tp_dictoffset;
|
|
10212
|
+
tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__");
|
|
10213
|
+
if (unlikely(!tp_dictoffset_o)) return -1;
|
|
10214
|
+
tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o);
|
|
10215
|
+
Py_DECREF(tp_dictoffset_o);
|
|
10216
|
+
if (unlikely(tp_dictoffset == 0)) {
|
|
10217
|
+
PyErr_SetString(
|
|
10218
|
+
PyExc_TypeError,
|
|
10219
|
+
"'type' doesn't have a dictoffset");
|
|
10220
|
+
return -1;
|
|
10221
|
+
} else if (unlikely(tp_dictoffset < 0)) {
|
|
10222
|
+
PyErr_SetString(
|
|
10223
|
+
PyExc_TypeError,
|
|
10224
|
+
"'type' has an unexpected negative dictoffset. "
|
|
10225
|
+
"Please report this as Cython bug");
|
|
10226
|
+
return -1;
|
|
10227
|
+
}
|
|
10228
|
+
return tp_dictoffset;
|
|
10229
|
+
}
|
|
10230
|
+
static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) {
|
|
10231
|
+
static Py_ssize_t tp_dictoffset = 0;
|
|
10232
|
+
if (unlikely(tp_dictoffset == 0)) {
|
|
10233
|
+
tp_dictoffset = __Pyx_GetTypeDictOffset();
|
|
10234
|
+
if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) {
|
|
10235
|
+
tp_dictoffset = 0; // try again next time?
|
|
10236
|
+
return NULL;
|
|
10237
|
+
}
|
|
10238
|
+
}
|
|
10239
|
+
return *(PyObject**)((char*)tp + tp_dictoffset);
|
|
10240
|
+
}
|
|
10241
|
+
#endif
|
|
10242
|
+
|
|
10243
|
+
/* SetItemOnTypeDict */
|
|
10244
|
+
static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) {
|
|
10245
|
+
int result;
|
|
10246
|
+
PyObject *tp_dict;
|
|
10247
|
+
#if CYTHON_COMPILING_IN_LIMITED_API
|
|
10248
|
+
tp_dict = __Pyx_GetTypeDict(tp);
|
|
10249
|
+
if (unlikely(!tp_dict)) return -1;
|
|
10250
|
+
#else
|
|
10251
|
+
tp_dict = tp->tp_dict;
|
|
10252
|
+
#endif
|
|
10253
|
+
result = PyDict_SetItem(tp_dict, k, v);
|
|
10254
|
+
if (likely(!result)) {
|
|
10255
|
+
PyType_Modified(tp);
|
|
10256
|
+
if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) {
|
|
10257
|
+
PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL);
|
|
10258
|
+
if (!setNameResult) return -1;
|
|
10259
|
+
Py_DECREF(setNameResult);
|
|
10260
|
+
}
|
|
10261
|
+
}
|
|
10262
|
+
return result;
|
|
10263
|
+
}
|
|
10264
|
+
|
|
10174
10265
|
/* FixUpExtensionType */
|
|
10175
10266
|
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
|
|
10176
|
-
#if
|
|
10267
|
+
#if __PYX_LIMITED_VERSION_HEX > 0x030900B1
|
|
10177
10268
|
CYTHON_UNUSED_VAR(spec);
|
|
10178
10269
|
CYTHON_UNUSED_VAR(type);
|
|
10270
|
+
CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
|
|
10179
10271
|
#else
|
|
10180
10272
|
const PyType_Slot *slot = spec->slots;
|
|
10273
|
+
int changed = 0;
|
|
10274
|
+
#if !CYTHON_COMPILING_IN_LIMITED_API
|
|
10181
10275
|
while (slot && slot->slot && slot->slot != Py_tp_members)
|
|
10182
10276
|
slot++;
|
|
10183
10277
|
if (slot && slot->slot == Py_tp_members) {
|
|
10184
|
-
|
|
10185
|
-
#if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON)
|
|
10278
|
+
#if !CYTHON_COMPILING_IN_CPYTHON
|
|
10186
10279
|
const
|
|
10187
|
-
#endif
|
|
10280
|
+
#endif // !CYTHON_COMPILING_IN_CPYTHON)
|
|
10188
10281
|
PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
|
|
10189
10282
|
while (memb && memb->name) {
|
|
10190
10283
|
if (memb->name[0] == '_' && memb->name[1] == '_') {
|
|
10191
|
-
#if PY_VERSION_HEX < 0x030900b1
|
|
10192
10284
|
if (strcmp(memb->name, "__weaklistoffset__") == 0) {
|
|
10193
10285
|
assert(memb->type == T_PYSSIZET);
|
|
10194
10286
|
assert(memb->flags == READONLY);
|
|
@@ -10212,11 +10304,7 @@ static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject
|
|
|
10212
10304
|
#endif
|
|
10213
10305
|
changed = 1;
|
|
10214
10306
|
}
|
|
10215
|
-
#endif
|
|
10216
|
-
#else
|
|
10217
|
-
if ((0));
|
|
10218
|
-
#endif
|
|
10219
|
-
#if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON
|
|
10307
|
+
#endif // CYTHON_METH_FASTCALL
|
|
10220
10308
|
else if (strcmp(memb->name, "__module__") == 0) {
|
|
10221
10309
|
PyObject *descr;
|
|
10222
10310
|
assert(memb->type == T_OBJECT);
|
|
@@ -10224,21 +10312,52 @@ static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject
|
|
|
10224
10312
|
descr = PyDescr_NewMember(type, memb);
|
|
10225
10313
|
if (unlikely(!descr))
|
|
10226
10314
|
return -1;
|
|
10227
|
-
|
|
10228
|
-
|
|
10315
|
+
int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
|
|
10316
|
+
Py_DECREF(descr);
|
|
10317
|
+
if (unlikely(set_item_result < 0)) {
|
|
10229
10318
|
return -1;
|
|
10230
10319
|
}
|
|
10231
|
-
Py_DECREF(descr);
|
|
10232
10320
|
changed = 1;
|
|
10233
10321
|
}
|
|
10234
|
-
#endif
|
|
10235
10322
|
}
|
|
10236
10323
|
memb++;
|
|
10237
10324
|
}
|
|
10238
|
-
if (changed)
|
|
10239
|
-
PyType_Modified(type);
|
|
10240
10325
|
}
|
|
10241
|
-
#endif
|
|
10326
|
+
#endif // !CYTHON_COMPILING_IN_LIMITED_API
|
|
10327
|
+
slot = spec->slots;
|
|
10328
|
+
while (slot && slot->slot && slot->slot != Py_tp_getset)
|
|
10329
|
+
slot++;
|
|
10330
|
+
if (slot && slot->slot == Py_tp_getset) {
|
|
10331
|
+
PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc;
|
|
10332
|
+
while (getset && getset->name) {
|
|
10333
|
+
if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) {
|
|
10334
|
+
PyObject *descr = PyDescr_NewGetSet(type, getset);
|
|
10335
|
+
if (unlikely(!descr))
|
|
10336
|
+
return -1;
|
|
10337
|
+
#if CYTHON_COMPILING_IN_LIMITED_API
|
|
10338
|
+
PyObject *pyname = PyUnicode_FromString(getset->name);
|
|
10339
|
+
if (unlikely(!pyname)) {
|
|
10340
|
+
Py_DECREF(descr);
|
|
10341
|
+
return -1;
|
|
10342
|
+
}
|
|
10343
|
+
int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr);
|
|
10344
|
+
Py_DECREF(pyname);
|
|
10345
|
+
#else
|
|
10346
|
+
CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
|
|
10347
|
+
int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
|
|
10348
|
+
#endif
|
|
10349
|
+
Py_DECREF(descr);
|
|
10350
|
+
if (unlikely(set_item_result < 0)) {
|
|
10351
|
+
return -1;
|
|
10352
|
+
}
|
|
10353
|
+
changed = 1;
|
|
10354
|
+
}
|
|
10355
|
+
++getset;
|
|
10356
|
+
}
|
|
10357
|
+
}
|
|
10358
|
+
if (changed)
|
|
10359
|
+
PyType_Modified(type);
|
|
10360
|
+
#endif // PY_VERSION_HEX > 0x030900B1
|
|
10242
10361
|
return 0;
|
|
10243
10362
|
}
|
|
10244
10363
|
|
|
@@ -10866,6 +10985,24 @@ static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *ke
|
|
|
10866
10985
|
}
|
|
10867
10986
|
|
|
10868
10987
|
/* FetchCommonType */
|
|
10988
|
+
#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
|
|
10989
|
+
static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
|
|
10990
|
+
PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases);
|
|
10991
|
+
if (result && metaclass) {
|
|
10992
|
+
PyObject *old_tp = (PyObject*)Py_TYPE(result);
|
|
10993
|
+
Py_INCREF((PyObject*)metaclass);
|
|
10994
|
+
#if __PYX_LIMITED_VERSION_HEX >= 0x03090000
|
|
10995
|
+
Py_SET_TYPE(result, metaclass);
|
|
10996
|
+
#else
|
|
10997
|
+
result->ob_type = metaclass;
|
|
10998
|
+
#endif
|
|
10999
|
+
Py_DECREF(old_tp);
|
|
11000
|
+
}
|
|
11001
|
+
return result;
|
|
11002
|
+
}
|
|
11003
|
+
#else
|
|
11004
|
+
#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b)
|
|
11005
|
+
#endif
|
|
10869
11006
|
static int __Pyx_VerifyCachedType(PyObject *cached_type,
|
|
10870
11007
|
const char *name,
|
|
10871
11008
|
Py_ssize_t expected_basicsize) {
|
|
@@ -10875,6 +11012,9 @@ static int __Pyx_VerifyCachedType(PyObject *cached_type,
|
|
|
10875
11012
|
"Shared Cython type %.200s is not a type object", name);
|
|
10876
11013
|
return -1;
|
|
10877
11014
|
}
|
|
11015
|
+
if (expected_basicsize == 0) {
|
|
11016
|
+
return 0; // size is inherited, nothing useful to check
|
|
11017
|
+
}
|
|
10878
11018
|
#if CYTHON_COMPILING_IN_LIMITED_API
|
|
10879
11019
|
PyObject *py_basicsize;
|
|
10880
11020
|
py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
|
|
@@ -10894,7 +11034,7 @@ static int __Pyx_VerifyCachedType(PyObject *cached_type,
|
|
|
10894
11034
|
}
|
|
10895
11035
|
return 0;
|
|
10896
11036
|
}
|
|
10897
|
-
static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) {
|
|
11037
|
+
static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
|
|
10898
11038
|
PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name;
|
|
10899
11039
|
int get_item_ref_result;
|
|
10900
11040
|
const char* object_name = strrchr(spec->name, '.');
|
|
@@ -10918,7 +11058,7 @@ static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec
|
|
|
10918
11058
|
goto bad;
|
|
10919
11059
|
}
|
|
10920
11060
|
CYTHON_UNUSED_VAR(module);
|
|
10921
|
-
cached_type =
|
|
11061
|
+
cached_type = __Pyx_PyType_FromMetaclass(metaclass, abi_module, spec, bases);
|
|
10922
11062
|
if (unlikely(!cached_type)) goto bad;
|
|
10923
11063
|
if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
|
|
10924
11064
|
new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type, 1);
|
|
@@ -10947,6 +11087,42 @@ bad:
|
|
|
10947
11087
|
goto done;
|
|
10948
11088
|
}
|
|
10949
11089
|
|
|
11090
|
+
/* CommonTypesMetaclass */
|
|
11091
|
+
PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) {
|
|
11092
|
+
return PyUnicode_FromString(__PYX_ABI_MODULE_NAME);
|
|
11093
|
+
}
|
|
11094
|
+
static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = {
|
|
11095
|
+
{"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL},
|
|
11096
|
+
{0, 0, 0, 0, 0}
|
|
11097
|
+
};
|
|
11098
|
+
static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = {
|
|
11099
|
+
{Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset},
|
|
11100
|
+
{0, 0}
|
|
11101
|
+
};
|
|
11102
|
+
static PyType_Spec __pyx_CommonTypesMetaclass_spec = {
|
|
11103
|
+
__PYX_TYPE_MODULE_PREFIX "_common_types_metatype",
|
|
11104
|
+
0,
|
|
11105
|
+
0,
|
|
11106
|
+
#if PY_VERSION_HEX >= 0x030A0000
|
|
11107
|
+
Py_TPFLAGS_IMMUTABLETYPE |
|
|
11108
|
+
Py_TPFLAGS_DISALLOW_INSTANTIATION |
|
|
11109
|
+
#endif
|
|
11110
|
+
Py_TPFLAGS_DEFAULT,
|
|
11111
|
+
__pyx_CommonTypesMetaclass_slots
|
|
11112
|
+
};
|
|
11113
|
+
static int __pyx_CommonTypesMetaclass_init(PyObject *module) {
|
|
11114
|
+
__pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
|
|
11115
|
+
PyObject *bases = PyTuple_Pack(1, &PyType_Type);
|
|
11116
|
+
if (unlikely(!bases)) {
|
|
11117
|
+
return -1;
|
|
11118
|
+
}
|
|
11119
|
+
mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
|
|
11120
|
+
if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
|
|
11121
|
+
return -1;
|
|
11122
|
+
}
|
|
11123
|
+
return 0;
|
|
11124
|
+
}
|
|
11125
|
+
|
|
10950
11126
|
/* CallTypeTraverse */
|
|
10951
11127
|
#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
|
|
10952
11128
|
#else
|
|
@@ -12063,7 +12239,8 @@ static PyType_Spec __pyx_CyFunctionType_spec = {
|
|
|
12063
12239
|
};
|
|
12064
12240
|
static int __pyx_CyFunction_init(PyObject *module) {
|
|
12065
12241
|
__pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
|
|
12066
|
-
mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(
|
|
12242
|
+
mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(
|
|
12243
|
+
mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL);
|
|
12067
12244
|
if (unlikely(mstate->__pyx_CyFunctionType == NULL)) {
|
|
12068
12245
|
return -1;
|
|
12069
12246
|
}
|
|
@@ -14505,6 +14682,14 @@ static void __Pyx_SetBackportTypeAmSend(PyTypeObject *type, __Pyx_PyAsyncMethods
|
|
|
14505
14682
|
type->tp_as_async = __Pyx_SlotTpAsAsync(static_amsend_methods);
|
|
14506
14683
|
}
|
|
14507
14684
|
#endif
|
|
14685
|
+
static PyObject *__Pyx_Coroutine_fail_reduce_ex(PyObject *self, PyObject *arg) {
|
|
14686
|
+
CYTHON_UNUSED_VAR(arg);
|
|
14687
|
+
__Pyx_TypeName self_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE((PyObject*)self));
|
|
14688
|
+
PyErr_Format(PyExc_TypeError, "cannot pickle '" __Pyx_FMT_TYPENAME "' object",
|
|
14689
|
+
self_type_name);
|
|
14690
|
+
__Pyx_DECREF_TypeName(self_type_name);
|
|
14691
|
+
return NULL;
|
|
14692
|
+
}
|
|
14508
14693
|
|
|
14509
14694
|
/* Generator */
|
|
14510
14695
|
static PyMethodDef __pyx_Generator_methods[] = {
|
|
@@ -14514,6 +14699,8 @@ static PyMethodDef __pyx_Generator_methods[] = {
|
|
|
14514
14699
|
PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
|
|
14515
14700
|
{"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
|
|
14516
14701
|
PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
|
|
14702
|
+
{"__reduce_ex__", (PyCFunction) __Pyx_Coroutine_fail_reduce_ex, METH_O, 0},
|
|
14703
|
+
{"__reduce__", (PyCFunction) __Pyx_Coroutine_fail_reduce_ex, METH_NOARGS, 0},
|
|
14517
14704
|
{0, 0, 0, 0}
|
|
14518
14705
|
};
|
|
14519
14706
|
static PyMemberDef __pyx_Generator_memberlist[] = {
|
|
@@ -14566,7 +14753,8 @@ static __Pyx_PyAsyncMethodsStruct __pyx_Generator_as_async;
|
|
|
14566
14753
|
#endif
|
|
14567
14754
|
static int __pyx_Generator_init(PyObject *module) {
|
|
14568
14755
|
__pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
|
|
14569
|
-
mstate->__pyx_GeneratorType = __Pyx_FetchCommonTypeFromSpec(
|
|
14756
|
+
mstate->__pyx_GeneratorType = __Pyx_FetchCommonTypeFromSpec(
|
|
14757
|
+
mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_GeneratorType_spec, NULL);
|
|
14570
14758
|
if (unlikely(!mstate->__pyx_GeneratorType)) {
|
|
14571
14759
|
return -1;
|
|
14572
14760
|
}
|