fonttools 4.58.1__cp312-cp312-musllinux_1_2_aarch64.whl → 4.58.3__cp312-cp312-musllinux_1_2_aarch64.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/feaLib/ast.py CHANGED
@@ -719,7 +719,7 @@ class ChainContextPosStatement(Statement):
719
719
  for i, lookup in enumerate(lookups):
720
720
  if lookup:
721
721
  try:
722
- (_ for _ in lookup)
722
+ iter(lookup)
723
723
  except TypeError:
724
724
  self.lookups[i] = [lookup]
725
725
 
@@ -777,7 +777,7 @@ class ChainContextSubstStatement(Statement):
777
777
  for i, lookup in enumerate(lookups):
778
778
  if lookup:
779
779
  try:
780
- (_ for _ in lookup)
780
+ iter(lookup)
781
781
  except TypeError:
782
782
  self.lookups[i] = [lookup]
783
783
 
fontTools/feaLib/lexer.c CHANGED
@@ -1,4 +1,4 @@
1
- /* Generated by Cython 3.1.1 */
1
+ /* Generated by Cython 3.1.2 */
2
2
 
3
3
  /* BEGIN: Cython Metadata
4
4
  {
@@ -26,8 +26,8 @@ END: Cython Metadata */
26
26
  #elif PY_VERSION_HEX < 0x03080000
27
27
  #error Cython requires Python 3.8+.
28
28
  #else
29
- #define __PYX_ABI_VERSION "3_1_1"
30
- #define CYTHON_HEX_VERSION 0x030101F0
29
+ #define __PYX_ABI_VERSION "3_1_2"
30
+ #define CYTHON_HEX_VERSION 0x030102F0
31
31
  #define CYTHON_FUTURE_DIVISION 1
32
32
  /* CModulePreamble */
33
33
  #include <stddef.h>
@@ -442,7 +442,7 @@ END: Cython Metadata */
442
442
  #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
443
443
  #endif
444
444
  #ifndef CYTHON_NCP_UNUSED
445
- # if CYTHON_COMPILING_IN_CPYTHON
445
+ # if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
446
446
  # define CYTHON_NCP_UNUSED
447
447
  # else
448
448
  # define CYTHON_NCP_UNUSED CYTHON_UNUSED
@@ -887,11 +887,19 @@ static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict,
887
887
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
888
888
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
889
889
  #endif
890
- #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS
890
+ #if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
891
891
  #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
892
892
  #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
893
+ #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
894
+ #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
893
895
  #else
894
- #define __Pyx_PyList_GetItemRef(o, i) PySequence_GetItem(o, i)
896
+ #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i)
897
+ #endif
898
+ #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
899
+ #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
900
+ #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
901
+ #else
902
+ #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i))
895
903
  #endif
896
904
  #else
897
905
  #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i))
@@ -1299,7 +1307,9 @@ static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
1299
1307
  #endif /* __GNUC__ */
1300
1308
  /* PretendToInitialize */
1301
1309
  #ifdef __cplusplus
1310
+ #if __cplusplus > 201103L
1302
1311
  #include <type_traits>
1312
+ #endif
1303
1313
  template <typename T>
1304
1314
  static void __Pyx_pretend_to_initialize(T* ptr) {
1305
1315
  #if __cplusplus > 201103L
@@ -1891,18 +1901,18 @@ static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2
1891
1901
  static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1892
1902
 
1893
1903
  /* GetItemInt.proto */
1894
- #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1904
+ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\
1895
1905
  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1896
1906
  __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
1897
1907
  (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
1898
1908
  __Pyx_GetItemInt_Generic(o, to_py_func(i))))
1899
- #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1909
+ #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\
1900
1910
  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1901
1911
  __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1902
1912
  (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
1903
1913
  static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
1904
1914
  int wraparound, int boundscheck);
1905
- #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1915
+ #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\
1906
1916
  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1907
1917
  __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1908
1918
  (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
@@ -2270,6 +2280,15 @@ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bas
2270
2280
  #define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value)
2271
2281
  #endif
2272
2282
 
2283
+ /* LimitedApiGetTypeDict.proto */
2284
+ #if CYTHON_COMPILING_IN_LIMITED_API
2285
+ static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp);
2286
+ #endif
2287
+
2288
+ /* SetItemOnTypeDict.proto */
2289
+ static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v);
2290
+ #define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v)
2291
+
2273
2292
  /* FixUpExtensionType.proto */
2274
2293
  static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);
2275
2294
 
@@ -2280,7 +2299,11 @@ static PyObject *__Pyx_FetchSharedCythonABIModule(void);
2280
2299
  static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, int is_safe_type);
2281
2300
 
2282
2301
  /* FetchCommonType.proto */
2283
- static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases);
2302
+ static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases);
2303
+
2304
+ /* CommonTypesMetaclass.proto */
2305
+ static int __pyx_CommonTypesMetaclass_init(PyObject *module);
2306
+ #define __Pyx_CommonTypesMetaclass_USED
2284
2307
 
2285
2308
  /* CallTypeTraverse.proto */
2286
2309
  #if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
@@ -2671,6 +2694,7 @@ static const char __pyx_k_filename[] = "filename";
2671
2694
  static const char __pyx_k_location[] = "location_";
2672
2695
  static const char __pyx_k_maxsplit[] = "maxsplit";
2673
2696
  static const char __pyx_k_qualname[] = "__qualname__";
2697
+ static const char __pyx_k_set_name[] = "__set_name__";
2674
2698
  static const char __pyx_k_A_fA_U_G1[] = "\200A\330\010\t\330\014\030\230\007\230{\250$\250f\260A\330\014\017\210{\230#\230U\240!\330\020\030\230\014\240G\2501";
2675
2699
  static const char __pyx_k_metaclass[] = "__metaclass__";
2676
2700
  static const char __pyx_k_next_char[] = "next_char";
@@ -2825,7 +2849,7 @@ typedef struct {
2825
2849
  __Pyx_CachedCFunction __pyx_umethod_PyList_Type_pop;
2826
2850
  PyObject *__pyx_tuple[4];
2827
2851
  PyObject *__pyx_codeobj_tab[16];
2828
- PyObject *__pyx_string_tab[183];
2852
+ PyObject *__pyx_string_tab[184];
2829
2853
  PyObject *__pyx_int_0;
2830
2854
  PyObject *__pyx_int_1;
2831
2855
  PyObject *__pyx_int_2;
@@ -2838,6 +2862,9 @@ typedef struct {
2838
2862
  PyObject *__Pyx_GetBuiltinNext_LimitedAPI_cache;
2839
2863
  #endif
2840
2864
 
2865
+ /* CommonTypesMetaclass.module_state_decls */
2866
+ PyTypeObject *__pyx_CommonTypesMetaclassType;
2867
+
2841
2868
  /* CachedMethodType.module_state_decls */
2842
2869
  #if CYTHON_COMPILING_IN_LIMITED_API
2843
2870
  PyObject *__Pyx_CachedMethodType;
@@ -3036,24 +3063,25 @@ static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_stati
3036
3063
  #define __pyx_n_u_scan_over __pyx_string_tab[162]
3037
3064
  #define __pyx_n_u_scan_until __pyx_string_tab[163]
3038
3065
  #define __pyx_n_u_self __pyx_string_tab[164]
3039
- #define __pyx_n_u_spec __pyx_string_tab[165]
3040
- #define __pyx_n_u_split __pyx_string_tab[166]
3041
- #define __pyx_n_u_start __pyx_string_tab[167]
3042
- #define __pyx_n_u_staticmethod __pyx_string_tab[168]
3043
- #define __pyx_n_u_stop_at __pyx_string_tab[169]
3044
- #define __pyx_n_u_string __pyx_string_tab[170]
3045
- #define __pyx_n_u_strip __pyx_string_tab[171]
3046
- #define __pyx_n_u_sub __pyx_string_tab[172]
3047
- #define __pyx_n_u_tag __pyx_string_tab[173]
3048
- #define __pyx_n_u_test __pyx_string_tab[174]
3049
- #define __pyx_n_u_text __pyx_string_tab[175]
3050
- #define __pyx_n_u_text_2 __pyx_string_tab[176]
3051
- #define __pyx_n_u_text_length __pyx_string_tab[177]
3052
- #define __pyx_n_u_token __pyx_string_tab[178]
3053
- #define __pyx_n_u_token_type __pyx_string_tab[179]
3054
- #define __pyx_kp_u_utf_8_sig __pyx_string_tab[180]
3055
- #define __pyx_n_u_valid __pyx_string_tab[181]
3056
- #define __pyx_n_u_xX __pyx_string_tab[182]
3066
+ #define __pyx_n_u_set_name __pyx_string_tab[165]
3067
+ #define __pyx_n_u_spec __pyx_string_tab[166]
3068
+ #define __pyx_n_u_split __pyx_string_tab[167]
3069
+ #define __pyx_n_u_start __pyx_string_tab[168]
3070
+ #define __pyx_n_u_staticmethod __pyx_string_tab[169]
3071
+ #define __pyx_n_u_stop_at __pyx_string_tab[170]
3072
+ #define __pyx_n_u_string __pyx_string_tab[171]
3073
+ #define __pyx_n_u_strip __pyx_string_tab[172]
3074
+ #define __pyx_n_u_sub __pyx_string_tab[173]
3075
+ #define __pyx_n_u_tag __pyx_string_tab[174]
3076
+ #define __pyx_n_u_test __pyx_string_tab[175]
3077
+ #define __pyx_n_u_text __pyx_string_tab[176]
3078
+ #define __pyx_n_u_text_2 __pyx_string_tab[177]
3079
+ #define __pyx_n_u_text_length __pyx_string_tab[178]
3080
+ #define __pyx_n_u_token __pyx_string_tab[179]
3081
+ #define __pyx_n_u_token_type __pyx_string_tab[180]
3082
+ #define __pyx_kp_u_utf_8_sig __pyx_string_tab[181]
3083
+ #define __pyx_n_u_valid __pyx_string_tab[182]
3084
+ #define __pyx_n_u_xX __pyx_string_tab[183]
3057
3085
  /* #### Code section: module_state_clear ### */
3058
3086
  #if CYTHON_USE_MODULE_STATE
3059
3087
  static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) {
@@ -3076,7 +3104,7 @@ static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) {
3076
3104
  #endif
3077
3105
  for (int i=0; i<4; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); }
3078
3106
  for (int i=0; i<16; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); }
3079
- for (int i=0; i<183; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
3107
+ for (int i=0; i<184; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
3080
3108
  Py_CLEAR(clear_module_state->__pyx_int_0);
3081
3109
  Py_CLEAR(clear_module_state->__pyx_int_1);
3082
3110
  Py_CLEAR(clear_module_state->__pyx_int_2);
@@ -3105,7 +3133,7 @@ static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void
3105
3133
  #endif
3106
3134
  for (int i=0; i<4; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); }
3107
3135
  for (int i=0; i<16; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); }
3108
- for (int i=0; i<183; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
3136
+ for (int i=0; i<184; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
3109
3137
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_0);
3110
3138
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_1);
3111
3139
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_2);
@@ -7199,7 +7227,7 @@ static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_16scan_anonymous_bloc
7199
7227
  */
7200
7228
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 188, __pyx_L1_error)
7201
7229
  __Pyx_GOTREF(__pyx_t_4);
7202
- __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_split, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 188, __pyx_L1_error)
7230
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_split, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 188, __pyx_L1_error)
7203
7231
  __Pyx_GOTREF(__pyx_t_6);
7204
7232
  __pyx_t_8 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 188, __pyx_L1_error)
7205
7233
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
@@ -7225,7 +7253,7 @@ static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_16scan_anonymous_bloc
7225
7253
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ANONYMOUS_BLOCK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 189, __pyx_L1_error)
7226
7254
  __Pyx_GOTREF(__pyx_t_6);
7227
7255
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7228
- __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_split, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 189, __pyx_L1_error)
7256
+ __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_split, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 189, __pyx_L1_error)
7229
7257
  __Pyx_GOTREF(__pyx_t_7);
7230
7258
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 189, __pyx_L1_error)
7231
7259
  __Pyx_GOTREF(__pyx_t_4);
@@ -7286,7 +7314,7 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7286
7314
  PyObject *__pyx_args, PyObject *__pyx_kwds
7287
7315
  #endif
7288
7316
  ); /*proto*/
7289
- PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_14IncludingLexer___init__, "IncludingLexer.__init__(self, featurefile, *, includeDir=None)\nInitializes an IncludingLexer.\n\nBehavior:\n If includeDir is passed, it will be used to determine the top-level\n include directory to use for all encountered include statements. If it is\n not passed, ``os.path.dirname(featurefile)`` will be considered the\n include directory.");
7317
+ PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_14IncludingLexer___init__, "IncludingLexer.__init__(self, featurefile, *, includeDir=None)\n\nInitializes an IncludingLexer.\n\nBehavior:\n If includeDir is passed, it will be used to determine the top-level\n include directory to use for all encountered include statements. If it is\n not passed, ``os.path.dirname(featurefile)`` will be considered the\n include directory.");
7290
7318
  static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_14IncludingLexer_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_14IncludingLexer___init__};
7291
7319
  static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_1__init__(PyObject *__pyx_self,
7292
7320
  #if CYTHON_METH_FASTCALL
@@ -7421,7 +7449,7 @@ static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer___init__(CY
7421
7449
  */
7422
7450
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lexers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __pyx_L1_error)
7423
7451
  __Pyx_GOTREF(__pyx_t_2);
7424
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error)
7452
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error)
7425
7453
  __Pyx_GOTREF(__pyx_t_1);
7426
7454
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7427
7455
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_filename_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __pyx_L1_error)
@@ -7893,7 +7921,7 @@ static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_6__next__(C
7893
7921
  */
7894
7922
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lexers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
7895
7923
  __Pyx_GOTREF(__pyx_t_1);
7896
- __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L1_error)
7924
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L1_error)
7897
7925
  __Pyx_GOTREF(__pyx_t_3);
7898
7926
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7899
7927
  __Pyx_XDECREF_SET(__pyx_v_lexer, __pyx_t_3);
@@ -9210,7 +9238,7 @@ static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_10scan_anon
9210
9238
  __Pyx_XDECREF(__pyx_r);
9211
9239
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lexers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 280, __pyx_L1_error)
9212
9240
  __Pyx_GOTREF(__pyx_t_3);
9213
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 280, __pyx_L1_error)
9241
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 280, __pyx_L1_error)
9214
9242
  __Pyx_GOTREF(__pyx_t_4);
9215
9243
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9216
9244
  __pyx_t_2 = __pyx_t_4;
@@ -9361,7 +9389,7 @@ static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_17NonIncludingLexer___next__
9361
9389
  __Pyx_XDECREF(__pyx_r);
9362
9390
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lexers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L1_error)
9363
9391
  __Pyx_GOTREF(__pyx_t_1);
9364
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 287, __pyx_L1_error)
9392
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 287, __pyx_L1_error)
9365
9393
  __Pyx_GOTREF(__pyx_t_2);
9366
9394
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9367
9395
  __pyx_t_1 = __Pyx_PyIter_Next(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L1_error)
@@ -9716,6 +9744,13 @@ __Pyx_RefNannySetupContext("PyInit_lexer", 0);
9716
9744
  __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
9717
9745
  __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
9718
9746
  __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
9747
+ /*--- Initialize various global constants etc. ---*/
9748
+ if (__Pyx_InitConstants(__pyx_mstate) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
9749
+ stringtab_initialized = 1;
9750
+ if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
9751
+ #if 0 || defined(__Pyx_CyFunction_USED) || defined(__Pyx_FusedFunction_USED) || defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED) || defined(__Pyx_AsyncGen_USED)
9752
+ if (__pyx_CommonTypesMetaclass_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
9753
+ #endif
9719
9754
  #ifdef __Pyx_CyFunction_USED
9720
9755
  if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
9721
9756
  #endif
@@ -9732,10 +9767,6 @@ __Pyx_RefNannySetupContext("PyInit_lexer", 0);
9732
9767
  if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
9733
9768
  #endif
9734
9769
  /*--- Library function declarations ---*/
9735
- /*--- Initialize various global constants etc. ---*/
9736
- if (__Pyx_InitConstants(__pyx_mstate) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
9737
- stringtab_initialized = 1;
9738
- if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
9739
9770
  if (__pyx_module_is_main_fontTools__feaLib__lexer) {
9740
9771
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
9741
9772
  }
@@ -10693,6 +10724,7 @@ static const __Pyx_StringTabEntry __pyx_string_tab[] = {
10693
10724
  {__pyx_k_scan_over, sizeof(__pyx_k_scan_over), 0, 1, 1}, /* PyObject cname: __pyx_n_u_scan_over */
10694
10725
  {__pyx_k_scan_until, sizeof(__pyx_k_scan_until), 0, 1, 1}, /* PyObject cname: __pyx_n_u_scan_until */
10695
10726
  {__pyx_k_self, sizeof(__pyx_k_self), 0, 1, 1}, /* PyObject cname: __pyx_n_u_self */
10727
+ {__pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_set_name */
10696
10728
  {__pyx_k_spec, sizeof(__pyx_k_spec), 0, 1, 1}, /* PyObject cname: __pyx_n_u_spec */
10697
10729
  {__pyx_k_split, sizeof(__pyx_k_split), 0, 1, 1}, /* PyObject cname: __pyx_n_u_split */
10698
10730
  {__pyx_k_start, sizeof(__pyx_k_start), 0, 1, 1}, /* PyObject cname: __pyx_n_u_start */
@@ -13954,24 +13986,83 @@ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bas
13954
13986
  return (PyObject*) metaclass;
13955
13987
  }
13956
13988
 
13989
+ /* LimitedApiGetTypeDict */
13990
+ #if CYTHON_COMPILING_IN_LIMITED_API
13991
+ static Py_ssize_t __Pyx_GetTypeDictOffset(void) {
13992
+ PyObject *tp_dictoffset_o;
13993
+ Py_ssize_t tp_dictoffset;
13994
+ tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__");
13995
+ if (unlikely(!tp_dictoffset_o)) return -1;
13996
+ tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o);
13997
+ Py_DECREF(tp_dictoffset_o);
13998
+ if (unlikely(tp_dictoffset == 0)) {
13999
+ PyErr_SetString(
14000
+ PyExc_TypeError,
14001
+ "'type' doesn't have a dictoffset");
14002
+ return -1;
14003
+ } else if (unlikely(tp_dictoffset < 0)) {
14004
+ PyErr_SetString(
14005
+ PyExc_TypeError,
14006
+ "'type' has an unexpected negative dictoffset. "
14007
+ "Please report this as Cython bug");
14008
+ return -1;
14009
+ }
14010
+ return tp_dictoffset;
14011
+ }
14012
+ static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) {
14013
+ static Py_ssize_t tp_dictoffset = 0;
14014
+ if (unlikely(tp_dictoffset == 0)) {
14015
+ tp_dictoffset = __Pyx_GetTypeDictOffset();
14016
+ if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) {
14017
+ tp_dictoffset = 0; // try again next time?
14018
+ return NULL;
14019
+ }
14020
+ }
14021
+ return *(PyObject**)((char*)tp + tp_dictoffset);
14022
+ }
14023
+ #endif
14024
+
14025
+ /* SetItemOnTypeDict */
14026
+ static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) {
14027
+ int result;
14028
+ PyObject *tp_dict;
14029
+ #if CYTHON_COMPILING_IN_LIMITED_API
14030
+ tp_dict = __Pyx_GetTypeDict(tp);
14031
+ if (unlikely(!tp_dict)) return -1;
14032
+ #else
14033
+ tp_dict = tp->tp_dict;
14034
+ #endif
14035
+ result = PyDict_SetItem(tp_dict, k, v);
14036
+ if (likely(!result)) {
14037
+ PyType_Modified(tp);
14038
+ if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) {
14039
+ PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL);
14040
+ if (!setNameResult) return -1;
14041
+ Py_DECREF(setNameResult);
14042
+ }
14043
+ }
14044
+ return result;
14045
+ }
14046
+
13957
14047
  /* FixUpExtensionType */
13958
14048
  static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
13959
- #if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
14049
+ #if __PYX_LIMITED_VERSION_HEX > 0x030900B1
13960
14050
  CYTHON_UNUSED_VAR(spec);
13961
14051
  CYTHON_UNUSED_VAR(type);
14052
+ CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
13962
14053
  #else
13963
14054
  const PyType_Slot *slot = spec->slots;
14055
+ int changed = 0;
14056
+ #if !CYTHON_COMPILING_IN_LIMITED_API
13964
14057
  while (slot && slot->slot && slot->slot != Py_tp_members)
13965
14058
  slot++;
13966
14059
  if (slot && slot->slot == Py_tp_members) {
13967
- int changed = 0;
13968
- #if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON)
14060
+ #if !CYTHON_COMPILING_IN_CPYTHON
13969
14061
  const
13970
- #endif
14062
+ #endif // !CYTHON_COMPILING_IN_CPYTHON)
13971
14063
  PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
13972
14064
  while (memb && memb->name) {
13973
14065
  if (memb->name[0] == '_' && memb->name[1] == '_') {
13974
- #if PY_VERSION_HEX < 0x030900b1
13975
14066
  if (strcmp(memb->name, "__weaklistoffset__") == 0) {
13976
14067
  assert(memb->type == T_PYSSIZET);
13977
14068
  assert(memb->flags == READONLY);
@@ -13995,11 +14086,7 @@ static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject
13995
14086
  #endif
13996
14087
  changed = 1;
13997
14088
  }
13998
- #endif
13999
- #else
14000
- if ((0));
14001
- #endif
14002
- #if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON
14089
+ #endif // CYTHON_METH_FASTCALL
14003
14090
  else if (strcmp(memb->name, "__module__") == 0) {
14004
14091
  PyObject *descr;
14005
14092
  assert(memb->type == T_OBJECT);
@@ -14007,21 +14094,52 @@ static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject
14007
14094
  descr = PyDescr_NewMember(type, memb);
14008
14095
  if (unlikely(!descr))
14009
14096
  return -1;
14010
- if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) {
14011
- Py_DECREF(descr);
14097
+ int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
14098
+ Py_DECREF(descr);
14099
+ if (unlikely(set_item_result < 0)) {
14012
14100
  return -1;
14013
14101
  }
14014
- Py_DECREF(descr);
14015
14102
  changed = 1;
14016
14103
  }
14017
- #endif
14018
14104
  }
14019
14105
  memb++;
14020
14106
  }
14021
- if (changed)
14022
- PyType_Modified(type);
14023
14107
  }
14024
- #endif
14108
+ #endif // !CYTHON_COMPILING_IN_LIMITED_API
14109
+ slot = spec->slots;
14110
+ while (slot && slot->slot && slot->slot != Py_tp_getset)
14111
+ slot++;
14112
+ if (slot && slot->slot == Py_tp_getset) {
14113
+ PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc;
14114
+ while (getset && getset->name) {
14115
+ if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) {
14116
+ PyObject *descr = PyDescr_NewGetSet(type, getset);
14117
+ if (unlikely(!descr))
14118
+ return -1;
14119
+ #if CYTHON_COMPILING_IN_LIMITED_API
14120
+ PyObject *pyname = PyUnicode_FromString(getset->name);
14121
+ if (unlikely(!pyname)) {
14122
+ Py_DECREF(descr);
14123
+ return -1;
14124
+ }
14125
+ int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr);
14126
+ Py_DECREF(pyname);
14127
+ #else
14128
+ CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
14129
+ int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
14130
+ #endif
14131
+ Py_DECREF(descr);
14132
+ if (unlikely(set_item_result < 0)) {
14133
+ return -1;
14134
+ }
14135
+ changed = 1;
14136
+ }
14137
+ ++getset;
14138
+ }
14139
+ }
14140
+ if (changed)
14141
+ PyType_Modified(type);
14142
+ #endif // PY_VERSION_HEX > 0x030900B1
14025
14143
  return 0;
14026
14144
  }
14027
14145
 
@@ -14048,6 +14166,24 @@ static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *ke
14048
14166
  }
14049
14167
 
14050
14168
  /* FetchCommonType */
14169
+ #if __PYX_LIMITED_VERSION_HEX < 0x030C0000
14170
+ static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
14171
+ PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases);
14172
+ if (result && metaclass) {
14173
+ PyObject *old_tp = (PyObject*)Py_TYPE(result);
14174
+ Py_INCREF((PyObject*)metaclass);
14175
+ #if __PYX_LIMITED_VERSION_HEX >= 0x03090000
14176
+ Py_SET_TYPE(result, metaclass);
14177
+ #else
14178
+ result->ob_type = metaclass;
14179
+ #endif
14180
+ Py_DECREF(old_tp);
14181
+ }
14182
+ return result;
14183
+ }
14184
+ #else
14185
+ #define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b)
14186
+ #endif
14051
14187
  static int __Pyx_VerifyCachedType(PyObject *cached_type,
14052
14188
  const char *name,
14053
14189
  Py_ssize_t expected_basicsize) {
@@ -14057,6 +14193,9 @@ static int __Pyx_VerifyCachedType(PyObject *cached_type,
14057
14193
  "Shared Cython type %.200s is not a type object", name);
14058
14194
  return -1;
14059
14195
  }
14196
+ if (expected_basicsize == 0) {
14197
+ return 0; // size is inherited, nothing useful to check
14198
+ }
14060
14199
  #if CYTHON_COMPILING_IN_LIMITED_API
14061
14200
  PyObject *py_basicsize;
14062
14201
  py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
@@ -14076,7 +14215,7 @@ static int __Pyx_VerifyCachedType(PyObject *cached_type,
14076
14215
  }
14077
14216
  return 0;
14078
14217
  }
14079
- static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) {
14218
+ static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
14080
14219
  PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name;
14081
14220
  int get_item_ref_result;
14082
14221
  const char* object_name = strrchr(spec->name, '.');
@@ -14100,7 +14239,7 @@ static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec
14100
14239
  goto bad;
14101
14240
  }
14102
14241
  CYTHON_UNUSED_VAR(module);
14103
- cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases);
14242
+ cached_type = __Pyx_PyType_FromMetaclass(metaclass, abi_module, spec, bases);
14104
14243
  if (unlikely(!cached_type)) goto bad;
14105
14244
  if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
14106
14245
  new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type, 1);
@@ -14129,6 +14268,42 @@ bad:
14129
14268
  goto done;
14130
14269
  }
14131
14270
 
14271
+ /* CommonTypesMetaclass */
14272
+ PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) {
14273
+ return PyUnicode_FromString(__PYX_ABI_MODULE_NAME);
14274
+ }
14275
+ static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = {
14276
+ {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL},
14277
+ {0, 0, 0, 0, 0}
14278
+ };
14279
+ static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = {
14280
+ {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset},
14281
+ {0, 0}
14282
+ };
14283
+ static PyType_Spec __pyx_CommonTypesMetaclass_spec = {
14284
+ __PYX_TYPE_MODULE_PREFIX "_common_types_metatype",
14285
+ 0,
14286
+ 0,
14287
+ #if PY_VERSION_HEX >= 0x030A0000
14288
+ Py_TPFLAGS_IMMUTABLETYPE |
14289
+ Py_TPFLAGS_DISALLOW_INSTANTIATION |
14290
+ #endif
14291
+ Py_TPFLAGS_DEFAULT,
14292
+ __pyx_CommonTypesMetaclass_slots
14293
+ };
14294
+ static int __pyx_CommonTypesMetaclass_init(PyObject *module) {
14295
+ __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
14296
+ PyObject *bases = PyTuple_Pack(1, &PyType_Type);
14297
+ if (unlikely(!bases)) {
14298
+ return -1;
14299
+ }
14300
+ mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
14301
+ if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
14302
+ return -1;
14303
+ }
14304
+ return 0;
14305
+ }
14306
+
14132
14307
  /* CallTypeTraverse */
14133
14308
  #if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
14134
14309
  #else
@@ -15245,7 +15420,8 @@ static PyType_Spec __pyx_CyFunctionType_spec = {
15245
15420
  };
15246
15421
  static int __pyx_CyFunction_init(PyObject *module) {
15247
15422
  __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
15248
- mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL);
15423
+ mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(
15424
+ mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL);
15249
15425
  if (unlikely(mstate->__pyx_CyFunctionType == NULL)) {
15250
15426
  return -1;
15251
15427
  }