Debian Codegraph @

tests/Recode.c

raw symbols SCIP
1 #include "config.h"
2 /* Generated by Cython 3.0.8 */
3
4 #ifndef PY_SSIZE_T_CLEAN
5 #define PY_SSIZE_T_CLEAN
6 #endif /* PY_SSIZE_T_CLEAN */
7 #if defined(CYTHON_LIMITED_API) && 0
8 #ifndef Py_LIMITED_API
9 #if CYTHON_LIMITED_API+0 > 0x03030000
10 #define Py_LIMITED_API CYTHON_LIMITED_API
11 #else
12 #define Py_LIMITED_API 0x03030000
13 #endif
14 #endif
15 #endif
16
17 #include "Python.h"
18 #ifndef Py_PYTHON_H
19 #error Python headers needed to compile C extensions, please install development version of Python.
20 #elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
21 #error Cython requires Python 2.7+ or Python 3.3+.
22 #else
23 #if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API
24 #define __PYX_EXTRA_ABI_MODULE_NAME "limited"
25 #else
26 #define __PYX_EXTRA_ABI_MODULE_NAME ""
27 #endif
28 #define CYTHON_ABI "3_0_8" __PYX_EXTRA_ABI_MODULE_NAME
29 #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
30 #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
31 #define CYTHON_HEX_VERSION 0x030008F0
32 #define CYTHON_FUTURE_DIVISION 1
33 #include <stddef.h>
34 #ifndef offsetof
35 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
36 #endif
37 #if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
38 #ifndef __stdcall
39 #define __stdcall
40 #endif
41 #ifndef __cdecl
42 #define __cdecl
43 #endif
44 #ifndef __fastcall
45 #define __fastcall
46 #endif
47 #endif
48 #ifndef DL_IMPORT
49 #define DL_IMPORT(t) t
50 #endif
51 #ifndef DL_EXPORT
52 #define DL_EXPORT(t) t
53 #endif
54 #define __PYX_COMMA ,
55 #ifndef HAVE_LONG_LONG
56 #define HAVE_LONG_LONG
57 #endif
58 #ifndef PY_LONG_LONG
59 #define PY_LONG_LONG LONG_LONG
60 #endif
61 #ifndef Py_HUGE_VAL
62 #define Py_HUGE_VAL HUGE_VAL
63 #endif
64 #define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
65 #if defined(GRAALVM_PYTHON)
66 /* For very preliminary testing purposes. Most variables are set the same as PyPy.
67 The existence of this section does not imply that anything works or is even tested */
68 #define CYTHON_COMPILING_IN_PYPY 0
69 #define CYTHON_COMPILING_IN_CPYTHON 0
70 #define CYTHON_COMPILING_IN_LIMITED_API 0
71 #define CYTHON_COMPILING_IN_GRAAL 1
72 #define CYTHON_COMPILING_IN_NOGIL 0
73 #undef CYTHON_USE_TYPE_SLOTS
74 #define CYTHON_USE_TYPE_SLOTS 0
75 #undef CYTHON_USE_TYPE_SPECS
76 #define CYTHON_USE_TYPE_SPECS 0
77 #undef CYTHON_USE_PYTYPE_LOOKUP
78 #define CYTHON_USE_PYTYPE_LOOKUP 0
79 #if PY_VERSION_HEX < 0x03050000
80 #undef CYTHON_USE_ASYNC_SLOTS
81 #define CYTHON_USE_ASYNC_SLOTS 0
82 #elif !defined(CYTHON_USE_ASYNC_SLOTS)
83 #define CYTHON_USE_ASYNC_SLOTS 1
84 #endif
85 #undef CYTHON_USE_PYLIST_INTERNALS
86 #define CYTHON_USE_PYLIST_INTERNALS 0
87 #undef CYTHON_USE_UNICODE_INTERNALS
88 #define CYTHON_USE_UNICODE_INTERNALS 0
89 #undef CYTHON_USE_UNICODE_WRITER
90 #define CYTHON_USE_UNICODE_WRITER 0
91 #undef CYTHON_USE_PYLONG_INTERNALS
92 #define CYTHON_USE_PYLONG_INTERNALS 0
93 #undef CYTHON_AVOID_BORROWED_REFS
94 #define CYTHON_AVOID_BORROWED_REFS 1
95 #undef CYTHON_ASSUME_SAFE_MACROS
96 #define CYTHON_ASSUME_SAFE_MACROS 0
97 #undef CYTHON_UNPACK_METHODS
98 #define CYTHON_UNPACK_METHODS 0
99 #undef CYTHON_FAST_THREAD_STATE
100 #define CYTHON_FAST_THREAD_STATE 0
101 #undef CYTHON_FAST_GIL
102 #define CYTHON_FAST_GIL 0
103 #undef CYTHON_METH_FASTCALL
104 #define CYTHON_METH_FASTCALL 0
105 #undef CYTHON_FAST_PYCALL
106 #define CYTHON_FAST_PYCALL 0
107 #ifndef CYTHON_PEP487_INIT_SUBCLASS
108 #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
109 #endif
110 #undef CYTHON_PEP489_MULTI_PHASE_INIT
111 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
112 #undef CYTHON_USE_MODULE_STATE
113 #define CYTHON_USE_MODULE_STATE 0
114 #undef CYTHON_USE_TP_FINALIZE
115 #define CYTHON_USE_TP_FINALIZE 0
116 #undef CYTHON_USE_DICT_VERSIONS
117 #define CYTHON_USE_DICT_VERSIONS 0
118 #undef CYTHON_USE_EXC_INFO_STACK
119 #define CYTHON_USE_EXC_INFO_STACK 0
120 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
121 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
122 #endif
123 #elif defined(PYPY_VERSION)
124 #define CYTHON_COMPILING_IN_PYPY 1
125 #define CYTHON_COMPILING_IN_CPYTHON 0
126 #define CYTHON_COMPILING_IN_LIMITED_API 0
127 #define CYTHON_COMPILING_IN_GRAAL 0
128 #define CYTHON_COMPILING_IN_NOGIL 0
129 #undef CYTHON_USE_TYPE_SLOTS
130 #define CYTHON_USE_TYPE_SLOTS 0
131 #ifndef CYTHON_USE_TYPE_SPECS
132 #define CYTHON_USE_TYPE_SPECS 0
133 #endif
134 #undef CYTHON_USE_PYTYPE_LOOKUP
135 #define CYTHON_USE_PYTYPE_LOOKUP 0
136 #if PY_VERSION_HEX < 0x03050000
137 #undef CYTHON_USE_ASYNC_SLOTS
138 #define CYTHON_USE_ASYNC_SLOTS 0
139 #elif !defined(CYTHON_USE_ASYNC_SLOTS)
140 #define CYTHON_USE_ASYNC_SLOTS 1
141 #endif
142 #undef CYTHON_USE_PYLIST_INTERNALS
143 #define CYTHON_USE_PYLIST_INTERNALS 0
144 #undef CYTHON_USE_UNICODE_INTERNALS
145 #define CYTHON_USE_UNICODE_INTERNALS 0
146 #undef CYTHON_USE_UNICODE_WRITER
147 #define CYTHON_USE_UNICODE_WRITER 0
148 #undef CYTHON_USE_PYLONG_INTERNALS
149 #define CYTHON_USE_PYLONG_INTERNALS 0
150 #undef CYTHON_AVOID_BORROWED_REFS
151 #define CYTHON_AVOID_BORROWED_REFS 1
152 #undef CYTHON_ASSUME_SAFE_MACROS
153 #define CYTHON_ASSUME_SAFE_MACROS 0
154 #undef CYTHON_UNPACK_METHODS
155 #define CYTHON_UNPACK_METHODS 0
156 #undef CYTHON_FAST_THREAD_STATE
157 #define CYTHON_FAST_THREAD_STATE 0
158 #undef CYTHON_FAST_GIL
159 #define CYTHON_FAST_GIL 0
160 #undef CYTHON_METH_FASTCALL
161 #define CYTHON_METH_FASTCALL 0
162 #undef CYTHON_FAST_PYCALL
163 #define CYTHON_FAST_PYCALL 0
164 #ifndef CYTHON_PEP487_INIT_SUBCLASS
165 #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
166 #endif
167 #if PY_VERSION_HEX < 0x03090000
168 #undef CYTHON_PEP489_MULTI_PHASE_INIT
169 #define CYTHON_PEP489_MULTI_PHASE_INIT 0
170 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
171 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
172 #endif
173 #undef CYTHON_USE_MODULE_STATE
174 #define CYTHON_USE_MODULE_STATE 0
175 #undef CYTHON_USE_TP_FINALIZE
176 #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00)
177 #undef CYTHON_USE_DICT_VERSIONS
178 #define CYTHON_USE_DICT_VERSIONS 0
179 #undef CYTHON_USE_EXC_INFO_STACK
180 #define CYTHON_USE_EXC_INFO_STACK 0
181 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
182 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
183 #endif
184 #elif defined(CYTHON_LIMITED_API)
185 #ifdef Py_LIMITED_API
186 #undef __PYX_LIMITED_VERSION_HEX
187 #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
188 #endif
189 #define CYTHON_COMPILING_IN_PYPY 0
190 #define CYTHON_COMPILING_IN_CPYTHON 0
191 #define CYTHON_COMPILING_IN_LIMITED_API 1
192 #define CYTHON_COMPILING_IN_GRAAL 0
193 #define CYTHON_COMPILING_IN_NOGIL 0
194 #undef CYTHON_CLINE_IN_TRACEBACK
195 #define CYTHON_CLINE_IN_TRACEBACK 0
196 #undef CYTHON_USE_TYPE_SLOTS
197 #define CYTHON_USE_TYPE_SLOTS 0
198 #undef CYTHON_USE_TYPE_SPECS
199 #define CYTHON_USE_TYPE_SPECS 1
200 #undef CYTHON_USE_PYTYPE_LOOKUP
201 #define CYTHON_USE_PYTYPE_LOOKUP 0
202 #undef CYTHON_USE_ASYNC_SLOTS
203 #define CYTHON_USE_ASYNC_SLOTS 0
204 #undef CYTHON_USE_PYLIST_INTERNALS
205 #define CYTHON_USE_PYLIST_INTERNALS 0
206 #undef CYTHON_USE_UNICODE_INTERNALS
207 #define CYTHON_USE_UNICODE_INTERNALS 0
208 #ifndef CYTHON_USE_UNICODE_WRITER
209 #define CYTHON_USE_UNICODE_WRITER 0
210 #endif
211 #undef CYTHON_USE_PYLONG_INTERNALS
212 #define CYTHON_USE_PYLONG_INTERNALS 0
213 #ifndef CYTHON_AVOID_BORROWED_REFS
214 #define CYTHON_AVOID_BORROWED_REFS 0
215 #endif
216 #undef CYTHON_ASSUME_SAFE_MACROS
217 #define CYTHON_ASSUME_SAFE_MACROS 0
218 #undef CYTHON_UNPACK_METHODS
219 #define CYTHON_UNPACK_METHODS 0
220 #undef CYTHON_FAST_THREAD_STATE
221 #define CYTHON_FAST_THREAD_STATE 0
222 #undef CYTHON_FAST_GIL
223 #define CYTHON_FAST_GIL 0
224 #undef CYTHON_METH_FASTCALL
225 #define CYTHON_METH_FASTCALL 0
226 #undef CYTHON_FAST_PYCALL
227 #define CYTHON_FAST_PYCALL 0
228 #ifndef CYTHON_PEP487_INIT_SUBCLASS
229 #define CYTHON_PEP487_INIT_SUBCLASS 1
230 #endif
231 #undef CYTHON_PEP489_MULTI_PHASE_INIT
232 #define CYTHON_PEP489_MULTI_PHASE_INIT 0
233 #undef CYTHON_USE_MODULE_STATE
234 #define CYTHON_USE_MODULE_STATE 1
235 #ifndef CYTHON_USE_TP_FINALIZE
236 #define CYTHON_USE_TP_FINALIZE 0
237 #endif
238 #undef CYTHON_USE_DICT_VERSIONS
239 #define CYTHON_USE_DICT_VERSIONS 0
240 #undef CYTHON_USE_EXC_INFO_STACK
241 #define CYTHON_USE_EXC_INFO_STACK 0
242 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
243 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
244 #endif
245 #elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL)
246 #define CYTHON_COMPILING_IN_PYPY 0
247 #define CYTHON_COMPILING_IN_CPYTHON 0
248 #define CYTHON_COMPILING_IN_LIMITED_API 0
249 #define CYTHON_COMPILING_IN_GRAAL 0
250 #define CYTHON_COMPILING_IN_NOGIL 1
251 #ifndef CYTHON_USE_TYPE_SLOTS
252 #define CYTHON_USE_TYPE_SLOTS 1
253 #endif
254 #undef CYTHON_USE_PYTYPE_LOOKUP
255 #define CYTHON_USE_PYTYPE_LOOKUP 0
256 #ifndef CYTHON_USE_ASYNC_SLOTS
257 #define CYTHON_USE_ASYNC_SLOTS 1
258 #endif
259 #undef CYTHON_USE_PYLIST_INTERNALS
260 #define CYTHON_USE_PYLIST_INTERNALS 0
261 #ifndef CYTHON_USE_UNICODE_INTERNALS
262 #define CYTHON_USE_UNICODE_INTERNALS 1
263 #endif
264 #undef CYTHON_USE_UNICODE_WRITER
265 #define CYTHON_USE_UNICODE_WRITER 0
266 #undef CYTHON_USE_PYLONG_INTERNALS
267 #define CYTHON_USE_PYLONG_INTERNALS 0
268 #ifndef CYTHON_AVOID_BORROWED_REFS
269 #define CYTHON_AVOID_BORROWED_REFS 0
270 #endif
271 #ifndef CYTHON_ASSUME_SAFE_MACROS
272 #define CYTHON_ASSUME_SAFE_MACROS 1
273 #endif
274 #ifndef CYTHON_UNPACK_METHODS
275 #define CYTHON_UNPACK_METHODS 1
276 #endif
277 #undef CYTHON_FAST_THREAD_STATE
278 #define CYTHON_FAST_THREAD_STATE 0
279 #undef CYTHON_FAST_PYCALL
280 #define CYTHON_FAST_PYCALL 0
281 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
282 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
283 #endif
284 #ifndef CYTHON_USE_TP_FINALIZE
285 #define CYTHON_USE_TP_FINALIZE 1
286 #endif
287 #undef CYTHON_USE_DICT_VERSIONS
288 #define CYTHON_USE_DICT_VERSIONS 0
289 #undef CYTHON_USE_EXC_INFO_STACK
290 #define CYTHON_USE_EXC_INFO_STACK 0
291 #else
292 #define CYTHON_COMPILING_IN_PYPY 0
293 #define CYTHON_COMPILING_IN_CPYTHON 1
294 #define CYTHON_COMPILING_IN_LIMITED_API 0
295 #define CYTHON_COMPILING_IN_GRAAL 0
296 #define CYTHON_COMPILING_IN_NOGIL 0
297 #ifndef CYTHON_USE_TYPE_SLOTS
298 #define CYTHON_USE_TYPE_SLOTS 1
299 #endif
300 #ifndef CYTHON_USE_TYPE_SPECS
301 #define CYTHON_USE_TYPE_SPECS 0
302 #endif
303 #ifndef CYTHON_USE_PYTYPE_LOOKUP
304 #define CYTHON_USE_PYTYPE_LOOKUP 1
305 #endif
306 #if PY_MAJOR_VERSION < 3
307 #undef CYTHON_USE_ASYNC_SLOTS
308 #define CYTHON_USE_ASYNC_SLOTS 0
309 #elif !defined(CYTHON_USE_ASYNC_SLOTS)
310 #define CYTHON_USE_ASYNC_SLOTS 1
311 #endif
312 #ifndef CYTHON_USE_PYLONG_INTERNALS
313 #define CYTHON_USE_PYLONG_INTERNALS 1
314 #endif
315 #ifndef CYTHON_USE_PYLIST_INTERNALS
316 #define CYTHON_USE_PYLIST_INTERNALS 1
317 #endif
318 #ifndef CYTHON_USE_UNICODE_INTERNALS
319 #define CYTHON_USE_UNICODE_INTERNALS 1
320 #endif
321 #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
322 #undef CYTHON_USE_UNICODE_WRITER
323 #define CYTHON_USE_UNICODE_WRITER 0
324 #elif !defined(CYTHON_USE_UNICODE_WRITER)
325 #define CYTHON_USE_UNICODE_WRITER 1
326 #endif
327 #ifndef CYTHON_AVOID_BORROWED_REFS
328 #define CYTHON_AVOID_BORROWED_REFS 0
329 #endif
330 #ifndef CYTHON_ASSUME_SAFE_MACROS
331 #define CYTHON_ASSUME_SAFE_MACROS 1
332 #endif
333 #ifndef CYTHON_UNPACK_METHODS
334 #define CYTHON_UNPACK_METHODS 1
335 #endif
336 #ifndef CYTHON_FAST_THREAD_STATE
337 #define CYTHON_FAST_THREAD_STATE 1
338 #endif
339 #ifndef CYTHON_FAST_GIL
340 #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6)
341 #endif
342 #ifndef CYTHON_METH_FASTCALL
343 #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1)
344 #endif
345 #ifndef CYTHON_FAST_PYCALL
346 #define CYTHON_FAST_PYCALL 1
347 #endif
348 #ifndef CYTHON_PEP487_INIT_SUBCLASS
349 #define CYTHON_PEP487_INIT_SUBCLASS 1
350 #endif
351 #if PY_VERSION_HEX < 0x03050000
352 #undef CYTHON_PEP489_MULTI_PHASE_INIT
353 #define CYTHON_PEP489_MULTI_PHASE_INIT 0
354 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
355 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
356 #endif
357 #ifndef CYTHON_USE_MODULE_STATE
358 #define CYTHON_USE_MODULE_STATE 0
359 #endif
360 #if PY_VERSION_HEX < 0x030400a1
361 #undef CYTHON_USE_TP_FINALIZE
362 #define CYTHON_USE_TP_FINALIZE 0
363 #elif !defined(CYTHON_USE_TP_FINALIZE)
364 #define CYTHON_USE_TP_FINALIZE 1
365 #endif
366 #if PY_VERSION_HEX < 0x030600B1
367 #undef CYTHON_USE_DICT_VERSIONS
368 #define CYTHON_USE_DICT_VERSIONS 0
369 #elif !defined(CYTHON_USE_DICT_VERSIONS)
370 #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5)
371 #endif
372 #if PY_VERSION_HEX < 0x030700A3
373 #undef CYTHON_USE_EXC_INFO_STACK
374 #define CYTHON_USE_EXC_INFO_STACK 0
375 #elif !defined(CYTHON_USE_EXC_INFO_STACK)
376 #define CYTHON_USE_EXC_INFO_STACK 1
377 #endif
378 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
379 #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
380 #endif
381 #endif
382 #if !defined(CYTHON_FAST_PYCCALL)
383 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
384 #endif
385 #if !defined(CYTHON_VECTORCALL)
386 #define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1)
387 #endif
388 #define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1)
389 #if CYTHON_USE_PYLONG_INTERNALS
390 #if PY_MAJOR_VERSION < 3
391 #include "longintrepr.h"
392 #endif
393 #undef SHIFT
394 #undef BASE
395 #undef MASK
396 #ifdef SIZEOF_VOID_P
397 enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
398 #endif
399 #endif
400 #ifndef __has_attribute
401 #define __has_attribute(x) 0
402 #endif
403 #ifndef __has_cpp_attribute
404 #define __has_cpp_attribute(x) 0
405 #endif
406 #ifndef CYTHON_RESTRICT
407 #if defined(__GNUC__)
408 #define CYTHON_RESTRICT __restrict__
409 #elif defined(_MSC_VER) && _MSC_VER >= 1400
410 #define CYTHON_RESTRICT __restrict
411 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
412 #define CYTHON_RESTRICT restrict
413 #else
414 #define CYTHON_RESTRICT
415 #endif
416 #endif
417 #ifndef CYTHON_UNUSED
418 #if defined(__cplusplus)
419 /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
420 * but leads to warnings with -pedantic, since it is a C++17 feature */
421 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
422 #if __has_cpp_attribute(maybe_unused)
423 #define CYTHON_UNUSED [[maybe_unused]]
424 #endif
425 #endif
426 #endif
427 #endif
428 #ifndef CYTHON_UNUSED
429 # if defined(__GNUC__)
430 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
431 # define CYTHON_UNUSED __attribute__ ((__unused__))
432 # else
433 # define CYTHON_UNUSED
434 # endif
435 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
436 # define CYTHON_UNUSED __attribute__ ((__unused__))
437 # else
438 # define CYTHON_UNUSED
439 # endif
440 #endif
441 #ifndef CYTHON_UNUSED_VAR
442 # if defined(__cplusplus)
443 template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
444 # else
445 # define CYTHON_UNUSED_VAR(x) (void)(x)
446 # endif
447 #endif
448 #ifndef CYTHON_MAYBE_UNUSED_VAR
449 #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
450 #endif
451 #ifndef CYTHON_NCP_UNUSED
452 # if CYTHON_COMPILING_IN_CPYTHON
453 # define CYTHON_NCP_UNUSED
454 # else
455 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
456 # endif
457 #endif
458 #ifndef CYTHON_USE_CPP_STD_MOVE
459 #if defined(__cplusplus) && (\
460 __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
461 #define CYTHON_USE_CPP_STD_MOVE 1
462 #else
463 #define CYTHON_USE_CPP_STD_MOVE 0
464 #endif
465 #endif
466 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
467 #ifdef _MSC_VER
468 #ifndef _MSC_STDINT_H_
469 #if _MSC_VER < 1300
470 typedef unsigned char uint8_t;
471 typedef unsigned short uint16_t;
472 typedef unsigned int uint32_t;
473 #else
474 typedef unsigned __int8 uint8_t;
475 typedef unsigned __int16 uint16_t;
476 typedef unsigned __int32 uint32_t;
477 #endif
478 #endif
479 #if _MSC_VER < 1300
480 #ifdef _WIN64
481 typedef unsigned long long __pyx_uintptr_t;
482 #else
483 typedef unsigned int __pyx_uintptr_t;
484 #endif
485 #else
486 #ifdef _WIN64
487 typedef unsigned __int64 __pyx_uintptr_t;
488 #else
489 typedef unsigned __int32 __pyx_uintptr_t;
490 #endif
491 #endif
492 #else
493 #include <stdint.h>
494 typedef uintptr_t __pyx_uintptr_t;
495 #endif
496 #ifndef CYTHON_FALLTHROUGH
497 #if defined(__cplusplus)
498 /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
499 * but leads to warnings with -pedantic, since it is a C++17 feature */
500 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
501 #if __has_cpp_attribute(fallthrough)
502 #define CYTHON_FALLTHROUGH [[fallthrough]]
503 #endif
504 #endif
505 #ifndef CYTHON_FALLTHROUGH
506 #if __has_cpp_attribute(clang::fallthrough)
507 #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
508 #elif __has_cpp_attribute(gnu::fallthrough)
509 #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
510 #endif
511 #endif
512 #endif
513 #ifndef CYTHON_FALLTHROUGH
514 #if __has_attribute(fallthrough)
515 #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
516 #else
517 #define CYTHON_FALLTHROUGH
518 #endif
519 #endif
520 #if defined(__clang__) && defined(__apple_build_version__)
521 #if __apple_build_version__ < 7000000
522 #undef CYTHON_FALLTHROUGH
523 #define CYTHON_FALLTHROUGH
524 #endif
525 #endif
526 #endif
527 #ifdef __cplusplus
528 template <typename T>
529 struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
530 #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
531 #else
532 #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
533 #endif
534 #if CYTHON_COMPILING_IN_PYPY == 1
535 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000)
536 #else
537 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000)
538 #endif
539 #define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))
540
541 #ifndef CYTHON_INLINE
542 #if defined(__clang__)
543 #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
544 #elif defined(__GNUC__)
545 #define CYTHON_INLINE __inline__
546 #elif defined(_MSC_VER)
547 #define CYTHON_INLINE __inline
548 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
549 #define CYTHON_INLINE inline
550 #else
551 #define CYTHON_INLINE
552 #endif
553 #endif
554
555 #define __PYX_BUILD_PY_SSIZE_T "n"
556 #define CYTHON_FORMAT_SSIZE_T "z"
557 #if PY_MAJOR_VERSION < 3
558 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
559 #define __Pyx_DefaultClassType PyClass_Type
560 #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
561 PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
562 #else
563 #define __Pyx_BUILTIN_MODULE_NAME "builtins"
564 #define __Pyx_DefaultClassType PyType_Type
565 #if CYTHON_COMPILING_IN_LIMITED_API
566 static CYTHON_INLINE PyObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
567 PyObject *code, PyObject *c, PyObject* n, PyObject *v,
568 PyObject *fv, PyObject *cell, PyObject* fn,
569 PyObject *name, int fline, PyObject *lnos) {
570 PyObject *exception_table = NULL;
571 PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
572 #if __PYX_LIMITED_VERSION_HEX < 0x030B0000
573 PyObject *version_info;
574 PyObject *py_minor_version = NULL;
575 #endif
576 long minor_version = 0;
577 PyObject *type, *value, *traceback;
578 PyErr_Fetch(&type, &value, &traceback);
579 #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000
580 minor_version = 11;
581 #else
582 if (!(version_info = PySys_GetObject("version_info"))) goto end;
583 if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
584 minor_version = PyLong_AsLong(py_minor_version);
585 Py_DECREF(py_minor_version);
586 if (minor_version == -1 && PyErr_Occurred()) goto end;
587 #endif
588 if (!(types_module = PyImport_ImportModule("types"))) goto end;
589 if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
590 if (minor_version <= 7) {
591 (void)p;
592 result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code,
593 c, n, v, fn, name, fline, lnos, fv, cell);
594 } else if (minor_version <= 10) {
595 result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code,
596 c, n, v, fn, name, fline, lnos, fv, cell);
597 } else {
598 if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
599 result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code,
600 c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
601 }
602 end:
603 Py_XDECREF(code_type);
604 Py_XDECREF(exception_table);
605 Py_XDECREF(types_module);
606 if (type) {
607 PyErr_Restore(type, value, traceback);
608 }
609 return result;
610 }
611 #ifndef CO_OPTIMIZED
612 #define CO_OPTIMIZED 0x0001
613 #endif
614 #ifndef CO_NEWLOCALS
615 #define CO_NEWLOCALS 0x0002
616 #endif
617 #ifndef CO_VARARGS
618 #define CO_VARARGS 0x0004
619 #endif
620 #ifndef CO_VARKEYWORDS
621 #define CO_VARKEYWORDS 0x0008
622 #endif
623 #ifndef CO_ASYNC_GENERATOR
624 #define CO_ASYNC_GENERATOR 0x0200
625 #endif
626 #ifndef CO_GENERATOR
627 #define CO_GENERATOR 0x0020
628 #endif
629 #ifndef CO_COROUTINE
630 #define CO_COROUTINE 0x0080
631 #endif
632 #elif PY_VERSION_HEX >= 0x030B0000
633 static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
634 PyObject *code, PyObject *c, PyObject* n, PyObject *v,
635 PyObject *fv, PyObject *cell, PyObject* fn,
636 PyObject *name, int fline, PyObject *lnos) {
637 PyCodeObject *result;
638 PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0);
639 if (!empty_bytes) return NULL;
640 result =
641 #if PY_VERSION_HEX >= 0x030C0000
642 PyUnstable_Code_NewWithPosOnlyArgs
643 #else
644 PyCode_NewWithPosOnlyArgs
645 #endif
646 (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes);
647 Py_DECREF(empty_bytes);
648 return result;
649 }
650 #elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY
651 #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
652 PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
653 #else
654 #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
655 PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
656 #endif
657 #endif
658 #if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
659 #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
660 #else
661 #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
662 #endif
663 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
664 #define __Pyx_Py_Is(x, y) Py_Is(x, y)
665 #else
666 #define __Pyx_Py_Is(x, y) ((x) == (y))
667 #endif
668 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
669 #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
670 #else
671 #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
672 #endif
673 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
674 #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
675 #else
676 #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
677 #endif
678 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
679 #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
680 #else
681 #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
682 #endif
683 #define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj))
684 #if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
685 #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
686 #else
687 #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
688 #endif
689 #ifndef CO_COROUTINE
690 #define CO_COROUTINE 0x80
691 #endif
692 #ifndef CO_ASYNC_GENERATOR
693 #define CO_ASYNC_GENERATOR 0x200
694 #endif
695 #ifndef Py_TPFLAGS_CHECKTYPES
696 #define Py_TPFLAGS_CHECKTYPES 0
697 #endif
698 #ifndef Py_TPFLAGS_HAVE_INDEX
699 #define Py_TPFLAGS_HAVE_INDEX 0
700 #endif
701 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
702 #define Py_TPFLAGS_HAVE_NEWBUFFER 0
703 #endif
704 #ifndef Py_TPFLAGS_HAVE_FINALIZE
705 #define Py_TPFLAGS_HAVE_FINALIZE 0
706 #endif
707 #ifndef Py_TPFLAGS_SEQUENCE
708 #define Py_TPFLAGS_SEQUENCE 0
709 #endif
710 #ifndef Py_TPFLAGS_MAPPING
711 #define Py_TPFLAGS_MAPPING 0
712 #endif
713 #ifndef METH_STACKLESS
714 #define METH_STACKLESS 0
715 #endif
716 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
717 #ifndef METH_FASTCALL
718 #define METH_FASTCALL 0x80
719 #endif
720 typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
721 typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
722 Py_ssize_t nargs, PyObject *kwnames);
723 #else
724 #define __Pyx_PyCFunctionFast _PyCFunctionFast
725 #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
726 #endif
727 #if CYTHON_METH_FASTCALL
728 #define __Pyx_METH_FASTCALL METH_FASTCALL
729 #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
730 #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
731 #else
732 #define __Pyx_METH_FASTCALL METH_VARARGS
733 #define __Pyx_PyCFunction_FastCall PyCFunction
734 #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
735 #endif
736 #if CYTHON_VECTORCALL
737 #define __pyx_vectorcallfunc vectorcallfunc
738 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET
739 #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n))
740 #elif CYTHON_BACKPORT_VECTORCALL
741 typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args,
742 size_t nargsf, PyObject *kwnames);
743 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1))
744 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET))
745 #else
746 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0
747 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n))
748 #endif
749 #if PY_MAJOR_VERSION >= 0x030900B1
750 #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func)
751 #else
752 #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func)
753 #endif
754 #define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func)
755 #if CYTHON_COMPILING_IN_CPYTHON
756 #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth)
757 #elif !CYTHON_COMPILING_IN_LIMITED_API
758 #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func)
759 #endif
760 #if CYTHON_COMPILING_IN_CPYTHON
761 #define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags)
762 static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
763 return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
764 }
765 #endif
766 static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) {
767 #if CYTHON_COMPILING_IN_LIMITED_API
768 return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
769 #else
770 return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
771 #endif
772 }
773 #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc)
774 #if __PYX_LIMITED_VERSION_HEX < 0x030900B1
775 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b))
776 typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
777 #else
778 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b)
779 #define __Pyx_PyCMethod PyCMethod
780 #endif
781 #ifndef METH_METHOD
782 #define METH_METHOD 0x200
783 #endif
784 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
785 #define PyObject_Malloc(s) PyMem_Malloc(s)
786 #define PyObject_Free(p) PyMem_Free(p)
787 #define PyObject_Realloc(p) PyMem_Realloc(p)
788 #endif
789 #if CYTHON_COMPILING_IN_LIMITED_API
790 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
791 #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
792 #else
793 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
794 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
795 #endif
796 #if CYTHON_COMPILING_IN_LIMITED_API
797 #define __Pyx_PyThreadState_Current PyThreadState_Get()
798 #elif !CYTHON_FAST_THREAD_STATE
799 #define __Pyx_PyThreadState_Current PyThreadState_GET()
800 #elif PY_VERSION_HEX >= 0x030d00A1
801 #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
802 #elif PY_VERSION_HEX >= 0x03060000
803 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
804 #elif PY_VERSION_HEX >= 0x03000000
805 #define __Pyx_PyThreadState_Current PyThreadState_GET()
806 #else
807 #define __Pyx_PyThreadState_Current _PyThreadState_Current
808 #endif
809 #if CYTHON_COMPILING_IN_LIMITED_API
810 static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op)
811 {
812 void *result;
813 result = PyModule_GetState(op);
814 if (!result)
815 Py_FatalError("Couldn't find the module state");
816 return result;
817 }
818 #endif
819 #define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype)
820 #if CYTHON_COMPILING_IN_LIMITED_API
821 #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name))
822 #else
823 #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name)
824 #endif
825 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
826 #include "pythread.h"
827 #define Py_tss_NEEDS_INIT 0
828 typedef int Py_tss_t;
829 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
830 *key = PyThread_create_key();
831 return 0;
832 }
833 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
834 Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
835 *key = Py_tss_NEEDS_INIT;
836 return key;
837 }
838 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
839 PyObject_Free(key);
840 }
841 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
842 return *key != Py_tss_NEEDS_INIT;
843 }
844 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
845 PyThread_delete_key(*key);
846 *key = Py_tss_NEEDS_INIT;
847 }
848 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
849 return PyThread_set_key_value(*key, value);
850 }
851 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
852 return PyThread_get_key_value(*key);
853 }
854 #endif
855 #if PY_MAJOR_VERSION < 3
856 #if CYTHON_COMPILING_IN_PYPY
857 #if PYPY_VERSION_NUM < 0x07030600
858 #if defined(__cplusplus) && __cplusplus >= 201402L
859 [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]]
860 #elif defined(__GNUC__) || defined(__clang__)
861 __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")))
862 #elif defined(_MSC_VER)
863 __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))
864 #endif
865 static CYTHON_INLINE int PyGILState_Check(void) {
866 return 0;
867 }
868 #else // PYPY_VERSION_NUM < 0x07030600
869 #endif // PYPY_VERSION_NUM < 0x07030600
870 #else
871 static CYTHON_INLINE int PyGILState_Check(void) {
872 PyThreadState * tstate = _PyThreadState_Current;
873 return tstate && (tstate == PyGILState_GetThisThreadState());
874 }
875 #endif
876 #endif
877 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized)
878 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
879 #else
880 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
881 #endif
882 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
883 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
884 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
885 #else
886 #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
887 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
888 #endif
889 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS
890 #define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
891 static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
892 PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
893 if (res == NULL) PyErr_Clear();
894 return res;
895 }
896 #elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000)
897 #define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError
898 #define __Pyx_PyDict_GetItemStr PyDict_GetItem
899 #else
900 static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
901 #if CYTHON_COMPILING_IN_PYPY
902 return PyDict_GetItem(dict, name);
903 #else
904 PyDictEntry *ep;
905 PyDictObject *mp = (PyDictObject*) dict;
906 long hash = ((PyStringObject *) name)->ob_shash;
907 assert(hash != -1);
908 ep = (mp->ma_lookup)(mp, name, hash);
909 if (ep == NULL) {
910 return NULL;
911 }
912 return ep->me_value;
913 #endif
914 }
915 #define __Pyx_PyDict_GetItemStr PyDict_GetItem
916 #endif
917 #if CYTHON_USE_TYPE_SLOTS
918 #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags)
919 #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
920 #define __Pyx_PyObject_GetIterNextFunc(obj) (Py_TYPE(obj)->tp_iternext)
921 #else
922 #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp))
923 #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature)
924 #define __Pyx_PyObject_GetIterNextFunc(obj) PyIter_Next
925 #endif
926 #if CYTHON_COMPILING_IN_LIMITED_API
927 #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v)
928 #else
929 #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v)
930 #endif
931 #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000
932 #define __Pyx_PyHeapTypeObject_GC_Del(obj) {\
933 PyTypeObject *type = Py_TYPE((PyObject*)obj);\
934 assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
935 PyObject_GC_Del(obj);\
936 Py_DECREF(type);\
937 }
938 #else
939 #define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj)
940 #endif
941 #if CYTHON_COMPILING_IN_LIMITED_API
942 #define CYTHON_PEP393_ENABLED 1
943 #define __Pyx_PyUnicode_READY(op) (0)
944 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GetLength(u)
945 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
946 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U)
947 #define __Pyx_PyUnicode_KIND(u) ((void)u, (0))
948 #define __Pyx_PyUnicode_DATA(u) ((void*)u)
949 #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
950 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u))
951 #elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
952 #define CYTHON_PEP393_ENABLED 1
953 #if PY_VERSION_HEX >= 0x030C0000
954 #define __Pyx_PyUnicode_READY(op) (0)
955 #else
956 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
957 0 : _PyUnicode_Ready((PyObject *)(op)))
958 #endif
959 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
960 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
961 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
962 #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u))
963 #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
964 #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
965 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
966 #if PY_VERSION_HEX >= 0x030C0000
967 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
968 #else
969 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
970 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
971 #else
972 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
973 #endif
974 #endif
975 #else
976 #define CYTHON_PEP393_ENABLED 0
977 #define PyUnicode_1BYTE_KIND 1
978 #define PyUnicode_2BYTE_KIND 2
979 #define PyUnicode_4BYTE_KIND 4
980 #define __Pyx_PyUnicode_READY(op) (0)
981 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
982 #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
983 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U)
984 #define __Pyx_PyUnicode_KIND(u) ((int)sizeof(Py_UNICODE))
985 #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
986 #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
987 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch)
988 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
989 #endif
990 #if CYTHON_COMPILING_IN_PYPY
991 #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
992 #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
993 #else
994 #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
995 #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
996 PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
997 #endif
998 #if CYTHON_COMPILING_IN_PYPY
999 #if !defined(PyUnicode_DecodeUnicodeEscape)
1000 #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors)
1001 #endif
1002 #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500)
1003 #undef PyUnicode_Contains
1004 #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
1005 #endif
1006 #if !defined(PyByteArray_Check)
1007 #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
1008 #endif
1009 #if !defined(PyObject_Format)
1010 #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
1011 #endif
1012 #endif
1013 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
1014 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
1015 #if PY_MAJOR_VERSION >= 3
1016 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
1017 #else
1018 #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
1019 #endif
1020 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
1021 #define PyObject_ASCII(o) PyObject_Repr(o)
1022 #endif
1023 #if PY_MAJOR_VERSION >= 3
1024 #define PyBaseString_Type PyUnicode_Type
1025 #define PyStringObject PyUnicodeObject
1026 #define PyString_Type PyUnicode_Type
1027 #define PyString_Check PyUnicode_Check
1028 #define PyString_CheckExact PyUnicode_CheckExact
1029 #ifndef PyObject_Unicode
1030 #define PyObject_Unicode PyObject_Str
1031 #endif
1032 #endif
1033 #if PY_MAJOR_VERSION >= 3
1034 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
1035 #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
1036 #else
1037 #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
1038 #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
1039 #endif
1040 #if CYTHON_COMPILING_IN_CPYTHON
1041 #define __Pyx_PySequence_ListKeepNew(obj)\
1042 (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
1043 #else
1044 #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj)
1045 #endif
1046 #ifndef PySet_CheckExact
1047 #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type)
1048 #endif
1049 #if PY_VERSION_HEX >= 0x030900A4
1050 #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
1051 #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
1052 #else
1053 #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
1054 #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
1055 #endif
1056 #if CYTHON_ASSUME_SAFE_MACROS
1057 #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
1058 #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
1059 #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
1060 #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
1061 #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
1062 #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
1063 #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
1064 #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
1065 #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
1066 #else
1067 #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
1068 #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
1069 #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
1070 #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
1071 #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
1072 #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
1073 #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
1074 #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
1075 #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
1076 #endif
1077 #if PY_VERSION_HEX >= 0x030d00A1
1078 #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
1079 #else
1080 static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
1081 PyObject *module = PyImport_AddModule(name);
1082 Py_XINCREF(module);
1083 return module;
1084 }
1085 #endif
1086 #if PY_MAJOR_VERSION >= 3
1087 #define PyIntObject PyLongObject
1088 #define PyInt_Type PyLong_Type
1089 #define PyInt_Check(op) PyLong_Check(op)
1090 #define PyInt_CheckExact(op) PyLong_CheckExact(op)
1091 #define __Pyx_Py3Int_Check(op) PyLong_Check(op)
1092 #define __Pyx_Py3Int_CheckExact(op) PyLong_CheckExact(op)
1093 #define PyInt_FromString PyLong_FromString
1094 #define PyInt_FromUnicode PyLong_FromUnicode
1095 #define PyInt_FromLong PyLong_FromLong
1096 #define PyInt_FromSize_t PyLong_FromSize_t
1097 #define PyInt_FromSsize_t PyLong_FromSsize_t
1098 #define PyInt_AsLong PyLong_AsLong
1099 #define PyInt_AS_LONG PyLong_AS_LONG
1100 #define PyInt_AsSsize_t PyLong_AsSsize_t
1101 #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
1102 #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
1103 #define PyNumber_Int PyNumber_Long
1104 #else
1105 #define __Pyx_Py3Int_Check(op) (PyLong_Check(op) || PyInt_Check(op))
1106 #define __Pyx_Py3Int_CheckExact(op) (PyLong_CheckExact(op) || PyInt_CheckExact(op))
1107 #endif
1108 #if PY_MAJOR_VERSION >= 3
1109 #define PyBoolObject PyLongObject
1110 #endif
1111 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
1112 #ifndef PyUnicode_InternFromString
1113 #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
1114 #endif
1115 #endif
1116 #if PY_VERSION_HEX < 0x030200A4
1117 typedef long Py_hash_t;
1118 #define __Pyx_PyInt_FromHash_t PyInt_FromLong
1119 #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t
1120 #else
1121 #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
1122 #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t
1123 #endif
1124 #if CYTHON_USE_ASYNC_SLOTS
1125 #if PY_VERSION_HEX >= 0x030500B1
1126 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
1127 #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
1128 #else
1129 #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
1130 #endif
1131 #else
1132 #define __Pyx_PyType_AsAsync(obj) NULL
1133 #endif
1134 #ifndef __Pyx_PyAsyncMethodsStruct
1135 typedef struct {
1136 unaryfunc am_await;
1137 unaryfunc am_aiter;
1138 unaryfunc am_anext;
1139 } __Pyx_PyAsyncMethodsStruct;
1140 #endif
1141
1142 #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
1143 #if !defined(_USE_MATH_DEFINES)
1144 #define _USE_MATH_DEFINES
1145 #endif
1146 #endif
1147 #include <math.h>
1148 #ifdef NAN
1149 #define __PYX_NAN() ((float) NAN)
1150 #else
1151 static CYTHON_INLINE float __PYX_NAN() {
1152 float value;
1153 memset(&value, 0xFF, sizeof(value));
1154 return value;
1155 }
1156 #endif
1157 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
1158 #define __Pyx_truncl trunc
1159 #else
1160 #define __Pyx_truncl truncl
1161 #endif
1162
1163 #define __PYX_MARK_ERR_POS(f_index, lineno) \
1164 { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
1165 #define __PYX_ERR(f_index, lineno, Ln_error) \
1166 { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
1167
1168 #ifdef CYTHON_EXTERN_C
1169 #undef __PYX_EXTERN_C
1170 #define __PYX_EXTERN_C CYTHON_EXTERN_C
1171 #elif defined(__PYX_EXTERN_C)
1172 #ifdef _MSC_VER
1173 #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
1174 #else
1175 #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
1176 #endif
1177 #else
1178 #ifdef __cplusplus
1179 #define __PYX_EXTERN_C extern "C"
1180 #else
1181 #define __PYX_EXTERN_C extern
1182 #endif
1183 #endif
1184
1185 #define __PYX_HAVE__Recode
1186 #define __PYX_HAVE_API__Recode
1187 /* Early includes */
1188 #include <string.h>
1189 #include <stdlib.h>
1190 #include <stdio.h>
1191 #include "common.h"
1192 #ifdef _OPENMP
1193 #include <omp.h>
1194 #endif /* _OPENMP */
1195
1196 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
1197 #define CYTHON_WITHOUT_ASSERTIONS
1198 #endif
1199
1200 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
1201 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
1202
1203 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
1204 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
1205 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
1206 #define __PYX_DEFAULT_STRING_ENCODING ""
1207 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
1208 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
1209 #define __Pyx_uchar_cast(c) ((unsigned char)c)
1210 #define __Pyx_long_cast(x) ((long)x)
1211 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
1212 (sizeof(type) < sizeof(Py_ssize_t)) ||\
1213 (sizeof(type) > sizeof(Py_ssize_t) &&\
1214 likely(v < (type)PY_SSIZE_T_MAX ||\
1215 v == (type)PY_SSIZE_T_MAX) &&\
1216 (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
1217 v == (type)PY_SSIZE_T_MIN))) ||\
1218 (sizeof(type) == sizeof(Py_ssize_t) &&\
1219 (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
1220 v == (type)PY_SSIZE_T_MAX))) )
1221 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
1222 return (size_t) i < (size_t) limit;
1223 }
1224 #if defined (__cplusplus) && __cplusplus >= 201103L
1225 #include <cstdlib>
1226 #define __Pyx_sst_abs(value) std::abs(value)
1227 #elif SIZEOF_INT >= SIZEOF_SIZE_T
1228 #define __Pyx_sst_abs(value) abs(value)
1229 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
1230 #define __Pyx_sst_abs(value) labs(value)
1231 #elif defined (_MSC_VER)
1232 #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
1233 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
1234 #define __Pyx_sst_abs(value) llabs(value)
1235 #elif defined (__GNUC__)
1236 #define __Pyx_sst_abs(value) __builtin_llabs(value)
1237 #else
1238 #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
1239 #endif
1240 static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
1241 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
1242 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
1243 static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
1244 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
1245 #define __Pyx_PyBytes_FromString PyBytes_FromString
1246 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
1247 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
1248 #if PY_MAJOR_VERSION < 3
1249 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
1250 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
1251 #else
1252 #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
1253 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
1254 #endif
1255 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
1256 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
1257 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
1258 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
1259 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
1260 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
1261 #define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
1262 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
1263 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
1264 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
1265 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
1266 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
1267 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
1268 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
1269 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
1270 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
1271 #if CYTHON_COMPILING_IN_LIMITED_API
1272 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const wchar_t *u)
1273 {
1274 const wchar_t *u_end = u;
1275 while (*u_end++) ;
1276 return (size_t)(u_end - u - 1);
1277 }
1278 #else
1279 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
1280 {
1281 const Py_UNICODE *u_end = u;
1282 while (*u_end++) ;
1283 return (size_t)(u_end - u - 1);
1284 }
1285 #endif
1286 #define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o)
1287 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
1288 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
1289 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
1290 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
1291 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
1292 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
1293 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
1294 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
1295 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
1296 #define __Pyx_PySequence_Tuple(obj)\
1297 (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
1298 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
1299 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
1300 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
1301 #if CYTHON_ASSUME_SAFE_MACROS
1302 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
1303 #else
1304 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
1305 #endif
1306 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
1307 #if PY_MAJOR_VERSION >= 3
1308 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
1309 #else
1310 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
1311 #endif
1312 #if CYTHON_USE_PYLONG_INTERNALS
1313 #if PY_VERSION_HEX >= 0x030C00A7
1314 #ifndef _PyLong_SIGN_MASK
1315 #define _PyLong_SIGN_MASK 3
1316 #endif
1317 #ifndef _PyLong_NON_SIZE_BITS
1318 #define _PyLong_NON_SIZE_BITS 3
1319 #endif
1320 #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
1321 #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0)
1322 #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x))
1323 #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1)
1324 #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0)
1325 #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0])
1326 #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
1327 #define __Pyx_PyLong_SignedDigitCount(x)\
1328 ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
1329 #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
1330 #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x)
1331 #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x)
1332 #else
1333 #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
1334 #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
1335 #endif
1336 typedef Py_ssize_t __Pyx_compact_pylong;
1337 typedef size_t __Pyx_compact_upylong;
1338 #else
1339 #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0)
1340 #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0)
1341 #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0)
1342 #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0)
1343 #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
1344 #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x))
1345 #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x)
1346 #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
1347 #define __Pyx_PyLong_CompactValue(x)\
1348 ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
1349 typedef sdigit __Pyx_compact_pylong;
1350 typedef digit __Pyx_compact_upylong;
1351 #endif
1352 #if PY_VERSION_HEX >= 0x030C00A5
1353 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit)
1354 #else
1355 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit)
1356 #endif
1357 #endif
1358 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
1359 #include <string.h>
1360 static int __Pyx_sys_getdefaultencoding_not_ascii;
1361 static int __Pyx_init_sys_getdefaultencoding_params(void) {
1362 PyObject* sys;
1363 PyObject* default_encoding = NULL;
1364 PyObject* ascii_chars_u = NULL;
1365 PyObject* ascii_chars_b = NULL;
1366 const char* default_encoding_c;
1367 sys = PyImport_ImportModule("sys");
1368 if (!sys) goto bad;
1369 default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
1370 Py_DECREF(sys);
1371 if (!default_encoding) goto bad;
1372 default_encoding_c = PyBytes_AsString(default_encoding);
1373 if (!default_encoding_c) goto bad;
1374 if (strcmp(default_encoding_c, "ascii") == 0) {
1375 __Pyx_sys_getdefaultencoding_not_ascii = 0;
1376 } else {
1377 char ascii_chars[128];
1378 int c;
1379 for (c = 0; c < 128; c++) {
1380 ascii_chars[c] = (char) c;
1381 }
1382 __Pyx_sys_getdefaultencoding_not_ascii = 1;
1383 ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
1384 if (!ascii_chars_u) goto bad;
1385 ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
1386 if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
1387 PyErr_Format(
1388 PyExc_ValueError,
1389 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
1390 default_encoding_c);
1391 goto bad;
1392 }
1393 Py_DECREF(ascii_chars_u);
1394 Py_DECREF(ascii_chars_b);
1395 }
1396 Py_DECREF(default_encoding);
1397 return 0;
1398 bad:
1399 Py_XDECREF(default_encoding);
1400 Py_XDECREF(ascii_chars_u);
1401 Py_XDECREF(ascii_chars_b);
1402 return -1;
1403 }
1404 #endif
1405 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
1406 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
1407 #else
1408 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
1409 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
1410 #include <string.h>
1411 static char* __PYX_DEFAULT_STRING_ENCODING;
1412 static int __Pyx_init_sys_getdefaultencoding_params(void) {
1413 PyObject* sys;
1414 PyObject* default_encoding = NULL;
1415 char* default_encoding_c;
1416 sys = PyImport_ImportModule("sys");
1417 if (!sys) goto bad;
1418 default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
1419 Py_DECREF(sys);
1420 if (!default_encoding) goto bad;
1421 default_encoding_c = PyBytes_AsString(default_encoding);
1422 if (!default_encoding_c) goto bad;
1423 __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
1424 if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
1425 strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
1426 Py_DECREF(default_encoding);
1427 return 0;
1428 bad:
1429 Py_XDECREF(default_encoding);
1430 return -1;
1431 }
1432 #endif
1433 #endif
1434
1435
1436 /* Test for GCC > 2.95 */
1437 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
1438 #define likely(x) __builtin_expect(!!(x), 1)
1439 #define unlikely(x) __builtin_expect(!!(x), 0)
1440 #else /* !__GNUC__ or GCC < 2.95 */
1441 #define likely(x) (x)
1442 #define unlikely(x) (x)
1443 #endif /* __GNUC__ */
1444 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
1445
1446 #if !CYTHON_USE_MODULE_STATE
1447 static PyObject *__pyx_m = NULL;
1448 #endif
1449 static int __pyx_lineno;
1450 static int __pyx_clineno = 0;
1451 static const char * __pyx_cfilenm = __FILE__;
1452 static const char *__pyx_filename;
1453
1454 /* #### Code section: filename_table ### */
1455
1456 static const char *__pyx_f[] = {
1457 "<stringsource>",
1458 "Recode.pyx",
1459 };
1460 /* #### Code section: utility_code_proto_before_types ### */
1461 /* ForceInitThreads.proto */
1462 #ifndef __PYX_FORCE_INIT_THREADS
1463 #define __PYX_FORCE_INIT_THREADS 0
1464 #endif
1465
1466 /* #### Code section: numeric_typedefs ### */
1467 /* #### Code section: complex_type_declarations ### */
1468 /* #### Code section: type_declarations ### */
1469
1470 /*--- Type declarations ---*/
1471 struct __pyx_obj_6Recode_Outer;
1472 struct __pyx_obj_6Recode_Request;
1473 struct __pyx_obj_6Recode_Task;
1474
1475 /* "Recode.pyx":522
1476 * ## Recode library at OUTER level.
1477 *
1478 * cdef class Outer: # <<<<<<<<<<<<<<
1479 * cdef RECODE_OUTER outer
1480 *
1481 */
1482 struct __pyx_obj_6Recode_Outer {
1483 PyObject_HEAD
1484 RECODE_OUTER outer;
1485 };
1486
1487
1488 /* "Recode.pyx":589
1489 * # Recode library at REQUEST level.
1490 *
1491 * cdef class Request: # <<<<<<<<<<<<<<
1492 * cdef RECODE_REQUEST request
1493 *
1494 */
1495 struct __pyx_obj_6Recode_Request {
1496 PyObject_HEAD
1497 RECODE_REQUEST request;
1498 };
1499
1500
1501 /* "Recode.pyx":668
1502 * # Recode library at TASK level.
1503 *
1504 * cdef class Task: # <<<<<<<<<<<<<<
1505 * cdef RECODE_TASK task
1506 *
1507 */
1508 struct __pyx_obj_6Recode_Task {
1509 PyObject_HEAD
1510 RECODE_TASK task;
1511 };
1512
1513 /* #### Code section: utility_code_proto ### */
1514
1515 /* --- Runtime support code (head) --- */
1516 /* Refnanny.proto */
1517 #ifndef CYTHON_REFNANNY
1518 #define CYTHON_REFNANNY 0
1519 #endif
1520 #if CYTHON_REFNANNY
1521 typedef struct {
1522 void (*INCREF)(void*, PyObject*, Py_ssize_t);
1523 void (*DECREF)(void*, PyObject*, Py_ssize_t);
1524 void (*GOTREF)(void*, PyObject*, Py_ssize_t);
1525 void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
1526 void* (*SetupContext)(const char*, Py_ssize_t, const char*);
1527 void (*FinishContext)(void**);
1528 } __Pyx_RefNannyAPIStruct;
1529 static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1530 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1531 #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1532 #ifdef WITH_THREAD
1533 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1534 if (acquire_gil) {\
1535 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1536 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
1537 PyGILState_Release(__pyx_gilstate_save);\
1538 } else {\
1539 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
1540 }
1541 #define __Pyx_RefNannyFinishContextNogil() {\
1542 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1543 __Pyx_RefNannyFinishContext();\
1544 PyGILState_Release(__pyx_gilstate_save);\
1545 }
1546 #else
1547 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1548 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__))
1549 #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext()
1550 #endif
1551 #define __Pyx_RefNannyFinishContextNogil() {\
1552 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1553 __Pyx_RefNannyFinishContext();\
1554 PyGILState_Release(__pyx_gilstate_save);\
1555 }
1556 #define __Pyx_RefNannyFinishContext()\
1557 __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1558 #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
1559 #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
1560 #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
1561 #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
1562 #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0)
1563 #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
1564 #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
1565 #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
1566 #else
1567 #define __Pyx_RefNannyDeclarations
1568 #define __Pyx_RefNannySetupContext(name, acquire_gil)
1569 #define __Pyx_RefNannyFinishContextNogil()
1570 #define __Pyx_RefNannyFinishContext()
1571 #define __Pyx_INCREF(r) Py_INCREF(r)
1572 #define __Pyx_DECREF(r) Py_DECREF(r)
1573 #define __Pyx_GOTREF(r)
1574 #define __Pyx_GIVEREF(r)
1575 #define __Pyx_XINCREF(r) Py_XINCREF(r)
1576 #define __Pyx_XDECREF(r) Py_XDECREF(r)
1577 #define __Pyx_XGOTREF(r)
1578 #define __Pyx_XGIVEREF(r)
1579 #endif
1580 #define __Pyx_Py_XDECREF_SET(r, v) do {\
1581 PyObject *tmp = (PyObject *) r;\
1582 r = v; Py_XDECREF(tmp);\
1583 } while (0)
1584 #define __Pyx_XDECREF_SET(r, v) do {\
1585 PyObject *tmp = (PyObject *) r;\
1586 r = v; __Pyx_XDECREF(tmp);\
1587 } while (0)
1588 #define __Pyx_DECREF_SET(r, v) do {\
1589 PyObject *tmp = (PyObject *) r;\
1590 r = v; __Pyx_DECREF(tmp);\
1591 } while (0)
1592 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1593 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1594
1595 /* PyErrExceptionMatches.proto */
1596 #if CYTHON_FAST_THREAD_STATE
1597 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1598 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1599 #else
1600 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1601 #endif
1602
1603 /* PyThreadStateGet.proto */
1604 #if CYTHON_FAST_THREAD_STATE
1605 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1606 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1607 #if PY_VERSION_HEX >= 0x030C00A6
1608 #define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL)
1609 #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
1610 #else
1611 #define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL)
1612 #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type)
1613 #endif
1614 #else
1615 #define __Pyx_PyThreadState_declare
1616 #define __Pyx_PyThreadState_assign
1617 #define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL)
1618 #define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred()
1619 #endif
1620
1621 /* PyErrFetchRestore.proto */
1622 #if CYTHON_FAST_THREAD_STATE
1623 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1624 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1625 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1626 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1627 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1628 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1629 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1630 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
1631 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1632 #else
1633 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1634 #endif
1635 #else
1636 #define __Pyx_PyErr_Clear() PyErr_Clear()
1637 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1638 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1639 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1640 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1641 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1642 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1643 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1644 #endif
1645
1646 /* PyObjectGetAttrStr.proto */
1647 #if CYTHON_USE_TYPE_SLOTS
1648 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1649 #else
1650 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1651 #endif
1652
1653 /* PyObjectGetAttrStrNoError.proto */
1654 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
1655
1656 /* GetBuiltinName.proto */
1657 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1658
1659 /* TupleAndListFromArray.proto */
1660 #if CYTHON_COMPILING_IN_CPYTHON
1661 static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
1662 static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
1663 #endif
1664
1665 /* IncludeStringH.proto */
1666 #include <string.h>
1667
1668 /* BytesEquals.proto */
1669 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1670
1671 /* UnicodeEquals.proto */
1672 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1673
1674 /* fastcall.proto */
1675 #if CYTHON_AVOID_BORROWED_REFS
1676 #define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i)
1677 #elif CYTHON_ASSUME_SAFE_MACROS
1678 #define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i)
1679 #else
1680 #define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i)
1681 #endif
1682 #if CYTHON_AVOID_BORROWED_REFS
1683 #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg)
1684 #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg)
1685 #else
1686 #define __Pyx_Arg_NewRef_VARARGS(arg) arg
1687 #define __Pyx_Arg_XDECREF_VARARGS(arg)
1688 #endif
1689 #define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
1690 #define __Pyx_KwValues_VARARGS(args, nargs) NULL
1691 #define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
1692 #define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
1693 #if CYTHON_METH_FASTCALL
1694 #define __Pyx_Arg_FASTCALL(args, i) args[i]
1695 #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds)
1696 #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
1697 static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
1698 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
1699 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
1700 #else
1701 #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
1702 #endif
1703 #define __Pyx_Arg_NewRef_FASTCALL(arg) arg /* no-op, __Pyx_Arg_FASTCALL is direct and this needs
1704 to have the same reference counting */
1705 #define __Pyx_Arg_XDECREF_FASTCALL(arg)
1706 #else
1707 #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS
1708 #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
1709 #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
1710 #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
1711 #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
1712 #define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg)
1713 #define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg)
1714 #endif
1715 #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
1716 #define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start)
1717 #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start)
1718 #else
1719 #define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
1720 #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
1721 #endif
1722
1723 /* RaiseDoubleKeywords.proto */
1724 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1725
1726 /* ParseKeywords.proto */
1727 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues,
1728 PyObject **argnames[],
1729 PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,
1730 const char* function_name);
1731
1732 /* RaiseArgTupleInvalid.proto */
1733 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1734 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1735
1736 /* KeywordStringCheck.proto */
1737 static int __Pyx_CheckKeywordStrings(PyObject *kw, const char* function_name, int kw_allowed);
1738
1739 /* ListAppend.proto */
1740 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
1741 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
1742 PyListObject* L = (PyListObject*) list;
1743 Py_ssize_t len = Py_SIZE(list);
1744 if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
1745 Py_INCREF(x);
1746 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
1747 L->ob_item[len] = x;
1748 #else
1749 PyList_SET_ITEM(list, len, x);
1750 #endif
1751 __Pyx_SET_SIZE(list, len + 1);
1752 return 0;
1753 }
1754 return PyList_Append(list, x);
1755 }
1756 #else
1757 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
1758 #endif
1759
1760 /* PyDictVersioning.proto */
1761 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1762 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
1763 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
1764 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1765 (version_var) = __PYX_GET_DICT_VERSION(dict);\
1766 (cache_var) = (value);
1767 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1768 static PY_UINT64_T __pyx_dict_version = 0;\
1769 static PyObject *__pyx_dict_cached_value = NULL;\
1770 if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1771 (VAR) = __pyx_dict_cached_value;\
1772 } else {\
1773 (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1774 __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1775 }\
1776 }
1777 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1778 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1779 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1780 #else
1781 #define __PYX_GET_DICT_VERSION(dict) (0)
1782 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1783 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
1784 #endif
1785
1786 /* GetModuleGlobalName.proto */
1787 #if CYTHON_USE_DICT_VERSIONS
1788 #define __Pyx_GetModuleGlobalName(var, name) do {\
1789 static PY_UINT64_T __pyx_dict_version = 0;\
1790 static PyObject *__pyx_dict_cached_value = NULL;\
1791 (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1792 (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1793 __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1794 } while(0)
1795 #define __Pyx_GetModuleGlobalNameUncached(var, name) do {\
1796 PY_UINT64_T __pyx_dict_version;\
1797 PyObject *__pyx_dict_cached_value;\
1798 (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1799 } while(0)
1800 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1801 #else
1802 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1803 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1804 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1805 #endif
1806
1807 /* RaiseException.proto */
1808 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1809
1810 /* PyFunctionFastCall.proto */
1811 #if CYTHON_FAST_PYCALL
1812 #if !CYTHON_VECTORCALL
1813 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1814 __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1815 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
1816 #endif
1817 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1818 (sizeof(char [1 - 2*!(cond)]) - 1)
1819 #ifndef Py_MEMBER_SIZE
1820 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1821 #endif
1822 #if !CYTHON_VECTORCALL
1823 #if PY_VERSION_HEX >= 0x03080000
1824 #include "frameobject.h"
1825 #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
1826 #ifndef Py_BUILD_CORE
1827 #define Py_BUILD_CORE 1
1828 #endif
1829 #include "internal/pycore_frame.h"
1830 #endif
1831 #define __Pxy_PyFrame_Initialize_Offsets()
1832 #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus)
1833 #else
1834 static size_t __pyx_pyframe_localsplus_offset = 0;
1835 #include "frameobject.h"
1836 #define __Pxy_PyFrame_Initialize_Offsets()\
1837 ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1838 (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1839 #define __Pyx_PyFrame_GetLocalsplus(frame)\
1840 (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1841 #endif
1842 #endif
1843 #endif
1844
1845 /* PyObjectCall.proto */
1846 #if CYTHON_COMPILING_IN_CPYTHON
1847 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1848 #else
1849 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1850 #endif
1851
1852 /* PyObjectCallMethO.proto */
1853 #if CYTHON_COMPILING_IN_CPYTHON
1854 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1855 #endif
1856
1857 /* PyObjectFastCall.proto */
1858 #define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
1859 static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs);
1860
1861 /* PyObjectCallOneArg.proto */
1862 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1863
1864 /* ArgTypeTest.proto */
1865 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1866 ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1867 __Pyx__ArgTypeTest(obj, type, name, exact))
1868 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1869
1870 /* GetException.proto */
1871 #if CYTHON_FAST_THREAD_STATE
1872 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1873 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1874 #else
1875 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1876 #endif
1877
1878 /* SwapException.proto */
1879 #if CYTHON_FAST_THREAD_STATE
1880 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
1881 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1882 #else
1883 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
1884 #endif
1885
1886 /* GetTopmostException.proto */
1887 #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
1888 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1889 #endif
1890
1891 /* SaveResetException.proto */
1892 #if CYTHON_FAST_THREAD_STATE
1893 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1894 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1895 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1896 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1897 #else
1898 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1899 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1900 #endif
1901
1902 /* IncludeStructmemberH.proto */
1903 #include <structmember.h>
1904
1905 /* FixUpExtensionType.proto */
1906 #if CYTHON_USE_TYPE_SPECS
1907 static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);
1908 #endif
1909
1910 /* PyObjectCallNoArg.proto */
1911 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1912
1913 /* PyObjectGetMethod.proto */
1914 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
1915
1916 /* PyObjectCallMethod0.proto */
1917 static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);
1918
1919 /* ValidateBasesTuple.proto */
1920 #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
1921 static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases);
1922 #endif
1923
1924 /* PyType_Ready.proto */
1925 CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t);
1926
1927 /* PyObject_GenericGetAttrNoDict.proto */
1928 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1929 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
1930 #else
1931 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
1932 #endif
1933
1934 /* PyObject_GenericGetAttr.proto */
1935 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1936 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
1937 #else
1938 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
1939 #endif
1940
1941 /* SetupReduce.proto */
1942 #if !CYTHON_COMPILING_IN_LIMITED_API
1943 static int __Pyx_setup_reduce(PyObject* type_obj);
1944 #endif
1945
1946 /* Py3UpdateBases.proto */
1947 static PyObject* __Pyx_PEP560_update_bases(PyObject *bases);
1948
1949 /* CalculateMetaclass.proto */
1950 static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
1951
1952 /* PyObjectCall2Args.proto */
1953 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1954
1955 /* PyObjectLookupSpecial.proto */
1956 #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
1957 #define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0)
1958 #define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1)
1959 static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error);
1960 #else
1961 #define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n)
1962 #define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
1963 #endif
1964
1965 /* Py3ClassCreate.proto */
1966 static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
1967 PyObject *mkw, PyObject *modname, PyObject *doc);
1968 static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
1969 PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);
1970
1971 /* FetchSharedCythonModule.proto */
1972 static PyObject *__Pyx_FetchSharedCythonABIModule(void);
1973
1974 /* FetchCommonType.proto */
1975 #if !CYTHON_USE_TYPE_SPECS
1976 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
1977 #else
1978 static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases);
1979 #endif
1980
1981 /* PyMethodNew.proto */
1982 #if CYTHON_COMPILING_IN_LIMITED_API
1983 static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
1984 PyObject *typesModule=NULL, *methodType=NULL, *result=NULL;
1985 CYTHON_UNUSED_VAR(typ);
1986 if (!self)
1987 return __Pyx_NewRef(func);
1988 typesModule = PyImport_ImportModule("types");
1989 if (!typesModule) return NULL;
1990 methodType = PyObject_GetAttrString(typesModule, "MethodType");
1991 Py_DECREF(typesModule);
1992 if (!methodType) return NULL;
1993 result = PyObject_CallFunctionObjArgs(methodType, func, self, NULL);
1994 Py_DECREF(methodType);
1995 return result;
1996 }
1997 #elif PY_MAJOR_VERSION >= 3
1998 static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
1999 CYTHON_UNUSED_VAR(typ);
2000 if (!self)
2001 return __Pyx_NewRef(func);
2002 return PyMethod_New(func, self);
2003 }
2004 #else
2005 #define __Pyx_PyMethod_New PyMethod_New
2006 #endif
2007
2008 /* PyVectorcallFastCallDict.proto */
2009 #if CYTHON_METH_FASTCALL
2010 static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
2011 #endif
2012
2013 /* CythonFunctionShared.proto */
2014 #define __Pyx_CyFunction_USED
2015 #define __Pyx_CYFUNCTION_STATICMETHOD 0x01
2016 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
2017 #define __Pyx_CYFUNCTION_CCLASS 0x04
2018 #define __Pyx_CYFUNCTION_COROUTINE 0x08
2019 #define __Pyx_CyFunction_GetClosure(f)\
2020 (((__pyx_CyFunctionObject *) (f))->func_closure)
2021 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
2022 #define __Pyx_CyFunction_GetClassObj(f)\
2023 (((__pyx_CyFunctionObject *) (f))->func_classobj)
2024 #else
2025 #define __Pyx_CyFunction_GetClassObj(f)\
2026 ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
2027 #endif
2028 #define __Pyx_CyFunction_SetClassObj(f, classobj)\
2029 __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj))
2030 #define __Pyx_CyFunction_Defaults(type, f)\
2031 ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
2032 #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
2033 ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
2034 typedef struct {
2035 #if CYTHON_COMPILING_IN_LIMITED_API
2036 PyObject_HEAD
2037 PyObject *func;
2038 #elif PY_VERSION_HEX < 0x030900B1
2039 PyCFunctionObject func;
2040 #else
2041 PyCMethodObject func;
2042 #endif
2043 #if CYTHON_BACKPORT_VECTORCALL
2044 __pyx_vectorcallfunc func_vectorcall;
2045 #endif
2046 #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
2047 PyObject *func_weakreflist;
2048 #endif
2049 PyObject *func_dict;
2050 PyObject *func_name;
2051 PyObject *func_qualname;
2052 PyObject *func_doc;
2053 PyObject *func_globals;
2054 PyObject *func_code;
2055 PyObject *func_closure;
2056 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
2057 PyObject *func_classobj;
2058 #endif
2059 void *defaults;
2060 int defaults_pyobjects;
2061 size_t defaults_size;
2062 int flags;
2063 PyObject *defaults_tuple;
2064 PyObject *defaults_kwdict;
2065 PyObject *(*defaults_getter)(PyObject *);
2066 PyObject *func_annotations;
2067 PyObject *func_is_coroutine;
2068 } __pyx_CyFunctionObject;
2069 #undef __Pyx_CyOrPyCFunction_Check
2070 #define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_CyFunctionType)
2071 #define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type)
2072 #define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_CyFunctionType)
2073 static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc);
2074 #undef __Pyx_IsSameCFunction
2075 #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc)
2076 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
2077 int flags, PyObject* qualname,
2078 PyObject *closure,
2079 PyObject *module, PyObject *globals,
2080 PyObject* code);
2081 static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
2082 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
2083 size_t size,
2084 int pyobjects);
2085 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
2086 PyObject *tuple);
2087 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
2088 PyObject *dict);
2089 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
2090 PyObject *dict);
2091 static int __pyx_CyFunction_init(PyObject *module);
2092 #if CYTHON_METH_FASTCALL
2093 static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
2094 static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
2095 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
2096 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
2097 #if CYTHON_BACKPORT_VECTORCALL
2098 #define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
2099 #else
2100 #define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
2101 #endif
2102 #endif
2103
2104 /* CythonFunction.proto */
2105 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
2106 int flags, PyObject* qualname,
2107 PyObject *closure,
2108 PyObject *module, PyObject *globals,
2109 PyObject* code);
2110
2111 /* CLineInTraceback.proto */
2112 #ifdef CYTHON_CLINE_IN_TRACEBACK
2113 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
2114 #else
2115 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
2116 #endif
2117
2118 /* CodeObjectCache.proto */
2119 #if !CYTHON_COMPILING_IN_LIMITED_API
2120 typedef struct {
2121 PyCodeObject* code_object;
2122 int code_line;
2123 } __Pyx_CodeObjectCacheEntry;
2124 struct __Pyx_CodeObjectCache {
2125 int count;
2126 int max_count;
2127 __Pyx_CodeObjectCacheEntry* entries;
2128 };
2129 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
2130 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
2131 static PyCodeObject *__pyx_find_code_object(int code_line);
2132 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
2133 #endif
2134
2135 /* AddTraceback.proto */
2136 static void __Pyx_AddTraceback(const char *funcname, int c_line,
2137 int py_line, const char *filename);
2138
2139 /* GCCDiagnostics.proto */
2140 #if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
2141 #define __Pyx_HAS_GCC_DIAGNOSTIC
2142 #endif
2143
2144 /* CIntToPy.proto */
2145 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__recode_symbol_type(enum recode_symbol_type value);
2146
2147 /* CIntToPy.proto */
2148 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__recode_data_type(enum recode_data_type value);
2149
2150 /* CIntToPy.proto */
2151 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__recode_size(enum recode_size value);
2152
2153 /* CIntToPy.proto */
2154 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__recode_step_type(enum recode_step_type value);
2155
2156 /* CIntToPy.proto */
2157 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__recode_swap_input(enum recode_swap_input value);
2158
2159 /* CIntToPy.proto */
2160 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__recode_error(enum recode_error value);
2161
2162 /* CIntToPy.proto */
2163 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__recode_list_format(enum recode_list_format value);
2164
2165 /* CIntToPy.proto */
2166 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__recode_programming_language(enum recode_programming_language value);
2167
2168 /* CIntToPy.proto */
2169 static CYTHON_INLINE PyObject* __Pyx_PyInt_From___pyx_anon_enum(int value);
2170
2171 /* CIntToPy.proto */
2172 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__alias_find_type(enum alias_find_type value);
2173
2174 /* CIntFromPy.proto */
2175 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
2176
2177 /* CIntFromPy.proto */
2178 static CYTHON_INLINE enum recode_list_format __Pyx_PyInt_As_enum__recode_list_format(PyObject *);
2179
2180 /* CIntFromPy.proto */
2181 static CYTHON_INLINE enum recode_error __Pyx_PyInt_As_enum__recode_error(PyObject *);
2182
2183 /* FormatTypeName.proto */
2184 #if CYTHON_COMPILING_IN_LIMITED_API
2185 typedef PyObject *__Pyx_TypeName;
2186 #define __Pyx_FMT_TYPENAME "%U"
2187 static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp);
2188 #define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
2189 #else
2190 typedef const char *__Pyx_TypeName;
2191 #define __Pyx_FMT_TYPENAME "%.200s"
2192 #define __Pyx_PyType_GetName(tp) ((tp)->tp_name)
2193 #define __Pyx_DECREF_TypeName(obj)
2194 #endif
2195
2196 /* CIntToPy.proto */
2197 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
2198
2199 /* CIntFromPy.proto */
2200 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
2201
2202 /* FastTypeChecks.proto */
2203 #if CYTHON_COMPILING_IN_CPYTHON
2204 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
2205 #define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
2206 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
2207 static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
2208 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
2209 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
2210 #else
2211 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
2212 #define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
2213 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
2214 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
2215 #endif
2216 #define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
2217 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
2218
2219 /* CheckBinaryVersion.proto */
2220 static unsigned long __Pyx_get_runtime_version(void);
2221 static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);
2222
2223 /* InitStrings.proto */
2224 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
2225
2226 /* #### Code section: module_declarations ### */
2227
2228 /* Module declarations from "libcpp" */
2229
2230 /* Module declarations from "libc.string" */
2231
2232 /* Module declarations from "libc.stdlib" */
2233
2234 /* Module declarations from "libc.stdio" */
2235
2236 /* Module declarations from "Recode" */
2237 /* #### Code section: typeinfo ### */
2238 /* #### Code section: before_global_var ### */
2239 #define __Pyx_MODULE_NAME "Recode"
2240 extern int __pyx_module_is_main_Recode;
2241 int __pyx_module_is_main_Recode = 0;
2242
2243 /* Implementation of "Recode" */
2244 /* #### Code section: global_var ### */
2245 static PyObject *__pyx_builtin_TypeError;
2246 /* #### Code section: string_decls ### */
2247 static const char __pyx_k_gc[] = "gc";
2248 static const char __pyx_k_ok[] = "ok";
2249 static const char __pyx_k_NUL[] = "NUL";
2250 static const char __pyx_k__41[] = "?";
2251 static const char __pyx_k_doc[] = "__doc__";
2252 static const char __pyx_k_Task[] = "Task";
2253 static const char __pyx_k_dict[] = "__dict__";
2254 static const char __pyx_k_flag[] = "flag";
2255 static const char __pyx_k_list[] = "list";
2256 static const char __pyx_k_main[] = "__main__";
2257 static const char __pyx_k_name[] = "__name__";
2258 static const char __pyx_k_scan[] = "scan";
2259 static const char __pyx_k_self[] = "self";
2260 static const char __pyx_k_step[] = "step";
2261 static const char __pyx_k_test[] = "__test__";
2262 static const char __pyx_k_text[] = "text";
2263 static const char __pyx_k_Outer[] = "Outer";
2264 static const char __pyx_k_error[] = "error";
2265 static const char __pyx_k_iconv[] = "iconv";
2266 static const char __pyx_k_input[] = "input";
2267 static const char __pyx_k_outer[] = "outer";
2268 static const char __pyx_k_saved[] = "saved";
2269 static const char __pyx_k_super[] = "super";
2270 static const char __pyx_k_xDONE[] = "xDONE";
2271 static const char __pyx_k_xELSE[] = "xELSE";
2272 static const char __pyx_k_Recode[] = "Recode";
2273 static const char __pyx_k_SIZE_1[] = "SIZE_1";
2274 static const char __pyx_k_SIZE_2[] = "SIZE_2";
2275 static const char __pyx_k_SIZE_4[] = "SIZE_4";
2276 static const char __pyx_k_SIZE_N[] = "SIZE_N";
2277 static const char __pyx_k_enable[] = "enable";
2278 static const char __pyx_k_format[] = "format";
2279 static const char __pyx_k_module[] = "__module__";
2280 static const char __pyx_k_output[] = "output";
2281 static const char __pyx_k_recode[] = "recode";
2282 static const char __pyx_k_reduce[] = "__reduce__";
2283 static const char __pyx_k_result[] = "result";
2284 static const char __pyx_k_strict[] = "strict";
2285 static const char __pyx_k_string[] = "string";
2286 static const char __pyx_k_symbol[] = "symbol";
2287 static const char __pyx_k_CHARSET[] = "CHARSET";
2288 static const char __pyx_k_Request[] = "Request";
2289 static const char __pyx_k_SWAP_NO[] = "SWAP_NO";
2290 static const char __pyx_k_charset[] = "charset";
2291 static const char __pyx_k_command[] = "command";
2292 static const char __pyx_k_counter[] = "counter";
2293 static const char __pyx_k_disable[] = "disable";
2294 static const char __pyx_k_perform[] = "perform";
2295 static const char __pyx_k_prepare[] = "__prepare__";
2296 static const char __pyx_k_request[] = "request";
2297 static const char __pyx_k_verbose[] = "verbose";
2298 static const char __pyx_k_NO_ERROR[] = "NO_ERROR";
2299 static const char __pyx_k_SWAP_YES[] = "SWAP_YES";
2300 static const char __pyx_k_getstate[] = "__getstate__";
2301 static const char __pyx_k_language[] = "language";
2302 static const char __pyx_k_previous[] = "previous";
2303 static const char __pyx_k_qualname[] = "__qualname__";
2304 static const char __pyx_k_set_name[] = "__set_name__";
2305 static const char __pyx_k_setstate[] = "__setstate__";
2306 static const char __pyx_k_NO_FORMAT[] = "NO_FORMAT";
2307 static const char __pyx_k_TypeError[] = "TypeError";
2308 static const char __pyx_k_get_error[] = "get_error";
2309 static const char __pyx_k_input_len[] = "input_len";
2310 static const char __pyx_k_isenabled[] = "isenabled";
2311 static const char __pyx_k_metaclass[] = "__metaclass__";
2312 static const char __pyx_k_py_string[] = "py_string";
2313 static const char __pyx_k_pyx_state[] = "__pyx_state";
2314 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
2315 static const char __pyx_k_set_input[] = "set_input";
2316 static const char __pyx_k_LANGUAGE_C[] = "LANGUAGE_C";
2317 static const char __pyx_k_Recode_pyx[] = "Recode.pyx";
2318 static const char __pyx_k_STRIP_DATA[] = "STRIP_DATA";
2319 static const char __pyx_k_STRIP_SIZE[] = "STRIP_SIZE";
2320 static const char __pyx_k_USER_ERROR[] = "USER_ERROR";
2321 static const char __pyx_k_auto_abort[] = "auto_abort";
2322 static const char __pyx_k_fail_level[] = "fail_level";
2323 static const char __pyx_k_get_output[] = "get_output";
2324 static const char __pyx_k_output_len[] = "output_len";
2325 static const char __pyx_k_FULL_FORMAT[] = "FULL_FORMAT";
2326 static const char __pyx_k_NO_LANGUAGE[] = "NO_LANGUAGE";
2327 static const char __pyx_k_abort_level[] = "abort_level";
2328 static const char __pyx_k_mro_entries[] = "__mro_entries__";
2329 static const char __pyx_k_set_verbose[] = "set_verbose";
2330 static const char __pyx_k_BYTE_TO_BYTE[] = "BYTE_TO_BYTE";
2331 static const char __pyx_k_COMBINE_STEP[] = "COMBINE_STEP";
2332 static const char __pyx_k_DATA_SURFACE[] = "DATA_SURFACE";
2333 static const char __pyx_k_EXPLODE_DATA[] = "EXPLODE_DATA";
2334 static const char __pyx_k_EXPLODE_STEP[] = "EXPLODE_STEP";
2335 static const char __pyx_k_OCTAL_FORMAT[] = "OCTAL_FORMAT";
2336 static const char __pyx_k_Outer_recode[] = "Outer.recode";
2337 static const char __pyx_k_Request_scan[] = "Request.scan";
2338 static const char __pyx_k_SYSTEM_ERROR[] = "SYSTEM_ERROR";
2339 static const char __pyx_k_Task_perform[] = "Task.perform";
2340 static const char __pyx_k_UCS2_TO_BYTE[] = "UCS2_TO_BYTE";
2341 static const char __pyx_k_all_charsets[] = "all_charsets";
2342 static const char __pyx_k_all_surfaces[] = "all_surfaces";
2343 static const char __pyx_k_format_table[] = "format_table";
2344 static const char __pyx_k_full_charset[] = "full_charset";
2345 static const char __pyx_k_is_coroutine[] = "_is_coroutine";
2346 static const char __pyx_k_stringsource[] = "<stringsource>";
2347 static const char __pyx_k_INVALID_INPUT[] = "INVALID_INPUT";
2348 static const char __pyx_k_LANGUAGE_PERL[] = "LANGUAGE_PERL";
2349 static const char __pyx_k_MAXIMUM_ERROR[] = "MAXIMUM_ERROR";
2350 static const char __pyx_k_NOT_CANONICAL[] = "NOT_CANONICAL";
2351 static const char __pyx_k_NO_ICONV_FLAG[] = "NO_ICONV_FLAG";
2352 static const char __pyx_k_NO_STEP_TABLE[] = "NO_STEP_TABLE";
2353 static const char __pyx_k_init_subclass[] = "__init_subclass__";
2354 static const char __pyx_k_pair_sequence[] = "pair_sequence";
2355 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
2356 static const char __pyx_k_BYTE_TO_STRING[] = "BYTE_TO_STRING";
2357 static const char __pyx_k_DECIMAL_FORMAT[] = "DECIMAL_FORMAT";
2358 static const char __pyx_k_INTERNAL_ERROR[] = "INTERNAL_ERROR";
2359 static const char __pyx_k_NO_SYMBOL_TYPE[] = "NO_SYMBOL_TYPE";
2360 static const char __pyx_k_Request_string[] = "Request.string";
2361 static const char __pyx_k_STRING_TO_UCS2[] = "STRING_TO_UCS2";
2362 static const char __pyx_k_SWAP_UNDECIDED[] = "SWAP_UNDECIDED";
2363 static const char __pyx_k_Task_get_error[] = "Task.get_error";
2364 static const char __pyx_k_Task_set_input[] = "Task.set_input";
2365 static const char __pyx_k_UCS2_TO_STRING[] = "UCS2_TO_STRING";
2366 static const char __pyx_k_UNTRANSLATABLE[] = "UNTRANSLATABLE";
2367 static const char __pyx_k_set_fail_level[] = "set_fail_level";
2368 static const char __pyx_k_AUTO_ABORT_FLAG[] = "AUTO_ABORT_FLAG";
2369 static const char __pyx_k_BYTE_ORDER_MARK[] = "BYTE_ORDER_MARK";
2370 static const char __pyx_k_COMBINE_EXPLODE[] = "COMBINE_EXPLODE";
2371 static const char __pyx_k_NOT_A_CHARACTER[] = "NOT_A_CHARACTER";
2372 static const char __pyx_k_NO_CHARSET_DATA[] = "NO_CHARSET_DATA";
2373 static const char __pyx_k_Task_get_output[] = "Task.get_output";
2374 static const char __pyx_k_concise_charset[] = "concise_charset";
2375 static const char __pyx_k_default_charset[] = "default_charset";
2376 static const char __pyx_k_set_abort_level[] = "set_abort_level";
2377 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
2378 static const char __pyx_k_AMBIGUOUS_OUTPUT[] = "AMBIGUOUS_OUTPUT";
2379 static const char __pyx_k_output_allocated[] = "output_allocated";
2380 static const char __pyx_k_HEXADECIMAL_FORMAT[] = "HEXADECIMAL_FORMAT";
2381 static const char __pyx_k_Outer_all_charsets[] = "Outer.all_charsets";
2382 static const char __pyx_k_Outer_all_surfaces[] = "Outer.all_surfaces";
2383 static const char __pyx_k_Outer_full_charset[] = "Outer.full_charset";
2384 static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
2385 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
2386 static const char __pyx_k_Request_set_verbose[] = "Request.set_verbose";
2387 static const char __pyx_k_STRICT_MAPPING_FLAG[] = "STRICT_MAPPING_FLAG";
2388 static const char __pyx_k_Task_set_fail_level[] = "Task.set_fail_level";
2389 static const char __pyx_k_set_byte_order_mark[] = "set_byte_order_mark";
2390 static const char __pyx_k_ALIAS_FIND_AS_EITHER[] = "ALIAS_FIND_AS_EITHER";
2391 static const char __pyx_k_Request_format_table[] = "Request.format_table";
2392 static const char __pyx_k_Task___reduce_cython[] = "Task.__reduce_cython__";
2393 static const char __pyx_k_Task_set_abort_level[] = "Task.set_abort_level";
2394 static const char __pyx_k_ALIAS_FIND_AS_CHARSET[] = "ALIAS_FIND_AS_CHARSET";
2395 static const char __pyx_k_ALIAS_FIND_AS_SURFACE[] = "ALIAS_FIND_AS_SURFACE";
2396 static const char __pyx_k_Outer___reduce_cython[] = "Outer.__reduce_cython__";
2397 static const char __pyx_k_Outer_concise_charset[] = "Outer.concise_charset";
2398 static const char __pyx_k_Outer_default_charset[] = "Outer.default_charset";
2399 static const char __pyx_k_REPLACEMENT_CHARACTER[] = "REPLACEMENT_CHARACTER";
2400 static const char __pyx_k_Request_pair_sequence[] = "Request.pair_sequence";
2401 static const char __pyx_k_SYMBOL_CREATE_CHARSET[] = "SYMBOL_CREATE_CHARSET";
2402 static const char __pyx_k_Task___setstate_cython[] = "Task.__setstate_cython__";
2403 static const char __pyx_k_BYTE_ORDER_MARK_SWAPPED[] = "BYTE_ORDER_MARK_SWAPPED";
2404 static const char __pyx_k_Outer___setstate_cython[] = "Outer.__setstate_cython__";
2405 static const char __pyx_k_Request___reduce_cython[] = "Request.__reduce_cython__";
2406 static const char __pyx_k_Task_set_byte_order_mark[] = "Task.set_byte_order_mark";
2407 static const char __pyx_k_Request___setstate_cython[] = "Request.__setstate_cython__";
2408 static const char __pyx_k_SYMBOL_CREATE_DATA_SURFACE[] = "SYMBOL_CREATE_DATA_SURFACE";
2409 static const char __pyx_k_self_outer_cannot_be_converted_t[] = "self.outer cannot be converted to a Python object for pickling";
2410 static const char __pyx_k_self_request_cannot_be_converted[] = "self.request cannot be converted to a Python object for pickling";
2411 static const char __pyx_k_self_task_cannot_be_converted_to[] = "self.task cannot be converted to a Python object for pickling";
2412 /* #### Code section: decls ### */
2413 static int __pyx_pf_6Recode_5Outer___init__(struct __pyx_obj_6Recode_Outer *__pyx_v_self, PyObject *__pyx_v_auto_abort, PyObject *__pyx_v_iconv, PyObject *__pyx_v_strict); /* proto */
2414 static void __pyx_pf_6Recode_5Outer_2__dealloc__(struct __pyx_obj_6Recode_Outer *__pyx_v_self); /* proto */
2415 static PyObject *__pyx_pf_6Recode_5Outer_4default_charset(CYTHON_UNUSED struct __pyx_obj_6Recode_Outer *__pyx_v_self); /* proto */
2416 static PyObject *__pyx_pf_6Recode_5Outer_6all_charsets(struct __pyx_obj_6Recode_Outer *__pyx_v_self); /* proto */
2417 static PyObject *__pyx_pf_6Recode_5Outer_8all_surfaces(struct __pyx_obj_6Recode_Outer *__pyx_v_self); /* proto */
2418 static PyObject *__pyx_pf_6Recode_5Outer_10concise_charset(struct __pyx_obj_6Recode_Outer *__pyx_v_self, PyObject *__pyx_v_format); /* proto */
2419 static PyObject *__pyx_pf_6Recode_5Outer_12full_charset(struct __pyx_obj_6Recode_Outer *__pyx_v_self); /* proto */
2420 static PyObject *__pyx_pf_6Recode_5Outer_14recode(struct __pyx_obj_6Recode_Outer *__pyx_v_self, char *__pyx_v_command, char *__pyx_v_input, PyObject *__pyx_v_verbose); /* proto */
2421 static PyObject *__pyx_pf_6Recode_5Outer_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6Recode_Outer *__pyx_v_self); /* proto */
2422 static PyObject *__pyx_pf_6Recode_5Outer_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6Recode_Outer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2423 static int __pyx_pf_6Recode_7Request___init__(struct __pyx_obj_6Recode_Request *__pyx_v_self, struct __pyx_obj_6Recode_Outer *__pyx_v_outer); /* proto */
2424 static void __pyx_pf_6Recode_7Request_2__dealloc__(struct __pyx_obj_6Recode_Request *__pyx_v_self); /* proto */
2425 static PyObject *__pyx_pf_6Recode_7Request_4set_verbose(struct __pyx_obj_6Recode_Request *__pyx_v_self, PyObject *__pyx_v_flag); /* proto */
2426 static PyObject *__pyx_pf_6Recode_7Request_6scan(struct __pyx_obj_6Recode_Request *__pyx_v_self, char *__pyx_v_text); /* proto */
2427 static PyObject *__pyx_pf_6Recode_7Request_8pair_sequence(struct __pyx_obj_6Recode_Request *__pyx_v_self); /* proto */
2428 static PyObject *__pyx_pf_6Recode_7Request_10format_table(struct __pyx_obj_6Recode_Request *__pyx_v_self, int __pyx_v_language, char *__pyx_v_charset); /* proto */
2429 static PyObject *__pyx_pf_6Recode_7Request_12string(struct __pyx_obj_6Recode_Request *__pyx_v_self, PyObject *__pyx_v_text); /* proto */
2430 static PyObject *__pyx_pf_6Recode_7Request_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6Recode_Request *__pyx_v_self); /* proto */
2431 static PyObject *__pyx_pf_6Recode_7Request_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6Recode_Request *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2432 static int __pyx_pf_6Recode_4Task___init__(struct __pyx_obj_6Recode_Task *__pyx_v_self, struct __pyx_obj_6Recode_Request *__pyx_v_request); /* proto */
2433 static void __pyx_pf_6Recode_4Task_2__dealloc__(struct __pyx_obj_6Recode_Task *__pyx_v_self); /* proto */
2434 static PyObject *__pyx_pf_6Recode_4Task_4set_byte_order_mark(struct __pyx_obj_6Recode_Task *__pyx_v_self, PyObject *__pyx_v_flag); /* proto */
2435 static PyObject *__pyx_pf_6Recode_4Task_6get_error(struct __pyx_obj_6Recode_Task *__pyx_v_self); /* proto */
2436 static PyObject *__pyx_pf_6Recode_4Task_8set_fail_level(struct __pyx_obj_6Recode_Task *__pyx_v_self, PyObject *__pyx_v_fail_level); /* proto */
2437 static PyObject *__pyx_pf_6Recode_4Task_10set_abort_level(struct __pyx_obj_6Recode_Task *__pyx_v_self, PyObject *__pyx_v_abort_level); /* proto */
2438 static PyObject *__pyx_pf_6Recode_4Task_12set_input(struct __pyx_obj_6Recode_Task *__pyx_v_self, PyObject *__pyx_v_text); /* proto */
2439 static PyObject *__pyx_pf_6Recode_4Task_14get_output(struct __pyx_obj_6Recode_Task *__pyx_v_self); /* proto */
2440 static PyObject *__pyx_pf_6Recode_4Task_16perform(struct __pyx_obj_6Recode_Task *__pyx_v_self); /* proto */
2441 static PyObject *__pyx_pf_6Recode_4Task_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6Recode_Task *__pyx_v_self); /* proto */
2442 static PyObject *__pyx_pf_6Recode_4Task_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6Recode_Task *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2443 static PyObject *__pyx_tp_new_6Recode_Outer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2444 static PyObject *__pyx_tp_new_6Recode_Request(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2445 static PyObject *__pyx_tp_new_6Recode_Task(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2446 /* #### Code section: late_includes ### */
2447 /* #### Code section: module_state ### */
2448 typedef struct {
2449 PyObject *__pyx_d;
2450 PyObject *__pyx_b;
2451 PyObject *__pyx_cython_runtime;
2452 PyObject *__pyx_empty_tuple;
2453 PyObject *__pyx_empty_bytes;
2454 PyObject *__pyx_empty_unicode;
2455 #ifdef __Pyx_CyFunction_USED
2456 PyTypeObject *__pyx_CyFunctionType;
2457 #endif
2458 #ifdef __Pyx_FusedFunction_USED
2459 PyTypeObject *__pyx_FusedFunctionType;
2460 #endif
2461 #ifdef __Pyx_Generator_USED
2462 PyTypeObject *__pyx_GeneratorType;
2463 #endif
2464 #ifdef __Pyx_IterableCoroutine_USED
2465 PyTypeObject *__pyx_IterableCoroutineType;
2466 #endif
2467 #ifdef __Pyx_Coroutine_USED
2468 PyTypeObject *__pyx_CoroutineAwaitType;
2469 #endif
2470 #ifdef __Pyx_Coroutine_USED
2471 PyTypeObject *__pyx_CoroutineType;
2472 #endif
2473 #if CYTHON_USE_MODULE_STATE
2474 #endif
2475 #if CYTHON_USE_MODULE_STATE
2476 #endif
2477 #if CYTHON_USE_MODULE_STATE
2478 #endif
2479 #if CYTHON_USE_MODULE_STATE
2480 #endif
2481 #if CYTHON_USE_MODULE_STATE
2482 PyObject *__pyx_type_6Recode_Outer;
2483 PyObject *__pyx_type_6Recode_Request;
2484 PyObject *__pyx_type_6Recode_Task;
2485 #endif
2486 PyTypeObject *__pyx_ptype_6Recode_Outer;
2487 PyTypeObject *__pyx_ptype_6Recode_Request;
2488 PyTypeObject *__pyx_ptype_6Recode_Task;
2489 PyObject *__pyx_n_s_ALIAS_FIND_AS_CHARSET;
2490 PyObject *__pyx_n_s_ALIAS_FIND_AS_EITHER;
2491 PyObject *__pyx_n_s_ALIAS_FIND_AS_SURFACE;
2492 PyObject *__pyx_n_s_AMBIGUOUS_OUTPUT;
2493 PyObject *__pyx_n_s_AUTO_ABORT_FLAG;
2494 PyObject *__pyx_n_s_BYTE_ORDER_MARK;
2495 PyObject *__pyx_n_s_BYTE_ORDER_MARK_SWAPPED;
2496 PyObject *__pyx_n_s_BYTE_TO_BYTE;
2497 PyObject *__pyx_n_s_BYTE_TO_STRING;
2498 PyObject *__pyx_n_s_CHARSET;
2499 PyObject *__pyx_n_s_COMBINE_EXPLODE;
2500 PyObject *__pyx_n_s_COMBINE_STEP;
2501 PyObject *__pyx_n_s_DATA_SURFACE;
2502 PyObject *__pyx_n_s_DECIMAL_FORMAT;
2503 PyObject *__pyx_n_s_EXPLODE_DATA;
2504 PyObject *__pyx_n_s_EXPLODE_STEP;
2505 PyObject *__pyx_n_s_FULL_FORMAT;
2506 PyObject *__pyx_n_s_HEXADECIMAL_FORMAT;
2507 PyObject *__pyx_n_s_INTERNAL_ERROR;
2508 PyObject *__pyx_n_s_INVALID_INPUT;
2509 PyObject *__pyx_n_s_LANGUAGE_C;
2510 PyObject *__pyx_n_s_LANGUAGE_PERL;
2511 PyObject *__pyx_n_s_MAXIMUM_ERROR;
2512 PyObject *__pyx_n_s_NOT_A_CHARACTER;
2513 PyObject *__pyx_n_s_NOT_CANONICAL;
2514 PyObject *__pyx_n_s_NO_CHARSET_DATA;
2515 PyObject *__pyx_n_s_NO_ERROR;
2516 PyObject *__pyx_n_s_NO_FORMAT;
2517 PyObject *__pyx_n_s_NO_ICONV_FLAG;
2518 PyObject *__pyx_n_s_NO_LANGUAGE;
2519 PyObject *__pyx_n_s_NO_STEP_TABLE;
2520 PyObject *__pyx_n_s_NO_SYMBOL_TYPE;
2521 PyObject *__pyx_n_s_NUL;
2522 PyObject *__pyx_n_s_OCTAL_FORMAT;
2523 PyObject *__pyx_n_s_Outer;
2524 PyObject *__pyx_n_s_Outer___reduce_cython;
2525 PyObject *__pyx_n_s_Outer___setstate_cython;
2526 PyObject *__pyx_n_s_Outer_all_charsets;
2527 PyObject *__pyx_n_s_Outer_all_surfaces;
2528 PyObject *__pyx_n_s_Outer_concise_charset;
2529 PyObject *__pyx_n_s_Outer_default_charset;
2530 PyObject *__pyx_n_s_Outer_full_charset;
2531 PyObject *__pyx_n_s_Outer_recode;
2532 PyObject *__pyx_n_s_REPLACEMENT_CHARACTER;
2533 PyObject *__pyx_n_s_Recode;
2534 PyObject *__pyx_kp_s_Recode_pyx;
2535 PyObject *__pyx_n_s_Request;
2536 PyObject *__pyx_n_s_Request___reduce_cython;
2537 PyObject *__pyx_n_s_Request___setstate_cython;
2538 PyObject *__pyx_n_s_Request_format_table;
2539 PyObject *__pyx_n_s_Request_pair_sequence;
2540 PyObject *__pyx_n_s_Request_scan;
2541 PyObject *__pyx_n_s_Request_set_verbose;
2542 PyObject *__pyx_n_s_Request_string;
2543 PyObject *__pyx_n_s_SIZE_1;
2544 PyObject *__pyx_n_s_SIZE_2;
2545 PyObject *__pyx_n_s_SIZE_4;
2546 PyObject *__pyx_n_s_SIZE_N;
2547 PyObject *__pyx_n_s_STRICT_MAPPING_FLAG;
2548 PyObject *__pyx_n_s_STRING_TO_UCS2;
2549 PyObject *__pyx_n_s_STRIP_DATA;
2550 PyObject *__pyx_n_s_STRIP_SIZE;
2551 PyObject *__pyx_n_s_SWAP_NO;
2552 PyObject *__pyx_n_s_SWAP_UNDECIDED;
2553 PyObject *__pyx_n_s_SWAP_YES;
2554 PyObject *__pyx_n_s_SYMBOL_CREATE_CHARSET;
2555 PyObject *__pyx_n_s_SYMBOL_CREATE_DATA_SURFACE;
2556 PyObject *__pyx_n_s_SYSTEM_ERROR;
2557 PyObject *__pyx_n_s_Task;
2558 PyObject *__pyx_n_s_Task___reduce_cython;
2559 PyObject *__pyx_n_s_Task___setstate_cython;
2560 PyObject *__pyx_n_s_Task_get_error;
2561 PyObject *__pyx_n_s_Task_get_output;
2562 PyObject *__pyx_n_s_Task_perform;
2563 PyObject *__pyx_n_s_Task_set_abort_level;
2564 PyObject *__pyx_n_s_Task_set_byte_order_mark;
2565 PyObject *__pyx_n_s_Task_set_fail_level;
2566 PyObject *__pyx_n_s_Task_set_input;
2567 PyObject *__pyx_n_s_TypeError;
2568 PyObject *__pyx_n_s_UCS2_TO_BYTE;
2569 PyObject *__pyx_n_s_UCS2_TO_STRING;
2570 PyObject *__pyx_n_s_UNTRANSLATABLE;
2571 PyObject *__pyx_n_s_USER_ERROR;
2572 PyObject *__pyx_n_s__41;
2573 PyObject *__pyx_n_s_abort_level;
2574 PyObject *__pyx_n_s_all_charsets;
2575 PyObject *__pyx_n_s_all_surfaces;
2576 PyObject *__pyx_n_s_asyncio_coroutines;
2577 PyObject *__pyx_n_s_auto_abort;
2578 PyObject *__pyx_n_s_charset;
2579 PyObject *__pyx_n_s_cline_in_traceback;
2580 PyObject *__pyx_n_s_command;
2581 PyObject *__pyx_n_s_concise_charset;
2582 PyObject *__pyx_n_s_counter;
2583 PyObject *__pyx_n_s_default_charset;
2584 PyObject *__pyx_n_s_dict;
2585 PyObject *__pyx_kp_u_disable;
2586 PyObject *__pyx_n_s_doc;
2587 PyObject *__pyx_kp_u_enable;
2588 PyObject *__pyx_n_s_error;
2589 PyObject *__pyx_n_s_fail_level;
2590 PyObject *__pyx_n_s_flag;
2591 PyObject *__pyx_n_s_format;
2592 PyObject *__pyx_n_s_format_table;
2593 PyObject *__pyx_n_s_full_charset;
2594 PyObject *__pyx_kp_u_gc;
2595 PyObject *__pyx_n_s_get_error;
2596 PyObject *__pyx_n_s_get_output;
2597 PyObject *__pyx_n_s_getstate;
2598 PyObject *__pyx_n_s_iconv;
2599 PyObject *__pyx_n_s_init_subclass;
2600 PyObject *__pyx_n_s_input;
2601 PyObject *__pyx_n_s_input_len;
2602 PyObject *__pyx_n_s_is_coroutine;
2603 PyObject *__pyx_kp_u_isenabled;
2604 PyObject *__pyx_n_s_language;
2605 PyObject *__pyx_n_s_list;
2606 PyObject *__pyx_n_s_main;
2607 PyObject *__pyx_n_s_metaclass;
2608 PyObject *__pyx_n_s_module;
2609 PyObject *__pyx_n_s_mro_entries;
2610 PyObject *__pyx_n_s_name;
2611 PyObject *__pyx_n_s_ok;
2612 PyObject *__pyx_n_s_outer;
2613 PyObject *__pyx_n_s_output;
2614 PyObject *__pyx_n_s_output_allocated;
2615 PyObject *__pyx_n_s_output_len;
2616 PyObject *__pyx_n_s_pair_sequence;
2617 PyObject *__pyx_n_s_perform;
2618 PyObject *__pyx_n_s_prepare;
2619 PyObject *__pyx_n_s_previous;
2620 PyObject *__pyx_n_s_py_string;
2621 PyObject *__pyx_n_s_pyx_state;
2622 PyObject *__pyx_n_s_qualname;
2623 PyObject *__pyx_n_s_recode;
2624 PyObject *__pyx_n_s_reduce;
2625 PyObject *__pyx_n_s_reduce_cython;
2626 PyObject *__pyx_n_s_reduce_ex;
2627 PyObject *__pyx_n_s_request;
2628 PyObject *__pyx_n_s_result;
2629 PyObject *__pyx_n_s_saved;
2630 PyObject *__pyx_n_s_scan;
2631 PyObject *__pyx_n_s_self;
2632 PyObject *__pyx_kp_s_self_outer_cannot_be_converted_t;
2633 PyObject *__pyx_kp_s_self_request_cannot_be_converted;
2634 PyObject *__pyx_kp_s_self_task_cannot_be_converted_to;
2635 PyObject *__pyx_n_s_set_abort_level;
2636 PyObject *__pyx_n_s_set_byte_order_mark;
2637 PyObject *__pyx_n_s_set_fail_level;
2638 PyObject *__pyx_n_s_set_input;
2639 PyObject *__pyx_n_s_set_name;
2640 PyObject *__pyx_n_s_set_verbose;
2641 PyObject *__pyx_n_s_setstate;
2642 PyObject *__pyx_n_s_setstate_cython;
2643 PyObject *__pyx_n_s_step;
2644 PyObject *__pyx_n_s_strict;
2645 PyObject *__pyx_n_s_string;
2646 PyObject *__pyx_kp_s_stringsource;
2647 PyObject *__pyx_n_s_super;
2648 PyObject *__pyx_n_s_symbol;
2649 PyObject *__pyx_n_s_test;
2650 PyObject *__pyx_n_s_text;
2651 PyObject *__pyx_n_s_verbose;
2652 PyObject *__pyx_n_s_xDONE;
2653 PyObject *__pyx_n_s_xELSE;
2654 PyObject *__pyx_k_;
2655 PyObject *__pyx_tuple__2;
2656 PyObject *__pyx_tuple__4;
2657 PyObject *__pyx_tuple__7;
2658 PyObject *__pyx_tuple__9;
2659 PyObject *__pyx_tuple__11;
2660 PyObject *__pyx_tuple__13;
2661 PyObject *__pyx_tuple__15;
2662 PyObject *__pyx_tuple__17;
2663 PyObject *__pyx_tuple__19;
2664 PyObject *__pyx_tuple__21;
2665 PyObject *__pyx_tuple__23;
2666 PyObject *__pyx_tuple__25;
2667 PyObject *__pyx_tuple__31;
2668 PyObject *__pyx_tuple__33;
2669 PyObject *__pyx_tuple__35;
2670 PyObject *__pyx_codeobj__3;
2671 PyObject *__pyx_codeobj__5;
2672 PyObject *__pyx_codeobj__6;
2673 PyObject *__pyx_codeobj__8;
2674 PyObject *__pyx_codeobj__10;
2675 PyObject *__pyx_codeobj__12;
2676 PyObject *__pyx_codeobj__14;
2677 PyObject *__pyx_codeobj__16;
2678 PyObject *__pyx_codeobj__18;
2679 PyObject *__pyx_codeobj__20;
2680 PyObject *__pyx_codeobj__22;
2681 PyObject *__pyx_codeobj__24;
2682 PyObject *__pyx_codeobj__26;
2683 PyObject *__pyx_codeobj__27;
2684 PyObject *__pyx_codeobj__28;
2685 PyObject *__pyx_codeobj__29;
2686 PyObject *__pyx_codeobj__30;
2687 PyObject *__pyx_codeobj__32;
2688 PyObject *__pyx_codeobj__34;
2689 PyObject *__pyx_codeobj__36;
2690 PyObject *__pyx_codeobj__37;
2691 PyObject *__pyx_codeobj__38;
2692 PyObject *__pyx_codeobj__39;
2693 PyObject *__pyx_codeobj__40;
2694 } __pyx_mstate;
2695
2696 #if CYTHON_USE_MODULE_STATE
2697 #ifdef __cplusplus
2698 namespace {
2699 extern struct PyModuleDef __pyx_moduledef;
2700 } /* anonymous namespace */
2701 #else
2702 static struct PyModuleDef __pyx_moduledef;
2703 #endif
2704
2705 #define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o))
2706
2707 #define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef)))
2708
2709 #define __pyx_m (PyState_FindModule(&__pyx_moduledef))
2710 #else
2711 static __pyx_mstate __pyx_mstate_global_static =
2712 #ifdef __cplusplus
2713 {};
2714 #else
2715 {0};
2716 #endif
2717 static __pyx_mstate *__pyx_mstate_global = &__pyx_mstate_global_static;
2718 #endif
2719 /* #### Code section: module_state_clear ### */
2720 #if CYTHON_USE_MODULE_STATE
2721 static int __pyx_m_clear(PyObject *m) {
2722 __pyx_mstate *clear_module_state = __pyx_mstate(m);
2723 if (!clear_module_state) return 0;
2724 Py_CLEAR(clear_module_state->__pyx_d);
2725 Py_CLEAR(clear_module_state->__pyx_b);
2726 Py_CLEAR(clear_module_state->__pyx_cython_runtime);
2727 Py_CLEAR(clear_module_state->__pyx_empty_tuple);
2728 Py_CLEAR(clear_module_state->__pyx_empty_bytes);
2729 Py_CLEAR(clear_module_state->__pyx_empty_unicode);
2730 #ifdef __Pyx_CyFunction_USED
2731 Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
2732 #endif
2733 #ifdef __Pyx_FusedFunction_USED
2734 Py_CLEAR(clear_module_state->__pyx_FusedFunctionType);
2735 #endif
2736 Py_CLEAR(clear_module_state->__pyx_ptype_6Recode_Outer);
2737 Py_CLEAR(clear_module_state->__pyx_type_6Recode_Outer);
2738 Py_CLEAR(clear_module_state->__pyx_ptype_6Recode_Request);
2739 Py_CLEAR(clear_module_state->__pyx_type_6Recode_Request);
2740 Py_CLEAR(clear_module_state->__pyx_ptype_6Recode_Task);
2741 Py_CLEAR(clear_module_state->__pyx_type_6Recode_Task);
2742 Py_CLEAR(clear_module_state->__pyx_n_s_ALIAS_FIND_AS_CHARSET);
2743 Py_CLEAR(clear_module_state->__pyx_n_s_ALIAS_FIND_AS_EITHER);
2744 Py_CLEAR(clear_module_state->__pyx_n_s_ALIAS_FIND_AS_SURFACE);
2745 Py_CLEAR(clear_module_state->__pyx_n_s_AMBIGUOUS_OUTPUT);
2746 Py_CLEAR(clear_module_state->__pyx_n_s_AUTO_ABORT_FLAG);
2747 Py_CLEAR(clear_module_state->__pyx_n_s_BYTE_ORDER_MARK);
2748 Py_CLEAR(clear_module_state->__pyx_n_s_BYTE_ORDER_MARK_SWAPPED);
2749 Py_CLEAR(clear_module_state->__pyx_n_s_BYTE_TO_BYTE);
2750 Py_CLEAR(clear_module_state->__pyx_n_s_BYTE_TO_STRING);
2751 Py_CLEAR(clear_module_state->__pyx_n_s_CHARSET);
2752 Py_CLEAR(clear_module_state->__pyx_n_s_COMBINE_EXPLODE);
2753 Py_CLEAR(clear_module_state->__pyx_n_s_COMBINE_STEP);
2754 Py_CLEAR(clear_module_state->__pyx_n_s_DATA_SURFACE);
2755 Py_CLEAR(clear_module_state->__pyx_n_s_DECIMAL_FORMAT);
2756 Py_CLEAR(clear_module_state->__pyx_n_s_EXPLODE_DATA);
2757 Py_CLEAR(clear_module_state->__pyx_n_s_EXPLODE_STEP);
2758 Py_CLEAR(clear_module_state->__pyx_n_s_FULL_FORMAT);
2759 Py_CLEAR(clear_module_state->__pyx_n_s_HEXADECIMAL_FORMAT);
2760 Py_CLEAR(clear_module_state->__pyx_n_s_INTERNAL_ERROR);
2761 Py_CLEAR(clear_module_state->__pyx_n_s_INVALID_INPUT);
2762 Py_CLEAR(clear_module_state->__pyx_n_s_LANGUAGE_C);
2763 Py_CLEAR(clear_module_state->__pyx_n_s_LANGUAGE_PERL);
2764 Py_CLEAR(clear_module_state->__pyx_n_s_MAXIMUM_ERROR);
2765 Py_CLEAR(clear_module_state->__pyx_n_s_NOT_A_CHARACTER);
2766 Py_CLEAR(clear_module_state->__pyx_n_s_NOT_CANONICAL);
2767 Py_CLEAR(clear_module_state->__pyx_n_s_NO_CHARSET_DATA);
2768 Py_CLEAR(clear_module_state->__pyx_n_s_NO_ERROR);
2769 Py_CLEAR(clear_module_state->__pyx_n_s_NO_FORMAT);
2770 Py_CLEAR(clear_module_state->__pyx_n_s_NO_ICONV_FLAG);
2771 Py_CLEAR(clear_module_state->__pyx_n_s_NO_LANGUAGE);
2772 Py_CLEAR(clear_module_state->__pyx_n_s_NO_STEP_TABLE);
2773 Py_CLEAR(clear_module_state->__pyx_n_s_NO_SYMBOL_TYPE);
2774 Py_CLEAR(clear_module_state->__pyx_n_s_NUL);
2775 Py_CLEAR(clear_module_state->__pyx_n_s_OCTAL_FORMAT);
2776 Py_CLEAR(clear_module_state->__pyx_n_s_Outer);
2777 Py_CLEAR(clear_module_state->__pyx_n_s_Outer___reduce_cython);
2778 Py_CLEAR(clear_module_state->__pyx_n_s_Outer___setstate_cython);
2779 Py_CLEAR(clear_module_state->__pyx_n_s_Outer_all_charsets);
2780 Py_CLEAR(clear_module_state->__pyx_n_s_Outer_all_surfaces);
2781 Py_CLEAR(clear_module_state->__pyx_n_s_Outer_concise_charset);
2782 Py_CLEAR(clear_module_state->__pyx_n_s_Outer_default_charset);
2783 Py_CLEAR(clear_module_state->__pyx_n_s_Outer_full_charset);
2784 Py_CLEAR(clear_module_state->__pyx_n_s_Outer_recode);
2785 Py_CLEAR(clear_module_state->__pyx_n_s_REPLACEMENT_CHARACTER);
2786 Py_CLEAR(clear_module_state->__pyx_n_s_Recode);
2787 Py_CLEAR(clear_module_state->__pyx_kp_s_Recode_pyx);
2788 Py_CLEAR(clear_module_state->__pyx_n_s_Request);
2789 Py_CLEAR(clear_module_state->__pyx_n_s_Request___reduce_cython);
2790 Py_CLEAR(clear_module_state->__pyx_n_s_Request___setstate_cython);
2791 Py_CLEAR(clear_module_state->__pyx_n_s_Request_format_table);
2792 Py_CLEAR(clear_module_state->__pyx_n_s_Request_pair_sequence);
2793 Py_CLEAR(clear_module_state->__pyx_n_s_Request_scan);
2794 Py_CLEAR(clear_module_state->__pyx_n_s_Request_set_verbose);
2795 Py_CLEAR(clear_module_state->__pyx_n_s_Request_string);
2796 Py_CLEAR(clear_module_state->__pyx_n_s_SIZE_1);
2797 Py_CLEAR(clear_module_state->__pyx_n_s_SIZE_2);
2798 Py_CLEAR(clear_module_state->__pyx_n_s_SIZE_4);
2799 Py_CLEAR(clear_module_state->__pyx_n_s_SIZE_N);
2800 Py_CLEAR(clear_module_state->__pyx_n_s_STRICT_MAPPING_FLAG);
2801 Py_CLEAR(clear_module_state->__pyx_n_s_STRING_TO_UCS2);
2802 Py_CLEAR(clear_module_state->__pyx_n_s_STRIP_DATA);
2803 Py_CLEAR(clear_module_state->__pyx_n_s_STRIP_SIZE);
2804 Py_CLEAR(clear_module_state->__pyx_n_s_SWAP_NO);
2805 Py_CLEAR(clear_module_state->__pyx_n_s_SWAP_UNDECIDED);
2806 Py_CLEAR(clear_module_state->__pyx_n_s_SWAP_YES);
2807 Py_CLEAR(clear_module_state->__pyx_n_s_SYMBOL_CREATE_CHARSET);
2808 Py_CLEAR(clear_module_state->__pyx_n_s_SYMBOL_CREATE_DATA_SURFACE);
2809 Py_CLEAR(clear_module_state->__pyx_n_s_SYSTEM_ERROR);
2810 Py_CLEAR(clear_module_state->__pyx_n_s_Task);
2811 Py_CLEAR(clear_module_state->__pyx_n_s_Task___reduce_cython);
2812 Py_CLEAR(clear_module_state->__pyx_n_s_Task___setstate_cython);
2813 Py_CLEAR(clear_module_state->__pyx_n_s_Task_get_error);
2814 Py_CLEAR(clear_module_state->__pyx_n_s_Task_get_output);
2815 Py_CLEAR(clear_module_state->__pyx_n_s_Task_perform);
2816 Py_CLEAR(clear_module_state->__pyx_n_s_Task_set_abort_level);
2817 Py_CLEAR(clear_module_state->__pyx_n_s_Task_set_byte_order_mark);
2818 Py_CLEAR(clear_module_state->__pyx_n_s_Task_set_fail_level);
2819 Py_CLEAR(clear_module_state->__pyx_n_s_Task_set_input);
2820 Py_CLEAR(clear_module_state->__pyx_n_s_TypeError);
2821 Py_CLEAR(clear_module_state->__pyx_n_s_UCS2_TO_BYTE);
2822 Py_CLEAR(clear_module_state->__pyx_n_s_UCS2_TO_STRING);
2823 Py_CLEAR(clear_module_state->__pyx_n_s_UNTRANSLATABLE);
2824 Py_CLEAR(clear_module_state->__pyx_n_s_USER_ERROR);
2825 Py_CLEAR(clear_module_state->__pyx_n_s__41);
2826 Py_CLEAR(clear_module_state->__pyx_n_s_abort_level);
2827 Py_CLEAR(clear_module_state->__pyx_n_s_all_charsets);
2828 Py_CLEAR(clear_module_state->__pyx_n_s_all_surfaces);
2829 Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines);
2830 Py_CLEAR(clear_module_state->__pyx_n_s_auto_abort);
2831 Py_CLEAR(clear_module_state->__pyx_n_s_charset);
2832 Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback);
2833 Py_CLEAR(clear_module_state->__pyx_n_s_command);
2834 Py_CLEAR(clear_module_state->__pyx_n_s_concise_charset);
2835 Py_CLEAR(clear_module_state->__pyx_n_s_counter);
2836 Py_CLEAR(clear_module_state->__pyx_n_s_default_charset);
2837 Py_CLEAR(clear_module_state->__pyx_n_s_dict);
2838 Py_CLEAR(clear_module_state->__pyx_kp_u_disable);
2839 Py_CLEAR(clear_module_state->__pyx_n_s_doc);
2840 Py_CLEAR(clear_module_state->__pyx_kp_u_enable);
2841 Py_CLEAR(clear_module_state->__pyx_n_s_error);
2842 Py_CLEAR(clear_module_state->__pyx_n_s_fail_level);
2843 Py_CLEAR(clear_module_state->__pyx_n_s_flag);
2844 Py_CLEAR(clear_module_state->__pyx_n_s_format);
2845 Py_CLEAR(clear_module_state->__pyx_n_s_format_table);
2846 Py_CLEAR(clear_module_state->__pyx_n_s_full_charset);
2847 Py_CLEAR(clear_module_state->__pyx_kp_u_gc);
2848 Py_CLEAR(clear_module_state->__pyx_n_s_get_error);
2849 Py_CLEAR(clear_module_state->__pyx_n_s_get_output);
2850 Py_CLEAR(clear_module_state->__pyx_n_s_getstate);
2851 Py_CLEAR(clear_module_state->__pyx_n_s_iconv);
2852 Py_CLEAR(clear_module_state->__pyx_n_s_init_subclass);
2853 Py_CLEAR(clear_module_state->__pyx_n_s_input);
2854 Py_CLEAR(clear_module_state->__pyx_n_s_input_len);
2855 Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine);
2856 Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled);
2857 Py_CLEAR(clear_module_state->__pyx_n_s_language);
2858 Py_CLEAR(clear_module_state->__pyx_n_s_list);
2859 Py_CLEAR(clear_module_state->__pyx_n_s_main);
2860 Py_CLEAR(clear_module_state->__pyx_n_s_metaclass);
2861 Py_CLEAR(clear_module_state->__pyx_n_s_module);
2862 Py_CLEAR(clear_module_state->__pyx_n_s_mro_entries);
2863 Py_CLEAR(clear_module_state->__pyx_n_s_name);
2864 Py_CLEAR(clear_module_state->__pyx_n_s_ok);
2865 Py_CLEAR(clear_module_state->__pyx_n_s_outer);
2866 Py_CLEAR(clear_module_state->__pyx_n_s_output);
2867 Py_CLEAR(clear_module_state->__pyx_n_s_output_allocated);
2868 Py_CLEAR(clear_module_state->__pyx_n_s_output_len);
2869 Py_CLEAR(clear_module_state->__pyx_n_s_pair_sequence);
2870 Py_CLEAR(clear_module_state->__pyx_n_s_perform);
2871 Py_CLEAR(clear_module_state->__pyx_n_s_prepare);
2872 Py_CLEAR(clear_module_state->__pyx_n_s_previous);
2873 Py_CLEAR(clear_module_state->__pyx_n_s_py_string);
2874 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state);
2875 Py_CLEAR(clear_module_state->__pyx_n_s_qualname);
2876 Py_CLEAR(clear_module_state->__pyx_n_s_recode);
2877 Py_CLEAR(clear_module_state->__pyx_n_s_reduce);
2878 Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython);
2879 Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex);
2880 Py_CLEAR(clear_module_state->__pyx_n_s_request);
2881 Py_CLEAR(clear_module_state->__pyx_n_s_result);
2882 Py_CLEAR(clear_module_state->__pyx_n_s_saved);
2883 Py_CLEAR(clear_module_state->__pyx_n_s_scan);
2884 Py_CLEAR(clear_module_state->__pyx_n_s_self);
2885 Py_CLEAR(clear_module_state->__pyx_kp_s_self_outer_cannot_be_converted_t);
2886 Py_CLEAR(clear_module_state->__pyx_kp_s_self_request_cannot_be_converted);
2887 Py_CLEAR(clear_module_state->__pyx_kp_s_self_task_cannot_be_converted_to);
2888 Py_CLEAR(clear_module_state->__pyx_n_s_set_abort_level);
2889 Py_CLEAR(clear_module_state->__pyx_n_s_set_byte_order_mark);
2890 Py_CLEAR(clear_module_state->__pyx_n_s_set_fail_level);
2891 Py_CLEAR(clear_module_state->__pyx_n_s_set_input);
2892 Py_CLEAR(clear_module_state->__pyx_n_s_set_name);
2893 Py_CLEAR(clear_module_state->__pyx_n_s_set_verbose);
2894 Py_CLEAR(clear_module_state->__pyx_n_s_setstate);
2895 Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython);
2896 Py_CLEAR(clear_module_state->__pyx_n_s_step);
2897 Py_CLEAR(clear_module_state->__pyx_n_s_strict);
2898 Py_CLEAR(clear_module_state->__pyx_n_s_string);
2899 Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource);
2900 Py_CLEAR(clear_module_state->__pyx_n_s_super);
2901 Py_CLEAR(clear_module_state->__pyx_n_s_symbol);
2902 Py_CLEAR(clear_module_state->__pyx_n_s_test);
2903 Py_CLEAR(clear_module_state->__pyx_n_s_text);
2904 Py_CLEAR(clear_module_state->__pyx_n_s_verbose);
2905 Py_CLEAR(clear_module_state->__pyx_n_s_xDONE);
2906 Py_CLEAR(clear_module_state->__pyx_n_s_xELSE);
2907 Py_CLEAR(clear_module_state->__pyx_k_);
2908 Py_CLEAR(clear_module_state->__pyx_tuple__2);
2909 Py_CLEAR(clear_module_state->__pyx_tuple__4);
2910 Py_CLEAR(clear_module_state->__pyx_tuple__7);
2911 Py_CLEAR(clear_module_state->__pyx_tuple__9);
2912 Py_CLEAR(clear_module_state->__pyx_tuple__11);
2913 Py_CLEAR(clear_module_state->__pyx_tuple__13);
2914 Py_CLEAR(clear_module_state->__pyx_tuple__15);
2915 Py_CLEAR(clear_module_state->__pyx_tuple__17);
2916 Py_CLEAR(clear_module_state->__pyx_tuple__19);
2917 Py_CLEAR(clear_module_state->__pyx_tuple__21);
2918 Py_CLEAR(clear_module_state->__pyx_tuple__23);
2919 Py_CLEAR(clear_module_state->__pyx_tuple__25);
2920 Py_CLEAR(clear_module_state->__pyx_tuple__31);
2921 Py_CLEAR(clear_module_state->__pyx_tuple__33);
2922 Py_CLEAR(clear_module_state->__pyx_tuple__35);
2923 Py_CLEAR(clear_module_state->__pyx_codeobj__3);
2924 Py_CLEAR(clear_module_state->__pyx_codeobj__5);
2925 Py_CLEAR(clear_module_state->__pyx_codeobj__6);
2926 Py_CLEAR(clear_module_state->__pyx_codeobj__8);
2927 Py_CLEAR(clear_module_state->__pyx_codeobj__10);
2928 Py_CLEAR(clear_module_state->__pyx_codeobj__12);
2929 Py_CLEAR(clear_module_state->__pyx_codeobj__14);
2930 Py_CLEAR(clear_module_state->__pyx_codeobj__16);
2931 Py_CLEAR(clear_module_state->__pyx_codeobj__18);
2932 Py_CLEAR(clear_module_state->__pyx_codeobj__20);
2933 Py_CLEAR(clear_module_state->__pyx_codeobj__22);
2934 Py_CLEAR(clear_module_state->__pyx_codeobj__24);
2935 Py_CLEAR(clear_module_state->__pyx_codeobj__26);
2936 Py_CLEAR(clear_module_state->__pyx_codeobj__27);
2937 Py_CLEAR(clear_module_state->__pyx_codeobj__28);
2938 Py_CLEAR(clear_module_state->__pyx_codeobj__29);
2939 Py_CLEAR(clear_module_state->__pyx_codeobj__30);
2940 Py_CLEAR(clear_module_state->__pyx_codeobj__32);
2941 Py_CLEAR(clear_module_state->__pyx_codeobj__34);
2942 Py_CLEAR(clear_module_state->__pyx_codeobj__36);
2943 Py_CLEAR(clear_module_state->__pyx_codeobj__37);
2944 Py_CLEAR(clear_module_state->__pyx_codeobj__38);
2945 Py_CLEAR(clear_module_state->__pyx_codeobj__39);
2946 Py_CLEAR(clear_module_state->__pyx_codeobj__40);
2947 return 0;
2948 }
2949 #endif
2950 /* #### Code section: module_state_traverse ### */
2951 #if CYTHON_USE_MODULE_STATE
2952 static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
2953 __pyx_mstate *traverse_module_state = __pyx_mstate(m);
2954 if (!traverse_module_state) return 0;
2955 Py_VISIT(traverse_module_state->__pyx_d);
2956 Py_VISIT(traverse_module_state->__pyx_b);
2957 Py_VISIT(traverse_module_state->__pyx_cython_runtime);
2958 Py_VISIT(traverse_module_state->__pyx_empty_tuple);
2959 Py_VISIT(traverse_module_state->__pyx_empty_bytes);
2960 Py_VISIT(traverse_module_state->__pyx_empty_unicode);
2961 #ifdef __Pyx_CyFunction_USED
2962 Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
2963 #endif
2964 #ifdef __Pyx_FusedFunction_USED
2965 Py_VISIT(traverse_module_state->__pyx_FusedFunctionType);
2966 #endif
2967 Py_VISIT(traverse_module_state->__pyx_ptype_6Recode_Outer);
2968 Py_VISIT(traverse_module_state->__pyx_type_6Recode_Outer);
2969 Py_VISIT(traverse_module_state->__pyx_ptype_6Recode_Request);
2970 Py_VISIT(traverse_module_state->__pyx_type_6Recode_Request);
2971 Py_VISIT(traverse_module_state->__pyx_ptype_6Recode_Task);
2972 Py_VISIT(traverse_module_state->__pyx_type_6Recode_Task);
2973 Py_VISIT(traverse_module_state->__pyx_n_s_ALIAS_FIND_AS_CHARSET);
2974 Py_VISIT(traverse_module_state->__pyx_n_s_ALIAS_FIND_AS_EITHER);
2975 Py_VISIT(traverse_module_state->__pyx_n_s_ALIAS_FIND_AS_SURFACE);
2976 Py_VISIT(traverse_module_state->__pyx_n_s_AMBIGUOUS_OUTPUT);
2977 Py_VISIT(traverse_module_state->__pyx_n_s_AUTO_ABORT_FLAG);
2978 Py_VISIT(traverse_module_state->__pyx_n_s_BYTE_ORDER_MARK);
2979 Py_VISIT(traverse_module_state->__pyx_n_s_BYTE_ORDER_MARK_SWAPPED);
2980 Py_VISIT(traverse_module_state->__pyx_n_s_BYTE_TO_BYTE);
2981 Py_VISIT(traverse_module_state->__pyx_n_s_BYTE_TO_STRING);
2982 Py_VISIT(traverse_module_state->__pyx_n_s_CHARSET);
2983 Py_VISIT(traverse_module_state->__pyx_n_s_COMBINE_EXPLODE);
2984 Py_VISIT(traverse_module_state->__pyx_n_s_COMBINE_STEP);
2985 Py_VISIT(traverse_module_state->__pyx_n_s_DATA_SURFACE);
2986 Py_VISIT(traverse_module_state->__pyx_n_s_DECIMAL_FORMAT);
2987 Py_VISIT(traverse_module_state->__pyx_n_s_EXPLODE_DATA);
2988 Py_VISIT(traverse_module_state->__pyx_n_s_EXPLODE_STEP);
2989 Py_VISIT(traverse_module_state->__pyx_n_s_FULL_FORMAT);
2990 Py_VISIT(traverse_module_state->__pyx_n_s_HEXADECIMAL_FORMAT);
2991 Py_VISIT(traverse_module_state->__pyx_n_s_INTERNAL_ERROR);
2992 Py_VISIT(traverse_module_state->__pyx_n_s_INVALID_INPUT);
2993 Py_VISIT(traverse_module_state->__pyx_n_s_LANGUAGE_C);
2994 Py_VISIT(traverse_module_state->__pyx_n_s_LANGUAGE_PERL);
2995 Py_VISIT(traverse_module_state->__pyx_n_s_MAXIMUM_ERROR);
2996 Py_VISIT(traverse_module_state->__pyx_n_s_NOT_A_CHARACTER);
2997 Py_VISIT(traverse_module_state->__pyx_n_s_NOT_CANONICAL);
2998 Py_VISIT(traverse_module_state->__pyx_n_s_NO_CHARSET_DATA);
2999 Py_VISIT(traverse_module_state->__pyx_n_s_NO_ERROR);
3000 Py_VISIT(traverse_module_state->__pyx_n_s_NO_FORMAT);
3001 Py_VISIT(traverse_module_state->__pyx_n_s_NO_ICONV_FLAG);
3002 Py_VISIT(traverse_module_state->__pyx_n_s_NO_LANGUAGE);
3003 Py_VISIT(traverse_module_state->__pyx_n_s_NO_STEP_TABLE);
3004 Py_VISIT(traverse_module_state->__pyx_n_s_NO_SYMBOL_TYPE);
3005 Py_VISIT(traverse_module_state->__pyx_n_s_NUL);
3006 Py_VISIT(traverse_module_state->__pyx_n_s_OCTAL_FORMAT);
3007 Py_VISIT(traverse_module_state->__pyx_n_s_Outer);
3008 Py_VISIT(traverse_module_state->__pyx_n_s_Outer___reduce_cython);
3009 Py_VISIT(traverse_module_state->__pyx_n_s_Outer___setstate_cython);
3010 Py_VISIT(traverse_module_state->__pyx_n_s_Outer_all_charsets);
3011 Py_VISIT(traverse_module_state->__pyx_n_s_Outer_all_surfaces);
3012 Py_VISIT(traverse_module_state->__pyx_n_s_Outer_concise_charset);
3013 Py_VISIT(traverse_module_state->__pyx_n_s_Outer_default_charset);
3014 Py_VISIT(traverse_module_state->__pyx_n_s_Outer_full_charset);
3015 Py_VISIT(traverse_module_state->__pyx_n_s_Outer_recode);
3016 Py_VISIT(traverse_module_state->__pyx_n_s_REPLACEMENT_CHARACTER);
3017 Py_VISIT(traverse_module_state->__pyx_n_s_Recode);
3018 Py_VISIT(traverse_module_state->__pyx_kp_s_Recode_pyx);
3019 Py_VISIT(traverse_module_state->__pyx_n_s_Request);
3020 Py_VISIT(traverse_module_state->__pyx_n_s_Request___reduce_cython);
3021 Py_VISIT(traverse_module_state->__pyx_n_s_Request___setstate_cython);
3022 Py_VISIT(traverse_module_state->__pyx_n_s_Request_format_table);
3023 Py_VISIT(traverse_module_state->__pyx_n_s_Request_pair_sequence);
3024 Py_VISIT(traverse_module_state->__pyx_n_s_Request_scan);
3025 Py_VISIT(traverse_module_state->__pyx_n_s_Request_set_verbose);
3026 Py_VISIT(traverse_module_state->__pyx_n_s_Request_string);
3027 Py_VISIT(traverse_module_state->__pyx_n_s_SIZE_1);
3028 Py_VISIT(traverse_module_state->__pyx_n_s_SIZE_2);
3029 Py_VISIT(traverse_module_state->__pyx_n_s_SIZE_4);
3030 Py_VISIT(traverse_module_state->__pyx_n_s_SIZE_N);
3031 Py_VISIT(traverse_module_state->__pyx_n_s_STRICT_MAPPING_FLAG);
3032 Py_VISIT(traverse_module_state->__pyx_n_s_STRING_TO_UCS2);
3033 Py_VISIT(traverse_module_state->__pyx_n_s_STRIP_DATA);
3034 Py_VISIT(traverse_module_state->__pyx_n_s_STRIP_SIZE);
3035 Py_VISIT(traverse_module_state->__pyx_n_s_SWAP_NO);
3036 Py_VISIT(traverse_module_state->__pyx_n_s_SWAP_UNDECIDED);
3037 Py_VISIT(traverse_module_state->__pyx_n_s_SWAP_YES);
3038 Py_VISIT(traverse_module_state->__pyx_n_s_SYMBOL_CREATE_CHARSET);
3039 Py_VISIT(traverse_module_state->__pyx_n_s_SYMBOL_CREATE_DATA_SURFACE);
3040 Py_VISIT(traverse_module_state->__pyx_n_s_SYSTEM_ERROR);
3041 Py_VISIT(traverse_module_state->__pyx_n_s_Task);
3042 Py_VISIT(traverse_module_state->__pyx_n_s_Task___reduce_cython);
3043 Py_VISIT(traverse_module_state->__pyx_n_s_Task___setstate_cython);
3044 Py_VISIT(traverse_module_state->__pyx_n_s_Task_get_error);
3045 Py_VISIT(traverse_module_state->__pyx_n_s_Task_get_output);
3046 Py_VISIT(traverse_module_state->__pyx_n_s_Task_perform);
3047 Py_VISIT(traverse_module_state->__pyx_n_s_Task_set_abort_level);
3048 Py_VISIT(traverse_module_state->__pyx_n_s_Task_set_byte_order_mark);
3049 Py_VISIT(traverse_module_state->__pyx_n_s_Task_set_fail_level);
3050 Py_VISIT(traverse_module_state->__pyx_n_s_Task_set_input);
3051 Py_VISIT(traverse_module_state->__pyx_n_s_TypeError);
3052 Py_VISIT(traverse_module_state->__pyx_n_s_UCS2_TO_BYTE);
3053 Py_VISIT(traverse_module_state->__pyx_n_s_UCS2_TO_STRING);
3054 Py_VISIT(traverse_module_state->__pyx_n_s_UNTRANSLATABLE);
3055 Py_VISIT(traverse_module_state->__pyx_n_s_USER_ERROR);
3056 Py_VISIT(traverse_module_state->__pyx_n_s__41);
3057 Py_VISIT(traverse_module_state->__pyx_n_s_abort_level);
3058 Py_VISIT(traverse_module_state->__pyx_n_s_all_charsets);
3059 Py_VISIT(traverse_module_state->__pyx_n_s_all_surfaces);
3060 Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines);
3061 Py_VISIT(traverse_module_state->__pyx_n_s_auto_abort);
3062 Py_VISIT(traverse_module_state->__pyx_n_s_charset);
3063 Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback);
3064 Py_VISIT(traverse_module_state->__pyx_n_s_command);
3065 Py_VISIT(traverse_module_state->__pyx_n_s_concise_charset);
3066 Py_VISIT(traverse_module_state->__pyx_n_s_counter);
3067 Py_VISIT(traverse_module_state->__pyx_n_s_default_charset);
3068 Py_VISIT(traverse_module_state->__pyx_n_s_dict);
3069 Py_VISIT(traverse_module_state->__pyx_kp_u_disable);
3070 Py_VISIT(traverse_module_state->__pyx_n_s_doc);
3071 Py_VISIT(traverse_module_state->__pyx_kp_u_enable);
3072 Py_VISIT(traverse_module_state->__pyx_n_s_error);
3073 Py_VISIT(traverse_module_state->__pyx_n_s_fail_level);
3074 Py_VISIT(traverse_module_state->__pyx_n_s_flag);
3075 Py_VISIT(traverse_module_state->__pyx_n_s_format);
3076 Py_VISIT(traverse_module_state->__pyx_n_s_format_table);
3077 Py_VISIT(traverse_module_state->__pyx_n_s_full_charset);
3078 Py_VISIT(traverse_module_state->__pyx_kp_u_gc);
3079 Py_VISIT(traverse_module_state->__pyx_n_s_get_error);
3080 Py_VISIT(traverse_module_state->__pyx_n_s_get_output);
3081 Py_VISIT(traverse_module_state->__pyx_n_s_getstate);
3082 Py_VISIT(traverse_module_state->__pyx_n_s_iconv);
3083 Py_VISIT(traverse_module_state->__pyx_n_s_init_subclass);
3084 Py_VISIT(traverse_module_state->__pyx_n_s_input);
3085 Py_VISIT(traverse_module_state->__pyx_n_s_input_len);
3086 Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine);
3087 Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled);
3088 Py_VISIT(traverse_module_state->__pyx_n_s_language);
3089 Py_VISIT(traverse_module_state->__pyx_n_s_list);
3090 Py_VISIT(traverse_module_state->__pyx_n_s_main);
3091 Py_VISIT(traverse_module_state->__pyx_n_s_metaclass);
3092 Py_VISIT(traverse_module_state->__pyx_n_s_module);
3093 Py_VISIT(traverse_module_state->__pyx_n_s_mro_entries);
3094 Py_VISIT(traverse_module_state->__pyx_n_s_name);
3095 Py_VISIT(traverse_module_state->__pyx_n_s_ok);
3096 Py_VISIT(traverse_module_state->__pyx_n_s_outer);
3097 Py_VISIT(traverse_module_state->__pyx_n_s_output);
3098 Py_VISIT(traverse_module_state->__pyx_n_s_output_allocated);
3099 Py_VISIT(traverse_module_state->__pyx_n_s_output_len);
3100 Py_VISIT(traverse_module_state->__pyx_n_s_pair_sequence);
3101 Py_VISIT(traverse_module_state->__pyx_n_s_perform);
3102 Py_VISIT(traverse_module_state->__pyx_n_s_prepare);
3103 Py_VISIT(traverse_module_state->__pyx_n_s_previous);
3104 Py_VISIT(traverse_module_state->__pyx_n_s_py_string);
3105 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state);
3106 Py_VISIT(traverse_module_state->__pyx_n_s_qualname);
3107 Py_VISIT(traverse_module_state->__pyx_n_s_recode);
3108 Py_VISIT(traverse_module_state->__pyx_n_s_reduce);
3109 Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython);
3110 Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex);
3111 Py_VISIT(traverse_module_state->__pyx_n_s_request);
3112 Py_VISIT(traverse_module_state->__pyx_n_s_result);
3113 Py_VISIT(traverse_module_state->__pyx_n_s_saved);
3114 Py_VISIT(traverse_module_state->__pyx_n_s_scan);
3115 Py_VISIT(traverse_module_state->__pyx_n_s_self);
3116 Py_VISIT(traverse_module_state->__pyx_kp_s_self_outer_cannot_be_converted_t);
3117 Py_VISIT(traverse_module_state->__pyx_kp_s_self_request_cannot_be_converted);
3118 Py_VISIT(traverse_module_state->__pyx_kp_s_self_task_cannot_be_converted_to);
3119 Py_VISIT(traverse_module_state->__pyx_n_s_set_abort_level);
3120 Py_VISIT(traverse_module_state->__pyx_n_s_set_byte_order_mark);
3121 Py_VISIT(traverse_module_state->__pyx_n_s_set_fail_level);
3122 Py_VISIT(traverse_module_state->__pyx_n_s_set_input);
3123 Py_VISIT(traverse_module_state->__pyx_n_s_set_name);
3124 Py_VISIT(traverse_module_state->__pyx_n_s_set_verbose);
3125 Py_VISIT(traverse_module_state->__pyx_n_s_setstate);
3126 Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython);
3127 Py_VISIT(traverse_module_state->__pyx_n_s_step);
3128 Py_VISIT(traverse_module_state->__pyx_n_s_strict);
3129 Py_VISIT(traverse_module_state->__pyx_n_s_string);
3130 Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource);
3131 Py_VISIT(traverse_module_state->__pyx_n_s_super);
3132 Py_VISIT(traverse_module_state->__pyx_n_s_symbol);
3133 Py_VISIT(traverse_module_state->__pyx_n_s_test);
3134 Py_VISIT(traverse_module_state->__pyx_n_s_text);
3135 Py_VISIT(traverse_module_state->__pyx_n_s_verbose);
3136 Py_VISIT(traverse_module_state->__pyx_n_s_xDONE);
3137 Py_VISIT(traverse_module_state->__pyx_n_s_xELSE);
3138 Py_VISIT(traverse_module_state->__pyx_k_);
3139 Py_VISIT(traverse_module_state->__pyx_tuple__2);
3140 Py_VISIT(traverse_module_state->__pyx_tuple__4);
3141 Py_VISIT(traverse_module_state->__pyx_tuple__7);
3142 Py_VISIT(traverse_module_state->__pyx_tuple__9);
3143 Py_VISIT(traverse_module_state->__pyx_tuple__11);
3144 Py_VISIT(traverse_module_state->__pyx_tuple__13);
3145 Py_VISIT(traverse_module_state->__pyx_tuple__15);
3146 Py_VISIT(traverse_module_state->__pyx_tuple__17);
3147 Py_VISIT(traverse_module_state->__pyx_tuple__19);
3148 Py_VISIT(traverse_module_state->__pyx_tuple__21);
3149 Py_VISIT(traverse_module_state->__pyx_tuple__23);
3150 Py_VISIT(traverse_module_state->__pyx_tuple__25);
3151 Py_VISIT(traverse_module_state->__pyx_tuple__31);
3152 Py_VISIT(traverse_module_state->__pyx_tuple__33);
3153 Py_VISIT(traverse_module_state->__pyx_tuple__35);
3154 Py_VISIT(traverse_module_state->__pyx_codeobj__3);
3155 Py_VISIT(traverse_module_state->__pyx_codeobj__5);
3156 Py_VISIT(traverse_module_state->__pyx_codeobj__6);
3157 Py_VISIT(traverse_module_state->__pyx_codeobj__8);
3158 Py_VISIT(traverse_module_state->__pyx_codeobj__10);
3159 Py_VISIT(traverse_module_state->__pyx_codeobj__12);
3160 Py_VISIT(traverse_module_state->__pyx_codeobj__14);
3161 Py_VISIT(traverse_module_state->__pyx_codeobj__16);
3162 Py_VISIT(traverse_module_state->__pyx_codeobj__18);
3163 Py_VISIT(traverse_module_state->__pyx_codeobj__20);
3164 Py_VISIT(traverse_module_state->__pyx_codeobj__22);
3165 Py_VISIT(traverse_module_state->__pyx_codeobj__24);
3166 Py_VISIT(traverse_module_state->__pyx_codeobj__26);
3167 Py_VISIT(traverse_module_state->__pyx_codeobj__27);
3168 Py_VISIT(traverse_module_state->__pyx_codeobj__28);
3169 Py_VISIT(traverse_module_state->__pyx_codeobj__29);
3170 Py_VISIT(traverse_module_state->__pyx_codeobj__30);
3171 Py_VISIT(traverse_module_state->__pyx_codeobj__32);
3172 Py_VISIT(traverse_module_state->__pyx_codeobj__34);
3173 Py_VISIT(traverse_module_state->__pyx_codeobj__36);
3174 Py_VISIT(traverse_module_state->__pyx_codeobj__37);
3175 Py_VISIT(traverse_module_state->__pyx_codeobj__38);
3176 Py_VISIT(traverse_module_state->__pyx_codeobj__39);
3177 Py_VISIT(traverse_module_state->__pyx_codeobj__40);
3178 return 0;
3179 }
3180 #endif
3181 /* #### Code section: module_state_defines ### */
3182 #define __pyx_d __pyx_mstate_global->__pyx_d
3183 #define __pyx_b __pyx_mstate_global->__pyx_b
3184 #define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime
3185 #define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple
3186 #define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes
3187 #define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode
3188 #ifdef __Pyx_CyFunction_USED
3189 #define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType
3190 #endif
3191 #ifdef __Pyx_FusedFunction_USED
3192 #define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType
3193 #endif
3194 #ifdef __Pyx_Generator_USED
3195 #define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType
3196 #endif
3197 #ifdef __Pyx_IterableCoroutine_USED
3198 #define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType
3199 #endif
3200 #ifdef __Pyx_Coroutine_USED
3201 #define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType
3202 #endif
3203 #ifdef __Pyx_Coroutine_USED
3204 #define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType
3205 #endif
3206 #if CYTHON_USE_MODULE_STATE
3207 #endif
3208 #if CYTHON_USE_MODULE_STATE
3209 #endif
3210 #if CYTHON_USE_MODULE_STATE
3211 #endif
3212 #if CYTHON_USE_MODULE_STATE
3213 #endif
3214 #if CYTHON_USE_MODULE_STATE
3215 #define __pyx_type_6Recode_Outer __pyx_mstate_global->__pyx_type_6Recode_Outer
3216 #define __pyx_type_6Recode_Request __pyx_mstate_global->__pyx_type_6Recode_Request
3217 #define __pyx_type_6Recode_Task __pyx_mstate_global->__pyx_type_6Recode_Task
3218 #endif
3219 #define __pyx_ptype_6Recode_Outer __pyx_mstate_global->__pyx_ptype_6Recode_Outer
3220 #define __pyx_ptype_6Recode_Request __pyx_mstate_global->__pyx_ptype_6Recode_Request
3221 #define __pyx_ptype_6Recode_Task __pyx_mstate_global->__pyx_ptype_6Recode_Task
3222 #define __pyx_n_s_ALIAS_FIND_AS_CHARSET __pyx_mstate_global->__pyx_n_s_ALIAS_FIND_AS_CHARSET
3223 #define __pyx_n_s_ALIAS_FIND_AS_EITHER __pyx_mstate_global->__pyx_n_s_ALIAS_FIND_AS_EITHER
3224 #define __pyx_n_s_ALIAS_FIND_AS_SURFACE __pyx_mstate_global->__pyx_n_s_ALIAS_FIND_AS_SURFACE
3225 #define __pyx_n_s_AMBIGUOUS_OUTPUT __pyx_mstate_global->__pyx_n_s_AMBIGUOUS_OUTPUT
3226 #define __pyx_n_s_AUTO_ABORT_FLAG __pyx_mstate_global->__pyx_n_s_AUTO_ABORT_FLAG
3227 #define __pyx_n_s_BYTE_ORDER_MARK __pyx_mstate_global->__pyx_n_s_BYTE_ORDER_MARK
3228 #define __pyx_n_s_BYTE_ORDER_MARK_SWAPPED __pyx_mstate_global->__pyx_n_s_BYTE_ORDER_MARK_SWAPPED
3229 #define __pyx_n_s_BYTE_TO_BYTE __pyx_mstate_global->__pyx_n_s_BYTE_TO_BYTE
3230 #define __pyx_n_s_BYTE_TO_STRING __pyx_mstate_global->__pyx_n_s_BYTE_TO_STRING
3231 #define __pyx_n_s_CHARSET __pyx_mstate_global->__pyx_n_s_CHARSET
3232 #define __pyx_n_s_COMBINE_EXPLODE __pyx_mstate_global->__pyx_n_s_COMBINE_EXPLODE
3233 #define __pyx_n_s_COMBINE_STEP __pyx_mstate_global->__pyx_n_s_COMBINE_STEP
3234 #define __pyx_n_s_DATA_SURFACE __pyx_mstate_global->__pyx_n_s_DATA_SURFACE
3235 #define __pyx_n_s_DECIMAL_FORMAT __pyx_mstate_global->__pyx_n_s_DECIMAL_FORMAT
3236 #define __pyx_n_s_EXPLODE_DATA __pyx_mstate_global->__pyx_n_s_EXPLODE_DATA
3237 #define __pyx_n_s_EXPLODE_STEP __pyx_mstate_global->__pyx_n_s_EXPLODE_STEP
3238 #define __pyx_n_s_FULL_FORMAT __pyx_mstate_global->__pyx_n_s_FULL_FORMAT
3239 #define __pyx_n_s_HEXADECIMAL_FORMAT __pyx_mstate_global->__pyx_n_s_HEXADECIMAL_FORMAT
3240 #define __pyx_n_s_INTERNAL_ERROR __pyx_mstate_global->__pyx_n_s_INTERNAL_ERROR
3241 #define __pyx_n_s_INVALID_INPUT __pyx_mstate_global->__pyx_n_s_INVALID_INPUT
3242 #define __pyx_n_s_LANGUAGE_C __pyx_mstate_global->__pyx_n_s_LANGUAGE_C
3243 #define __pyx_n_s_LANGUAGE_PERL __pyx_mstate_global->__pyx_n_s_LANGUAGE_PERL
3244 #define __pyx_n_s_MAXIMUM_ERROR __pyx_mstate_global->__pyx_n_s_MAXIMUM_ERROR
3245 #define __pyx_n_s_NOT_A_CHARACTER __pyx_mstate_global->__pyx_n_s_NOT_A_CHARACTER
3246 #define __pyx_n_s_NOT_CANONICAL __pyx_mstate_global->__pyx_n_s_NOT_CANONICAL
3247 #define __pyx_n_s_NO_CHARSET_DATA __pyx_mstate_global->__pyx_n_s_NO_CHARSET_DATA
3248 #define __pyx_n_s_NO_ERROR __pyx_mstate_global->__pyx_n_s_NO_ERROR
3249 #define __pyx_n_s_NO_FORMAT __pyx_mstate_global->__pyx_n_s_NO_FORMAT
3250 #define __pyx_n_s_NO_ICONV_FLAG __pyx_mstate_global->__pyx_n_s_NO_ICONV_FLAG
3251 #define __pyx_n_s_NO_LANGUAGE __pyx_mstate_global->__pyx_n_s_NO_LANGUAGE
3252 #define __pyx_n_s_NO_STEP_TABLE __pyx_mstate_global->__pyx_n_s_NO_STEP_TABLE
3253 #define __pyx_n_s_NO_SYMBOL_TYPE __pyx_mstate_global->__pyx_n_s_NO_SYMBOL_TYPE
3254 #define __pyx_n_s_NUL __pyx_mstate_global->__pyx_n_s_NUL
3255 #define __pyx_n_s_OCTAL_FORMAT __pyx_mstate_global->__pyx_n_s_OCTAL_FORMAT
3256 #define __pyx_n_s_Outer __pyx_mstate_global->__pyx_n_s_Outer
3257 #define __pyx_n_s_Outer___reduce_cython __pyx_mstate_global->__pyx_n_s_Outer___reduce_cython
3258 #define __pyx_n_s_Outer___setstate_cython __pyx_mstate_global->__pyx_n_s_Outer___setstate_cython
3259 #define __pyx_n_s_Outer_all_charsets __pyx_mstate_global->__pyx_n_s_Outer_all_charsets
3260 #define __pyx_n_s_Outer_all_surfaces __pyx_mstate_global->__pyx_n_s_Outer_all_surfaces
3261 #define __pyx_n_s_Outer_concise_charset __pyx_mstate_global->__pyx_n_s_Outer_concise_charset
3262 #define __pyx_n_s_Outer_default_charset __pyx_mstate_global->__pyx_n_s_Outer_default_charset
3263 #define __pyx_n_s_Outer_full_charset __pyx_mstate_global->__pyx_n_s_Outer_full_charset
3264 #define __pyx_n_s_Outer_recode __pyx_mstate_global->__pyx_n_s_Outer_recode
3265 #define __pyx_n_s_REPLACEMENT_CHARACTER __pyx_mstate_global->__pyx_n_s_REPLACEMENT_CHARACTER
3266 #define __pyx_n_s_Recode __pyx_mstate_global->__pyx_n_s_Recode
3267 #define __pyx_kp_s_Recode_pyx __pyx_mstate_global->__pyx_kp_s_Recode_pyx
3268 #define __pyx_n_s_Request __pyx_mstate_global->__pyx_n_s_Request
3269 #define __pyx_n_s_Request___reduce_cython __pyx_mstate_global->__pyx_n_s_Request___reduce_cython
3270 #define __pyx_n_s_Request___setstate_cython __pyx_mstate_global->__pyx_n_s_Request___setstate_cython
3271 #define __pyx_n_s_Request_format_table __pyx_mstate_global->__pyx_n_s_Request_format_table
3272 #define __pyx_n_s_Request_pair_sequence __pyx_mstate_global->__pyx_n_s_Request_pair_sequence
3273 #define __pyx_n_s_Request_scan __pyx_mstate_global->__pyx_n_s_Request_scan
3274 #define __pyx_n_s_Request_set_verbose __pyx_mstate_global->__pyx_n_s_Request_set_verbose
3275 #define __pyx_n_s_Request_string __pyx_mstate_global->__pyx_n_s_Request_string
3276 #define __pyx_n_s_SIZE_1 __pyx_mstate_global->__pyx_n_s_SIZE_1
3277 #define __pyx_n_s_SIZE_2 __pyx_mstate_global->__pyx_n_s_SIZE_2
3278 #define __pyx_n_s_SIZE_4 __pyx_mstate_global->__pyx_n_s_SIZE_4
3279 #define __pyx_n_s_SIZE_N __pyx_mstate_global->__pyx_n_s_SIZE_N
3280 #define __pyx_n_s_STRICT_MAPPING_FLAG __pyx_mstate_global->__pyx_n_s_STRICT_MAPPING_FLAG
3281 #define __pyx_n_s_STRING_TO_UCS2 __pyx_mstate_global->__pyx_n_s_STRING_TO_UCS2
3282 #define __pyx_n_s_STRIP_DATA __pyx_mstate_global->__pyx_n_s_STRIP_DATA
3283 #define __pyx_n_s_STRIP_SIZE __pyx_mstate_global->__pyx_n_s_STRIP_SIZE
3284 #define __pyx_n_s_SWAP_NO __pyx_mstate_global->__pyx_n_s_SWAP_NO
3285 #define __pyx_n_s_SWAP_UNDECIDED __pyx_mstate_global->__pyx_n_s_SWAP_UNDECIDED
3286 #define __pyx_n_s_SWAP_YES __pyx_mstate_global->__pyx_n_s_SWAP_YES
3287 #define __pyx_n_s_SYMBOL_CREATE_CHARSET __pyx_mstate_global->__pyx_n_s_SYMBOL_CREATE_CHARSET
3288 #define __pyx_n_s_SYMBOL_CREATE_DATA_SURFACE __pyx_mstate_global->__pyx_n_s_SYMBOL_CREATE_DATA_SURFACE
3289 #define __pyx_n_s_SYSTEM_ERROR __pyx_mstate_global->__pyx_n_s_SYSTEM_ERROR
3290 #define __pyx_n_s_Task __pyx_mstate_global->__pyx_n_s_Task
3291 #define __pyx_n_s_Task___reduce_cython __pyx_mstate_global->__pyx_n_s_Task___reduce_cython
3292 #define __pyx_n_s_Task___setstate_cython __pyx_mstate_global->__pyx_n_s_Task___setstate_cython
3293 #define __pyx_n_s_Task_get_error __pyx_mstate_global->__pyx_n_s_Task_get_error
3294 #define __pyx_n_s_Task_get_output __pyx_mstate_global->__pyx_n_s_Task_get_output
3295 #define __pyx_n_s_Task_perform __pyx_mstate_global->__pyx_n_s_Task_perform
3296 #define __pyx_n_s_Task_set_abort_level __pyx_mstate_global->__pyx_n_s_Task_set_abort_level
3297 #define __pyx_n_s_Task_set_byte_order_mark __pyx_mstate_global->__pyx_n_s_Task_set_byte_order_mark
3298 #define __pyx_n_s_Task_set_fail_level __pyx_mstate_global->__pyx_n_s_Task_set_fail_level
3299 #define __pyx_n_s_Task_set_input __pyx_mstate_global->__pyx_n_s_Task_set_input
3300 #define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError
3301 #define __pyx_n_s_UCS2_TO_BYTE __pyx_mstate_global->__pyx_n_s_UCS2_TO_BYTE
3302 #define __pyx_n_s_UCS2_TO_STRING __pyx_mstate_global->__pyx_n_s_UCS2_TO_STRING
3303 #define __pyx_n_s_UNTRANSLATABLE __pyx_mstate_global->__pyx_n_s_UNTRANSLATABLE
3304 #define __pyx_n_s_USER_ERROR __pyx_mstate_global->__pyx_n_s_USER_ERROR
3305 #define __pyx_n_s__41 __pyx_mstate_global->__pyx_n_s__41
3306 #define __pyx_n_s_abort_level __pyx_mstate_global->__pyx_n_s_abort_level
3307 #define __pyx_n_s_all_charsets __pyx_mstate_global->__pyx_n_s_all_charsets
3308 #define __pyx_n_s_all_surfaces __pyx_mstate_global->__pyx_n_s_all_surfaces
3309 #define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines
3310 #define __pyx_n_s_auto_abort __pyx_mstate_global->__pyx_n_s_auto_abort
3311 #define __pyx_n_s_charset __pyx_mstate_global->__pyx_n_s_charset
3312 #define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback
3313 #define __pyx_n_s_command __pyx_mstate_global->__pyx_n_s_command
3314 #define __pyx_n_s_concise_charset __pyx_mstate_global->__pyx_n_s_concise_charset
3315 #define __pyx_n_s_counter __pyx_mstate_global->__pyx_n_s_counter
3316 #define __pyx_n_s_default_charset __pyx_mstate_global->__pyx_n_s_default_charset
3317 #define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict
3318 #define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable
3319 #define __pyx_n_s_doc __pyx_mstate_global->__pyx_n_s_doc
3320 #define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable
3321 #define __pyx_n_s_error __pyx_mstate_global->__pyx_n_s_error
3322 #define __pyx_n_s_fail_level __pyx_mstate_global->__pyx_n_s_fail_level
3323 #define __pyx_n_s_flag __pyx_mstate_global->__pyx_n_s_flag
3324 #define __pyx_n_s_format __pyx_mstate_global->__pyx_n_s_format
3325 #define __pyx_n_s_format_table __pyx_mstate_global->__pyx_n_s_format_table
3326 #define __pyx_n_s_full_charset __pyx_mstate_global->__pyx_n_s_full_charset
3327 #define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc
3328 #define __pyx_n_s_get_error __pyx_mstate_global->__pyx_n_s_get_error
3329 #define __pyx_n_s_get_output __pyx_mstate_global->__pyx_n_s_get_output
3330 #define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate
3331 #define __pyx_n_s_iconv __pyx_mstate_global->__pyx_n_s_iconv
3332 #define __pyx_n_s_init_subclass __pyx_mstate_global->__pyx_n_s_init_subclass
3333 #define __pyx_n_s_input __pyx_mstate_global->__pyx_n_s_input
3334 #define __pyx_n_s_input_len __pyx_mstate_global->__pyx_n_s_input_len
3335 #define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine
3336 #define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled
3337 #define __pyx_n_s_language __pyx_mstate_global->__pyx_n_s_language
3338 #define __pyx_n_s_list __pyx_mstate_global->__pyx_n_s_list
3339 #define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main
3340 #define __pyx_n_s_metaclass __pyx_mstate_global->__pyx_n_s_metaclass
3341 #define __pyx_n_s_module __pyx_mstate_global->__pyx_n_s_module
3342 #define __pyx_n_s_mro_entries __pyx_mstate_global->__pyx_n_s_mro_entries
3343 #define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name
3344 #define __pyx_n_s_ok __pyx_mstate_global->__pyx_n_s_ok
3345 #define __pyx_n_s_outer __pyx_mstate_global->__pyx_n_s_outer
3346 #define __pyx_n_s_output __pyx_mstate_global->__pyx_n_s_output
3347 #define __pyx_n_s_output_allocated __pyx_mstate_global->__pyx_n_s_output_allocated
3348 #define __pyx_n_s_output_len __pyx_mstate_global->__pyx_n_s_output_len
3349 #define __pyx_n_s_pair_sequence __pyx_mstate_global->__pyx_n_s_pair_sequence
3350 #define __pyx_n_s_perform __pyx_mstate_global->__pyx_n_s_perform
3351 #define __pyx_n_s_prepare __pyx_mstate_global->__pyx_n_s_prepare
3352 #define __pyx_n_s_previous __pyx_mstate_global->__pyx_n_s_previous
3353 #define __pyx_n_s_py_string __pyx_mstate_global->__pyx_n_s_py_string
3354 #define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state
3355 #define __pyx_n_s_qualname __pyx_mstate_global->__pyx_n_s_qualname
3356 #define __pyx_n_s_recode __pyx_mstate_global->__pyx_n_s_recode
3357 #define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce
3358 #define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython
3359 #define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex
3360 #define __pyx_n_s_request __pyx_mstate_global->__pyx_n_s_request
3361 #define __pyx_n_s_result __pyx_mstate_global->__pyx_n_s_result
3362 #define __pyx_n_s_saved __pyx_mstate_global->__pyx_n_s_saved
3363 #define __pyx_n_s_scan __pyx_mstate_global->__pyx_n_s_scan
3364 #define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self
3365 #define __pyx_kp_s_self_outer_cannot_be_converted_t __pyx_mstate_global->__pyx_kp_s_self_outer_cannot_be_converted_t
3366 #define __pyx_kp_s_self_request_cannot_be_converted __pyx_mstate_global->__pyx_kp_s_self_request_cannot_be_converted
3367 #define __pyx_kp_s_self_task_cannot_be_converted_to __pyx_mstate_global->__pyx_kp_s_self_task_cannot_be_converted_to
3368 #define __pyx_n_s_set_abort_level __pyx_mstate_global->__pyx_n_s_set_abort_level
3369 #define __pyx_n_s_set_byte_order_mark __pyx_mstate_global->__pyx_n_s_set_byte_order_mark
3370 #define __pyx_n_s_set_fail_level __pyx_mstate_global->__pyx_n_s_set_fail_level
3371 #define __pyx_n_s_set_input __pyx_mstate_global->__pyx_n_s_set_input
3372 #define __pyx_n_s_set_name __pyx_mstate_global->__pyx_n_s_set_name
3373 #define __pyx_n_s_set_verbose __pyx_mstate_global->__pyx_n_s_set_verbose
3374 #define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate
3375 #define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython
3376 #define __pyx_n_s_step __pyx_mstate_global->__pyx_n_s_step
3377 #define __pyx_n_s_strict __pyx_mstate_global->__pyx_n_s_strict
3378 #define __pyx_n_s_string __pyx_mstate_global->__pyx_n_s_string
3379 #define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource
3380 #define __pyx_n_s_super __pyx_mstate_global->__pyx_n_s_super
3381 #define __pyx_n_s_symbol __pyx_mstate_global->__pyx_n_s_symbol
3382 #define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test
3383 #define __pyx_n_s_text __pyx_mstate_global->__pyx_n_s_text
3384 #define __pyx_n_s_verbose __pyx_mstate_global->__pyx_n_s_verbose
3385 #define __pyx_n_s_xDONE __pyx_mstate_global->__pyx_n_s_xDONE
3386 #define __pyx_n_s_xELSE __pyx_mstate_global->__pyx_n_s_xELSE
3387 #define __pyx_k_ __pyx_mstate_global->__pyx_k_
3388 #define __pyx_tuple__2 __pyx_mstate_global->__pyx_tuple__2
3389 #define __pyx_tuple__4 __pyx_mstate_global->__pyx_tuple__4
3390 #define __pyx_tuple__7 __pyx_mstate_global->__pyx_tuple__7
3391 #define __pyx_tuple__9 __pyx_mstate_global->__pyx_tuple__9
3392 #define __pyx_tuple__11 __pyx_mstate_global->__pyx_tuple__11
3393 #define __pyx_tuple__13 __pyx_mstate_global->__pyx_tuple__13
3394 #define __pyx_tuple__15 __pyx_mstate_global->__pyx_tuple__15
3395 #define __pyx_tuple__17 __pyx_mstate_global->__pyx_tuple__17
3396 #define __pyx_tuple__19 __pyx_mstate_global->__pyx_tuple__19
3397 #define __pyx_tuple__21 __pyx_mstate_global->__pyx_tuple__21
3398 #define __pyx_tuple__23 __pyx_mstate_global->__pyx_tuple__23
3399 #define __pyx_tuple__25 __pyx_mstate_global->__pyx_tuple__25
3400 #define __pyx_tuple__31 __pyx_mstate_global->__pyx_tuple__31
3401 #define __pyx_tuple__33 __pyx_mstate_global->__pyx_tuple__33
3402 #define __pyx_tuple__35 __pyx_mstate_global->__pyx_tuple__35
3403 #define __pyx_codeobj__3 __pyx_mstate_global->__pyx_codeobj__3
3404 #define __pyx_codeobj__5 __pyx_mstate_global->__pyx_codeobj__5
3405 #define __pyx_codeobj__6 __pyx_mstate_global->__pyx_codeobj__6
3406 #define __pyx_codeobj__8 __pyx_mstate_global->__pyx_codeobj__8
3407 #define __pyx_codeobj__10 __pyx_mstate_global->__pyx_codeobj__10
3408 #define __pyx_codeobj__12 __pyx_mstate_global->__pyx_codeobj__12
3409 #define __pyx_codeobj__14 __pyx_mstate_global->__pyx_codeobj__14
3410 #define __pyx_codeobj__16 __pyx_mstate_global->__pyx_codeobj__16
3411 #define __pyx_codeobj__18 __pyx_mstate_global->__pyx_codeobj__18
3412 #define __pyx_codeobj__20 __pyx_mstate_global->__pyx_codeobj__20
3413 #define __pyx_codeobj__22 __pyx_mstate_global->__pyx_codeobj__22
3414 #define __pyx_codeobj__24 __pyx_mstate_global->__pyx_codeobj__24
3415 #define __pyx_codeobj__26 __pyx_mstate_global->__pyx_codeobj__26
3416 #define __pyx_codeobj__27 __pyx_mstate_global->__pyx_codeobj__27
3417 #define __pyx_codeobj__28 __pyx_mstate_global->__pyx_codeobj__28
3418 #define __pyx_codeobj__29 __pyx_mstate_global->__pyx_codeobj__29
3419 #define __pyx_codeobj__30 __pyx_mstate_global->__pyx_codeobj__30
3420 #define __pyx_codeobj__32 __pyx_mstate_global->__pyx_codeobj__32
3421 #define __pyx_codeobj__34 __pyx_mstate_global->__pyx_codeobj__34
3422 #define __pyx_codeobj__36 __pyx_mstate_global->__pyx_codeobj__36
3423 #define __pyx_codeobj__37 __pyx_mstate_global->__pyx_codeobj__37
3424 #define __pyx_codeobj__38 __pyx_mstate_global->__pyx_codeobj__38
3425 #define __pyx_codeobj__39 __pyx_mstate_global->__pyx_codeobj__39
3426 #define __pyx_codeobj__40 __pyx_mstate_global->__pyx_codeobj__40
3427 /* #### Code section: module_code ### */
3428
3429 /* "Recode.pyx":525
3430 * cdef RECODE_OUTER outer
3431 *
3432 * def __init__(self, auto_abort=False, iconv=False, strict=False): # <<<<<<<<<<<<<<
3433 * cdef int flags
3434 * cdef RECODE_SINGLE single
3435 */
3436
3437 /* Python wrapper */
3438 static int __pyx_pw_6Recode_5Outer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3439 static int __pyx_pw_6Recode_5Outer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3440 PyObject *__pyx_v_auto_abort = 0;
3441 PyObject *__pyx_v_iconv = 0;
3442 PyObject *__pyx_v_strict = 0;
3443 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
3444 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
3445 PyObject* values[3] = {0,0,0};
3446 int __pyx_lineno = 0;
3447 const char *__pyx_filename = NULL;
3448 int __pyx_clineno = 0;
3449 int __pyx_r;
3450 __Pyx_RefNannyDeclarations
3451 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
3452 #if CYTHON_ASSUME_SAFE_MACROS
3453 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
3454 #else
3455 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
3456 #endif
3457 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
3458 {
3459 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_auto_abort,&__pyx_n_s_iconv,&__pyx_n_s_strict,0};
3460 values[0] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_False));
3461 values[1] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_False));
3462 values[2] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_False));
3463 if (__pyx_kwds) {
3464 Py_ssize_t kw_args;
3465 switch (__pyx_nargs) {
3466 case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
3467 CYTHON_FALLTHROUGH;
3468 case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
3469 CYTHON_FALLTHROUGH;
3470 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
3471 CYTHON_FALLTHROUGH;
3472 case 0: break;
3473 default: goto __pyx_L5_argtuple_error;
3474 }
3475 kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
3476 switch (__pyx_nargs) {
3477 case 0:
3478 if (kw_args > 0) {
3479 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_auto_abort);
3480 if (value) { values[0] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
3481 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 525, __pyx_L3_error)
3482 }
3483 CYTHON_FALLTHROUGH;
3484 case 1:
3485 if (kw_args > 0) {
3486 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_iconv);
3487 if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
3488 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 525, __pyx_L3_error)
3489 }
3490 CYTHON_FALLTHROUGH;
3491 case 2:
3492 if (kw_args > 0) {
3493 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_strict);
3494 if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
3495 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 525, __pyx_L3_error)
3496 }
3497 }
3498 if (unlikely(kw_args > 0)) {
3499 const Py_ssize_t kwd_pos_args = __pyx_nargs;
3500 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(1, 525, __pyx_L3_error)
3501 }
3502 } else {
3503 switch (__pyx_nargs) {
3504 case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
3505 CYTHON_FALLTHROUGH;
3506 case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
3507 CYTHON_FALLTHROUGH;
3508 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
3509 CYTHON_FALLTHROUGH;
3510 case 0: break;
3511 default: goto __pyx_L5_argtuple_error;
3512 }
3513 }
3514 __pyx_v_auto_abort = values[0];
3515 __pyx_v_iconv = values[1];
3516 __pyx_v_strict = values[2];
3517 }
3518 goto __pyx_L6_skip;
3519 __pyx_L5_argtuple_error:;
3520 __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, __pyx_nargs); __PYX_ERR(1, 525, __pyx_L3_error)
3521 __pyx_L6_skip:;
3522 goto __pyx_L4_argument_unpacking_done;
3523 __pyx_L3_error:;
3524 {
3525 Py_ssize_t __pyx_temp;
3526 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
3527 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
3528 }
3529 }
3530 __Pyx_AddTraceback("Recode.Outer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3531 __Pyx_RefNannyFinishContext();
3532 return -1;
3533 __pyx_L4_argument_unpacking_done:;
3534 __pyx_r = __pyx_pf_6Recode_5Outer___init__(((struct __pyx_obj_6Recode_Outer *)__pyx_v_self), __pyx_v_auto_abort, __pyx_v_iconv, __pyx_v_strict);
3535
3536 /* function exit code */
3537 {
3538 Py_ssize_t __pyx_temp;
3539 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
3540 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
3541 }
3542 }
3543 __Pyx_RefNannyFinishContext();
3544 return __pyx_r;
3545 }
3546
3547 static int __pyx_pf_6Recode_5Outer___init__(struct __pyx_obj_6Recode_Outer *__pyx_v_self, PyObject *__pyx_v_auto_abort, PyObject *__pyx_v_iconv, PyObject *__pyx_v_strict) {
3548 int __pyx_v_flags;
3549 RECODE_SINGLE __pyx_v_single;
3550 int __pyx_r;
3551 int __pyx_t_1;
3552 int __pyx_t_2;
3553 struct recode_single *__pyx_t_3;
3554 int __pyx_lineno = 0;
3555 const char *__pyx_filename = NULL;
3556 int __pyx_clineno = 0;
3557
3558 /* "Recode.pyx":528
3559 * cdef int flags
3560 * cdef RECODE_SINGLE single
3561 * flags = 0 # <<<<<<<<<<<<<<
3562 * if auto_abort:
3563 * flags = flags | RECODE_AUTO_ABORT_FLAG
3564 */
3565 __pyx_v_flags = 0;
3566
3567 /* "Recode.pyx":529
3568 * cdef RECODE_SINGLE single
3569 * flags = 0
3570 * if auto_abort: # <<<<<<<<<<<<<<
3571 * flags = flags | RECODE_AUTO_ABORT_FLAG
3572 * if not iconv:
3573 */
3574 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_auto_abort); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 529, __pyx_L1_error)
3575 if (__pyx_t_1) {
3576
3577 /* "Recode.pyx":530
3578 * flags = 0
3579 * if auto_abort:
3580 * flags = flags | RECODE_AUTO_ABORT_FLAG # <<<<<<<<<<<<<<
3581 * if not iconv:
3582 * flags = flags | RECODE_NO_ICONV_FLAG
3583 */
3584 __pyx_v_flags = (__pyx_v_flags | RECODE_AUTO_ABORT_FLAG);
3585
3586 /* "Recode.pyx":529
3587 * cdef RECODE_SINGLE single
3588 * flags = 0
3589 * if auto_abort: # <<<<<<<<<<<<<<
3590 * flags = flags | RECODE_AUTO_ABORT_FLAG
3591 * if not iconv:
3592 */
3593 }
3594
3595 /* "Recode.pyx":531
3596 * if auto_abort:
3597 * flags = flags | RECODE_AUTO_ABORT_FLAG
3598 * if not iconv: # <<<<<<<<<<<<<<
3599 * flags = flags | RECODE_NO_ICONV_FLAG
3600 * if strict:
3601 */
3602 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_iconv); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 531, __pyx_L1_error)
3603 __pyx_t_2 = (!__pyx_t_1);
3604 if (__pyx_t_2) {
3605
3606 /* "Recode.pyx":532
3607 * flags = flags | RECODE_AUTO_ABORT_FLAG
3608 * if not iconv:
3609 * flags = flags | RECODE_NO_ICONV_FLAG # <<<<<<<<<<<<<<
3610 * if strict:
3611 * flags = flags | RECODE_STRICT_MAPPING_FLAG
3612 */
3613 __pyx_v_flags = (__pyx_v_flags | RECODE_NO_ICONV_FLAG);
3614
3615 /* "Recode.pyx":531
3616 * if auto_abort:
3617 * flags = flags | RECODE_AUTO_ABORT_FLAG
3618 * if not iconv: # <<<<<<<<<<<<<<
3619 * flags = flags | RECODE_NO_ICONV_FLAG
3620 * if strict:
3621 */
3622 }
3623
3624 /* "Recode.pyx":533
3625 * if not iconv:
3626 * flags = flags | RECODE_NO_ICONV_FLAG
3627 * if strict: # <<<<<<<<<<<<<<
3628 * flags = flags | RECODE_STRICT_MAPPING_FLAG
3629 * self.outer = recode_new_outer(flags)
3630 */
3631 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_strict); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 533, __pyx_L1_error)
3632 if (__pyx_t_2) {
3633
3634 /* "Recode.pyx":534
3635 * flags = flags | RECODE_NO_ICONV_FLAG
3636 * if strict:
3637 * flags = flags | RECODE_STRICT_MAPPING_FLAG # <<<<<<<<<<<<<<
3638 * self.outer = recode_new_outer(flags)
3639 * if strict:
3640 */
3641 __pyx_v_flags = (__pyx_v_flags | RECODE_STRICT_MAPPING_FLAG);
3642
3643 /* "Recode.pyx":533
3644 * if not iconv:
3645 * flags = flags | RECODE_NO_ICONV_FLAG
3646 * if strict: # <<<<<<<<<<<<<<
3647 * flags = flags | RECODE_STRICT_MAPPING_FLAG
3648 * self.outer = recode_new_outer(flags)
3649 */
3650 }
3651
3652 /* "Recode.pyx":535
3653 * if strict:
3654 * flags = flags | RECODE_STRICT_MAPPING_FLAG
3655 * self.outer = recode_new_outer(flags) # <<<<<<<<<<<<<<
3656 * if strict:
3657 * single = self.outer.single_list
3658 */
3659 __pyx_v_self->outer = recode_new_outer(__pyx_v_flags);
3660
3661 /* "Recode.pyx":536
3662 * flags = flags | RECODE_STRICT_MAPPING_FLAG
3663 * self.outer = recode_new_outer(flags)
3664 * if strict: # <<<<<<<<<<<<<<
3665 * single = self.outer.single_list
3666 * while single is not NULL:
3667 */
3668 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_strict); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 536, __pyx_L1_error)
3669 if (__pyx_t_2) {
3670
3671 /* "Recode.pyx":537
3672 * self.outer = recode_new_outer(flags)
3673 * if strict:
3674 * single = self.outer.single_list # <<<<<<<<<<<<<<
3675 * while single is not NULL:
3676 * single.fallback_routine = NULL
3677 */
3678 __pyx_t_3 = __pyx_v_self->outer->single_list;
3679 __pyx_v_single = __pyx_t_3;
3680
3681 /* "Recode.pyx":538
3682 * if strict:
3683 * single = self.outer.single_list
3684 * while single is not NULL: # <<<<<<<<<<<<<<
3685 * single.fallback_routine = NULL
3686 * single = single.next
3687 */
3688 while (1) {
3689 __pyx_t_2 = (__pyx_v_single != NULL);
3690 if (!__pyx_t_2) break;
3691
3692 /* "Recode.pyx":539
3693 * single = self.outer.single_list
3694 * while single is not NULL:
3695 * single.fallback_routine = NULL # <<<<<<<<<<<<<<
3696 * single = single.next
3697 *
3698 */
3699 __pyx_v_single->fallback_routine = NULL;
3700
3701 /* "Recode.pyx":540
3702 * while single is not NULL:
3703 * single.fallback_routine = NULL
3704 * single = single.next # <<<<<<<<<<<<<<
3705 *
3706 * def __dealloc__(self):
3707 */
3708 __pyx_t_3 = __pyx_v_single->next;
3709 __pyx_v_single = __pyx_t_3;
3710 }
3711
3712 /* "Recode.pyx":536
3713 * flags = flags | RECODE_STRICT_MAPPING_FLAG
3714 * self.outer = recode_new_outer(flags)
3715 * if strict: # <<<<<<<<<<<<<<
3716 * single = self.outer.single_list
3717 * while single is not NULL:
3718 */
3719 }
3720
3721 /* "Recode.pyx":525
3722 * cdef RECODE_OUTER outer
3723 *
3724 * def __init__(self, auto_abort=False, iconv=False, strict=False): # <<<<<<<<<<<<<<
3725 * cdef int flags
3726 * cdef RECODE_SINGLE single
3727 */
3728
3729 /* function exit code */
3730 __pyx_r = 0;
3731 goto __pyx_L0;
3732 __pyx_L1_error:;
3733 __Pyx_AddTraceback("Recode.Outer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3734 __pyx_r = -1;
3735 __pyx_L0:;
3736 return __pyx_r;
3737 }
3738
3739 /* "Recode.pyx":542
3740 * single = single.next
3741 *
3742 * def __dealloc__(self): # <<<<<<<<<<<<<<
3743 * recode_delete_outer(self.outer)
3744 *
3745 */
3746
3747 /* Python wrapper */
3748 static void __pyx_pw_6Recode_5Outer_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
3749 static void __pyx_pw_6Recode_5Outer_3__dealloc__(PyObject *__pyx_v_self) {
3750 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
3751 __Pyx_RefNannyDeclarations
3752 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
3753 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
3754 __pyx_pf_6Recode_5Outer_2__dealloc__(((struct __pyx_obj_6Recode_Outer *)__pyx_v_self));
3755
3756 /* function exit code */
3757 __Pyx_RefNannyFinishContext();
3758 }
3759
3760 static void __pyx_pf_6Recode_5Outer_2__dealloc__(struct __pyx_obj_6Recode_Outer *__pyx_v_self) {
3761
3762 /* "Recode.pyx":543
3763 *
3764 * def __dealloc__(self):
3765 * recode_delete_outer(self.outer) # <<<<<<<<<<<<<<
3766 *
3767 * def default_charset(self):
3768 */
3769 (void)(recode_delete_outer(__pyx_v_self->outer));
3770
3771 /* "Recode.pyx":542
3772 * single = single.next
3773 *
3774 * def __dealloc__(self): # <<<<<<<<<<<<<<
3775 * recode_delete_outer(self.outer)
3776 *
3777 */
3778
3779 /* function exit code */
3780 }
3781
3782 /* "Recode.pyx":545
3783 * recode_delete_outer(self.outer)
3784 *
3785 * def default_charset(self): # <<<<<<<<<<<<<<
3786 * return locale_charset()
3787 *
3788 */
3789
3790 /* Python wrapper */
3791 static PyObject *__pyx_pw_6Recode_5Outer_5default_charset(PyObject *__pyx_v_self,
3792 #if CYTHON_METH_FASTCALL
3793 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
3794 #else
3795 PyObject *__pyx_args, PyObject *__pyx_kwds
3796 #endif
3797 ); /*proto*/
3798 static PyMethodDef __pyx_mdef_6Recode_5Outer_5default_charset = {"default_charset", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_5Outer_5default_charset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
3799 static PyObject *__pyx_pw_6Recode_5Outer_5default_charset(PyObject *__pyx_v_self,
3800 #if CYTHON_METH_FASTCALL
3801 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
3802 #else
3803 PyObject *__pyx_args, PyObject *__pyx_kwds
3804 #endif
3805 ) {
3806 #if !CYTHON_METH_FASTCALL
3807 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
3808 #endif
3809 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
3810 PyObject *__pyx_r = 0;
3811 __Pyx_RefNannyDeclarations
3812 __Pyx_RefNannySetupContext("default_charset (wrapper)", 0);
3813 #if !CYTHON_METH_FASTCALL
3814 #if CYTHON_ASSUME_SAFE_MACROS
3815 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
3816 #else
3817 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
3818 #endif
3819 #endif
3820 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
3821 if (unlikely(__pyx_nargs > 0)) {
3822 __Pyx_RaiseArgtupleInvalid("default_charset", 1, 0, 0, __pyx_nargs); return NULL;}
3823 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "default_charset", 0))) return NULL;
3824 __pyx_r = __pyx_pf_6Recode_5Outer_4default_charset(((struct __pyx_obj_6Recode_Outer *)__pyx_v_self));
3825
3826 /* function exit code */
3827 __Pyx_RefNannyFinishContext();
3828 return __pyx_r;
3829 }
3830
3831 static PyObject *__pyx_pf_6Recode_5Outer_4default_charset(CYTHON_UNUSED struct __pyx_obj_6Recode_Outer *__pyx_v_self) {
3832 PyObject *__pyx_r = NULL;
3833 __Pyx_RefNannyDeclarations
3834 PyObject *__pyx_t_1 = NULL;
3835 int __pyx_lineno = 0;
3836 const char *__pyx_filename = NULL;
3837 int __pyx_clineno = 0;
3838 __Pyx_RefNannySetupContext("default_charset", 1);
3839
3840 /* "Recode.pyx":546
3841 *
3842 * def default_charset(self):
3843 * return locale_charset() # <<<<<<<<<<<<<<
3844 *
3845 * def all_charsets(self):
3846 */
3847 __Pyx_XDECREF(__pyx_r);
3848 __pyx_t_1 = __Pyx_PyBytes_FromString(locale_charset()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 546, __pyx_L1_error)
3849 __Pyx_GOTREF(__pyx_t_1);
3850 __pyx_r = __pyx_t_1;
3851 __pyx_t_1 = 0;
3852 goto __pyx_L0;
3853
3854 /* "Recode.pyx":545
3855 * recode_delete_outer(self.outer)
3856 *
3857 * def default_charset(self): # <<<<<<<<<<<<<<
3858 * return locale_charset()
3859 *
3860 */
3861
3862 /* function exit code */
3863 __pyx_L1_error:;
3864 __Pyx_XDECREF(__pyx_t_1);
3865 __Pyx_AddTraceback("Recode.Outer.default_charset", __pyx_clineno, __pyx_lineno, __pyx_filename);
3866 __pyx_r = NULL;
3867 __pyx_L0:;
3868 __Pyx_XGIVEREF(__pyx_r);
3869 __Pyx_RefNannyFinishContext();
3870 return __pyx_r;
3871 }
3872
3873 /* "Recode.pyx":548
3874 * return locale_charset()
3875 *
3876 * def all_charsets(self): # <<<<<<<<<<<<<<
3877 * list = []
3878 * cdef RECODE_SYMBOL symbol
3879 */
3880
3881 /* Python wrapper */
3882 static PyObject *__pyx_pw_6Recode_5Outer_7all_charsets(PyObject *__pyx_v_self,
3883 #if CYTHON_METH_FASTCALL
3884 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
3885 #else
3886 PyObject *__pyx_args, PyObject *__pyx_kwds
3887 #endif
3888 ); /*proto*/
3889 static PyMethodDef __pyx_mdef_6Recode_5Outer_7all_charsets = {"all_charsets", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_5Outer_7all_charsets, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
3890 static PyObject *__pyx_pw_6Recode_5Outer_7all_charsets(PyObject *__pyx_v_self,
3891 #if CYTHON_METH_FASTCALL
3892 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
3893 #else
3894 PyObject *__pyx_args, PyObject *__pyx_kwds
3895 #endif
3896 ) {
3897 #if !CYTHON_METH_FASTCALL
3898 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
3899 #endif
3900 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
3901 PyObject *__pyx_r = 0;
3902 __Pyx_RefNannyDeclarations
3903 __Pyx_RefNannySetupContext("all_charsets (wrapper)", 0);
3904 #if !CYTHON_METH_FASTCALL
3905 #if CYTHON_ASSUME_SAFE_MACROS
3906 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
3907 #else
3908 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
3909 #endif
3910 #endif
3911 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
3912 if (unlikely(__pyx_nargs > 0)) {
3913 __Pyx_RaiseArgtupleInvalid("all_charsets", 1, 0, 0, __pyx_nargs); return NULL;}
3914 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "all_charsets", 0))) return NULL;
3915 __pyx_r = __pyx_pf_6Recode_5Outer_6all_charsets(((struct __pyx_obj_6Recode_Outer *)__pyx_v_self));
3916
3917 /* function exit code */
3918 __Pyx_RefNannyFinishContext();
3919 return __pyx_r;
3920 }
3921
3922 static PyObject *__pyx_pf_6Recode_5Outer_6all_charsets(struct __pyx_obj_6Recode_Outer *__pyx_v_self) {
3923 PyObject *__pyx_v_list = NULL;
3924 RECODE_SYMBOL __pyx_v_symbol;
3925 PyObject *__pyx_r = NULL;
3926 __Pyx_RefNannyDeclarations
3927 PyObject *__pyx_t_1 = NULL;
3928 RECODE_SYMBOL __pyx_t_2;
3929 int __pyx_t_3;
3930 int __pyx_t_4;
3931 int __pyx_t_5;
3932 struct recode_symbol *__pyx_t_6;
3933 int __pyx_lineno = 0;
3934 const char *__pyx_filename = NULL;
3935 int __pyx_clineno = 0;
3936 __Pyx_RefNannySetupContext("all_charsets", 1);
3937
3938 /* "Recode.pyx":549
3939 *
3940 * def all_charsets(self):
3941 * list = [] # <<<<<<<<<<<<<<
3942 * cdef RECODE_SYMBOL symbol
3943 * symbol = self.outer.symbol_list
3944 */
3945 __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 549, __pyx_L1_error)
3946 __Pyx_GOTREF(__pyx_t_1);
3947 __pyx_v_list = ((PyObject*)__pyx_t_1);
3948 __pyx_t_1 = 0;
3949
3950 /* "Recode.pyx":551
3951 * list = []
3952 * cdef RECODE_SYMBOL symbol
3953 * symbol = self.outer.symbol_list # <<<<<<<<<<<<<<
3954 * while symbol is not NULL:
3955 * if (symbol.type == RECODE_CHARSET
3956 */
3957 __pyx_t_2 = __pyx_v_self->outer->symbol_list;
3958 __pyx_v_symbol = __pyx_t_2;
3959
3960 /* "Recode.pyx":552
3961 * cdef RECODE_SYMBOL symbol
3962 * symbol = self.outer.symbol_list
3963 * while symbol is not NULL: # <<<<<<<<<<<<<<
3964 * if (symbol.type == RECODE_CHARSET
3965 * and symbol is not self.outer.iconv_pivot
3966 */
3967 while (1) {
3968 __pyx_t_3 = (__pyx_v_symbol != NULL);
3969 if (!__pyx_t_3) break;
3970
3971 /* "Recode.pyx":553
3972 * symbol = self.outer.symbol_list
3973 * while symbol is not NULL:
3974 * if (symbol.type == RECODE_CHARSET # <<<<<<<<<<<<<<
3975 * and symbol is not self.outer.iconv_pivot
3976 * and symbol is not self.outer.data_symbol):
3977 */
3978 __pyx_t_4 = (__pyx_v_symbol->type == RECODE_CHARSET);
3979 if (__pyx_t_4) {
3980 } else {
3981 __pyx_t_3 = __pyx_t_4;
3982 goto __pyx_L6_bool_binop_done;
3983 }
3984
3985 /* "Recode.pyx":554
3986 * while symbol is not NULL:
3987 * if (symbol.type == RECODE_CHARSET
3988 * and symbol is not self.outer.iconv_pivot # <<<<<<<<<<<<<<
3989 * and symbol is not self.outer.data_symbol):
3990 * list.append(symbol.name)
3991 */
3992 __pyx_t_4 = (__pyx_v_symbol != __pyx_v_self->outer->iconv_pivot);
3993 if (__pyx_t_4) {
3994 } else {
3995 __pyx_t_3 = __pyx_t_4;
3996 goto __pyx_L6_bool_binop_done;
3997 }
3998
3999 /* "Recode.pyx":555
4000 * if (symbol.type == RECODE_CHARSET
4001 * and symbol is not self.outer.iconv_pivot
4002 * and symbol is not self.outer.data_symbol): # <<<<<<<<<<<<<<
4003 * list.append(symbol.name)
4004 * symbol = symbol.next
4005 */
4006 __pyx_t_4 = (__pyx_v_symbol != __pyx_v_self->outer->data_symbol);
4007 __pyx_t_3 = __pyx_t_4;
4008 __pyx_L6_bool_binop_done:;
4009
4010 /* "Recode.pyx":553
4011 * symbol = self.outer.symbol_list
4012 * while symbol is not NULL:
4013 * if (symbol.type == RECODE_CHARSET # <<<<<<<<<<<<<<
4014 * and symbol is not self.outer.iconv_pivot
4015 * and symbol is not self.outer.data_symbol):
4016 */
4017 if (__pyx_t_3) {
4018
4019 /* "Recode.pyx":556
4020 * and symbol is not self.outer.iconv_pivot
4021 * and symbol is not self.outer.data_symbol):
4022 * list.append(symbol.name) # <<<<<<<<<<<<<<
4023 * symbol = symbol.next
4024 * return list
4025 */
4026 __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_symbol->name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 556, __pyx_L1_error)
4027 __Pyx_GOTREF(__pyx_t_1);
4028 __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_list, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 556, __pyx_L1_error)
4029 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4030
4031 /* "Recode.pyx":553
4032 * symbol = self.outer.symbol_list
4033 * while symbol is not NULL:
4034 * if (symbol.type == RECODE_CHARSET # <<<<<<<<<<<<<<
4035 * and symbol is not self.outer.iconv_pivot
4036 * and symbol is not self.outer.data_symbol):
4037 */
4038 }
4039
4040 /* "Recode.pyx":557
4041 * and symbol is not self.outer.data_symbol):
4042 * list.append(symbol.name)
4043 * symbol = symbol.next # <<<<<<<<<<<<<<
4044 * return list
4045 *
4046 */
4047 __pyx_t_6 = __pyx_v_symbol->next;
4048 __pyx_v_symbol = __pyx_t_6;
4049 }
4050
4051 /* "Recode.pyx":558
4052 * list.append(symbol.name)
4053 * symbol = symbol.next
4054 * return list # <<<<<<<<<<<<<<
4055 *
4056 * def all_surfaces(self):
4057 */
4058 __Pyx_XDECREF(__pyx_r);
4059 __Pyx_INCREF(__pyx_v_list);
4060 __pyx_r = __pyx_v_list;
4061 goto __pyx_L0;
4062
4063 /* "Recode.pyx":548
4064 * return locale_charset()
4065 *
4066 * def all_charsets(self): # <<<<<<<<<<<<<<
4067 * list = []
4068 * cdef RECODE_SYMBOL symbol
4069 */
4070
4071 /* function exit code */
4072 __pyx_L1_error:;
4073 __Pyx_XDECREF(__pyx_t_1);
4074 __Pyx_AddTraceback("Recode.Outer.all_charsets", __pyx_clineno, __pyx_lineno, __pyx_filename);
4075 __pyx_r = NULL;
4076 __pyx_L0:;
4077 __Pyx_XDECREF(__pyx_v_list);
4078 __Pyx_XGIVEREF(__pyx_r);
4079 __Pyx_RefNannyFinishContext();
4080 return __pyx_r;
4081 }
4082
4083 /* "Recode.pyx":560
4084 * return list
4085 *
4086 * def all_surfaces(self): # <<<<<<<<<<<<<<
4087 * list = []
4088 * cdef RECODE_SYMBOL symbol
4089 */
4090
4091 /* Python wrapper */
4092 static PyObject *__pyx_pw_6Recode_5Outer_9all_surfaces(PyObject *__pyx_v_self,
4093 #if CYTHON_METH_FASTCALL
4094 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
4095 #else
4096 PyObject *__pyx_args, PyObject *__pyx_kwds
4097 #endif
4098 ); /*proto*/
4099 static PyMethodDef __pyx_mdef_6Recode_5Outer_9all_surfaces = {"all_surfaces", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_5Outer_9all_surfaces, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
4100 static PyObject *__pyx_pw_6Recode_5Outer_9all_surfaces(PyObject *__pyx_v_self,
4101 #if CYTHON_METH_FASTCALL
4102 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
4103 #else
4104 PyObject *__pyx_args, PyObject *__pyx_kwds
4105 #endif
4106 ) {
4107 #if !CYTHON_METH_FASTCALL
4108 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
4109 #endif
4110 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
4111 PyObject *__pyx_r = 0;
4112 __Pyx_RefNannyDeclarations
4113 __Pyx_RefNannySetupContext("all_surfaces (wrapper)", 0);
4114 #if !CYTHON_METH_FASTCALL
4115 #if CYTHON_ASSUME_SAFE_MACROS
4116 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
4117 #else
4118 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
4119 #endif
4120 #endif
4121 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
4122 if (unlikely(__pyx_nargs > 0)) {
4123 __Pyx_RaiseArgtupleInvalid("all_surfaces", 1, 0, 0, __pyx_nargs); return NULL;}
4124 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "all_surfaces", 0))) return NULL;
4125 __pyx_r = __pyx_pf_6Recode_5Outer_8all_surfaces(((struct __pyx_obj_6Recode_Outer *)__pyx_v_self));
4126
4127 /* function exit code */
4128 __Pyx_RefNannyFinishContext();
4129 return __pyx_r;
4130 }
4131
4132 static PyObject *__pyx_pf_6Recode_5Outer_8all_surfaces(struct __pyx_obj_6Recode_Outer *__pyx_v_self) {
4133 PyObject *__pyx_v_list = NULL;
4134 RECODE_SYMBOL __pyx_v_symbol;
4135 PyObject *__pyx_r = NULL;
4136 __Pyx_RefNannyDeclarations
4137 PyObject *__pyx_t_1 = NULL;
4138 RECODE_SYMBOL __pyx_t_2;
4139 int __pyx_t_3;
4140 int __pyx_t_4;
4141 struct recode_symbol *__pyx_t_5;
4142 int __pyx_lineno = 0;
4143 const char *__pyx_filename = NULL;
4144 int __pyx_clineno = 0;
4145 __Pyx_RefNannySetupContext("all_surfaces", 1);
4146
4147 /* "Recode.pyx":561
4148 *
4149 * def all_surfaces(self):
4150 * list = [] # <<<<<<<<<<<<<<
4151 * cdef RECODE_SYMBOL symbol
4152 * symbol = self.outer.symbol_list
4153 */
4154 __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 561, __pyx_L1_error)
4155 __Pyx_GOTREF(__pyx_t_1);
4156 __pyx_v_list = ((PyObject*)__pyx_t_1);
4157 __pyx_t_1 = 0;
4158
4159 /* "Recode.pyx":563
4160 * list = []
4161 * cdef RECODE_SYMBOL symbol
4162 * symbol = self.outer.symbol_list # <<<<<<<<<<<<<<
4163 * while symbol is not NULL:
4164 * if symbol.type != RECODE_CHARSET:
4165 */
4166 __pyx_t_2 = __pyx_v_self->outer->symbol_list;
4167 __pyx_v_symbol = __pyx_t_2;
4168
4169 /* "Recode.pyx":564
4170 * cdef RECODE_SYMBOL symbol
4171 * symbol = self.outer.symbol_list
4172 * while symbol is not NULL: # <<<<<<<<<<<<<<
4173 * if symbol.type != RECODE_CHARSET:
4174 * list.append(symbol.name)
4175 */
4176 while (1) {
4177 __pyx_t_3 = (__pyx_v_symbol != NULL);
4178 if (!__pyx_t_3) break;
4179
4180 /* "Recode.pyx":565
4181 * symbol = self.outer.symbol_list
4182 * while symbol is not NULL:
4183 * if symbol.type != RECODE_CHARSET: # <<<<<<<<<<<<<<
4184 * list.append(symbol.name)
4185 * symbol = symbol.next
4186 */
4187 __pyx_t_3 = (__pyx_v_symbol->type != RECODE_CHARSET);
4188 if (__pyx_t_3) {
4189
4190 /* "Recode.pyx":566
4191 * while symbol is not NULL:
4192 * if symbol.type != RECODE_CHARSET:
4193 * list.append(symbol.name) # <<<<<<<<<<<<<<
4194 * symbol = symbol.next
4195 * return list
4196 */
4197 __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_symbol->name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 566, __pyx_L1_error)
4198 __Pyx_GOTREF(__pyx_t_1);
4199 __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_list, __pyx_t_1); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 566, __pyx_L1_error)
4200 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4201
4202 /* "Recode.pyx":565
4203 * symbol = self.outer.symbol_list
4204 * while symbol is not NULL:
4205 * if symbol.type != RECODE_CHARSET: # <<<<<<<<<<<<<<
4206 * list.append(symbol.name)
4207 * symbol = symbol.next
4208 */
4209 }
4210
4211 /* "Recode.pyx":567
4212 * if symbol.type != RECODE_CHARSET:
4213 * list.append(symbol.name)
4214 * symbol = symbol.next # <<<<<<<<<<<<<<
4215 * return list
4216 *
4217 */
4218 __pyx_t_5 = __pyx_v_symbol->next;
4219 __pyx_v_symbol = __pyx_t_5;
4220 }
4221
4222 /* "Recode.pyx":568
4223 * list.append(symbol.name)
4224 * symbol = symbol.next
4225 * return list # <<<<<<<<<<<<<<
4226 *
4227 * def concise_charset(self, format=NO_FORMAT):
4228 */
4229 __Pyx_XDECREF(__pyx_r);
4230 __Pyx_INCREF(__pyx_v_list);
4231 __pyx_r = __pyx_v_list;
4232 goto __pyx_L0;
4233
4234 /* "Recode.pyx":560
4235 * return list
4236 *
4237 * def all_surfaces(self): # <<<<<<<<<<<<<<
4238 * list = []
4239 * cdef RECODE_SYMBOL symbol
4240 */
4241
4242 /* function exit code */
4243 __pyx_L1_error:;
4244 __Pyx_XDECREF(__pyx_t_1);
4245 __Pyx_AddTraceback("Recode.Outer.all_surfaces", __pyx_clineno, __pyx_lineno, __pyx_filename);
4246 __pyx_r = NULL;
4247 __pyx_L0:;
4248 __Pyx_XDECREF(__pyx_v_list);
4249 __Pyx_XGIVEREF(__pyx_r);
4250 __Pyx_RefNannyFinishContext();
4251 return __pyx_r;
4252 }
4253
4254 /* "Recode.pyx":570
4255 * return list
4256 *
4257 * def concise_charset(self, format=NO_FORMAT): # <<<<<<<<<<<<<<
4258 * ok = recode_list_concise_charset(self.outer, NULL, format)
4259 * if not ok:
4260 */
4261
4262 /* Python wrapper */
4263 static PyObject *__pyx_pw_6Recode_5Outer_11concise_charset(PyObject *__pyx_v_self,
4264 #if CYTHON_METH_FASTCALL
4265 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
4266 #else
4267 PyObject *__pyx_args, PyObject *__pyx_kwds
4268 #endif
4269 ); /*proto*/
4270 static PyMethodDef __pyx_mdef_6Recode_5Outer_11concise_charset = {"concise_charset", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_5Outer_11concise_charset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
4271 static PyObject *__pyx_pw_6Recode_5Outer_11concise_charset(PyObject *__pyx_v_self,
4272 #if CYTHON_METH_FASTCALL
4273 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
4274 #else
4275 PyObject *__pyx_args, PyObject *__pyx_kwds
4276 #endif
4277 ) {
4278 PyObject *__pyx_v_format = 0;
4279 #if !CYTHON_METH_FASTCALL
4280 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
4281 #endif
4282 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
4283 PyObject* values[1] = {0};
4284 int __pyx_lineno = 0;
4285 const char *__pyx_filename = NULL;
4286 int __pyx_clineno = 0;
4287 PyObject *__pyx_r = 0;
4288 __Pyx_RefNannyDeclarations
4289 __Pyx_RefNannySetupContext("concise_charset (wrapper)", 0);
4290 #if !CYTHON_METH_FASTCALL
4291 #if CYTHON_ASSUME_SAFE_MACROS
4292 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
4293 #else
4294 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
4295 #endif
4296 #endif
4297 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
4298 {
4299 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_format,0};
4300 values[0] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k_);
4301 if (__pyx_kwds) {
4302 Py_ssize_t kw_args;
4303 switch (__pyx_nargs) {
4304 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
4305 CYTHON_FALLTHROUGH;
4306 case 0: break;
4307 default: goto __pyx_L5_argtuple_error;
4308 }
4309 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
4310 switch (__pyx_nargs) {
4311 case 0:
4312 if (kw_args > 0) {
4313 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format);
4314 if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
4315 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 570, __pyx_L3_error)
4316 }
4317 }
4318 if (unlikely(kw_args > 0)) {
4319 const Py_ssize_t kwd_pos_args = __pyx_nargs;
4320 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "concise_charset") < 0)) __PYX_ERR(1, 570, __pyx_L3_error)
4321 }
4322 } else {
4323 switch (__pyx_nargs) {
4324 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
4325 CYTHON_FALLTHROUGH;
4326 case 0: break;
4327 default: goto __pyx_L5_argtuple_error;
4328 }
4329 }
4330 __pyx_v_format = values[0];
4331 }
4332 goto __pyx_L6_skip;
4333 __pyx_L5_argtuple_error:;
4334 __Pyx_RaiseArgtupleInvalid("concise_charset", 0, 0, 1, __pyx_nargs); __PYX_ERR(1, 570, __pyx_L3_error)
4335 __pyx_L6_skip:;
4336 goto __pyx_L4_argument_unpacking_done;
4337 __pyx_L3_error:;
4338 {
4339 Py_ssize_t __pyx_temp;
4340 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
4341 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
4342 }
4343 }
4344 __Pyx_AddTraceback("Recode.Outer.concise_charset", __pyx_clineno, __pyx_lineno, __pyx_filename);
4345 __Pyx_RefNannyFinishContext();
4346 return NULL;
4347 __pyx_L4_argument_unpacking_done:;
4348 __pyx_r = __pyx_pf_6Recode_5Outer_10concise_charset(((struct __pyx_obj_6Recode_Outer *)__pyx_v_self), __pyx_v_format);
4349
4350 /* function exit code */
4351 {
4352 Py_ssize_t __pyx_temp;
4353 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
4354 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
4355 }
4356 }
4357 __Pyx_RefNannyFinishContext();
4358 return __pyx_r;
4359 }
4360
4361 static PyObject *__pyx_pf_6Recode_5Outer_10concise_charset(struct __pyx_obj_6Recode_Outer *__pyx_v_self, PyObject *__pyx_v_format) {
4362 bool __pyx_v_ok;
4363 PyObject *__pyx_r = NULL;
4364 __Pyx_RefNannyDeclarations
4365 enum recode_list_format __pyx_t_1;
4366 int __pyx_t_2;
4367 PyObject *__pyx_t_3 = NULL;
4368 int __pyx_lineno = 0;
4369 const char *__pyx_filename = NULL;
4370 int __pyx_clineno = 0;
4371 __Pyx_RefNannySetupContext("concise_charset", 1);
4372
4373 /* "Recode.pyx":571
4374 *
4375 * def concise_charset(self, format=NO_FORMAT):
4376 * ok = recode_list_concise_charset(self.outer, NULL, format) # <<<<<<<<<<<<<<
4377 * if not ok:
4378 * raise error
4379 */
4380 __pyx_t_1 = ((enum recode_list_format)__Pyx_PyInt_As_enum__recode_list_format(__pyx_v_format)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 571, __pyx_L1_error)
4381 __pyx_v_ok = recode_list_concise_charset(__pyx_v_self->outer, NULL, __pyx_t_1);
4382
4383 /* "Recode.pyx":572
4384 * def concise_charset(self, format=NO_FORMAT):
4385 * ok = recode_list_concise_charset(self.outer, NULL, format)
4386 * if not ok: # <<<<<<<<<<<<<<
4387 * raise error
4388 *
4389 */
4390 __pyx_t_2 = (!(__pyx_v_ok != 0));
4391 if (unlikely(__pyx_t_2)) {
4392
4393 /* "Recode.pyx":573
4394 * ok = recode_list_concise_charset(self.outer, NULL, format)
4395 * if not ok:
4396 * raise error # <<<<<<<<<<<<<<
4397 *
4398 * def full_charset(self):
4399 */
4400 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 573, __pyx_L1_error)
4401 __Pyx_GOTREF(__pyx_t_3);
4402 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
4403 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4404 __PYX_ERR(1, 573, __pyx_L1_error)
4405
4406 /* "Recode.pyx":572
4407 * def concise_charset(self, format=NO_FORMAT):
4408 * ok = recode_list_concise_charset(self.outer, NULL, format)
4409 * if not ok: # <<<<<<<<<<<<<<
4410 * raise error
4411 *
4412 */
4413 }
4414
4415 /* "Recode.pyx":570
4416 * return list
4417 *
4418 * def concise_charset(self, format=NO_FORMAT): # <<<<<<<<<<<<<<
4419 * ok = recode_list_concise_charset(self.outer, NULL, format)
4420 * if not ok:
4421 */
4422
4423 /* function exit code */
4424 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4425 goto __pyx_L0;
4426 __pyx_L1_error:;
4427 __Pyx_XDECREF(__pyx_t_3);
4428 __Pyx_AddTraceback("Recode.Outer.concise_charset", __pyx_clineno, __pyx_lineno, __pyx_filename);
4429 __pyx_r = NULL;
4430 __pyx_L0:;
4431 __Pyx_XGIVEREF(__pyx_r);
4432 __Pyx_RefNannyFinishContext();
4433 return __pyx_r;
4434 }
4435
4436 /* "Recode.pyx":575
4437 * raise error
4438 *
4439 * def full_charset(self): # <<<<<<<<<<<<<<
4440 * ok = recode_list_full_charset(self.outer, NULL)
4441 * if not ok:
4442 */
4443
4444 /* Python wrapper */
4445 static PyObject *__pyx_pw_6Recode_5Outer_13full_charset(PyObject *__pyx_v_self,
4446 #if CYTHON_METH_FASTCALL
4447 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
4448 #else
4449 PyObject *__pyx_args, PyObject *__pyx_kwds
4450 #endif
4451 ); /*proto*/
4452 static PyMethodDef __pyx_mdef_6Recode_5Outer_13full_charset = {"full_charset", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_5Outer_13full_charset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
4453 static PyObject *__pyx_pw_6Recode_5Outer_13full_charset(PyObject *__pyx_v_self,
4454 #if CYTHON_METH_FASTCALL
4455 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
4456 #else
4457 PyObject *__pyx_args, PyObject *__pyx_kwds
4458 #endif
4459 ) {
4460 #if !CYTHON_METH_FASTCALL
4461 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
4462 #endif
4463 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
4464 PyObject *__pyx_r = 0;
4465 __Pyx_RefNannyDeclarations
4466 __Pyx_RefNannySetupContext("full_charset (wrapper)", 0);
4467 #if !CYTHON_METH_FASTCALL
4468 #if CYTHON_ASSUME_SAFE_MACROS
4469 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
4470 #else
4471 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
4472 #endif
4473 #endif
4474 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
4475 if (unlikely(__pyx_nargs > 0)) {
4476 __Pyx_RaiseArgtupleInvalid("full_charset", 1, 0, 0, __pyx_nargs); return NULL;}
4477 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "full_charset", 0))) return NULL;
4478 __pyx_r = __pyx_pf_6Recode_5Outer_12full_charset(((struct __pyx_obj_6Recode_Outer *)__pyx_v_self));
4479
4480 /* function exit code */
4481 __Pyx_RefNannyFinishContext();
4482 return __pyx_r;
4483 }
4484
4485 static PyObject *__pyx_pf_6Recode_5Outer_12full_charset(struct __pyx_obj_6Recode_Outer *__pyx_v_self) {
4486 bool __pyx_v_ok;
4487 PyObject *__pyx_r = NULL;
4488 __Pyx_RefNannyDeclarations
4489 int __pyx_t_1;
4490 PyObject *__pyx_t_2 = NULL;
4491 int __pyx_lineno = 0;
4492 const char *__pyx_filename = NULL;
4493 int __pyx_clineno = 0;
4494 __Pyx_RefNannySetupContext("full_charset", 1);
4495
4496 /* "Recode.pyx":576
4497 *
4498 * def full_charset(self):
4499 * ok = recode_list_full_charset(self.outer, NULL) # <<<<<<<<<<<<<<
4500 * if not ok:
4501 * raise error
4502 */
4503 __pyx_v_ok = recode_list_full_charset(__pyx_v_self->outer, NULL);
4504
4505 /* "Recode.pyx":577
4506 * def full_charset(self):
4507 * ok = recode_list_full_charset(self.outer, NULL)
4508 * if not ok: # <<<<<<<<<<<<<<
4509 * raise error
4510 *
4511 */
4512 __pyx_t_1 = (!(__pyx_v_ok != 0));
4513 if (unlikely(__pyx_t_1)) {
4514
4515 /* "Recode.pyx":578
4516 * ok = recode_list_full_charset(self.outer, NULL)
4517 * if not ok:
4518 * raise error # <<<<<<<<<<<<<<
4519 *
4520 * # Lazy, all in one call.
4521 */
4522 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 578, __pyx_L1_error)
4523 __Pyx_GOTREF(__pyx_t_2);
4524 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
4525 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4526 __PYX_ERR(1, 578, __pyx_L1_error)
4527
4528 /* "Recode.pyx":577
4529 * def full_charset(self):
4530 * ok = recode_list_full_charset(self.outer, NULL)
4531 * if not ok: # <<<<<<<<<<<<<<
4532 * raise error
4533 *
4534 */
4535 }
4536
4537 /* "Recode.pyx":575
4538 * raise error
4539 *
4540 * def full_charset(self): # <<<<<<<<<<<<<<
4541 * ok = recode_list_full_charset(self.outer, NULL)
4542 * if not ok:
4543 */
4544
4545 /* function exit code */
4546 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4547 goto __pyx_L0;
4548 __pyx_L1_error:;
4549 __Pyx_XDECREF(__pyx_t_2);
4550 __Pyx_AddTraceback("Recode.Outer.full_charset", __pyx_clineno, __pyx_lineno, __pyx_filename);
4551 __pyx_r = NULL;
4552 __pyx_L0:;
4553 __Pyx_XGIVEREF(__pyx_r);
4554 __Pyx_RefNannyFinishContext();
4555 return __pyx_r;
4556 }
4557
4558 /* "Recode.pyx":581
4559 *
4560 * # Lazy, all in one call.
4561 * def recode(self, char *command, char *input, verbose=False): # <<<<<<<<<<<<<<
4562 * request = Request(self)
4563 * request.set_verbose(verbose)
4564 */
4565
4566 /* Python wrapper */
4567 static PyObject *__pyx_pw_6Recode_5Outer_15recode(PyObject *__pyx_v_self,
4568 #if CYTHON_METH_FASTCALL
4569 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
4570 #else
4571 PyObject *__pyx_args, PyObject *__pyx_kwds
4572 #endif
4573 ); /*proto*/
4574 static PyMethodDef __pyx_mdef_6Recode_5Outer_15recode = {"recode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_5Outer_15recode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
4575 static PyObject *__pyx_pw_6Recode_5Outer_15recode(PyObject *__pyx_v_self,
4576 #if CYTHON_METH_FASTCALL
4577 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
4578 #else
4579 PyObject *__pyx_args, PyObject *__pyx_kwds
4580 #endif
4581 ) {
4582 char *__pyx_v_command;
4583 char *__pyx_v_input;
4584 PyObject *__pyx_v_verbose = 0;
4585 #if !CYTHON_METH_FASTCALL
4586 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
4587 #endif
4588 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
4589 PyObject* values[3] = {0,0,0};
4590 int __pyx_lineno = 0;
4591 const char *__pyx_filename = NULL;
4592 int __pyx_clineno = 0;
4593 PyObject *__pyx_r = 0;
4594 __Pyx_RefNannyDeclarations
4595 __Pyx_RefNannySetupContext("recode (wrapper)", 0);
4596 #if !CYTHON_METH_FASTCALL
4597 #if CYTHON_ASSUME_SAFE_MACROS
4598 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
4599 #else
4600 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
4601 #endif
4602 #endif
4603 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
4604 {
4605 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_command,&__pyx_n_s_input,&__pyx_n_s_verbose,0};
4606 values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
4607 if (__pyx_kwds) {
4608 Py_ssize_t kw_args;
4609 switch (__pyx_nargs) {
4610 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
4611 CYTHON_FALLTHROUGH;
4612 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
4613 CYTHON_FALLTHROUGH;
4614 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
4615 CYTHON_FALLTHROUGH;
4616 case 0: break;
4617 default: goto __pyx_L5_argtuple_error;
4618 }
4619 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
4620 switch (__pyx_nargs) {
4621 case 0:
4622 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_command)) != 0)) {
4623 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
4624 kw_args--;
4625 }
4626 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 581, __pyx_L3_error)
4627 else goto __pyx_L5_argtuple_error;
4628 CYTHON_FALLTHROUGH;
4629 case 1:
4630 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_input)) != 0)) {
4631 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
4632 kw_args--;
4633 }
4634 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 581, __pyx_L3_error)
4635 else {
4636 __Pyx_RaiseArgtupleInvalid("recode", 0, 2, 3, 1); __PYX_ERR(1, 581, __pyx_L3_error)
4637 }
4638 CYTHON_FALLTHROUGH;
4639 case 2:
4640 if (kw_args > 0) {
4641 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_verbose);
4642 if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
4643 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 581, __pyx_L3_error)
4644 }
4645 }
4646 if (unlikely(kw_args > 0)) {
4647 const Py_ssize_t kwd_pos_args = __pyx_nargs;
4648 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "recode") < 0)) __PYX_ERR(1, 581, __pyx_L3_error)
4649 }
4650 } else {
4651 switch (__pyx_nargs) {
4652 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
4653 CYTHON_FALLTHROUGH;
4654 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
4655 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
4656 break;
4657 default: goto __pyx_L5_argtuple_error;
4658 }
4659 }
4660 __pyx_v_command = __Pyx_PyObject_AsWritableString(values[0]); if (unlikely((!__pyx_v_command) && PyErr_Occurred())) __PYX_ERR(1, 581, __pyx_L3_error)
4661 __pyx_v_input = __Pyx_PyObject_AsWritableString(values[1]); if (unlikely((!__pyx_v_input) && PyErr_Occurred())) __PYX_ERR(1, 581, __pyx_L3_error)
4662 __pyx_v_verbose = values[2];
4663 }
4664 goto __pyx_L6_skip;
4665 __pyx_L5_argtuple_error:;
4666 __Pyx_RaiseArgtupleInvalid("recode", 0, 2, 3, __pyx_nargs); __PYX_ERR(1, 581, __pyx_L3_error)
4667 __pyx_L6_skip:;
4668 goto __pyx_L4_argument_unpacking_done;
4669 __pyx_L3_error:;
4670 {
4671 Py_ssize_t __pyx_temp;
4672 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
4673 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
4674 }
4675 }
4676 __Pyx_AddTraceback("Recode.Outer.recode", __pyx_clineno, __pyx_lineno, __pyx_filename);
4677 __Pyx_RefNannyFinishContext();
4678 return NULL;
4679 __pyx_L4_argument_unpacking_done:;
4680 __pyx_r = __pyx_pf_6Recode_5Outer_14recode(((struct __pyx_obj_6Recode_Outer *)__pyx_v_self), __pyx_v_command, __pyx_v_input, __pyx_v_verbose);
4681
4682 /* function exit code */
4683 {
4684 Py_ssize_t __pyx_temp;
4685 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
4686 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
4687 }
4688 }
4689 __Pyx_RefNannyFinishContext();
4690 return __pyx_r;
4691 }
4692
4693 static PyObject *__pyx_pf_6Recode_5Outer_14recode(struct __pyx_obj_6Recode_Outer *__pyx_v_self, char *__pyx_v_command, char *__pyx_v_input, PyObject *__pyx_v_verbose) {
4694 struct __pyx_obj_6Recode_Request *__pyx_v_request = NULL;
4695 PyObject *__pyx_r = NULL;
4696 __Pyx_RefNannyDeclarations
4697 PyObject *__pyx_t_1 = NULL;
4698 PyObject *__pyx_t_2 = NULL;
4699 PyObject *__pyx_t_3 = NULL;
4700 int __pyx_t_4;
4701 PyObject *__pyx_t_5 = NULL;
4702 int __pyx_lineno = 0;
4703 const char *__pyx_filename = NULL;
4704 int __pyx_clineno = 0;
4705 __Pyx_RefNannySetupContext("recode", 1);
4706
4707 /* "Recode.pyx":582
4708 * # Lazy, all in one call.
4709 * def recode(self, char *command, char *input, verbose=False):
4710 * request = Request(self) # <<<<<<<<<<<<<<
4711 * request.set_verbose(verbose)
4712 * request.scan(command)
4713 */
4714 __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6Recode_Request), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 582, __pyx_L1_error)
4715 __Pyx_GOTREF(__pyx_t_1);
4716 __pyx_v_request = ((struct __pyx_obj_6Recode_Request *)__pyx_t_1);
4717 __pyx_t_1 = 0;
4718
4719 /* "Recode.pyx":583
4720 * def recode(self, char *command, char *input, verbose=False):
4721 * request = Request(self)
4722 * request.set_verbose(verbose) # <<<<<<<<<<<<<<
4723 * request.scan(command)
4724 * return request.string(input)
4725 */
4726 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_request), __pyx_n_s_set_verbose); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 583, __pyx_L1_error)
4727 __Pyx_GOTREF(__pyx_t_2);
4728 __pyx_t_3 = NULL;
4729 __pyx_t_4 = 0;
4730 #if CYTHON_UNPACK_METHODS
4731 if (likely(PyMethod_Check(__pyx_t_2))) {
4732 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4733 if (likely(__pyx_t_3)) {
4734 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4735 __Pyx_INCREF(__pyx_t_3);
4736 __Pyx_INCREF(function);
4737 __Pyx_DECREF_SET(__pyx_t_2, function);
4738 __pyx_t_4 = 1;
4739 }
4740 }
4741 #endif
4742 {
4743 PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_verbose};
4744 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
4745 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4746 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 583, __pyx_L1_error)
4747 __Pyx_GOTREF(__pyx_t_1);
4748 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4749 }
4750 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4751
4752 /* "Recode.pyx":584
4753 * request = Request(self)
4754 * request.set_verbose(verbose)
4755 * request.scan(command) # <<<<<<<<<<<<<<
4756 * return request.string(input)
4757 *
4758 */
4759 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_request), __pyx_n_s_scan); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 584, __pyx_L1_error)
4760 __Pyx_GOTREF(__pyx_t_2);
4761 __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_command); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 584, __pyx_L1_error)
4762 __Pyx_GOTREF(__pyx_t_3);
4763 __pyx_t_5 = NULL;
4764 __pyx_t_4 = 0;
4765 #if CYTHON_UNPACK_METHODS
4766 if (likely(PyMethod_Check(__pyx_t_2))) {
4767 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
4768 if (likely(__pyx_t_5)) {
4769 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4770 __Pyx_INCREF(__pyx_t_5);
4771 __Pyx_INCREF(function);
4772 __Pyx_DECREF_SET(__pyx_t_2, function);
4773 __pyx_t_4 = 1;
4774 }
4775 }
4776 #endif
4777 {
4778 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
4779 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
4780 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
4781 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4782 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 584, __pyx_L1_error)
4783 __Pyx_GOTREF(__pyx_t_1);
4784 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4785 }
4786 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4787
4788 /* "Recode.pyx":585
4789 * request.set_verbose(verbose)
4790 * request.scan(command)
4791 * return request.string(input) # <<<<<<<<<<<<<<
4792 *
4793 * # Recode library at REQUEST level.
4794 */
4795 __Pyx_XDECREF(__pyx_r);
4796 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_request), __pyx_n_s_string); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 585, __pyx_L1_error)
4797 __Pyx_GOTREF(__pyx_t_2);
4798 __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_input); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 585, __pyx_L1_error)
4799 __Pyx_GOTREF(__pyx_t_3);
4800 __pyx_t_5 = NULL;
4801 __pyx_t_4 = 0;
4802 #if CYTHON_UNPACK_METHODS
4803 if (likely(PyMethod_Check(__pyx_t_2))) {
4804 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
4805 if (likely(__pyx_t_5)) {
4806 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4807 __Pyx_INCREF(__pyx_t_5);
4808 __Pyx_INCREF(function);
4809 __Pyx_DECREF_SET(__pyx_t_2, function);
4810 __pyx_t_4 = 1;
4811 }
4812 }
4813 #endif
4814 {
4815 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
4816 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
4817 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
4818 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4819 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 585, __pyx_L1_error)
4820 __Pyx_GOTREF(__pyx_t_1);
4821 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4822 }
4823 __pyx_r = __pyx_t_1;
4824 __pyx_t_1 = 0;
4825 goto __pyx_L0;
4826
4827 /* "Recode.pyx":581
4828 *
4829 * # Lazy, all in one call.
4830 * def recode(self, char *command, char *input, verbose=False): # <<<<<<<<<<<<<<
4831 * request = Request(self)
4832 * request.set_verbose(verbose)
4833 */
4834
4835 /* function exit code */
4836 __pyx_L1_error:;
4837 __Pyx_XDECREF(__pyx_t_1);
4838 __Pyx_XDECREF(__pyx_t_2);
4839 __Pyx_XDECREF(__pyx_t_3);
4840 __Pyx_XDECREF(__pyx_t_5);
4841 __Pyx_AddTraceback("Recode.Outer.recode", __pyx_clineno, __pyx_lineno, __pyx_filename);
4842 __pyx_r = NULL;
4843 __pyx_L0:;
4844 __Pyx_XDECREF((PyObject *)__pyx_v_request);
4845 __Pyx_XGIVEREF(__pyx_r);
4846 __Pyx_RefNannyFinishContext();
4847 return __pyx_r;
4848 }
4849
4850 /* "(tree fragment)":1
4851 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
4852 * raise TypeError, "self.outer cannot be converted to a Python object for pickling"
4853 * def __setstate_cython__(self, __pyx_state):
4854 */
4855
4856 /* Python wrapper */
4857 static PyObject *__pyx_pw_6Recode_5Outer_17__reduce_cython__(PyObject *__pyx_v_self,
4858 #if CYTHON_METH_FASTCALL
4859 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
4860 #else
4861 PyObject *__pyx_args, PyObject *__pyx_kwds
4862 #endif
4863 ); /*proto*/
4864 static PyMethodDef __pyx_mdef_6Recode_5Outer_17__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_5Outer_17__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
4865 static PyObject *__pyx_pw_6Recode_5Outer_17__reduce_cython__(PyObject *__pyx_v_self,
4866 #if CYTHON_METH_FASTCALL
4867 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
4868 #else
4869 PyObject *__pyx_args, PyObject *__pyx_kwds
4870 #endif
4871 ) {
4872 #if !CYTHON_METH_FASTCALL
4873 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
4874 #endif
4875 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
4876 PyObject *__pyx_r = 0;
4877 __Pyx_RefNannyDeclarations
4878 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
4879 #if !CYTHON_METH_FASTCALL
4880 #if CYTHON_ASSUME_SAFE_MACROS
4881 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
4882 #else
4883 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
4884 #endif
4885 #endif
4886 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
4887 if (unlikely(__pyx_nargs > 0)) {
4888 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
4889 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
4890 __pyx_r = __pyx_pf_6Recode_5Outer_16__reduce_cython__(((struct __pyx_obj_6Recode_Outer *)__pyx_v_self));
4891
4892 /* function exit code */
4893 __Pyx_RefNannyFinishContext();
4894 return __pyx_r;
4895 }
4896
4897 static PyObject *__pyx_pf_6Recode_5Outer_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6Recode_Outer *__pyx_v_self) {
4898 PyObject *__pyx_r = NULL;
4899 __Pyx_RefNannyDeclarations
4900 int __pyx_lineno = 0;
4901 const char *__pyx_filename = NULL;
4902 int __pyx_clineno = 0;
4903 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
4904
4905 /* "(tree fragment)":2
4906 * def __reduce_cython__(self):
4907 * raise TypeError, "self.outer cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
4908 * def __setstate_cython__(self, __pyx_state):
4909 * raise TypeError, "self.outer cannot be converted to a Python object for pickling"
4910 */
4911 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_outer_cannot_be_converted_t, 0, 0);
4912 __PYX_ERR(0, 2, __pyx_L1_error)
4913
4914 /* "(tree fragment)":1
4915 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
4916 * raise TypeError, "self.outer cannot be converted to a Python object for pickling"
4917 * def __setstate_cython__(self, __pyx_state):
4918 */
4919
4920 /* function exit code */
4921 __pyx_L1_error:;
4922 __Pyx_AddTraceback("Recode.Outer.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4923 __pyx_r = NULL;
4924 __Pyx_XGIVEREF(__pyx_r);
4925 __Pyx_RefNannyFinishContext();
4926 return __pyx_r;
4927 }
4928
4929 /* "(tree fragment)":3
4930 * def __reduce_cython__(self):
4931 * raise TypeError, "self.outer cannot be converted to a Python object for pickling"
4932 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
4933 * raise TypeError, "self.outer cannot be converted to a Python object for pickling"
4934 */
4935
4936 /* Python wrapper */
4937 static PyObject *__pyx_pw_6Recode_5Outer_19__setstate_cython__(PyObject *__pyx_v_self,
4938 #if CYTHON_METH_FASTCALL
4939 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
4940 #else
4941 PyObject *__pyx_args, PyObject *__pyx_kwds
4942 #endif
4943 ); /*proto*/
4944 static PyMethodDef __pyx_mdef_6Recode_5Outer_19__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_5Outer_19__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
4945 static PyObject *__pyx_pw_6Recode_5Outer_19__setstate_cython__(PyObject *__pyx_v_self,
4946 #if CYTHON_METH_FASTCALL
4947 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
4948 #else
4949 PyObject *__pyx_args, PyObject *__pyx_kwds
4950 #endif
4951 ) {
4952 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
4953 #if !CYTHON_METH_FASTCALL
4954 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
4955 #endif
4956 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
4957 PyObject* values[1] = {0};
4958 int __pyx_lineno = 0;
4959 const char *__pyx_filename = NULL;
4960 int __pyx_clineno = 0;
4961 PyObject *__pyx_r = 0;
4962 __Pyx_RefNannyDeclarations
4963 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
4964 #if !CYTHON_METH_FASTCALL
4965 #if CYTHON_ASSUME_SAFE_MACROS
4966 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
4967 #else
4968 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
4969 #endif
4970 #endif
4971 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
4972 {
4973 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
4974 if (__pyx_kwds) {
4975 Py_ssize_t kw_args;
4976 switch (__pyx_nargs) {
4977 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
4978 CYTHON_FALLTHROUGH;
4979 case 0: break;
4980 default: goto __pyx_L5_argtuple_error;
4981 }
4982 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
4983 switch (__pyx_nargs) {
4984 case 0:
4985 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
4986 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
4987 kw_args--;
4988 }
4989 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3, __pyx_L3_error)
4990 else goto __pyx_L5_argtuple_error;
4991 }
4992 if (unlikely(kw_args > 0)) {
4993 const Py_ssize_t kwd_pos_args = __pyx_nargs;
4994 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(0, 3, __pyx_L3_error)
4995 }
4996 } else if (unlikely(__pyx_nargs != 1)) {
4997 goto __pyx_L5_argtuple_error;
4998 } else {
4999 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
5000 }
5001 __pyx_v___pyx_state = values[0];
5002 }
5003 goto __pyx_L6_skip;
5004 __pyx_L5_argtuple_error:;
5005 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3, __pyx_L3_error)
5006 __pyx_L6_skip:;
5007 goto __pyx_L4_argument_unpacking_done;
5008 __pyx_L3_error:;
5009 {
5010 Py_ssize_t __pyx_temp;
5011 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
5012 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
5013 }
5014 }
5015 __Pyx_AddTraceback("Recode.Outer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5016 __Pyx_RefNannyFinishContext();
5017 return NULL;
5018 __pyx_L4_argument_unpacking_done:;
5019 __pyx_r = __pyx_pf_6Recode_5Outer_18__setstate_cython__(((struct __pyx_obj_6Recode_Outer *)__pyx_v_self), __pyx_v___pyx_state);
5020
5021 /* function exit code */
5022 {
5023 Py_ssize_t __pyx_temp;
5024 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
5025 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
5026 }
5027 }
5028 __Pyx_RefNannyFinishContext();
5029 return __pyx_r;
5030 }
5031
5032 static PyObject *__pyx_pf_6Recode_5Outer_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6Recode_Outer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
5033 PyObject *__pyx_r = NULL;
5034 __Pyx_RefNannyDeclarations
5035 int __pyx_lineno = 0;
5036 const char *__pyx_filename = NULL;
5037 int __pyx_clineno = 0;
5038 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
5039
5040 /* "(tree fragment)":4
5041 * raise TypeError, "self.outer cannot be converted to a Python object for pickling"
5042 * def __setstate_cython__(self, __pyx_state):
5043 * raise TypeError, "self.outer cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
5044 */
5045 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_outer_cannot_be_converted_t, 0, 0);
5046 __PYX_ERR(0, 4, __pyx_L1_error)
5047
5048 /* "(tree fragment)":3
5049 * def __reduce_cython__(self):
5050 * raise TypeError, "self.outer cannot be converted to a Python object for pickling"
5051 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5052 * raise TypeError, "self.outer cannot be converted to a Python object for pickling"
5053 */
5054
5055 /* function exit code */
5056 __pyx_L1_error:;
5057 __Pyx_AddTraceback("Recode.Outer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5058 __pyx_r = NULL;
5059 __Pyx_XGIVEREF(__pyx_r);
5060 __Pyx_RefNannyFinishContext();
5061 return __pyx_r;
5062 }
5063
5064 /* "Recode.pyx":592
5065 * cdef RECODE_REQUEST request
5066 *
5067 * def __init__(self, Outer outer): # <<<<<<<<<<<<<<
5068 * self.request = recode_new_request(outer.outer)
5069 *
5070 */
5071
5072 /* Python wrapper */
5073 static int __pyx_pw_6Recode_7Request_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5074 static int __pyx_pw_6Recode_7Request_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5075 struct __pyx_obj_6Recode_Outer *__pyx_v_outer = 0;
5076 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
5077 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
5078 PyObject* values[1] = {0};
5079 int __pyx_lineno = 0;
5080 const char *__pyx_filename = NULL;
5081 int __pyx_clineno = 0;
5082 int __pyx_r;
5083 __Pyx_RefNannyDeclarations
5084 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
5085 #if CYTHON_ASSUME_SAFE_MACROS
5086 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
5087 #else
5088 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
5089 #endif
5090 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
5091 {
5092 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_outer,0};
5093 if (__pyx_kwds) {
5094 Py_ssize_t kw_args;
5095 switch (__pyx_nargs) {
5096 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
5097 CYTHON_FALLTHROUGH;
5098 case 0: break;
5099 default: goto __pyx_L5_argtuple_error;
5100 }
5101 kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
5102 switch (__pyx_nargs) {
5103 case 0:
5104 if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_outer)) != 0)) {
5105 (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
5106 kw_args--;
5107 }
5108 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 592, __pyx_L3_error)
5109 else goto __pyx_L5_argtuple_error;
5110 }
5111 if (unlikely(kw_args > 0)) {
5112 const Py_ssize_t kwd_pos_args = __pyx_nargs;
5113 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(1, 592, __pyx_L3_error)
5114 }
5115 } else if (unlikely(__pyx_nargs != 1)) {
5116 goto __pyx_L5_argtuple_error;
5117 } else {
5118 values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
5119 }
5120 __pyx_v_outer = ((struct __pyx_obj_6Recode_Outer *)values[0]);
5121 }
5122 goto __pyx_L6_skip;
5123 __pyx_L5_argtuple_error:;
5124 __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 592, __pyx_L3_error)
5125 __pyx_L6_skip:;
5126 goto __pyx_L4_argument_unpacking_done;
5127 __pyx_L3_error:;
5128 {
5129 Py_ssize_t __pyx_temp;
5130 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
5131 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
5132 }
5133 }
5134 __Pyx_AddTraceback("Recode.Request.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5135 __Pyx_RefNannyFinishContext();
5136 return -1;
5137 __pyx_L4_argument_unpacking_done:;
5138 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_outer), __pyx_ptype_6Recode_Outer, 1, "outer", 0))) __PYX_ERR(1, 592, __pyx_L1_error)
5139 __pyx_r = __pyx_pf_6Recode_7Request___init__(((struct __pyx_obj_6Recode_Request *)__pyx_v_self), __pyx_v_outer);
5140
5141 /* function exit code */
5142 goto __pyx_L0;
5143 __pyx_L1_error:;
5144 __pyx_r = -1;
5145 __pyx_L0:;
5146 {
5147 Py_ssize_t __pyx_temp;
5148 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
5149 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
5150 }
5151 }
5152 __Pyx_RefNannyFinishContext();
5153 return __pyx_r;
5154 }
5155
5156 static int __pyx_pf_6Recode_7Request___init__(struct __pyx_obj_6Recode_Request *__pyx_v_self, struct __pyx_obj_6Recode_Outer *__pyx_v_outer) {
5157 int __pyx_r;
5158
5159 /* "Recode.pyx":593
5160 *
5161 * def __init__(self, Outer outer):
5162 * self.request = recode_new_request(outer.outer) # <<<<<<<<<<<<<<
5163 *
5164 * def __dealloc__(self):
5165 */
5166 __pyx_v_self->request = recode_new_request(__pyx_v_outer->outer);
5167
5168 /* "Recode.pyx":592
5169 * cdef RECODE_REQUEST request
5170 *
5171 * def __init__(self, Outer outer): # <<<<<<<<<<<<<<
5172 * self.request = recode_new_request(outer.outer)
5173 *
5174 */
5175
5176 /* function exit code */
5177 __pyx_r = 0;
5178 return __pyx_r;
5179 }
5180
5181 /* "Recode.pyx":595
5182 * self.request = recode_new_request(outer.outer)
5183 *
5184 * def __dealloc__(self): # <<<<<<<<<<<<<<
5185 * recode_delete_request(self.request)
5186 *
5187 */
5188
5189 /* Python wrapper */
5190 static void __pyx_pw_6Recode_7Request_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
5191 static void __pyx_pw_6Recode_7Request_3__dealloc__(PyObject *__pyx_v_self) {
5192 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
5193 __Pyx_RefNannyDeclarations
5194 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
5195 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
5196 __pyx_pf_6Recode_7Request_2__dealloc__(((struct __pyx_obj_6Recode_Request *)__pyx_v_self));
5197
5198 /* function exit code */
5199 __Pyx_RefNannyFinishContext();
5200 }
5201
5202 static void __pyx_pf_6Recode_7Request_2__dealloc__(struct __pyx_obj_6Recode_Request *__pyx_v_self) {
5203
5204 /* "Recode.pyx":596
5205 *
5206 * def __dealloc__(self):
5207 * recode_delete_request(self.request) # <<<<<<<<<<<<<<
5208 *
5209 * def set_verbose(self, flag):
5210 */
5211 (void)(recode_delete_request(__pyx_v_self->request));
5212
5213 /* "Recode.pyx":595
5214 * self.request = recode_new_request(outer.outer)
5215 *
5216 * def __dealloc__(self): # <<<<<<<<<<<<<<
5217 * recode_delete_request(self.request)
5218 *
5219 */
5220
5221 /* function exit code */
5222 }
5223
5224 /* "Recode.pyx":598
5225 * recode_delete_request(self.request)
5226 *
5227 * def set_verbose(self, flag): # <<<<<<<<<<<<<<
5228 * previous = self.request.verbose_flag != 0
5229 * self.request.verbose_flag = int(flag)
5230 */
5231
5232 /* Python wrapper */
5233 static PyObject *__pyx_pw_6Recode_7Request_5set_verbose(PyObject *__pyx_v_self,
5234 #if CYTHON_METH_FASTCALL
5235 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
5236 #else
5237 PyObject *__pyx_args, PyObject *__pyx_kwds
5238 #endif
5239 ); /*proto*/
5240 static PyMethodDef __pyx_mdef_6Recode_7Request_5set_verbose = {"set_verbose", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_7Request_5set_verbose, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
5241 static PyObject *__pyx_pw_6Recode_7Request_5set_verbose(PyObject *__pyx_v_self,
5242 #if CYTHON_METH_FASTCALL
5243 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
5244 #else
5245 PyObject *__pyx_args, PyObject *__pyx_kwds
5246 #endif
5247 ) {
5248 PyObject *__pyx_v_flag = 0;
5249 #if !CYTHON_METH_FASTCALL
5250 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
5251 #endif
5252 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
5253 PyObject* values[1] = {0};
5254 int __pyx_lineno = 0;
5255 const char *__pyx_filename = NULL;
5256 int __pyx_clineno = 0;
5257 PyObject *__pyx_r = 0;
5258 __Pyx_RefNannyDeclarations
5259 __Pyx_RefNannySetupContext("set_verbose (wrapper)", 0);
5260 #if !CYTHON_METH_FASTCALL
5261 #if CYTHON_ASSUME_SAFE_MACROS
5262 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
5263 #else
5264 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
5265 #endif
5266 #endif
5267 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
5268 {
5269 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_flag,0};
5270 if (__pyx_kwds) {
5271 Py_ssize_t kw_args;
5272 switch (__pyx_nargs) {
5273 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
5274 CYTHON_FALLTHROUGH;
5275 case 0: break;
5276 default: goto __pyx_L5_argtuple_error;
5277 }
5278 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
5279 switch (__pyx_nargs) {
5280 case 0:
5281 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_flag)) != 0)) {
5282 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
5283 kw_args--;
5284 }
5285 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 598, __pyx_L3_error)
5286 else goto __pyx_L5_argtuple_error;
5287 }
5288 if (unlikely(kw_args > 0)) {
5289 const Py_ssize_t kwd_pos_args = __pyx_nargs;
5290 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_verbose") < 0)) __PYX_ERR(1, 598, __pyx_L3_error)
5291 }
5292 } else if (unlikely(__pyx_nargs != 1)) {
5293 goto __pyx_L5_argtuple_error;
5294 } else {
5295 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
5296 }
5297 __pyx_v_flag = values[0];
5298 }
5299 goto __pyx_L6_skip;
5300 __pyx_L5_argtuple_error:;
5301 __Pyx_RaiseArgtupleInvalid("set_verbose", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 598, __pyx_L3_error)
5302 __pyx_L6_skip:;
5303 goto __pyx_L4_argument_unpacking_done;
5304 __pyx_L3_error:;
5305 {
5306 Py_ssize_t __pyx_temp;
5307 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
5308 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
5309 }
5310 }
5311 __Pyx_AddTraceback("Recode.Request.set_verbose", __pyx_clineno, __pyx_lineno, __pyx_filename);
5312 __Pyx_RefNannyFinishContext();
5313 return NULL;
5314 __pyx_L4_argument_unpacking_done:;
5315 __pyx_r = __pyx_pf_6Recode_7Request_4set_verbose(((struct __pyx_obj_6Recode_Request *)__pyx_v_self), __pyx_v_flag);
5316
5317 /* function exit code */
5318 {
5319 Py_ssize_t __pyx_temp;
5320 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
5321 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
5322 }
5323 }
5324 __Pyx_RefNannyFinishContext();
5325 return __pyx_r;
5326 }
5327
5328 static PyObject *__pyx_pf_6Recode_7Request_4set_verbose(struct __pyx_obj_6Recode_Request *__pyx_v_self, PyObject *__pyx_v_flag) {
5329 PyObject *__pyx_v_previous = NULL;
5330 PyObject *__pyx_r = NULL;
5331 __Pyx_RefNannyDeclarations
5332 PyObject *__pyx_t_1 = NULL;
5333 bool __pyx_t_2;
5334 int __pyx_lineno = 0;
5335 const char *__pyx_filename = NULL;
5336 int __pyx_clineno = 0;
5337 __Pyx_RefNannySetupContext("set_verbose", 1);
5338
5339 /* "Recode.pyx":599
5340 *
5341 * def set_verbose(self, flag):
5342 * previous = self.request.verbose_flag != 0 # <<<<<<<<<<<<<<
5343 * self.request.verbose_flag = int(flag)
5344 * return previous
5345 */
5346 __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->request->verbose_flag != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 599, __pyx_L1_error)
5347 __Pyx_GOTREF(__pyx_t_1);
5348 __pyx_v_previous = __pyx_t_1;
5349 __pyx_t_1 = 0;
5350
5351 /* "Recode.pyx":600
5352 * def set_verbose(self, flag):
5353 * previous = self.request.verbose_flag != 0
5354 * self.request.verbose_flag = int(flag) # <<<<<<<<<<<<<<
5355 * return previous
5356 *
5357 */
5358 __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 600, __pyx_L1_error)
5359 __Pyx_GOTREF(__pyx_t_1);
5360 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(1, 600, __pyx_L1_error)
5361 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5362 __pyx_v_self->request->verbose_flag = __pyx_t_2;
5363
5364 /* "Recode.pyx":601
5365 * previous = self.request.verbose_flag != 0
5366 * self.request.verbose_flag = int(flag)
5367 * return previous # <<<<<<<<<<<<<<
5368 *
5369 * def scan(self, char *text):
5370 */
5371 __Pyx_XDECREF(__pyx_r);
5372 __Pyx_INCREF(__pyx_v_previous);
5373 __pyx_r = __pyx_v_previous;
5374 goto __pyx_L0;
5375
5376 /* "Recode.pyx":598
5377 * recode_delete_request(self.request)
5378 *
5379 * def set_verbose(self, flag): # <<<<<<<<<<<<<<
5380 * previous = self.request.verbose_flag != 0
5381 * self.request.verbose_flag = int(flag)
5382 */
5383
5384 /* function exit code */
5385 __pyx_L1_error:;
5386 __Pyx_XDECREF(__pyx_t_1);
5387 __Pyx_AddTraceback("Recode.Request.set_verbose", __pyx_clineno, __pyx_lineno, __pyx_filename);
5388 __pyx_r = NULL;
5389 __pyx_L0:;
5390 __Pyx_XDECREF(__pyx_v_previous);
5391 __Pyx_XGIVEREF(__pyx_r);
5392 __Pyx_RefNannyFinishContext();
5393 return __pyx_r;
5394 }
5395
5396 /* "Recode.pyx":603
5397 * return previous
5398 *
5399 * def scan(self, char *text): # <<<<<<<<<<<<<<
5400 * ok = recode_scan_request(self.request, text)
5401 * if not ok:
5402 */
5403
5404 /* Python wrapper */
5405 static PyObject *__pyx_pw_6Recode_7Request_7scan(PyObject *__pyx_v_self,
5406 #if CYTHON_METH_FASTCALL
5407 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
5408 #else
5409 PyObject *__pyx_args, PyObject *__pyx_kwds
5410 #endif
5411 ); /*proto*/
5412 static PyMethodDef __pyx_mdef_6Recode_7Request_7scan = {"scan", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_7Request_7scan, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
5413 static PyObject *__pyx_pw_6Recode_7Request_7scan(PyObject *__pyx_v_self,
5414 #if CYTHON_METH_FASTCALL
5415 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
5416 #else
5417 PyObject *__pyx_args, PyObject *__pyx_kwds
5418 #endif
5419 ) {
5420 char *__pyx_v_text;
5421 #if !CYTHON_METH_FASTCALL
5422 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
5423 #endif
5424 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
5425 PyObject* values[1] = {0};
5426 int __pyx_lineno = 0;
5427 const char *__pyx_filename = NULL;
5428 int __pyx_clineno = 0;
5429 PyObject *__pyx_r = 0;
5430 __Pyx_RefNannyDeclarations
5431 __Pyx_RefNannySetupContext("scan (wrapper)", 0);
5432 #if !CYTHON_METH_FASTCALL
5433 #if CYTHON_ASSUME_SAFE_MACROS
5434 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
5435 #else
5436 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
5437 #endif
5438 #endif
5439 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
5440 {
5441 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_text,0};
5442 if (__pyx_kwds) {
5443 Py_ssize_t kw_args;
5444 switch (__pyx_nargs) {
5445 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
5446 CYTHON_FALLTHROUGH;
5447 case 0: break;
5448 default: goto __pyx_L5_argtuple_error;
5449 }
5450 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
5451 switch (__pyx_nargs) {
5452 case 0:
5453 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_text)) != 0)) {
5454 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
5455 kw_args--;
5456 }
5457 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 603, __pyx_L3_error)
5458 else goto __pyx_L5_argtuple_error;
5459 }
5460 if (unlikely(kw_args > 0)) {
5461 const Py_ssize_t kwd_pos_args = __pyx_nargs;
5462 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "scan") < 0)) __PYX_ERR(1, 603, __pyx_L3_error)
5463 }
5464 } else if (unlikely(__pyx_nargs != 1)) {
5465 goto __pyx_L5_argtuple_error;
5466 } else {
5467 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
5468 }
5469 __pyx_v_text = __Pyx_PyObject_AsWritableString(values[0]); if (unlikely((!__pyx_v_text) && PyErr_Occurred())) __PYX_ERR(1, 603, __pyx_L3_error)
5470 }
5471 goto __pyx_L6_skip;
5472 __pyx_L5_argtuple_error:;
5473 __Pyx_RaiseArgtupleInvalid("scan", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 603, __pyx_L3_error)
5474 __pyx_L6_skip:;
5475 goto __pyx_L4_argument_unpacking_done;
5476 __pyx_L3_error:;
5477 {
5478 Py_ssize_t __pyx_temp;
5479 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
5480 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
5481 }
5482 }
5483 __Pyx_AddTraceback("Recode.Request.scan", __pyx_clineno, __pyx_lineno, __pyx_filename);
5484 __Pyx_RefNannyFinishContext();
5485 return NULL;
5486 __pyx_L4_argument_unpacking_done:;
5487 __pyx_r = __pyx_pf_6Recode_7Request_6scan(((struct __pyx_obj_6Recode_Request *)__pyx_v_self), __pyx_v_text);
5488
5489 /* function exit code */
5490 {
5491 Py_ssize_t __pyx_temp;
5492 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
5493 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
5494 }
5495 }
5496 __Pyx_RefNannyFinishContext();
5497 return __pyx_r;
5498 }
5499
5500 static PyObject *__pyx_pf_6Recode_7Request_6scan(struct __pyx_obj_6Recode_Request *__pyx_v_self, char *__pyx_v_text) {
5501 bool __pyx_v_ok;
5502 PyObject *__pyx_r = NULL;
5503 __Pyx_RefNannyDeclarations
5504 int __pyx_t_1;
5505 PyObject *__pyx_t_2 = NULL;
5506 int __pyx_lineno = 0;
5507 const char *__pyx_filename = NULL;
5508 int __pyx_clineno = 0;
5509 __Pyx_RefNannySetupContext("scan", 1);
5510
5511 /* "Recode.pyx":604
5512 *
5513 * def scan(self, char *text):
5514 * ok = recode_scan_request(self.request, text) # <<<<<<<<<<<<<<
5515 * if not ok:
5516 * raise error
5517 */
5518 __pyx_v_ok = recode_scan_request(__pyx_v_self->request, __pyx_v_text);
5519
5520 /* "Recode.pyx":605
5521 * def scan(self, char *text):
5522 * ok = recode_scan_request(self.request, text)
5523 * if not ok: # <<<<<<<<<<<<<<
5524 * raise error
5525 *
5526 */
5527 __pyx_t_1 = (!(__pyx_v_ok != 0));
5528 if (unlikely(__pyx_t_1)) {
5529
5530 /* "Recode.pyx":606
5531 * ok = recode_scan_request(self.request, text)
5532 * if not ok:
5533 * raise error # <<<<<<<<<<<<<<
5534 *
5535 * def pair_sequence(self):
5536 */
5537 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 606, __pyx_L1_error)
5538 __Pyx_GOTREF(__pyx_t_2);
5539 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
5540 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5541 __PYX_ERR(1, 606, __pyx_L1_error)
5542
5543 /* "Recode.pyx":605
5544 * def scan(self, char *text):
5545 * ok = recode_scan_request(self.request, text)
5546 * if not ok: # <<<<<<<<<<<<<<
5547 * raise error
5548 *
5549 */
5550 }
5551
5552 /* "Recode.pyx":603
5553 * return previous
5554 *
5555 * def scan(self, char *text): # <<<<<<<<<<<<<<
5556 * ok = recode_scan_request(self.request, text)
5557 * if not ok:
5558 */
5559
5560 /* function exit code */
5561 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5562 goto __pyx_L0;
5563 __pyx_L1_error:;
5564 __Pyx_XDECREF(__pyx_t_2);
5565 __Pyx_AddTraceback("Recode.Request.scan", __pyx_clineno, __pyx_lineno, __pyx_filename);
5566 __pyx_r = NULL;
5567 __pyx_L0:;
5568 __Pyx_XGIVEREF(__pyx_r);
5569 __Pyx_RefNannyFinishContext();
5570 return __pyx_r;
5571 }
5572
5573 /* "Recode.pyx":608
5574 * raise error
5575 *
5576 * def pair_sequence(self): # <<<<<<<<<<<<<<
5577 * list = []
5578 * cdef recode_step step
5579 */
5580
5581 /* Python wrapper */
5582 static PyObject *__pyx_pw_6Recode_7Request_9pair_sequence(PyObject *__pyx_v_self,
5583 #if CYTHON_METH_FASTCALL
5584 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
5585 #else
5586 PyObject *__pyx_args, PyObject *__pyx_kwds
5587 #endif
5588 ); /*proto*/
5589 static PyMethodDef __pyx_mdef_6Recode_7Request_9pair_sequence = {"pair_sequence", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_7Request_9pair_sequence, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
5590 static PyObject *__pyx_pw_6Recode_7Request_9pair_sequence(PyObject *__pyx_v_self,
5591 #if CYTHON_METH_FASTCALL
5592 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
5593 #else
5594 PyObject *__pyx_args, PyObject *__pyx_kwds
5595 #endif
5596 ) {
5597 #if !CYTHON_METH_FASTCALL
5598 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
5599 #endif
5600 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
5601 PyObject *__pyx_r = 0;
5602 __Pyx_RefNannyDeclarations
5603 __Pyx_RefNannySetupContext("pair_sequence (wrapper)", 0);
5604 #if !CYTHON_METH_FASTCALL
5605 #if CYTHON_ASSUME_SAFE_MACROS
5606 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
5607 #else
5608 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
5609 #endif
5610 #endif
5611 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
5612 if (unlikely(__pyx_nargs > 0)) {
5613 __Pyx_RaiseArgtupleInvalid("pair_sequence", 1, 0, 0, __pyx_nargs); return NULL;}
5614 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "pair_sequence", 0))) return NULL;
5615 __pyx_r = __pyx_pf_6Recode_7Request_8pair_sequence(((struct __pyx_obj_6Recode_Request *)__pyx_v_self));
5616
5617 /* function exit code */
5618 __Pyx_RefNannyFinishContext();
5619 return __pyx_r;
5620 }
5621
5622 static PyObject *__pyx_pf_6Recode_7Request_8pair_sequence(struct __pyx_obj_6Recode_Request *__pyx_v_self) {
5623 PyObject *__pyx_v_list = NULL;
5624 struct recode_step __pyx_v_step;
5625 short __pyx_v_counter;
5626 PyObject *__pyx_r = NULL;
5627 __Pyx_RefNannyDeclarations
5628 PyObject *__pyx_t_1 = NULL;
5629 short __pyx_t_2;
5630 PyObject *__pyx_t_3 = NULL;
5631 PyObject *__pyx_t_4 = NULL;
5632 int __pyx_t_5;
5633 int __pyx_lineno = 0;
5634 const char *__pyx_filename = NULL;
5635 int __pyx_clineno = 0;
5636 __Pyx_RefNannySetupContext("pair_sequence", 1);
5637
5638 /* "Recode.pyx":609
5639 *
5640 * def pair_sequence(self):
5641 * list = [] # <<<<<<<<<<<<<<
5642 * cdef recode_step step
5643 * cdef short counter
5644 */
5645 __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 609, __pyx_L1_error)
5646 __Pyx_GOTREF(__pyx_t_1);
5647 __pyx_v_list = ((PyObject*)__pyx_t_1);
5648 __pyx_t_1 = 0;
5649
5650 /* "Recode.pyx":612
5651 * cdef recode_step step
5652 * cdef short counter
5653 * for counter from 0 <= counter < self.request.sequence_length: # <<<<<<<<<<<<<<
5654 * step = self.request.sequence_array[counter]
5655 * list.append((step.before.name, step.after.name))
5656 */
5657 __pyx_t_2 = __pyx_v_self->request->sequence_length;
5658 for (__pyx_v_counter = 0; __pyx_v_counter < __pyx_t_2; __pyx_v_counter++) {
5659
5660 /* "Recode.pyx":613
5661 * cdef short counter
5662 * for counter from 0 <= counter < self.request.sequence_length:
5663 * step = self.request.sequence_array[counter] # <<<<<<<<<<<<<<
5664 * list.append((step.before.name, step.after.name))
5665 * return list
5666 */
5667 __pyx_v_step = (__pyx_v_self->request->sequence_array[__pyx_v_counter]);
5668
5669 /* "Recode.pyx":614
5670 * for counter from 0 <= counter < self.request.sequence_length:
5671 * step = self.request.sequence_array[counter]
5672 * list.append((step.before.name, step.after.name)) # <<<<<<<<<<<<<<
5673 * return list
5674 *
5675 */
5676 __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_step.before->name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 614, __pyx_L1_error)
5677 __Pyx_GOTREF(__pyx_t_1);
5678 __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_step.after->name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 614, __pyx_L1_error)
5679 __Pyx_GOTREF(__pyx_t_3);
5680 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 614, __pyx_L1_error)
5681 __Pyx_GOTREF(__pyx_t_4);
5682 __Pyx_GIVEREF(__pyx_t_1);
5683 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(1, 614, __pyx_L1_error);
5684 __Pyx_GIVEREF(__pyx_t_3);
5685 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(1, 614, __pyx_L1_error);
5686 __pyx_t_1 = 0;
5687 __pyx_t_3 = 0;
5688 __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_list, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 614, __pyx_L1_error)
5689 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5690 }
5691
5692 /* "Recode.pyx":615
5693 * step = self.request.sequence_array[counter]
5694 * list.append((step.before.name, step.after.name))
5695 * return list # <<<<<<<<<<<<<<
5696 *
5697 * def format_table(self, int language, char *charset):
5698 */
5699 __Pyx_XDECREF(__pyx_r);
5700 __Pyx_INCREF(__pyx_v_list);
5701 __pyx_r = __pyx_v_list;
5702 goto __pyx_L0;
5703
5704 /* "Recode.pyx":608
5705 * raise error
5706 *
5707 * def pair_sequence(self): # <<<<<<<<<<<<<<
5708 * list = []
5709 * cdef recode_step step
5710 */
5711
5712 /* function exit code */
5713 __pyx_L1_error:;
5714 __Pyx_XDECREF(__pyx_t_1);
5715 __Pyx_XDECREF(__pyx_t_3);
5716 __Pyx_XDECREF(__pyx_t_4);
5717 __Pyx_AddTraceback("Recode.Request.pair_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
5718 __pyx_r = NULL;
5719 __pyx_L0:;
5720 __Pyx_XDECREF(__pyx_v_list);
5721 __Pyx_XGIVEREF(__pyx_r);
5722 __Pyx_RefNannyFinishContext();
5723 return __pyx_r;
5724 }
5725
5726 /* "Recode.pyx":617
5727 * return list
5728 *
5729 * def format_table(self, int language, char *charset): # <<<<<<<<<<<<<<
5730 * cdef RECODE_OUTER outer
5731 * cdef bool saved
5732 */
5733
5734 /* Python wrapper */
5735 static PyObject *__pyx_pw_6Recode_7Request_11format_table(PyObject *__pyx_v_self,
5736 #if CYTHON_METH_FASTCALL
5737 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
5738 #else
5739 PyObject *__pyx_args, PyObject *__pyx_kwds
5740 #endif
5741 ); /*proto*/
5742 static PyMethodDef __pyx_mdef_6Recode_7Request_11format_table = {"format_table", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_7Request_11format_table, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
5743 static PyObject *__pyx_pw_6Recode_7Request_11format_table(PyObject *__pyx_v_self,
5744 #if CYTHON_METH_FASTCALL
5745 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
5746 #else
5747 PyObject *__pyx_args, PyObject *__pyx_kwds
5748 #endif
5749 ) {
5750 int __pyx_v_language;
5751 char *__pyx_v_charset;
5752 #if !CYTHON_METH_FASTCALL
5753 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
5754 #endif
5755 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
5756 PyObject* values[2] = {0,0};
5757 int __pyx_lineno = 0;
5758 const char *__pyx_filename = NULL;
5759 int __pyx_clineno = 0;
5760 PyObject *__pyx_r = 0;
5761 __Pyx_RefNannyDeclarations
5762 __Pyx_RefNannySetupContext("format_table (wrapper)", 0);
5763 #if !CYTHON_METH_FASTCALL
5764 #if CYTHON_ASSUME_SAFE_MACROS
5765 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
5766 #else
5767 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
5768 #endif
5769 #endif
5770 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
5771 {
5772 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_language,&__pyx_n_s_charset,0};
5773 if (__pyx_kwds) {
5774 Py_ssize_t kw_args;
5775 switch (__pyx_nargs) {
5776 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
5777 CYTHON_FALLTHROUGH;
5778 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
5779 CYTHON_FALLTHROUGH;
5780 case 0: break;
5781 default: goto __pyx_L5_argtuple_error;
5782 }
5783 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
5784 switch (__pyx_nargs) {
5785 case 0:
5786 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_language)) != 0)) {
5787 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
5788 kw_args--;
5789 }
5790 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 617, __pyx_L3_error)
5791 else goto __pyx_L5_argtuple_error;
5792 CYTHON_FALLTHROUGH;
5793 case 1:
5794 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_charset)) != 0)) {
5795 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
5796 kw_args--;
5797 }
5798 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 617, __pyx_L3_error)
5799 else {
5800 __Pyx_RaiseArgtupleInvalid("format_table", 1, 2, 2, 1); __PYX_ERR(1, 617, __pyx_L3_error)
5801 }
5802 }
5803 if (unlikely(kw_args > 0)) {
5804 const Py_ssize_t kwd_pos_args = __pyx_nargs;
5805 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "format_table") < 0)) __PYX_ERR(1, 617, __pyx_L3_error)
5806 }
5807 } else if (unlikely(__pyx_nargs != 2)) {
5808 goto __pyx_L5_argtuple_error;
5809 } else {
5810 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
5811 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
5812 }
5813 __pyx_v_language = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_language == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 617, __pyx_L3_error)
5814 __pyx_v_charset = __Pyx_PyObject_AsWritableString(values[1]); if (unlikely((!__pyx_v_charset) && PyErr_Occurred())) __PYX_ERR(1, 617, __pyx_L3_error)
5815 }
5816 goto __pyx_L6_skip;
5817 __pyx_L5_argtuple_error:;
5818 __Pyx_RaiseArgtupleInvalid("format_table", 1, 2, 2, __pyx_nargs); __PYX_ERR(1, 617, __pyx_L3_error)
5819 __pyx_L6_skip:;
5820 goto __pyx_L4_argument_unpacking_done;
5821 __pyx_L3_error:;
5822 {
5823 Py_ssize_t __pyx_temp;
5824 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
5825 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
5826 }
5827 }
5828 __Pyx_AddTraceback("Recode.Request.format_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
5829 __Pyx_RefNannyFinishContext();
5830 return NULL;
5831 __pyx_L4_argument_unpacking_done:;
5832 __pyx_r = __pyx_pf_6Recode_7Request_10format_table(((struct __pyx_obj_6Recode_Request *)__pyx_v_self), __pyx_v_language, __pyx_v_charset);
5833
5834 /* function exit code */
5835 {
5836 Py_ssize_t __pyx_temp;
5837 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
5838 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
5839 }
5840 }
5841 __Pyx_RefNannyFinishContext();
5842 return __pyx_r;
5843 }
5844
5845 static PyObject *__pyx_pf_6Recode_7Request_10format_table(struct __pyx_obj_6Recode_Request *__pyx_v_self, int __pyx_v_language, char *__pyx_v_charset) {
5846 RECODE_OUTER __pyx_v_outer;
5847 bool __pyx_v_saved;
5848 bool __pyx_v_ok;
5849 PyObject *__pyx_r = NULL;
5850 __Pyx_RefNannyDeclarations
5851 RECODE_OUTER __pyx_t_1;
5852 bool __pyx_t_2;
5853 int __pyx_t_3;
5854 PyObject *__pyx_t_4 = NULL;
5855 int __pyx_lineno = 0;
5856 const char *__pyx_filename = NULL;
5857 int __pyx_clineno = 0;
5858 __Pyx_RefNannySetupContext("format_table", 1);
5859
5860 /* "Recode.pyx":620
5861 * cdef RECODE_OUTER outer
5862 * cdef bool saved
5863 * outer = self.request.outer # <<<<<<<<<<<<<<
5864 * saved = outer.iconv_pivot.ignore
5865 * outer.iconv_pivot.ignore = True
5866 */
5867 __pyx_t_1 = __pyx_v_self->request->outer;
5868 __pyx_v_outer = __pyx_t_1;
5869
5870 /* "Recode.pyx":621
5871 * cdef bool saved
5872 * outer = self.request.outer
5873 * saved = outer.iconv_pivot.ignore # <<<<<<<<<<<<<<
5874 * outer.iconv_pivot.ignore = True
5875 * ok = recode_format_table(
5876 */
5877 __pyx_t_2 = __pyx_v_outer->iconv_pivot->ignore;
5878 __pyx_v_saved = __pyx_t_2;
5879
5880 /* "Recode.pyx":622
5881 * outer = self.request.outer
5882 * saved = outer.iconv_pivot.ignore
5883 * outer.iconv_pivot.ignore = True # <<<<<<<<<<<<<<
5884 * ok = recode_format_table(
5885 * self.request, <recode_programming_language> language, charset)
5886 */
5887 __pyx_v_outer->iconv_pivot->ignore = 1;
5888
5889 /* "Recode.pyx":623
5890 * saved = outer.iconv_pivot.ignore
5891 * outer.iconv_pivot.ignore = True
5892 * ok = recode_format_table( # <<<<<<<<<<<<<<
5893 * self.request, <recode_programming_language> language, charset)
5894 * outer.iconv_pivot.ignore = saved
5895 */
5896 __pyx_v_ok = recode_format_table(__pyx_v_self->request, ((enum recode_programming_language)__pyx_v_language), __pyx_v_charset);
5897
5898 /* "Recode.pyx":625
5899 * ok = recode_format_table(
5900 * self.request, <recode_programming_language> language, charset)
5901 * outer.iconv_pivot.ignore = saved # <<<<<<<<<<<<<<
5902 * if not ok:
5903 * raise error
5904 */
5905 __pyx_v_outer->iconv_pivot->ignore = __pyx_v_saved;
5906
5907 /* "Recode.pyx":626
5908 * self.request, <recode_programming_language> language, charset)
5909 * outer.iconv_pivot.ignore = saved
5910 * if not ok: # <<<<<<<<<<<<<<
5911 * raise error
5912 *
5913 */
5914 __pyx_t_3 = (!(__pyx_v_ok != 0));
5915 if (unlikely(__pyx_t_3)) {
5916
5917 /* "Recode.pyx":627
5918 * outer.iconv_pivot.ignore = saved
5919 * if not ok:
5920 * raise error # <<<<<<<<<<<<<<
5921 *
5922 * def string(self, text):
5923 */
5924 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 627, __pyx_L1_error)
5925 __Pyx_GOTREF(__pyx_t_4);
5926 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
5927 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5928 __PYX_ERR(1, 627, __pyx_L1_error)
5929
5930 /* "Recode.pyx":626
5931 * self.request, <recode_programming_language> language, charset)
5932 * outer.iconv_pivot.ignore = saved
5933 * if not ok: # <<<<<<<<<<<<<<
5934 * raise error
5935 *
5936 */
5937 }
5938
5939 /* "Recode.pyx":617
5940 * return list
5941 *
5942 * def format_table(self, int language, char *charset): # <<<<<<<<<<<<<<
5943 * cdef RECODE_OUTER outer
5944 * cdef bool saved
5945 */
5946
5947 /* function exit code */
5948 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5949 goto __pyx_L0;
5950 __pyx_L1_error:;
5951 __Pyx_XDECREF(__pyx_t_4);
5952 __Pyx_AddTraceback("Recode.Request.format_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
5953 __pyx_r = NULL;
5954 __pyx_L0:;
5955 __Pyx_XGIVEREF(__pyx_r);
5956 __Pyx_RefNannyFinishContext();
5957 return __pyx_r;
5958 }
5959
5960 /* "Recode.pyx":629
5961 * raise error
5962 *
5963 * def string(self, text): # <<<<<<<<<<<<<<
5964 * cdef char *input = text
5965 * cdef size_t input_len = len(text)
5966 */
5967
5968 /* Python wrapper */
5969 static PyObject *__pyx_pw_6Recode_7Request_13string(PyObject *__pyx_v_self,
5970 #if CYTHON_METH_FASTCALL
5971 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
5972 #else
5973 PyObject *__pyx_args, PyObject *__pyx_kwds
5974 #endif
5975 ); /*proto*/
5976 static PyMethodDef __pyx_mdef_6Recode_7Request_13string = {"string", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_7Request_13string, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
5977 static PyObject *__pyx_pw_6Recode_7Request_13string(PyObject *__pyx_v_self,
5978 #if CYTHON_METH_FASTCALL
5979 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
5980 #else
5981 PyObject *__pyx_args, PyObject *__pyx_kwds
5982 #endif
5983 ) {
5984 PyObject *__pyx_v_text = 0;
5985 #if !CYTHON_METH_FASTCALL
5986 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
5987 #endif
5988 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
5989 PyObject* values[1] = {0};
5990 int __pyx_lineno = 0;
5991 const char *__pyx_filename = NULL;
5992 int __pyx_clineno = 0;
5993 PyObject *__pyx_r = 0;
5994 __Pyx_RefNannyDeclarations
5995 __Pyx_RefNannySetupContext("string (wrapper)", 0);
5996 #if !CYTHON_METH_FASTCALL
5997 #if CYTHON_ASSUME_SAFE_MACROS
5998 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
5999 #else
6000 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
6001 #endif
6002 #endif
6003 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
6004 {
6005 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_text,0};
6006 if (__pyx_kwds) {
6007 Py_ssize_t kw_args;
6008 switch (__pyx_nargs) {
6009 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
6010 CYTHON_FALLTHROUGH;
6011 case 0: break;
6012 default: goto __pyx_L5_argtuple_error;
6013 }
6014 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
6015 switch (__pyx_nargs) {
6016 case 0:
6017 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_text)) != 0)) {
6018 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
6019 kw_args--;
6020 }
6021 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 629, __pyx_L3_error)
6022 else goto __pyx_L5_argtuple_error;
6023 }
6024 if (unlikely(kw_args > 0)) {
6025 const Py_ssize_t kwd_pos_args = __pyx_nargs;
6026 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "string") < 0)) __PYX_ERR(1, 629, __pyx_L3_error)
6027 }
6028 } else if (unlikely(__pyx_nargs != 1)) {
6029 goto __pyx_L5_argtuple_error;
6030 } else {
6031 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
6032 }
6033 __pyx_v_text = values[0];
6034 }
6035 goto __pyx_L6_skip;
6036 __pyx_L5_argtuple_error:;
6037 __Pyx_RaiseArgtupleInvalid("string", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 629, __pyx_L3_error)
6038 __pyx_L6_skip:;
6039 goto __pyx_L4_argument_unpacking_done;
6040 __pyx_L3_error:;
6041 {
6042 Py_ssize_t __pyx_temp;
6043 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6044 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
6045 }
6046 }
6047 __Pyx_AddTraceback("Recode.Request.string", __pyx_clineno, __pyx_lineno, __pyx_filename);
6048 __Pyx_RefNannyFinishContext();
6049 return NULL;
6050 __pyx_L4_argument_unpacking_done:;
6051 __pyx_r = __pyx_pf_6Recode_7Request_12string(((struct __pyx_obj_6Recode_Request *)__pyx_v_self), __pyx_v_text);
6052
6053 /* function exit code */
6054 {
6055 Py_ssize_t __pyx_temp;
6056 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6057 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
6058 }
6059 }
6060 __Pyx_RefNannyFinishContext();
6061 return __pyx_r;
6062 }
6063
6064 static PyObject *__pyx_pf_6Recode_7Request_12string(struct __pyx_obj_6Recode_Request *__pyx_v_self, PyObject *__pyx_v_text) {
6065 char *__pyx_v_input;
6066 size_t __pyx_v_input_len;
6067 char *__pyx_v_output;
6068 size_t __pyx_v_output_len;
6069 size_t __pyx_v_output_allocated;
6070 bool __pyx_v_result;
6071 PyObject *__pyx_v_py_string = NULL;
6072 PyObject *__pyx_r = NULL;
6073 __Pyx_RefNannyDeclarations
6074 char *__pyx_t_1;
6075 Py_ssize_t __pyx_t_2;
6076 int __pyx_t_3;
6077 int __pyx_t_4;
6078 PyObject *__pyx_t_5 = NULL;
6079 int __pyx_t_6;
6080 int __pyx_t_7;
6081 char const *__pyx_t_8;
6082 PyObject *__pyx_t_9 = NULL;
6083 PyObject *__pyx_t_10 = NULL;
6084 PyObject *__pyx_t_11 = NULL;
6085 PyObject *__pyx_t_12 = NULL;
6086 PyObject *__pyx_t_13 = NULL;
6087 PyObject *__pyx_t_14 = NULL;
6088 int __pyx_lineno = 0;
6089 const char *__pyx_filename = NULL;
6090 int __pyx_clineno = 0;
6091 __Pyx_RefNannySetupContext("string", 1);
6092
6093 /* "Recode.pyx":630
6094 *
6095 * def string(self, text):
6096 * cdef char *input = text # <<<<<<<<<<<<<<
6097 * cdef size_t input_len = len(text)
6098 * cdef char *output = NULL
6099 */
6100 __pyx_t_1 = __Pyx_PyObject_AsWritableString(__pyx_v_text); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(1, 630, __pyx_L1_error)
6101 __pyx_v_input = __pyx_t_1;
6102
6103 /* "Recode.pyx":631
6104 * def string(self, text):
6105 * cdef char *input = text
6106 * cdef size_t input_len = len(text) # <<<<<<<<<<<<<<
6107 * cdef char *output = NULL
6108 * cdef size_t output_len
6109 */
6110 __pyx_t_2 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 631, __pyx_L1_error)
6111 __pyx_v_input_len = __pyx_t_2;
6112
6113 /* "Recode.pyx":632
6114 * cdef char *input = text
6115 * cdef size_t input_len = len(text)
6116 * cdef char *output = NULL # <<<<<<<<<<<<<<
6117 * cdef size_t output_len
6118 * cdef size_t output_allocated = 0
6119 */
6120 __pyx_v_output = NULL;
6121
6122 /* "Recode.pyx":634
6123 * cdef char *output = NULL
6124 * cdef size_t output_len
6125 * cdef size_t output_allocated = 0 # <<<<<<<<<<<<<<
6126 * result = recode_buffer_to_buffer(self.request, input, input_len, &output, &output_len, &output_allocated)
6127 * if result is False or output is NULL:
6128 */
6129 __pyx_v_output_allocated = 0;
6130
6131 /* "Recode.pyx":635
6132 * cdef size_t output_len
6133 * cdef size_t output_allocated = 0
6134 * result = recode_buffer_to_buffer(self.request, input, input_len, &output, &output_len, &output_allocated) # <<<<<<<<<<<<<<
6135 * if result is False or output is NULL:
6136 * raise error
6137 */
6138 __pyx_v_result = recode_buffer_to_buffer(__pyx_v_self->request, __pyx_v_input, __pyx_v_input_len, (&__pyx_v_output), (&__pyx_v_output_len), (&__pyx_v_output_allocated));
6139
6140 /* "Recode.pyx":636
6141 * cdef size_t output_allocated = 0
6142 * result = recode_buffer_to_buffer(self.request, input, input_len, &output, &output_len, &output_allocated)
6143 * if result is False or output is NULL: # <<<<<<<<<<<<<<
6144 * raise error
6145 * try:
6146 */
6147 __pyx_t_4 = (__pyx_v_result == 0);
6148 if (!__pyx_t_4) {
6149 } else {
6150 __pyx_t_3 = __pyx_t_4;
6151 goto __pyx_L4_bool_binop_done;
6152 }
6153 __pyx_t_4 = (__pyx_v_output == NULL);
6154 __pyx_t_3 = __pyx_t_4;
6155 __pyx_L4_bool_binop_done:;
6156 if (unlikely(__pyx_t_3)) {
6157
6158 /* "Recode.pyx":637
6159 * result = recode_buffer_to_buffer(self.request, input, input_len, &output, &output_len, &output_allocated)
6160 * if result is False or output is NULL:
6161 * raise error # <<<<<<<<<<<<<<
6162 * try:
6163 * py_string = output[:output_len]
6164 */
6165 __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 637, __pyx_L1_error)
6166 __Pyx_GOTREF(__pyx_t_5);
6167 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
6168 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6169 __PYX_ERR(1, 637, __pyx_L1_error)
6170
6171 /* "Recode.pyx":636
6172 * cdef size_t output_allocated = 0
6173 * result = recode_buffer_to_buffer(self.request, input, input_len, &output, &output_len, &output_allocated)
6174 * if result is False or output is NULL: # <<<<<<<<<<<<<<
6175 * raise error
6176 * try:
6177 */
6178 }
6179
6180 /* "Recode.pyx":638
6181 * if result is False or output is NULL:
6182 * raise error
6183 * try: # <<<<<<<<<<<<<<
6184 * py_string = output[:output_len]
6185 * finally:
6186 */
6187 /*try:*/ {
6188
6189 /* "Recode.pyx":639
6190 * raise error
6191 * try:
6192 * py_string = output[:output_len] # <<<<<<<<<<<<<<
6193 * finally:
6194 * free (output)
6195 */
6196 __pyx_t_5 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_output + 0, __pyx_v_output_len - 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 639, __pyx_L7_error)
6197 __Pyx_GOTREF(__pyx_t_5);
6198 __pyx_v_py_string = ((PyObject*)__pyx_t_5);
6199 __pyx_t_5 = 0;
6200 }
6201
6202 /* "Recode.pyx":641
6203 * py_string = output[:output_len]
6204 * finally:
6205 * free (output) # <<<<<<<<<<<<<<
6206 * return py_string
6207 *
6208 */
6209 /*finally:*/ {
6210 /*normal exit:*/{
6211 free(__pyx_v_output);
6212 goto __pyx_L8;
6213 }
6214 __pyx_L7_error:;
6215 /*exception exit:*/{
6216 __Pyx_PyThreadState_declare
6217 __Pyx_PyThreadState_assign
6218 __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
6219 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6220 if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
6221 if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
6222 __Pyx_XGOTREF(__pyx_t_9);
6223 __Pyx_XGOTREF(__pyx_t_10);
6224 __Pyx_XGOTREF(__pyx_t_11);
6225 __Pyx_XGOTREF(__pyx_t_12);
6226 __Pyx_XGOTREF(__pyx_t_13);
6227 __Pyx_XGOTREF(__pyx_t_14);
6228 __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
6229 {
6230 free(__pyx_v_output);
6231 }
6232 if (PY_MAJOR_VERSION >= 3) {
6233 __Pyx_XGIVEREF(__pyx_t_12);
6234 __Pyx_XGIVEREF(__pyx_t_13);
6235 __Pyx_XGIVEREF(__pyx_t_14);
6236 __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
6237 }
6238 __Pyx_XGIVEREF(__pyx_t_9);
6239 __Pyx_XGIVEREF(__pyx_t_10);
6240 __Pyx_XGIVEREF(__pyx_t_11);
6241 __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
6242 __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
6243 __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8;
6244 goto __pyx_L1_error;
6245 }
6246 __pyx_L8:;
6247 }
6248
6249 /* "Recode.pyx":642
6250 * finally:
6251 * free (output)
6252 * return py_string # <<<<<<<<<<<<<<
6253 *
6254 * # Unexposed APIs:
6255 */
6256 __Pyx_XDECREF(__pyx_r);
6257 __Pyx_INCREF(__pyx_v_py_string);
6258 __pyx_r = __pyx_v_py_string;
6259 goto __pyx_L0;
6260
6261 /* "Recode.pyx":629
6262 * raise error
6263 *
6264 * def string(self, text): # <<<<<<<<<<<<<<
6265 * cdef char *input = text
6266 * cdef size_t input_len = len(text)
6267 */
6268
6269 /* function exit code */
6270 __pyx_L1_error:;
6271 __Pyx_XDECREF(__pyx_t_5);
6272 __Pyx_AddTraceback("Recode.Request.string", __pyx_clineno, __pyx_lineno, __pyx_filename);
6273 __pyx_r = NULL;
6274 __pyx_L0:;
6275 __Pyx_XDECREF(__pyx_v_py_string);
6276 __Pyx_XGIVEREF(__pyx_r);
6277 __Pyx_RefNannyFinishContext();
6278 return __pyx_r;
6279 }
6280
6281 /* "(tree fragment)":1
6282 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
6283 * raise TypeError, "self.request cannot be converted to a Python object for pickling"
6284 * def __setstate_cython__(self, __pyx_state):
6285 */
6286
6287 /* Python wrapper */
6288 static PyObject *__pyx_pw_6Recode_7Request_15__reduce_cython__(PyObject *__pyx_v_self,
6289 #if CYTHON_METH_FASTCALL
6290 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6291 #else
6292 PyObject *__pyx_args, PyObject *__pyx_kwds
6293 #endif
6294 ); /*proto*/
6295 static PyMethodDef __pyx_mdef_6Recode_7Request_15__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_7Request_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
6296 static PyObject *__pyx_pw_6Recode_7Request_15__reduce_cython__(PyObject *__pyx_v_self,
6297 #if CYTHON_METH_FASTCALL
6298 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6299 #else
6300 PyObject *__pyx_args, PyObject *__pyx_kwds
6301 #endif
6302 ) {
6303 #if !CYTHON_METH_FASTCALL
6304 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
6305 #endif
6306 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6307 PyObject *__pyx_r = 0;
6308 __Pyx_RefNannyDeclarations
6309 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
6310 #if !CYTHON_METH_FASTCALL
6311 #if CYTHON_ASSUME_SAFE_MACROS
6312 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
6313 #else
6314 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
6315 #endif
6316 #endif
6317 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
6318 if (unlikely(__pyx_nargs > 0)) {
6319 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
6320 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
6321 __pyx_r = __pyx_pf_6Recode_7Request_14__reduce_cython__(((struct __pyx_obj_6Recode_Request *)__pyx_v_self));
6322
6323 /* function exit code */
6324 __Pyx_RefNannyFinishContext();
6325 return __pyx_r;
6326 }
6327
6328 static PyObject *__pyx_pf_6Recode_7Request_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6Recode_Request *__pyx_v_self) {
6329 PyObject *__pyx_r = NULL;
6330 __Pyx_RefNannyDeclarations
6331 int __pyx_lineno = 0;
6332 const char *__pyx_filename = NULL;
6333 int __pyx_clineno = 0;
6334 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
6335
6336 /* "(tree fragment)":2
6337 * def __reduce_cython__(self):
6338 * raise TypeError, "self.request cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
6339 * def __setstate_cython__(self, __pyx_state):
6340 * raise TypeError, "self.request cannot be converted to a Python object for pickling"
6341 */
6342 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_request_cannot_be_converted, 0, 0);
6343 __PYX_ERR(0, 2, __pyx_L1_error)
6344
6345 /* "(tree fragment)":1
6346 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
6347 * raise TypeError, "self.request cannot be converted to a Python object for pickling"
6348 * def __setstate_cython__(self, __pyx_state):
6349 */
6350
6351 /* function exit code */
6352 __pyx_L1_error:;
6353 __Pyx_AddTraceback("Recode.Request.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6354 __pyx_r = NULL;
6355 __Pyx_XGIVEREF(__pyx_r);
6356 __Pyx_RefNannyFinishContext();
6357 return __pyx_r;
6358 }
6359
6360 /* "(tree fragment)":3
6361 * def __reduce_cython__(self):
6362 * raise TypeError, "self.request cannot be converted to a Python object for pickling"
6363 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
6364 * raise TypeError, "self.request cannot be converted to a Python object for pickling"
6365 */
6366
6367 /* Python wrapper */
6368 static PyObject *__pyx_pw_6Recode_7Request_17__setstate_cython__(PyObject *__pyx_v_self,
6369 #if CYTHON_METH_FASTCALL
6370 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6371 #else
6372 PyObject *__pyx_args, PyObject *__pyx_kwds
6373 #endif
6374 ); /*proto*/
6375 static PyMethodDef __pyx_mdef_6Recode_7Request_17__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_7Request_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
6376 static PyObject *__pyx_pw_6Recode_7Request_17__setstate_cython__(PyObject *__pyx_v_self,
6377 #if CYTHON_METH_FASTCALL
6378 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6379 #else
6380 PyObject *__pyx_args, PyObject *__pyx_kwds
6381 #endif
6382 ) {
6383 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
6384 #if !CYTHON_METH_FASTCALL
6385 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
6386 #endif
6387 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6388 PyObject* values[1] = {0};
6389 int __pyx_lineno = 0;
6390 const char *__pyx_filename = NULL;
6391 int __pyx_clineno = 0;
6392 PyObject *__pyx_r = 0;
6393 __Pyx_RefNannyDeclarations
6394 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
6395 #if !CYTHON_METH_FASTCALL
6396 #if CYTHON_ASSUME_SAFE_MACROS
6397 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
6398 #else
6399 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
6400 #endif
6401 #endif
6402 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
6403 {
6404 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
6405 if (__pyx_kwds) {
6406 Py_ssize_t kw_args;
6407 switch (__pyx_nargs) {
6408 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
6409 CYTHON_FALLTHROUGH;
6410 case 0: break;
6411 default: goto __pyx_L5_argtuple_error;
6412 }
6413 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
6414 switch (__pyx_nargs) {
6415 case 0:
6416 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
6417 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
6418 kw_args--;
6419 }
6420 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3, __pyx_L3_error)
6421 else goto __pyx_L5_argtuple_error;
6422 }
6423 if (unlikely(kw_args > 0)) {
6424 const Py_ssize_t kwd_pos_args = __pyx_nargs;
6425 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(0, 3, __pyx_L3_error)
6426 }
6427 } else if (unlikely(__pyx_nargs != 1)) {
6428 goto __pyx_L5_argtuple_error;
6429 } else {
6430 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
6431 }
6432 __pyx_v___pyx_state = values[0];
6433 }
6434 goto __pyx_L6_skip;
6435 __pyx_L5_argtuple_error:;
6436 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3, __pyx_L3_error)
6437 __pyx_L6_skip:;
6438 goto __pyx_L4_argument_unpacking_done;
6439 __pyx_L3_error:;
6440 {
6441 Py_ssize_t __pyx_temp;
6442 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6443 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
6444 }
6445 }
6446 __Pyx_AddTraceback("Recode.Request.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6447 __Pyx_RefNannyFinishContext();
6448 return NULL;
6449 __pyx_L4_argument_unpacking_done:;
6450 __pyx_r = __pyx_pf_6Recode_7Request_16__setstate_cython__(((struct __pyx_obj_6Recode_Request *)__pyx_v_self), __pyx_v___pyx_state);
6451
6452 /* function exit code */
6453 {
6454 Py_ssize_t __pyx_temp;
6455 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6456 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
6457 }
6458 }
6459 __Pyx_RefNannyFinishContext();
6460 return __pyx_r;
6461 }
6462
6463 static PyObject *__pyx_pf_6Recode_7Request_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6Recode_Request *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
6464 PyObject *__pyx_r = NULL;
6465 __Pyx_RefNannyDeclarations
6466 int __pyx_lineno = 0;
6467 const char *__pyx_filename = NULL;
6468 int __pyx_clineno = 0;
6469 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
6470
6471 /* "(tree fragment)":4
6472 * raise TypeError, "self.request cannot be converted to a Python object for pickling"
6473 * def __setstate_cython__(self, __pyx_state):
6474 * raise TypeError, "self.request cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
6475 */
6476 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_request_cannot_be_converted, 0, 0);
6477 __PYX_ERR(0, 4, __pyx_L1_error)
6478
6479 /* "(tree fragment)":3
6480 * def __reduce_cython__(self):
6481 * raise TypeError, "self.request cannot be converted to a Python object for pickling"
6482 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
6483 * raise TypeError, "self.request cannot be converted to a Python object for pickling"
6484 */
6485
6486 /* function exit code */
6487 __pyx_L1_error:;
6488 __Pyx_AddTraceback("Recode.Request.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6489 __pyx_r = NULL;
6490 __Pyx_XGIVEREF(__pyx_r);
6491 __Pyx_RefNannyFinishContext();
6492 return __pyx_r;
6493 }
6494
6495 /* "Recode.pyx":671
6496 * cdef RECODE_TASK task
6497 *
6498 * def __init__(self, Request request): # <<<<<<<<<<<<<<
6499 * self.task = recode_new_task(request.request)
6500 *
6501 */
6502
6503 /* Python wrapper */
6504 static int __pyx_pw_6Recode_4Task_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6505 static int __pyx_pw_6Recode_4Task_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6506 struct __pyx_obj_6Recode_Request *__pyx_v_request = 0;
6507 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
6508 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6509 PyObject* values[1] = {0};
6510 int __pyx_lineno = 0;
6511 const char *__pyx_filename = NULL;
6512 int __pyx_clineno = 0;
6513 int __pyx_r;
6514 __Pyx_RefNannyDeclarations
6515 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
6516 #if CYTHON_ASSUME_SAFE_MACROS
6517 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
6518 #else
6519 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
6520 #endif
6521 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
6522 {
6523 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_request,0};
6524 if (__pyx_kwds) {
6525 Py_ssize_t kw_args;
6526 switch (__pyx_nargs) {
6527 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
6528 CYTHON_FALLTHROUGH;
6529 case 0: break;
6530 default: goto __pyx_L5_argtuple_error;
6531 }
6532 kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
6533 switch (__pyx_nargs) {
6534 case 0:
6535 if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_request)) != 0)) {
6536 (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
6537 kw_args--;
6538 }
6539 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 671, __pyx_L3_error)
6540 else goto __pyx_L5_argtuple_error;
6541 }
6542 if (unlikely(kw_args > 0)) {
6543 const Py_ssize_t kwd_pos_args = __pyx_nargs;
6544 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(1, 671, __pyx_L3_error)
6545 }
6546 } else if (unlikely(__pyx_nargs != 1)) {
6547 goto __pyx_L5_argtuple_error;
6548 } else {
6549 values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
6550 }
6551 __pyx_v_request = ((struct __pyx_obj_6Recode_Request *)values[0]);
6552 }
6553 goto __pyx_L6_skip;
6554 __pyx_L5_argtuple_error:;
6555 __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 671, __pyx_L3_error)
6556 __pyx_L6_skip:;
6557 goto __pyx_L4_argument_unpacking_done;
6558 __pyx_L3_error:;
6559 {
6560 Py_ssize_t __pyx_temp;
6561 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6562 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
6563 }
6564 }
6565 __Pyx_AddTraceback("Recode.Task.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6566 __Pyx_RefNannyFinishContext();
6567 return -1;
6568 __pyx_L4_argument_unpacking_done:;
6569 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_request), __pyx_ptype_6Recode_Request, 1, "request", 0))) __PYX_ERR(1, 671, __pyx_L1_error)
6570 __pyx_r = __pyx_pf_6Recode_4Task___init__(((struct __pyx_obj_6Recode_Task *)__pyx_v_self), __pyx_v_request);
6571
6572 /* function exit code */
6573 goto __pyx_L0;
6574 __pyx_L1_error:;
6575 __pyx_r = -1;
6576 __pyx_L0:;
6577 {
6578 Py_ssize_t __pyx_temp;
6579 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6580 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
6581 }
6582 }
6583 __Pyx_RefNannyFinishContext();
6584 return __pyx_r;
6585 }
6586
6587 static int __pyx_pf_6Recode_4Task___init__(struct __pyx_obj_6Recode_Task *__pyx_v_self, struct __pyx_obj_6Recode_Request *__pyx_v_request) {
6588 int __pyx_r;
6589
6590 /* "Recode.pyx":672
6591 *
6592 * def __init__(self, Request request):
6593 * self.task = recode_new_task(request.request) # <<<<<<<<<<<<<<
6594 *
6595 * def __dealloc__(self):
6596 */
6597 __pyx_v_self->task = recode_new_task(__pyx_v_request->request);
6598
6599 /* "Recode.pyx":671
6600 * cdef RECODE_TASK task
6601 *
6602 * def __init__(self, Request request): # <<<<<<<<<<<<<<
6603 * self.task = recode_new_task(request.request)
6604 *
6605 */
6606
6607 /* function exit code */
6608 __pyx_r = 0;
6609 return __pyx_r;
6610 }
6611
6612 /* "Recode.pyx":674
6613 * self.task = recode_new_task(request.request)
6614 *
6615 * def __dealloc__(self): # <<<<<<<<<<<<<<
6616 * free (self.task.output.buffer)
6617 * recode_delete_task(self.task)
6618 */
6619
6620 /* Python wrapper */
6621 static void __pyx_pw_6Recode_4Task_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
6622 static void __pyx_pw_6Recode_4Task_3__dealloc__(PyObject *__pyx_v_self) {
6623 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6624 __Pyx_RefNannyDeclarations
6625 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
6626 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
6627 __pyx_pf_6Recode_4Task_2__dealloc__(((struct __pyx_obj_6Recode_Task *)__pyx_v_self));
6628
6629 /* function exit code */
6630 __Pyx_RefNannyFinishContext();
6631 }
6632
6633 static void __pyx_pf_6Recode_4Task_2__dealloc__(struct __pyx_obj_6Recode_Task *__pyx_v_self) {
6634
6635 /* "Recode.pyx":675
6636 *
6637 * def __dealloc__(self):
6638 * free (self.task.output.buffer) # <<<<<<<<<<<<<<
6639 * recode_delete_task(self.task)
6640 *
6641 */
6642 free(__pyx_v_self->task->output.buffer);
6643
6644 /* "Recode.pyx":676
6645 * def __dealloc__(self):
6646 * free (self.task.output.buffer)
6647 * recode_delete_task(self.task) # <<<<<<<<<<<<<<
6648 *
6649 * def set_byte_order_mark(self, flag):
6650 */
6651 (void)(recode_delete_task(__pyx_v_self->task));
6652
6653 /* "Recode.pyx":674
6654 * self.task = recode_new_task(request.request)
6655 *
6656 * def __dealloc__(self): # <<<<<<<<<<<<<<
6657 * free (self.task.output.buffer)
6658 * recode_delete_task(self.task)
6659 */
6660
6661 /* function exit code */
6662 }
6663
6664 /* "Recode.pyx":678
6665 * recode_delete_task(self.task)
6666 *
6667 * def set_byte_order_mark(self, flag): # <<<<<<<<<<<<<<
6668 * previous = self.task.byte_order_mark != 0
6669 * self.task.byte_order_mark = int(flag)
6670 */
6671
6672 /* Python wrapper */
6673 static PyObject *__pyx_pw_6Recode_4Task_5set_byte_order_mark(PyObject *__pyx_v_self,
6674 #if CYTHON_METH_FASTCALL
6675 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6676 #else
6677 PyObject *__pyx_args, PyObject *__pyx_kwds
6678 #endif
6679 ); /*proto*/
6680 static PyMethodDef __pyx_mdef_6Recode_4Task_5set_byte_order_mark = {"set_byte_order_mark", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_4Task_5set_byte_order_mark, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
6681 static PyObject *__pyx_pw_6Recode_4Task_5set_byte_order_mark(PyObject *__pyx_v_self,
6682 #if CYTHON_METH_FASTCALL
6683 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6684 #else
6685 PyObject *__pyx_args, PyObject *__pyx_kwds
6686 #endif
6687 ) {
6688 PyObject *__pyx_v_flag = 0;
6689 #if !CYTHON_METH_FASTCALL
6690 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
6691 #endif
6692 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6693 PyObject* values[1] = {0};
6694 int __pyx_lineno = 0;
6695 const char *__pyx_filename = NULL;
6696 int __pyx_clineno = 0;
6697 PyObject *__pyx_r = 0;
6698 __Pyx_RefNannyDeclarations
6699 __Pyx_RefNannySetupContext("set_byte_order_mark (wrapper)", 0);
6700 #if !CYTHON_METH_FASTCALL
6701 #if CYTHON_ASSUME_SAFE_MACROS
6702 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
6703 #else
6704 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
6705 #endif
6706 #endif
6707 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
6708 {
6709 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_flag,0};
6710 if (__pyx_kwds) {
6711 Py_ssize_t kw_args;
6712 switch (__pyx_nargs) {
6713 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
6714 CYTHON_FALLTHROUGH;
6715 case 0: break;
6716 default: goto __pyx_L5_argtuple_error;
6717 }
6718 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
6719 switch (__pyx_nargs) {
6720 case 0:
6721 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_flag)) != 0)) {
6722 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
6723 kw_args--;
6724 }
6725 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 678, __pyx_L3_error)
6726 else goto __pyx_L5_argtuple_error;
6727 }
6728 if (unlikely(kw_args > 0)) {
6729 const Py_ssize_t kwd_pos_args = __pyx_nargs;
6730 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_byte_order_mark") < 0)) __PYX_ERR(1, 678, __pyx_L3_error)
6731 }
6732 } else if (unlikely(__pyx_nargs != 1)) {
6733 goto __pyx_L5_argtuple_error;
6734 } else {
6735 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
6736 }
6737 __pyx_v_flag = values[0];
6738 }
6739 goto __pyx_L6_skip;
6740 __pyx_L5_argtuple_error:;
6741 __Pyx_RaiseArgtupleInvalid("set_byte_order_mark", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 678, __pyx_L3_error)
6742 __pyx_L6_skip:;
6743 goto __pyx_L4_argument_unpacking_done;
6744 __pyx_L3_error:;
6745 {
6746 Py_ssize_t __pyx_temp;
6747 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6748 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
6749 }
6750 }
6751 __Pyx_AddTraceback("Recode.Task.set_byte_order_mark", __pyx_clineno, __pyx_lineno, __pyx_filename);
6752 __Pyx_RefNannyFinishContext();
6753 return NULL;
6754 __pyx_L4_argument_unpacking_done:;
6755 __pyx_r = __pyx_pf_6Recode_4Task_4set_byte_order_mark(((struct __pyx_obj_6Recode_Task *)__pyx_v_self), __pyx_v_flag);
6756
6757 /* function exit code */
6758 {
6759 Py_ssize_t __pyx_temp;
6760 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6761 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
6762 }
6763 }
6764 __Pyx_RefNannyFinishContext();
6765 return __pyx_r;
6766 }
6767
6768 static PyObject *__pyx_pf_6Recode_4Task_4set_byte_order_mark(struct __pyx_obj_6Recode_Task *__pyx_v_self, PyObject *__pyx_v_flag) {
6769 PyObject *__pyx_v_previous = NULL;
6770 PyObject *__pyx_r = NULL;
6771 __Pyx_RefNannyDeclarations
6772 PyObject *__pyx_t_1 = NULL;
6773 bool __pyx_t_2;
6774 int __pyx_lineno = 0;
6775 const char *__pyx_filename = NULL;
6776 int __pyx_clineno = 0;
6777 __Pyx_RefNannySetupContext("set_byte_order_mark", 1);
6778
6779 /* "Recode.pyx":679
6780 *
6781 * def set_byte_order_mark(self, flag):
6782 * previous = self.task.byte_order_mark != 0 # <<<<<<<<<<<<<<
6783 * self.task.byte_order_mark = int(flag)
6784 * return previous
6785 */
6786 __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->task->byte_order_mark != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 679, __pyx_L1_error)
6787 __Pyx_GOTREF(__pyx_t_1);
6788 __pyx_v_previous = __pyx_t_1;
6789 __pyx_t_1 = 0;
6790
6791 /* "Recode.pyx":680
6792 * def set_byte_order_mark(self, flag):
6793 * previous = self.task.byte_order_mark != 0
6794 * self.task.byte_order_mark = int(flag) # <<<<<<<<<<<<<<
6795 * return previous
6796 *
6797 */
6798 __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 680, __pyx_L1_error)
6799 __Pyx_GOTREF(__pyx_t_1);
6800 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(1, 680, __pyx_L1_error)
6801 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6802 __pyx_v_self->task->byte_order_mark = __pyx_t_2;
6803
6804 /* "Recode.pyx":681
6805 * previous = self.task.byte_order_mark != 0
6806 * self.task.byte_order_mark = int(flag)
6807 * return previous # <<<<<<<<<<<<<<
6808 *
6809 * def get_error(self):
6810 */
6811 __Pyx_XDECREF(__pyx_r);
6812 __Pyx_INCREF(__pyx_v_previous);
6813 __pyx_r = __pyx_v_previous;
6814 goto __pyx_L0;
6815
6816 /* "Recode.pyx":678
6817 * recode_delete_task(self.task)
6818 *
6819 * def set_byte_order_mark(self, flag): # <<<<<<<<<<<<<<
6820 * previous = self.task.byte_order_mark != 0
6821 * self.task.byte_order_mark = int(flag)
6822 */
6823
6824 /* function exit code */
6825 __pyx_L1_error:;
6826 __Pyx_XDECREF(__pyx_t_1);
6827 __Pyx_AddTraceback("Recode.Task.set_byte_order_mark", __pyx_clineno, __pyx_lineno, __pyx_filename);
6828 __pyx_r = NULL;
6829 __pyx_L0:;
6830 __Pyx_XDECREF(__pyx_v_previous);
6831 __Pyx_XGIVEREF(__pyx_r);
6832 __Pyx_RefNannyFinishContext();
6833 return __pyx_r;
6834 }
6835
6836 /* "Recode.pyx":683
6837 * return previous
6838 *
6839 * def get_error(self): # <<<<<<<<<<<<<<
6840 * return self.task.error_so_far
6841 *
6842 */
6843
6844 /* Python wrapper */
6845 static PyObject *__pyx_pw_6Recode_4Task_7get_error(PyObject *__pyx_v_self,
6846 #if CYTHON_METH_FASTCALL
6847 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6848 #else
6849 PyObject *__pyx_args, PyObject *__pyx_kwds
6850 #endif
6851 ); /*proto*/
6852 static PyMethodDef __pyx_mdef_6Recode_4Task_7get_error = {"get_error", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_4Task_7get_error, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
6853 static PyObject *__pyx_pw_6Recode_4Task_7get_error(PyObject *__pyx_v_self,
6854 #if CYTHON_METH_FASTCALL
6855 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6856 #else
6857 PyObject *__pyx_args, PyObject *__pyx_kwds
6858 #endif
6859 ) {
6860 #if !CYTHON_METH_FASTCALL
6861 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
6862 #endif
6863 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6864 PyObject *__pyx_r = 0;
6865 __Pyx_RefNannyDeclarations
6866 __Pyx_RefNannySetupContext("get_error (wrapper)", 0);
6867 #if !CYTHON_METH_FASTCALL
6868 #if CYTHON_ASSUME_SAFE_MACROS
6869 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
6870 #else
6871 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
6872 #endif
6873 #endif
6874 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
6875 if (unlikely(__pyx_nargs > 0)) {
6876 __Pyx_RaiseArgtupleInvalid("get_error", 1, 0, 0, __pyx_nargs); return NULL;}
6877 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_error", 0))) return NULL;
6878 __pyx_r = __pyx_pf_6Recode_4Task_6get_error(((struct __pyx_obj_6Recode_Task *)__pyx_v_self));
6879
6880 /* function exit code */
6881 __Pyx_RefNannyFinishContext();
6882 return __pyx_r;
6883 }
6884
6885 static PyObject *__pyx_pf_6Recode_4Task_6get_error(struct __pyx_obj_6Recode_Task *__pyx_v_self) {
6886 PyObject *__pyx_r = NULL;
6887 __Pyx_RefNannyDeclarations
6888 PyObject *__pyx_t_1 = NULL;
6889 int __pyx_lineno = 0;
6890 const char *__pyx_filename = NULL;
6891 int __pyx_clineno = 0;
6892 __Pyx_RefNannySetupContext("get_error", 1);
6893
6894 /* "Recode.pyx":684
6895 *
6896 * def get_error(self):
6897 * return self.task.error_so_far # <<<<<<<<<<<<<<
6898 *
6899 * def set_fail_level(self, fail_level):
6900 */
6901 __Pyx_XDECREF(__pyx_r);
6902 __pyx_t_1 = __Pyx_PyInt_From_enum__recode_error(__pyx_v_self->task->error_so_far); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 684, __pyx_L1_error)
6903 __Pyx_GOTREF(__pyx_t_1);
6904 __pyx_r = __pyx_t_1;
6905 __pyx_t_1 = 0;
6906 goto __pyx_L0;
6907
6908 /* "Recode.pyx":683
6909 * return previous
6910 *
6911 * def get_error(self): # <<<<<<<<<<<<<<
6912 * return self.task.error_so_far
6913 *
6914 */
6915
6916 /* function exit code */
6917 __pyx_L1_error:;
6918 __Pyx_XDECREF(__pyx_t_1);
6919 __Pyx_AddTraceback("Recode.Task.get_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
6920 __pyx_r = NULL;
6921 __pyx_L0:;
6922 __Pyx_XGIVEREF(__pyx_r);
6923 __Pyx_RefNannyFinishContext();
6924 return __pyx_r;
6925 }
6926
6927 /* "Recode.pyx":686
6928 * return self.task.error_so_far
6929 *
6930 * def set_fail_level(self, fail_level): # <<<<<<<<<<<<<<
6931 * previous = self.task.fail_level
6932 * self.task.fail_level = fail_level
6933 */
6934
6935 /* Python wrapper */
6936 static PyObject *__pyx_pw_6Recode_4Task_9set_fail_level(PyObject *__pyx_v_self,
6937 #if CYTHON_METH_FASTCALL
6938 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6939 #else
6940 PyObject *__pyx_args, PyObject *__pyx_kwds
6941 #endif
6942 ); /*proto*/
6943 static PyMethodDef __pyx_mdef_6Recode_4Task_9set_fail_level = {"set_fail_level", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_4Task_9set_fail_level, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
6944 static PyObject *__pyx_pw_6Recode_4Task_9set_fail_level(PyObject *__pyx_v_self,
6945 #if CYTHON_METH_FASTCALL
6946 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6947 #else
6948 PyObject *__pyx_args, PyObject *__pyx_kwds
6949 #endif
6950 ) {
6951 PyObject *__pyx_v_fail_level = 0;
6952 #if !CYTHON_METH_FASTCALL
6953 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
6954 #endif
6955 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6956 PyObject* values[1] = {0};
6957 int __pyx_lineno = 0;
6958 const char *__pyx_filename = NULL;
6959 int __pyx_clineno = 0;
6960 PyObject *__pyx_r = 0;
6961 __Pyx_RefNannyDeclarations
6962 __Pyx_RefNannySetupContext("set_fail_level (wrapper)", 0);
6963 #if !CYTHON_METH_FASTCALL
6964 #if CYTHON_ASSUME_SAFE_MACROS
6965 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
6966 #else
6967 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
6968 #endif
6969 #endif
6970 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
6971 {
6972 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fail_level,0};
6973 if (__pyx_kwds) {
6974 Py_ssize_t kw_args;
6975 switch (__pyx_nargs) {
6976 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
6977 CYTHON_FALLTHROUGH;
6978 case 0: break;
6979 default: goto __pyx_L5_argtuple_error;
6980 }
6981 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
6982 switch (__pyx_nargs) {
6983 case 0:
6984 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fail_level)) != 0)) {
6985 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
6986 kw_args--;
6987 }
6988 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 686, __pyx_L3_error)
6989 else goto __pyx_L5_argtuple_error;
6990 }
6991 if (unlikely(kw_args > 0)) {
6992 const Py_ssize_t kwd_pos_args = __pyx_nargs;
6993 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_fail_level") < 0)) __PYX_ERR(1, 686, __pyx_L3_error)
6994 }
6995 } else if (unlikely(__pyx_nargs != 1)) {
6996 goto __pyx_L5_argtuple_error;
6997 } else {
6998 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
6999 }
7000 __pyx_v_fail_level = values[0];
7001 }
7002 goto __pyx_L6_skip;
7003 __pyx_L5_argtuple_error:;
7004 __Pyx_RaiseArgtupleInvalid("set_fail_level", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 686, __pyx_L3_error)
7005 __pyx_L6_skip:;
7006 goto __pyx_L4_argument_unpacking_done;
7007 __pyx_L3_error:;
7008 {
7009 Py_ssize_t __pyx_temp;
7010 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7011 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
7012 }
7013 }
7014 __Pyx_AddTraceback("Recode.Task.set_fail_level", __pyx_clineno, __pyx_lineno, __pyx_filename);
7015 __Pyx_RefNannyFinishContext();
7016 return NULL;
7017 __pyx_L4_argument_unpacking_done:;
7018 __pyx_r = __pyx_pf_6Recode_4Task_8set_fail_level(((struct __pyx_obj_6Recode_Task *)__pyx_v_self), __pyx_v_fail_level);
7019
7020 /* function exit code */
7021 {
7022 Py_ssize_t __pyx_temp;
7023 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7024 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
7025 }
7026 }
7027 __Pyx_RefNannyFinishContext();
7028 return __pyx_r;
7029 }
7030
7031 static PyObject *__pyx_pf_6Recode_4Task_8set_fail_level(struct __pyx_obj_6Recode_Task *__pyx_v_self, PyObject *__pyx_v_fail_level) {
7032 enum recode_error __pyx_v_previous;
7033 PyObject *__pyx_r = NULL;
7034 __Pyx_RefNannyDeclarations
7035 enum recode_error __pyx_t_1;
7036 PyObject *__pyx_t_2 = NULL;
7037 int __pyx_lineno = 0;
7038 const char *__pyx_filename = NULL;
7039 int __pyx_clineno = 0;
7040 __Pyx_RefNannySetupContext("set_fail_level", 1);
7041
7042 /* "Recode.pyx":687
7043 *
7044 * def set_fail_level(self, fail_level):
7045 * previous = self.task.fail_level # <<<<<<<<<<<<<<
7046 * self.task.fail_level = fail_level
7047 * return previous
7048 */
7049 __pyx_t_1 = __pyx_v_self->task->fail_level;
7050 __pyx_v_previous = __pyx_t_1;
7051
7052 /* "Recode.pyx":688
7053 * def set_fail_level(self, fail_level):
7054 * previous = self.task.fail_level
7055 * self.task.fail_level = fail_level # <<<<<<<<<<<<<<
7056 * return previous
7057 *
7058 */
7059 __pyx_t_1 = ((enum recode_error)__Pyx_PyInt_As_enum__recode_error(__pyx_v_fail_level)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 688, __pyx_L1_error)
7060 __pyx_v_self->task->fail_level = __pyx_t_1;
7061
7062 /* "Recode.pyx":689
7063 * previous = self.task.fail_level
7064 * self.task.fail_level = fail_level
7065 * return previous # <<<<<<<<<<<<<<
7066 *
7067 * def set_abort_level(self, abort_level):
7068 */
7069 __Pyx_XDECREF(__pyx_r);
7070 __pyx_t_2 = __Pyx_PyInt_From_enum__recode_error(__pyx_v_previous); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 689, __pyx_L1_error)
7071 __Pyx_GOTREF(__pyx_t_2);
7072 __pyx_r = __pyx_t_2;
7073 __pyx_t_2 = 0;
7074 goto __pyx_L0;
7075
7076 /* "Recode.pyx":686
7077 * return self.task.error_so_far
7078 *
7079 * def set_fail_level(self, fail_level): # <<<<<<<<<<<<<<
7080 * previous = self.task.fail_level
7081 * self.task.fail_level = fail_level
7082 */
7083
7084 /* function exit code */
7085 __pyx_L1_error:;
7086 __Pyx_XDECREF(__pyx_t_2);
7087 __Pyx_AddTraceback("Recode.Task.set_fail_level", __pyx_clineno, __pyx_lineno, __pyx_filename);
7088 __pyx_r = NULL;
7089 __pyx_L0:;
7090 __Pyx_XGIVEREF(__pyx_r);
7091 __Pyx_RefNannyFinishContext();
7092 return __pyx_r;
7093 }
7094
7095 /* "Recode.pyx":691
7096 * return previous
7097 *
7098 * def set_abort_level(self, abort_level): # <<<<<<<<<<<<<<
7099 * previous = self.task.abort_level
7100 * self.task.abort_level = abort_level
7101 */
7102
7103 /* Python wrapper */
7104 static PyObject *__pyx_pw_6Recode_4Task_11set_abort_level(PyObject *__pyx_v_self,
7105 #if CYTHON_METH_FASTCALL
7106 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7107 #else
7108 PyObject *__pyx_args, PyObject *__pyx_kwds
7109 #endif
7110 ); /*proto*/
7111 static PyMethodDef __pyx_mdef_6Recode_4Task_11set_abort_level = {"set_abort_level", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_4Task_11set_abort_level, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
7112 static PyObject *__pyx_pw_6Recode_4Task_11set_abort_level(PyObject *__pyx_v_self,
7113 #if CYTHON_METH_FASTCALL
7114 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7115 #else
7116 PyObject *__pyx_args, PyObject *__pyx_kwds
7117 #endif
7118 ) {
7119 PyObject *__pyx_v_abort_level = 0;
7120 #if !CYTHON_METH_FASTCALL
7121 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
7122 #endif
7123 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
7124 PyObject* values[1] = {0};
7125 int __pyx_lineno = 0;
7126 const char *__pyx_filename = NULL;
7127 int __pyx_clineno = 0;
7128 PyObject *__pyx_r = 0;
7129 __Pyx_RefNannyDeclarations
7130 __Pyx_RefNannySetupContext("set_abort_level (wrapper)", 0);
7131 #if !CYTHON_METH_FASTCALL
7132 #if CYTHON_ASSUME_SAFE_MACROS
7133 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
7134 #else
7135 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
7136 #endif
7137 #endif
7138 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
7139 {
7140 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_abort_level,0};
7141 if (__pyx_kwds) {
7142 Py_ssize_t kw_args;
7143 switch (__pyx_nargs) {
7144 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
7145 CYTHON_FALLTHROUGH;
7146 case 0: break;
7147 default: goto __pyx_L5_argtuple_error;
7148 }
7149 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
7150 switch (__pyx_nargs) {
7151 case 0:
7152 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_abort_level)) != 0)) {
7153 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
7154 kw_args--;
7155 }
7156 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 691, __pyx_L3_error)
7157 else goto __pyx_L5_argtuple_error;
7158 }
7159 if (unlikely(kw_args > 0)) {
7160 const Py_ssize_t kwd_pos_args = __pyx_nargs;
7161 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_abort_level") < 0)) __PYX_ERR(1, 691, __pyx_L3_error)
7162 }
7163 } else if (unlikely(__pyx_nargs != 1)) {
7164 goto __pyx_L5_argtuple_error;
7165 } else {
7166 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
7167 }
7168 __pyx_v_abort_level = values[0];
7169 }
7170 goto __pyx_L6_skip;
7171 __pyx_L5_argtuple_error:;
7172 __Pyx_RaiseArgtupleInvalid("set_abort_level", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 691, __pyx_L3_error)
7173 __pyx_L6_skip:;
7174 goto __pyx_L4_argument_unpacking_done;
7175 __pyx_L3_error:;
7176 {
7177 Py_ssize_t __pyx_temp;
7178 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7179 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
7180 }
7181 }
7182 __Pyx_AddTraceback("Recode.Task.set_abort_level", __pyx_clineno, __pyx_lineno, __pyx_filename);
7183 __Pyx_RefNannyFinishContext();
7184 return NULL;
7185 __pyx_L4_argument_unpacking_done:;
7186 __pyx_r = __pyx_pf_6Recode_4Task_10set_abort_level(((struct __pyx_obj_6Recode_Task *)__pyx_v_self), __pyx_v_abort_level);
7187
7188 /* function exit code */
7189 {
7190 Py_ssize_t __pyx_temp;
7191 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7192 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
7193 }
7194 }
7195 __Pyx_RefNannyFinishContext();
7196 return __pyx_r;
7197 }
7198
7199 static PyObject *__pyx_pf_6Recode_4Task_10set_abort_level(struct __pyx_obj_6Recode_Task *__pyx_v_self, PyObject *__pyx_v_abort_level) {
7200 enum recode_error __pyx_v_previous;
7201 PyObject *__pyx_r = NULL;
7202 __Pyx_RefNannyDeclarations
7203 enum recode_error __pyx_t_1;
7204 PyObject *__pyx_t_2 = NULL;
7205 int __pyx_lineno = 0;
7206 const char *__pyx_filename = NULL;
7207 int __pyx_clineno = 0;
7208 __Pyx_RefNannySetupContext("set_abort_level", 1);
7209
7210 /* "Recode.pyx":692
7211 *
7212 * def set_abort_level(self, abort_level):
7213 * previous = self.task.abort_level # <<<<<<<<<<<<<<
7214 * self.task.abort_level = abort_level
7215 * return previous
7216 */
7217 __pyx_t_1 = __pyx_v_self->task->abort_level;
7218 __pyx_v_previous = __pyx_t_1;
7219
7220 /* "Recode.pyx":693
7221 * def set_abort_level(self, abort_level):
7222 * previous = self.task.abort_level
7223 * self.task.abort_level = abort_level # <<<<<<<<<<<<<<
7224 * return previous
7225 *
7226 */
7227 __pyx_t_1 = ((enum recode_error)__Pyx_PyInt_As_enum__recode_error(__pyx_v_abort_level)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 693, __pyx_L1_error)
7228 __pyx_v_self->task->abort_level = __pyx_t_1;
7229
7230 /* "Recode.pyx":694
7231 * previous = self.task.abort_level
7232 * self.task.abort_level = abort_level
7233 * return previous # <<<<<<<<<<<<<<
7234 *
7235 * def set_input(self, text):
7236 */
7237 __Pyx_XDECREF(__pyx_r);
7238 __pyx_t_2 = __Pyx_PyInt_From_enum__recode_error(__pyx_v_previous); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 694, __pyx_L1_error)
7239 __Pyx_GOTREF(__pyx_t_2);
7240 __pyx_r = __pyx_t_2;
7241 __pyx_t_2 = 0;
7242 goto __pyx_L0;
7243
7244 /* "Recode.pyx":691
7245 * return previous
7246 *
7247 * def set_abort_level(self, abort_level): # <<<<<<<<<<<<<<
7248 * previous = self.task.abort_level
7249 * self.task.abort_level = abort_level
7250 */
7251
7252 /* function exit code */
7253 __pyx_L1_error:;
7254 __Pyx_XDECREF(__pyx_t_2);
7255 __Pyx_AddTraceback("Recode.Task.set_abort_level", __pyx_clineno, __pyx_lineno, __pyx_filename);
7256 __pyx_r = NULL;
7257 __pyx_L0:;
7258 __Pyx_XGIVEREF(__pyx_r);
7259 __Pyx_RefNannyFinishContext();
7260 return __pyx_r;
7261 }
7262
7263 /* "Recode.pyx":696
7264 * return previous
7265 *
7266 * def set_input(self, text): # <<<<<<<<<<<<<<
7267 * cdef char *input = text
7268 * cdef size_t input_len = len(text)
7269 */
7270
7271 /* Python wrapper */
7272 static PyObject *__pyx_pw_6Recode_4Task_13set_input(PyObject *__pyx_v_self,
7273 #if CYTHON_METH_FASTCALL
7274 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7275 #else
7276 PyObject *__pyx_args, PyObject *__pyx_kwds
7277 #endif
7278 ); /*proto*/
7279 static PyMethodDef __pyx_mdef_6Recode_4Task_13set_input = {"set_input", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_4Task_13set_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
7280 static PyObject *__pyx_pw_6Recode_4Task_13set_input(PyObject *__pyx_v_self,
7281 #if CYTHON_METH_FASTCALL
7282 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7283 #else
7284 PyObject *__pyx_args, PyObject *__pyx_kwds
7285 #endif
7286 ) {
7287 PyObject *__pyx_v_text = 0;
7288 #if !CYTHON_METH_FASTCALL
7289 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
7290 #endif
7291 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
7292 PyObject* values[1] = {0};
7293 int __pyx_lineno = 0;
7294 const char *__pyx_filename = NULL;
7295 int __pyx_clineno = 0;
7296 PyObject *__pyx_r = 0;
7297 __Pyx_RefNannyDeclarations
7298 __Pyx_RefNannySetupContext("set_input (wrapper)", 0);
7299 #if !CYTHON_METH_FASTCALL
7300 #if CYTHON_ASSUME_SAFE_MACROS
7301 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
7302 #else
7303 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
7304 #endif
7305 #endif
7306 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
7307 {
7308 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_text,0};
7309 if (__pyx_kwds) {
7310 Py_ssize_t kw_args;
7311 switch (__pyx_nargs) {
7312 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
7313 CYTHON_FALLTHROUGH;
7314 case 0: break;
7315 default: goto __pyx_L5_argtuple_error;
7316 }
7317 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
7318 switch (__pyx_nargs) {
7319 case 0:
7320 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_text)) != 0)) {
7321 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
7322 kw_args--;
7323 }
7324 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 696, __pyx_L3_error)
7325 else goto __pyx_L5_argtuple_error;
7326 }
7327 if (unlikely(kw_args > 0)) {
7328 const Py_ssize_t kwd_pos_args = __pyx_nargs;
7329 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_input") < 0)) __PYX_ERR(1, 696, __pyx_L3_error)
7330 }
7331 } else if (unlikely(__pyx_nargs != 1)) {
7332 goto __pyx_L5_argtuple_error;
7333 } else {
7334 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
7335 }
7336 __pyx_v_text = values[0];
7337 }
7338 goto __pyx_L6_skip;
7339 __pyx_L5_argtuple_error:;
7340 __Pyx_RaiseArgtupleInvalid("set_input", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 696, __pyx_L3_error)
7341 __pyx_L6_skip:;
7342 goto __pyx_L4_argument_unpacking_done;
7343 __pyx_L3_error:;
7344 {
7345 Py_ssize_t __pyx_temp;
7346 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7347 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
7348 }
7349 }
7350 __Pyx_AddTraceback("Recode.Task.set_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
7351 __Pyx_RefNannyFinishContext();
7352 return NULL;
7353 __pyx_L4_argument_unpacking_done:;
7354 __pyx_r = __pyx_pf_6Recode_4Task_12set_input(((struct __pyx_obj_6Recode_Task *)__pyx_v_self), __pyx_v_text);
7355
7356 /* function exit code */
7357 {
7358 Py_ssize_t __pyx_temp;
7359 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7360 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
7361 }
7362 }
7363 __Pyx_RefNannyFinishContext();
7364 return __pyx_r;
7365 }
7366
7367 static PyObject *__pyx_pf_6Recode_4Task_12set_input(struct __pyx_obj_6Recode_Task *__pyx_v_self, PyObject *__pyx_v_text) {
7368 char *__pyx_v_input;
7369 size_t __pyx_v_input_len;
7370 PyObject *__pyx_r = NULL;
7371 __Pyx_RefNannyDeclarations
7372 char *__pyx_t_1;
7373 Py_ssize_t __pyx_t_2;
7374 int __pyx_lineno = 0;
7375 const char *__pyx_filename = NULL;
7376 int __pyx_clineno = 0;
7377 __Pyx_RefNannySetupContext("set_input", 1);
7378
7379 /* "Recode.pyx":697
7380 *
7381 * def set_input(self, text):
7382 * cdef char *input = text # <<<<<<<<<<<<<<
7383 * cdef size_t input_len = len(text)
7384 * self.task.input.buffer = input
7385 */
7386 __pyx_t_1 = __Pyx_PyObject_AsWritableString(__pyx_v_text); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(1, 697, __pyx_L1_error)
7387 __pyx_v_input = __pyx_t_1;
7388
7389 /* "Recode.pyx":698
7390 * def set_input(self, text):
7391 * cdef char *input = text
7392 * cdef size_t input_len = len(text) # <<<<<<<<<<<<<<
7393 * self.task.input.buffer = input
7394 * self.task.input.cursor = input
7395 */
7396 __pyx_t_2 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 698, __pyx_L1_error)
7397 __pyx_v_input_len = __pyx_t_2;
7398
7399 /* "Recode.pyx":699
7400 * cdef char *input = text
7401 * cdef size_t input_len = len(text)
7402 * self.task.input.buffer = input # <<<<<<<<<<<<<<
7403 * self.task.input.cursor = input
7404 * self.task.input.limit = input + input_len
7405 */
7406 __pyx_v_self->task->input.buffer = __pyx_v_input;
7407
7408 /* "Recode.pyx":700
7409 * cdef size_t input_len = len(text)
7410 * self.task.input.buffer = input
7411 * self.task.input.cursor = input # <<<<<<<<<<<<<<
7412 * self.task.input.limit = input + input_len
7413 *
7414 */
7415 __pyx_v_self->task->input.cursor = __pyx_v_input;
7416
7417 /* "Recode.pyx":701
7418 * self.task.input.buffer = input
7419 * self.task.input.cursor = input
7420 * self.task.input.limit = input + input_len # <<<<<<<<<<<<<<
7421 *
7422 * def get_output(self):
7423 */
7424 __pyx_v_self->task->input.limit = (__pyx_v_input + __pyx_v_input_len);
7425
7426 /* "Recode.pyx":696
7427 * return previous
7428 *
7429 * def set_input(self, text): # <<<<<<<<<<<<<<
7430 * cdef char *input = text
7431 * cdef size_t input_len = len(text)
7432 */
7433
7434 /* function exit code */
7435 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7436 goto __pyx_L0;
7437 __pyx_L1_error:;
7438 __Pyx_AddTraceback("Recode.Task.set_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
7439 __pyx_r = NULL;
7440 __pyx_L0:;
7441 __Pyx_XGIVEREF(__pyx_r);
7442 __Pyx_RefNannyFinishContext();
7443 return __pyx_r;
7444 }
7445
7446 /* "Recode.pyx":703
7447 * self.task.input.limit = input + input_len
7448 *
7449 * def get_output(self): # <<<<<<<<<<<<<<
7450 * return self.task.output.buffer[:self.task.output.cursor - self.task.output.buffer]
7451 *
7452 */
7453
7454 /* Python wrapper */
7455 static PyObject *__pyx_pw_6Recode_4Task_15get_output(PyObject *__pyx_v_self,
7456 #if CYTHON_METH_FASTCALL
7457 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7458 #else
7459 PyObject *__pyx_args, PyObject *__pyx_kwds
7460 #endif
7461 ); /*proto*/
7462 static PyMethodDef __pyx_mdef_6Recode_4Task_15get_output = {"get_output", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_4Task_15get_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
7463 static PyObject *__pyx_pw_6Recode_4Task_15get_output(PyObject *__pyx_v_self,
7464 #if CYTHON_METH_FASTCALL
7465 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7466 #else
7467 PyObject *__pyx_args, PyObject *__pyx_kwds
7468 #endif
7469 ) {
7470 #if !CYTHON_METH_FASTCALL
7471 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
7472 #endif
7473 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
7474 PyObject *__pyx_r = 0;
7475 __Pyx_RefNannyDeclarations
7476 __Pyx_RefNannySetupContext("get_output (wrapper)", 0);
7477 #if !CYTHON_METH_FASTCALL
7478 #if CYTHON_ASSUME_SAFE_MACROS
7479 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
7480 #else
7481 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
7482 #endif
7483 #endif
7484 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
7485 if (unlikely(__pyx_nargs > 0)) {
7486 __Pyx_RaiseArgtupleInvalid("get_output", 1, 0, 0, __pyx_nargs); return NULL;}
7487 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_output", 0))) return NULL;
7488 __pyx_r = __pyx_pf_6Recode_4Task_14get_output(((struct __pyx_obj_6Recode_Task *)__pyx_v_self));
7489
7490 /* function exit code */
7491 __Pyx_RefNannyFinishContext();
7492 return __pyx_r;
7493 }
7494
7495 static PyObject *__pyx_pf_6Recode_4Task_14get_output(struct __pyx_obj_6Recode_Task *__pyx_v_self) {
7496 PyObject *__pyx_r = NULL;
7497 __Pyx_RefNannyDeclarations
7498 PyObject *__pyx_t_1 = NULL;
7499 int __pyx_lineno = 0;
7500 const char *__pyx_filename = NULL;
7501 int __pyx_clineno = 0;
7502 __Pyx_RefNannySetupContext("get_output", 1);
7503
7504 /* "Recode.pyx":704
7505 *
7506 * def get_output(self):
7507 * return self.task.output.buffer[:self.task.output.cursor - self.task.output.buffer] # <<<<<<<<<<<<<<
7508 *
7509 * def perform(self):
7510 */
7511 __Pyx_XDECREF(__pyx_r);
7512 __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_self->task->output.buffer + 0, (__pyx_v_self->task->output.cursor - __pyx_v_self->task->output.buffer) - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 704, __pyx_L1_error)
7513 __Pyx_GOTREF(__pyx_t_1);
7514 __pyx_r = __pyx_t_1;
7515 __pyx_t_1 = 0;
7516 goto __pyx_L0;
7517
7518 /* "Recode.pyx":703
7519 * self.task.input.limit = input + input_len
7520 *
7521 * def get_output(self): # <<<<<<<<<<<<<<
7522 * return self.task.output.buffer[:self.task.output.cursor - self.task.output.buffer]
7523 *
7524 */
7525
7526 /* function exit code */
7527 __pyx_L1_error:;
7528 __Pyx_XDECREF(__pyx_t_1);
7529 __Pyx_AddTraceback("Recode.Task.get_output", __pyx_clineno, __pyx_lineno, __pyx_filename);
7530 __pyx_r = NULL;
7531 __pyx_L0:;
7532 __Pyx_XGIVEREF(__pyx_r);
7533 __Pyx_RefNannyFinishContext();
7534 return __pyx_r;
7535 }
7536
7537 /* "Recode.pyx":706
7538 * return self.task.output.buffer[:self.task.output.cursor - self.task.output.buffer]
7539 *
7540 * def perform(self): # <<<<<<<<<<<<<<
7541 * return recode_perform_task(self.task)
7542 */
7543
7544 /* Python wrapper */
7545 static PyObject *__pyx_pw_6Recode_4Task_17perform(PyObject *__pyx_v_self,
7546 #if CYTHON_METH_FASTCALL
7547 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7548 #else
7549 PyObject *__pyx_args, PyObject *__pyx_kwds
7550 #endif
7551 ); /*proto*/
7552 static PyMethodDef __pyx_mdef_6Recode_4Task_17perform = {"perform", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_4Task_17perform, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
7553 static PyObject *__pyx_pw_6Recode_4Task_17perform(PyObject *__pyx_v_self,
7554 #if CYTHON_METH_FASTCALL
7555 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7556 #else
7557 PyObject *__pyx_args, PyObject *__pyx_kwds
7558 #endif
7559 ) {
7560 #if !CYTHON_METH_FASTCALL
7561 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
7562 #endif
7563 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
7564 PyObject *__pyx_r = 0;
7565 __Pyx_RefNannyDeclarations
7566 __Pyx_RefNannySetupContext("perform (wrapper)", 0);
7567 #if !CYTHON_METH_FASTCALL
7568 #if CYTHON_ASSUME_SAFE_MACROS
7569 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
7570 #else
7571 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
7572 #endif
7573 #endif
7574 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
7575 if (unlikely(__pyx_nargs > 0)) {
7576 __Pyx_RaiseArgtupleInvalid("perform", 1, 0, 0, __pyx_nargs); return NULL;}
7577 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "perform", 0))) return NULL;
7578 __pyx_r = __pyx_pf_6Recode_4Task_16perform(((struct __pyx_obj_6Recode_Task *)__pyx_v_self));
7579
7580 /* function exit code */
7581 __Pyx_RefNannyFinishContext();
7582 return __pyx_r;
7583 }
7584
7585 static PyObject *__pyx_pf_6Recode_4Task_16perform(struct __pyx_obj_6Recode_Task *__pyx_v_self) {
7586 PyObject *__pyx_r = NULL;
7587 __Pyx_RefNannyDeclarations
7588 PyObject *__pyx_t_1 = NULL;
7589 int __pyx_lineno = 0;
7590 const char *__pyx_filename = NULL;
7591 int __pyx_clineno = 0;
7592 __Pyx_RefNannySetupContext("perform", 1);
7593
7594 /* "Recode.pyx":707
7595 *
7596 * def perform(self):
7597 * return recode_perform_task(self.task) # <<<<<<<<<<<<<<
7598 */
7599 __Pyx_XDECREF(__pyx_r);
7600 __pyx_t_1 = __Pyx_PyBool_FromLong(recode_perform_task(__pyx_v_self->task)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 707, __pyx_L1_error)
7601 __Pyx_GOTREF(__pyx_t_1);
7602 __pyx_r = __pyx_t_1;
7603 __pyx_t_1 = 0;
7604 goto __pyx_L0;
7605
7606 /* "Recode.pyx":706
7607 * return self.task.output.buffer[:self.task.output.cursor - self.task.output.buffer]
7608 *
7609 * def perform(self): # <<<<<<<<<<<<<<
7610 * return recode_perform_task(self.task)
7611 */
7612
7613 /* function exit code */
7614 __pyx_L1_error:;
7615 __Pyx_XDECREF(__pyx_t_1);
7616 __Pyx_AddTraceback("Recode.Task.perform", __pyx_clineno, __pyx_lineno, __pyx_filename);
7617 __pyx_r = NULL;
7618 __pyx_L0:;
7619 __Pyx_XGIVEREF(__pyx_r);
7620 __Pyx_RefNannyFinishContext();
7621 return __pyx_r;
7622 }
7623
7624 /* "(tree fragment)":1
7625 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
7626 * raise TypeError, "self.task cannot be converted to a Python object for pickling"
7627 * def __setstate_cython__(self, __pyx_state):
7628 */
7629
7630 /* Python wrapper */
7631 static PyObject *__pyx_pw_6Recode_4Task_19__reduce_cython__(PyObject *__pyx_v_self,
7632 #if CYTHON_METH_FASTCALL
7633 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7634 #else
7635 PyObject *__pyx_args, PyObject *__pyx_kwds
7636 #endif
7637 ); /*proto*/
7638 static PyMethodDef __pyx_mdef_6Recode_4Task_19__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_4Task_19__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
7639 static PyObject *__pyx_pw_6Recode_4Task_19__reduce_cython__(PyObject *__pyx_v_self,
7640 #if CYTHON_METH_FASTCALL
7641 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7642 #else
7643 PyObject *__pyx_args, PyObject *__pyx_kwds
7644 #endif
7645 ) {
7646 #if !CYTHON_METH_FASTCALL
7647 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
7648 #endif
7649 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
7650 PyObject *__pyx_r = 0;
7651 __Pyx_RefNannyDeclarations
7652 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
7653 #if !CYTHON_METH_FASTCALL
7654 #if CYTHON_ASSUME_SAFE_MACROS
7655 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
7656 #else
7657 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
7658 #endif
7659 #endif
7660 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
7661 if (unlikely(__pyx_nargs > 0)) {
7662 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
7663 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
7664 __pyx_r = __pyx_pf_6Recode_4Task_18__reduce_cython__(((struct __pyx_obj_6Recode_Task *)__pyx_v_self));
7665
7666 /* function exit code */
7667 __Pyx_RefNannyFinishContext();
7668 return __pyx_r;
7669 }
7670
7671 static PyObject *__pyx_pf_6Recode_4Task_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6Recode_Task *__pyx_v_self) {
7672 PyObject *__pyx_r = NULL;
7673 __Pyx_RefNannyDeclarations
7674 int __pyx_lineno = 0;
7675 const char *__pyx_filename = NULL;
7676 int __pyx_clineno = 0;
7677 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
7678
7679 /* "(tree fragment)":2
7680 * def __reduce_cython__(self):
7681 * raise TypeError, "self.task cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
7682 * def __setstate_cython__(self, __pyx_state):
7683 * raise TypeError, "self.task cannot be converted to a Python object for pickling"
7684 */
7685 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_task_cannot_be_converted_to, 0, 0);
7686 __PYX_ERR(0, 2, __pyx_L1_error)
7687
7688 /* "(tree fragment)":1
7689 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
7690 * raise TypeError, "self.task cannot be converted to a Python object for pickling"
7691 * def __setstate_cython__(self, __pyx_state):
7692 */
7693
7694 /* function exit code */
7695 __pyx_L1_error:;
7696 __Pyx_AddTraceback("Recode.Task.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7697 __pyx_r = NULL;
7698 __Pyx_XGIVEREF(__pyx_r);
7699 __Pyx_RefNannyFinishContext();
7700 return __pyx_r;
7701 }
7702
7703 /* "(tree fragment)":3
7704 * def __reduce_cython__(self):
7705 * raise TypeError, "self.task cannot be converted to a Python object for pickling"
7706 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
7707 * raise TypeError, "self.task cannot be converted to a Python object for pickling"
7708 */
7709
7710 /* Python wrapper */
7711 static PyObject *__pyx_pw_6Recode_4Task_21__setstate_cython__(PyObject *__pyx_v_self,
7712 #if CYTHON_METH_FASTCALL
7713 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7714 #else
7715 PyObject *__pyx_args, PyObject *__pyx_kwds
7716 #endif
7717 ); /*proto*/
7718 static PyMethodDef __pyx_mdef_6Recode_4Task_21__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_4Task_21__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
7719 static PyObject *__pyx_pw_6Recode_4Task_21__setstate_cython__(PyObject *__pyx_v_self,
7720 #if CYTHON_METH_FASTCALL
7721 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7722 #else
7723 PyObject *__pyx_args, PyObject *__pyx_kwds
7724 #endif
7725 ) {
7726 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
7727 #if !CYTHON_METH_FASTCALL
7728 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
7729 #endif
7730 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
7731 PyObject* values[1] = {0};
7732 int __pyx_lineno = 0;
7733 const char *__pyx_filename = NULL;
7734 int __pyx_clineno = 0;
7735 PyObject *__pyx_r = 0;
7736 __Pyx_RefNannyDeclarations
7737 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
7738 #if !CYTHON_METH_FASTCALL
7739 #if CYTHON_ASSUME_SAFE_MACROS
7740 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
7741 #else
7742 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
7743 #endif
7744 #endif
7745 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
7746 {
7747 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
7748 if (__pyx_kwds) {
7749 Py_ssize_t kw_args;
7750 switch (__pyx_nargs) {
7751 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
7752 CYTHON_FALLTHROUGH;
7753 case 0: break;
7754 default: goto __pyx_L5_argtuple_error;
7755 }
7756 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
7757 switch (__pyx_nargs) {
7758 case 0:
7759 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
7760 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
7761 kw_args--;
7762 }
7763 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3, __pyx_L3_error)
7764 else goto __pyx_L5_argtuple_error;
7765 }
7766 if (unlikely(kw_args > 0)) {
7767 const Py_ssize_t kwd_pos_args = __pyx_nargs;
7768 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(0, 3, __pyx_L3_error)
7769 }
7770 } else if (unlikely(__pyx_nargs != 1)) {
7771 goto __pyx_L5_argtuple_error;
7772 } else {
7773 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
7774 }
7775 __pyx_v___pyx_state = values[0];
7776 }
7777 goto __pyx_L6_skip;
7778 __pyx_L5_argtuple_error:;
7779 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3, __pyx_L3_error)
7780 __pyx_L6_skip:;
7781 goto __pyx_L4_argument_unpacking_done;
7782 __pyx_L3_error:;
7783 {
7784 Py_ssize_t __pyx_temp;
7785 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7786 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
7787 }
7788 }
7789 __Pyx_AddTraceback("Recode.Task.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7790 __Pyx_RefNannyFinishContext();
7791 return NULL;
7792 __pyx_L4_argument_unpacking_done:;
7793 __pyx_r = __pyx_pf_6Recode_4Task_20__setstate_cython__(((struct __pyx_obj_6Recode_Task *)__pyx_v_self), __pyx_v___pyx_state);
7794
7795 /* function exit code */
7796 {
7797 Py_ssize_t __pyx_temp;
7798 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7799 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
7800 }
7801 }
7802 __Pyx_RefNannyFinishContext();
7803 return __pyx_r;
7804 }
7805
7806 static PyObject *__pyx_pf_6Recode_4Task_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6Recode_Task *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
7807 PyObject *__pyx_r = NULL;
7808 __Pyx_RefNannyDeclarations
7809 int __pyx_lineno = 0;
7810 const char *__pyx_filename = NULL;
7811 int __pyx_clineno = 0;
7812 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
7813
7814 /* "(tree fragment)":4
7815 * raise TypeError, "self.task cannot be converted to a Python object for pickling"
7816 * def __setstate_cython__(self, __pyx_state):
7817 * raise TypeError, "self.task cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
7818 */
7819 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_task_cannot_be_converted_to, 0, 0);
7820 __PYX_ERR(0, 4, __pyx_L1_error)
7821
7822 /* "(tree fragment)":3
7823 * def __reduce_cython__(self):
7824 * raise TypeError, "self.task cannot be converted to a Python object for pickling"
7825 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
7826 * raise TypeError, "self.task cannot be converted to a Python object for pickling"
7827 */
7828
7829 /* function exit code */
7830 __pyx_L1_error:;
7831 __Pyx_AddTraceback("Recode.Task.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7832 __pyx_r = NULL;
7833 __Pyx_XGIVEREF(__pyx_r);
7834 __Pyx_RefNannyFinishContext();
7835 return __pyx_r;
7836 }
7837
7838 static PyObject *__pyx_tp_new_6Recode_Outer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
7839 PyObject *o;
7840 #if CYTHON_COMPILING_IN_LIMITED_API
7841 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
7842 o = alloc_func(t, 0);
7843 #else
7844 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
7845 o = (*t->tp_alloc)(t, 0);
7846 } else {
7847 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
7848 }
7849 if (unlikely(!o)) return 0;
7850 #endif
7851 return o;
7852 }
7853
7854 static void __pyx_tp_dealloc_6Recode_Outer(PyObject *o) {
7855 #if CYTHON_USE_TP_FINALIZE
7856 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
7857 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6Recode_Outer) {
7858 if (PyObject_CallFinalizerFromDealloc(o)) return;
7859 }
7860 }
7861 #endif
7862 {
7863 PyObject *etype, *eval, *etb;
7864 PyErr_Fetch(&etype, &eval, &etb);
7865 __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
7866 __pyx_pw_6Recode_5Outer_3__dealloc__(o);
7867 __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
7868 PyErr_Restore(etype, eval, etb);
7869 }
7870 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
7871 (*Py_TYPE(o)->tp_free)(o);
7872 #else
7873 {
7874 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
7875 if (tp_free) tp_free(o);
7876 }
7877 #endif
7878 }
7879
7880 static PyMethodDef __pyx_methods_6Recode_Outer[] = {
7881 {"default_charset", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_5Outer_5default_charset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
7882 {"all_charsets", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_5Outer_7all_charsets, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
7883 {"all_surfaces", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_5Outer_9all_surfaces, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
7884 {"concise_charset", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_5Outer_11concise_charset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
7885 {"full_charset", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_5Outer_13full_charset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
7886 {"recode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_5Outer_15recode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
7887 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_5Outer_17__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
7888 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_5Outer_19__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
7889 {0, 0, 0, 0}
7890 };
7891 #if CYTHON_USE_TYPE_SPECS
7892 static PyType_Slot __pyx_type_6Recode_Outer_slots[] = {
7893 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6Recode_Outer},
7894 {Py_tp_methods, (void *)__pyx_methods_6Recode_Outer},
7895 {Py_tp_init, (void *)__pyx_pw_6Recode_5Outer_1__init__},
7896 {Py_tp_new, (void *)__pyx_tp_new_6Recode_Outer},
7897 {0, 0},
7898 };
7899 static PyType_Spec __pyx_type_6Recode_Outer_spec = {
7900 "Recode.Outer",
7901 sizeof(struct __pyx_obj_6Recode_Outer),
7902 0,
7903 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
7904 __pyx_type_6Recode_Outer_slots,
7905 };
7906 #else
7907
7908 static PyTypeObject __pyx_type_6Recode_Outer = {
7909 PyVarObject_HEAD_INIT(0, 0)
7910 "Recode.""Outer", /*tp_name*/
7911 sizeof(struct __pyx_obj_6Recode_Outer), /*tp_basicsize*/
7912 0, /*tp_itemsize*/
7913 __pyx_tp_dealloc_6Recode_Outer, /*tp_dealloc*/
7914 #if PY_VERSION_HEX < 0x030800b4
7915 0, /*tp_print*/
7916 #endif
7917 #if PY_VERSION_HEX >= 0x030800b4
7918 0, /*tp_vectorcall_offset*/
7919 #endif
7920 0, /*tp_getattr*/
7921 0, /*tp_setattr*/
7922 #if PY_MAJOR_VERSION < 3
7923 0, /*tp_compare*/
7924 #endif
7925 #if PY_MAJOR_VERSION >= 3
7926 0, /*tp_as_async*/
7927 #endif
7928 0, /*tp_repr*/
7929 0, /*tp_as_number*/
7930 0, /*tp_as_sequence*/
7931 0, /*tp_as_mapping*/
7932 0, /*tp_hash*/
7933 0, /*tp_call*/
7934 0, /*tp_str*/
7935 0, /*tp_getattro*/
7936 0, /*tp_setattro*/
7937 0, /*tp_as_buffer*/
7938 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
7939 0, /*tp_doc*/
7940 0, /*tp_traverse*/
7941 0, /*tp_clear*/
7942 0, /*tp_richcompare*/
7943 0, /*tp_weaklistoffset*/
7944 0, /*tp_iter*/
7945 0, /*tp_iternext*/
7946 __pyx_methods_6Recode_Outer, /*tp_methods*/
7947 0, /*tp_members*/
7948 0, /*tp_getset*/
7949 0, /*tp_base*/
7950 0, /*tp_dict*/
7951 0, /*tp_descr_get*/
7952 0, /*tp_descr_set*/
7953 #if !CYTHON_USE_TYPE_SPECS
7954 0, /*tp_dictoffset*/
7955 #endif
7956 __pyx_pw_6Recode_5Outer_1__init__, /*tp_init*/
7957 0, /*tp_alloc*/
7958 __pyx_tp_new_6Recode_Outer, /*tp_new*/
7959 0, /*tp_free*/
7960 0, /*tp_is_gc*/
7961 0, /*tp_bases*/
7962 0, /*tp_mro*/
7963 0, /*tp_cache*/
7964 0, /*tp_subclasses*/
7965 0, /*tp_weaklist*/
7966 0, /*tp_del*/
7967 0, /*tp_version_tag*/
7968 #if PY_VERSION_HEX >= 0x030400a1
7969 #if CYTHON_USE_TP_FINALIZE
7970 0, /*tp_finalize*/
7971 #else
7972 NULL, /*tp_finalize*/
7973 #endif
7974 #endif
7975 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
7976 0, /*tp_vectorcall*/
7977 #endif
7978 #if __PYX_NEED_TP_PRINT_SLOT == 1
7979 0, /*tp_print*/
7980 #endif
7981 #if PY_VERSION_HEX >= 0x030C0000
7982 0, /*tp_watched*/
7983 #endif
7984 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
7985 0, /*tp_pypy_flags*/
7986 #endif
7987 };
7988 #endif
7989
7990 static PyObject *__pyx_tp_new_6Recode_Request(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
7991 PyObject *o;
7992 #if CYTHON_COMPILING_IN_LIMITED_API
7993 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
7994 o = alloc_func(t, 0);
7995 #else
7996 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
7997 o = (*t->tp_alloc)(t, 0);
7998 } else {
7999 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
8000 }
8001 if (unlikely(!o)) return 0;
8002 #endif
8003 return o;
8004 }
8005
8006 static void __pyx_tp_dealloc_6Recode_Request(PyObject *o) {
8007 #if CYTHON_USE_TP_FINALIZE
8008 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
8009 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6Recode_Request) {
8010 if (PyObject_CallFinalizerFromDealloc(o)) return;
8011 }
8012 }
8013 #endif
8014 {
8015 PyObject *etype, *eval, *etb;
8016 PyErr_Fetch(&etype, &eval, &etb);
8017 __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
8018 __pyx_pw_6Recode_7Request_3__dealloc__(o);
8019 __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
8020 PyErr_Restore(etype, eval, etb);
8021 }
8022 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
8023 (*Py_TYPE(o)->tp_free)(o);
8024 #else
8025 {
8026 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
8027 if (tp_free) tp_free(o);
8028 }
8029 #endif
8030 }
8031
8032 static PyMethodDef __pyx_methods_6Recode_Request[] = {
8033 {"set_verbose", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_7Request_5set_verbose, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
8034 {"scan", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_7Request_7scan, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
8035 {"pair_sequence", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_7Request_9pair_sequence, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
8036 {"format_table", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_7Request_11format_table, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
8037 {"string", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_7Request_13string, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
8038 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_7Request_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
8039 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_7Request_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
8040 {0, 0, 0, 0}
8041 };
8042 #if CYTHON_USE_TYPE_SPECS
8043 static PyType_Slot __pyx_type_6Recode_Request_slots[] = {
8044 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6Recode_Request},
8045 {Py_tp_methods, (void *)__pyx_methods_6Recode_Request},
8046 {Py_tp_init, (void *)__pyx_pw_6Recode_7Request_1__init__},
8047 {Py_tp_new, (void *)__pyx_tp_new_6Recode_Request},
8048 {0, 0},
8049 };
8050 static PyType_Spec __pyx_type_6Recode_Request_spec = {
8051 "Recode.Request",
8052 sizeof(struct __pyx_obj_6Recode_Request),
8053 0,
8054 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
8055 __pyx_type_6Recode_Request_slots,
8056 };
8057 #else
8058
8059 static PyTypeObject __pyx_type_6Recode_Request = {
8060 PyVarObject_HEAD_INIT(0, 0)
8061 "Recode.""Request", /*tp_name*/
8062 sizeof(struct __pyx_obj_6Recode_Request), /*tp_basicsize*/
8063 0, /*tp_itemsize*/
8064 __pyx_tp_dealloc_6Recode_Request, /*tp_dealloc*/
8065 #if PY_VERSION_HEX < 0x030800b4
8066 0, /*tp_print*/
8067 #endif
8068 #if PY_VERSION_HEX >= 0x030800b4
8069 0, /*tp_vectorcall_offset*/
8070 #endif
8071 0, /*tp_getattr*/
8072 0, /*tp_setattr*/
8073 #if PY_MAJOR_VERSION < 3
8074 0, /*tp_compare*/
8075 #endif
8076 #if PY_MAJOR_VERSION >= 3
8077 0, /*tp_as_async*/
8078 #endif
8079 0, /*tp_repr*/
8080 0, /*tp_as_number*/
8081 0, /*tp_as_sequence*/
8082 0, /*tp_as_mapping*/
8083 0, /*tp_hash*/
8084 0, /*tp_call*/
8085 0, /*tp_str*/
8086 0, /*tp_getattro*/
8087 0, /*tp_setattro*/
8088 0, /*tp_as_buffer*/
8089 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
8090 0, /*tp_doc*/
8091 0, /*tp_traverse*/
8092 0, /*tp_clear*/
8093 0, /*tp_richcompare*/
8094 0, /*tp_weaklistoffset*/
8095 0, /*tp_iter*/
8096 0, /*tp_iternext*/
8097 __pyx_methods_6Recode_Request, /*tp_methods*/
8098 0, /*tp_members*/
8099 0, /*tp_getset*/
8100 0, /*tp_base*/
8101 0, /*tp_dict*/
8102 0, /*tp_descr_get*/
8103 0, /*tp_descr_set*/
8104 #if !CYTHON_USE_TYPE_SPECS
8105 0, /*tp_dictoffset*/
8106 #endif
8107 __pyx_pw_6Recode_7Request_1__init__, /*tp_init*/
8108 0, /*tp_alloc*/
8109 __pyx_tp_new_6Recode_Request, /*tp_new*/
8110 0, /*tp_free*/
8111 0, /*tp_is_gc*/
8112 0, /*tp_bases*/
8113 0, /*tp_mro*/
8114 0, /*tp_cache*/
8115 0, /*tp_subclasses*/
8116 0, /*tp_weaklist*/
8117 0, /*tp_del*/
8118 0, /*tp_version_tag*/
8119 #if PY_VERSION_HEX >= 0x030400a1
8120 #if CYTHON_USE_TP_FINALIZE
8121 0, /*tp_finalize*/
8122 #else
8123 NULL, /*tp_finalize*/
8124 #endif
8125 #endif
8126 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
8127 0, /*tp_vectorcall*/
8128 #endif
8129 #if __PYX_NEED_TP_PRINT_SLOT == 1
8130 0, /*tp_print*/
8131 #endif
8132 #if PY_VERSION_HEX >= 0x030C0000
8133 0, /*tp_watched*/
8134 #endif
8135 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
8136 0, /*tp_pypy_flags*/
8137 #endif
8138 };
8139 #endif
8140
8141 static PyObject *__pyx_tp_new_6Recode_Task(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
8142 PyObject *o;
8143 #if CYTHON_COMPILING_IN_LIMITED_API
8144 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
8145 o = alloc_func(t, 0);
8146 #else
8147 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
8148 o = (*t->tp_alloc)(t, 0);
8149 } else {
8150 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
8151 }
8152 if (unlikely(!o)) return 0;
8153 #endif
8154 return o;
8155 }
8156
8157 static void __pyx_tp_dealloc_6Recode_Task(PyObject *o) {
8158 #if CYTHON_USE_TP_FINALIZE
8159 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
8160 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6Recode_Task) {
8161 if (PyObject_CallFinalizerFromDealloc(o)) return;
8162 }
8163 }
8164 #endif
8165 {
8166 PyObject *etype, *eval, *etb;
8167 PyErr_Fetch(&etype, &eval, &etb);
8168 __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
8169 __pyx_pw_6Recode_4Task_3__dealloc__(o);
8170 __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
8171 PyErr_Restore(etype, eval, etb);
8172 }
8173 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
8174 (*Py_TYPE(o)->tp_free)(o);
8175 #else
8176 {
8177 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
8178 if (tp_free) tp_free(o);
8179 }
8180 #endif
8181 }
8182
8183 static PyMethodDef __pyx_methods_6Recode_Task[] = {
8184 {"set_byte_order_mark", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_4Task_5set_byte_order_mark, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
8185 {"get_error", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_4Task_7get_error, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
8186 {"set_fail_level", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_4Task_9set_fail_level, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
8187 {"set_abort_level", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_4Task_11set_abort_level, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
8188 {"set_input", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_4Task_13set_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
8189 {"get_output", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_4Task_15get_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
8190 {"perform", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_4Task_17perform, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
8191 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_4Task_19__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
8192 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6Recode_4Task_21__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
8193 {0, 0, 0, 0}
8194 };
8195 #if CYTHON_USE_TYPE_SPECS
8196 static PyType_Slot __pyx_type_6Recode_Task_slots[] = {
8197 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6Recode_Task},
8198 {Py_tp_methods, (void *)__pyx_methods_6Recode_Task},
8199 {Py_tp_init, (void *)__pyx_pw_6Recode_4Task_1__init__},
8200 {Py_tp_new, (void *)__pyx_tp_new_6Recode_Task},
8201 {0, 0},
8202 };
8203 static PyType_Spec __pyx_type_6Recode_Task_spec = {
8204 "Recode.Task",
8205 sizeof(struct __pyx_obj_6Recode_Task),
8206 0,
8207 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
8208 __pyx_type_6Recode_Task_slots,
8209 };
8210 #else
8211
8212 static PyTypeObject __pyx_type_6Recode_Task = {
8213 PyVarObject_HEAD_INIT(0, 0)
8214 "Recode.""Task", /*tp_name*/
8215 sizeof(struct __pyx_obj_6Recode_Task), /*tp_basicsize*/
8216 0, /*tp_itemsize*/
8217 __pyx_tp_dealloc_6Recode_Task, /*tp_dealloc*/
8218 #if PY_VERSION_HEX < 0x030800b4
8219 0, /*tp_print*/
8220 #endif
8221 #if PY_VERSION_HEX >= 0x030800b4
8222 0, /*tp_vectorcall_offset*/
8223 #endif
8224 0, /*tp_getattr*/
8225 0, /*tp_setattr*/
8226 #if PY_MAJOR_VERSION < 3
8227 0, /*tp_compare*/
8228 #endif
8229 #if PY_MAJOR_VERSION >= 3
8230 0, /*tp_as_async*/
8231 #endif
8232 0, /*tp_repr*/
8233 0, /*tp_as_number*/
8234 0, /*tp_as_sequence*/
8235 0, /*tp_as_mapping*/
8236 0, /*tp_hash*/
8237 0, /*tp_call*/
8238 0, /*tp_str*/
8239 0, /*tp_getattro*/
8240 0, /*tp_setattro*/
8241 0, /*tp_as_buffer*/
8242 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
8243 0, /*tp_doc*/
8244 0, /*tp_traverse*/
8245 0, /*tp_clear*/
8246 0, /*tp_richcompare*/
8247 0, /*tp_weaklistoffset*/
8248 0, /*tp_iter*/
8249 0, /*tp_iternext*/
8250 __pyx_methods_6Recode_Task, /*tp_methods*/
8251 0, /*tp_members*/
8252 0, /*tp_getset*/
8253 0, /*tp_base*/
8254 0, /*tp_dict*/
8255 0, /*tp_descr_get*/
8256 0, /*tp_descr_set*/
8257 #if !CYTHON_USE_TYPE_SPECS
8258 0, /*tp_dictoffset*/
8259 #endif
8260 __pyx_pw_6Recode_4Task_1__init__, /*tp_init*/
8261 0, /*tp_alloc*/
8262 __pyx_tp_new_6Recode_Task, /*tp_new*/
8263 0, /*tp_free*/
8264 0, /*tp_is_gc*/
8265 0, /*tp_bases*/
8266 0, /*tp_mro*/
8267 0, /*tp_cache*/
8268 0, /*tp_subclasses*/
8269 0, /*tp_weaklist*/
8270 0, /*tp_del*/
8271 0, /*tp_version_tag*/
8272 #if PY_VERSION_HEX >= 0x030400a1
8273 #if CYTHON_USE_TP_FINALIZE
8274 0, /*tp_finalize*/
8275 #else
8276 NULL, /*tp_finalize*/
8277 #endif
8278 #endif
8279 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
8280 0, /*tp_vectorcall*/
8281 #endif
8282 #if __PYX_NEED_TP_PRINT_SLOT == 1
8283 0, /*tp_print*/
8284 #endif
8285 #if PY_VERSION_HEX >= 0x030C0000
8286 0, /*tp_watched*/
8287 #endif
8288 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
8289 0, /*tp_pypy_flags*/
8290 #endif
8291 };
8292 #endif
8293
8294 static PyMethodDef __pyx_methods[] = {
8295 {0, 0, 0, 0}
8296 };
8297 #ifndef CYTHON_SMALL_CODE
8298 #if defined(__clang__)
8299 #define CYTHON_SMALL_CODE
8300 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
8301 #define CYTHON_SMALL_CODE __attribute__((cold))
8302 #else
8303 #define CYTHON_SMALL_CODE
8304 #endif
8305 #endif
8306 /* #### Code section: pystring_table ### */
8307
8308 static int __Pyx_CreateStringTabAndInitStrings(void) {
8309 __Pyx_StringTabEntry __pyx_string_tab[] = {
8310 {&__pyx_n_s_ALIAS_FIND_AS_CHARSET, __pyx_k_ALIAS_FIND_AS_CHARSET, sizeof(__pyx_k_ALIAS_FIND_AS_CHARSET), 0, 0, 1, 1},
8311 {&__pyx_n_s_ALIAS_FIND_AS_EITHER, __pyx_k_ALIAS_FIND_AS_EITHER, sizeof(__pyx_k_ALIAS_FIND_AS_EITHER), 0, 0, 1, 1},
8312 {&__pyx_n_s_ALIAS_FIND_AS_SURFACE, __pyx_k_ALIAS_FIND_AS_SURFACE, sizeof(__pyx_k_ALIAS_FIND_AS_SURFACE), 0, 0, 1, 1},
8313 {&__pyx_n_s_AMBIGUOUS_OUTPUT, __pyx_k_AMBIGUOUS_OUTPUT, sizeof(__pyx_k_AMBIGUOUS_OUTPUT), 0, 0, 1, 1},
8314 {&__pyx_n_s_AUTO_ABORT_FLAG, __pyx_k_AUTO_ABORT_FLAG, sizeof(__pyx_k_AUTO_ABORT_FLAG), 0, 0, 1, 1},
8315 {&__pyx_n_s_BYTE_ORDER_MARK, __pyx_k_BYTE_ORDER_MARK, sizeof(__pyx_k_BYTE_ORDER_MARK), 0, 0, 1, 1},
8316 {&__pyx_n_s_BYTE_ORDER_MARK_SWAPPED, __pyx_k_BYTE_ORDER_MARK_SWAPPED, sizeof(__pyx_k_BYTE_ORDER_MARK_SWAPPED), 0, 0, 1, 1},
8317 {&__pyx_n_s_BYTE_TO_BYTE, __pyx_k_BYTE_TO_BYTE, sizeof(__pyx_k_BYTE_TO_BYTE), 0, 0, 1, 1},
8318 {&__pyx_n_s_BYTE_TO_STRING, __pyx_k_BYTE_TO_STRING, sizeof(__pyx_k_BYTE_TO_STRING), 0, 0, 1, 1},
8319 {&__pyx_n_s_CHARSET, __pyx_k_CHARSET, sizeof(__pyx_k_CHARSET), 0, 0, 1, 1},
8320 {&__pyx_n_s_COMBINE_EXPLODE, __pyx_k_COMBINE_EXPLODE, sizeof(__pyx_k_COMBINE_EXPLODE), 0, 0, 1, 1},
8321 {&__pyx_n_s_COMBINE_STEP, __pyx_k_COMBINE_STEP, sizeof(__pyx_k_COMBINE_STEP), 0, 0, 1, 1},
8322 {&__pyx_n_s_DATA_SURFACE, __pyx_k_DATA_SURFACE, sizeof(__pyx_k_DATA_SURFACE), 0, 0, 1, 1},
8323 {&__pyx_n_s_DECIMAL_FORMAT, __pyx_k_DECIMAL_FORMAT, sizeof(__pyx_k_DECIMAL_FORMAT), 0, 0, 1, 1},
8324 {&__pyx_n_s_EXPLODE_DATA, __pyx_k_EXPLODE_DATA, sizeof(__pyx_k_EXPLODE_DATA), 0, 0, 1, 1},
8325 {&__pyx_n_s_EXPLODE_STEP, __pyx_k_EXPLODE_STEP, sizeof(__pyx_k_EXPLODE_STEP), 0, 0, 1, 1},
8326 {&__pyx_n_s_FULL_FORMAT, __pyx_k_FULL_FORMAT, sizeof(__pyx_k_FULL_FORMAT), 0, 0, 1, 1},
8327 {&__pyx_n_s_HEXADECIMAL_FORMAT, __pyx_k_HEXADECIMAL_FORMAT, sizeof(__pyx_k_HEXADECIMAL_FORMAT), 0, 0, 1, 1},
8328 {&__pyx_n_s_INTERNAL_ERROR, __pyx_k_INTERNAL_ERROR, sizeof(__pyx_k_INTERNAL_ERROR), 0, 0, 1, 1},
8329 {&__pyx_n_s_INVALID_INPUT, __pyx_k_INVALID_INPUT, sizeof(__pyx_k_INVALID_INPUT), 0, 0, 1, 1},
8330 {&__pyx_n_s_LANGUAGE_C, __pyx_k_LANGUAGE_C, sizeof(__pyx_k_LANGUAGE_C), 0, 0, 1, 1},
8331 {&__pyx_n_s_LANGUAGE_PERL, __pyx_k_LANGUAGE_PERL, sizeof(__pyx_k_LANGUAGE_PERL), 0, 0, 1, 1},
8332 {&__pyx_n_s_MAXIMUM_ERROR, __pyx_k_MAXIMUM_ERROR, sizeof(__pyx_k_MAXIMUM_ERROR), 0, 0, 1, 1},
8333 {&__pyx_n_s_NOT_A_CHARACTER, __pyx_k_NOT_A_CHARACTER, sizeof(__pyx_k_NOT_A_CHARACTER), 0, 0, 1, 1},
8334 {&__pyx_n_s_NOT_CANONICAL, __pyx_k_NOT_CANONICAL, sizeof(__pyx_k_NOT_CANONICAL), 0, 0, 1, 1},
8335 {&__pyx_n_s_NO_CHARSET_DATA, __pyx_k_NO_CHARSET_DATA, sizeof(__pyx_k_NO_CHARSET_DATA), 0, 0, 1, 1},
8336 {&__pyx_n_s_NO_ERROR, __pyx_k_NO_ERROR, sizeof(__pyx_k_NO_ERROR), 0, 0, 1, 1},
8337 {&__pyx_n_s_NO_FORMAT, __pyx_k_NO_FORMAT, sizeof(__pyx_k_NO_FORMAT), 0, 0, 1, 1},
8338 {&__pyx_n_s_NO_ICONV_FLAG, __pyx_k_NO_ICONV_FLAG, sizeof(__pyx_k_NO_ICONV_FLAG), 0, 0, 1, 1},
8339 {&__pyx_n_s_NO_LANGUAGE, __pyx_k_NO_LANGUAGE, sizeof(__pyx_k_NO_LANGUAGE), 0, 0, 1, 1},
8340 {&__pyx_n_s_NO_STEP_TABLE, __pyx_k_NO_STEP_TABLE, sizeof(__pyx_k_NO_STEP_TABLE), 0, 0, 1, 1},
8341 {&__pyx_n_s_NO_SYMBOL_TYPE, __pyx_k_NO_SYMBOL_TYPE, sizeof(__pyx_k_NO_SYMBOL_TYPE), 0, 0, 1, 1},
8342 {&__pyx_n_s_NUL, __pyx_k_NUL, sizeof(__pyx_k_NUL), 0, 0, 1, 1},
8343 {&__pyx_n_s_OCTAL_FORMAT, __pyx_k_OCTAL_FORMAT, sizeof(__pyx_k_OCTAL_FORMAT), 0, 0, 1, 1},
8344 {&__pyx_n_s_Outer, __pyx_k_Outer, sizeof(__pyx_k_Outer), 0, 0, 1, 1},
8345 {&__pyx_n_s_Outer___reduce_cython, __pyx_k_Outer___reduce_cython, sizeof(__pyx_k_Outer___reduce_cython), 0, 0, 1, 1},
8346 {&__pyx_n_s_Outer___setstate_cython, __pyx_k_Outer___setstate_cython, sizeof(__pyx_k_Outer___setstate_cython), 0, 0, 1, 1},
8347 {&__pyx_n_s_Outer_all_charsets, __pyx_k_Outer_all_charsets, sizeof(__pyx_k_Outer_all_charsets), 0, 0, 1, 1},
8348 {&__pyx_n_s_Outer_all_surfaces, __pyx_k_Outer_all_surfaces, sizeof(__pyx_k_Outer_all_surfaces), 0, 0, 1, 1},
8349 {&__pyx_n_s_Outer_concise_charset, __pyx_k_Outer_concise_charset, sizeof(__pyx_k_Outer_concise_charset), 0, 0, 1, 1},
8350 {&__pyx_n_s_Outer_default_charset, __pyx_k_Outer_default_charset, sizeof(__pyx_k_Outer_default_charset), 0, 0, 1, 1},
8351 {&__pyx_n_s_Outer_full_charset, __pyx_k_Outer_full_charset, sizeof(__pyx_k_Outer_full_charset), 0, 0, 1, 1},
8352 {&__pyx_n_s_Outer_recode, __pyx_k_Outer_recode, sizeof(__pyx_k_Outer_recode), 0, 0, 1, 1},
8353 {&__pyx_n_s_REPLACEMENT_CHARACTER, __pyx_k_REPLACEMENT_CHARACTER, sizeof(__pyx_k_REPLACEMENT_CHARACTER), 0, 0, 1, 1},
8354 {&__pyx_n_s_Recode, __pyx_k_Recode, sizeof(__pyx_k_Recode), 0, 0, 1, 1},
8355 {&__pyx_kp_s_Recode_pyx, __pyx_k_Recode_pyx, sizeof(__pyx_k_Recode_pyx), 0, 0, 1, 0},
8356 {&__pyx_n_s_Request, __pyx_k_Request, sizeof(__pyx_k_Request), 0, 0, 1, 1},
8357 {&__pyx_n_s_Request___reduce_cython, __pyx_k_Request___reduce_cython, sizeof(__pyx_k_Request___reduce_cython), 0, 0, 1, 1},
8358 {&__pyx_n_s_Request___setstate_cython, __pyx_k_Request___setstate_cython, sizeof(__pyx_k_Request___setstate_cython), 0, 0, 1, 1},
8359 {&__pyx_n_s_Request_format_table, __pyx_k_Request_format_table, sizeof(__pyx_k_Request_format_table), 0, 0, 1, 1},
8360 {&__pyx_n_s_Request_pair_sequence, __pyx_k_Request_pair_sequence, sizeof(__pyx_k_Request_pair_sequence), 0, 0, 1, 1},
8361 {&__pyx_n_s_Request_scan, __pyx_k_Request_scan, sizeof(__pyx_k_Request_scan), 0, 0, 1, 1},
8362 {&__pyx_n_s_Request_set_verbose, __pyx_k_Request_set_verbose, sizeof(__pyx_k_Request_set_verbose), 0, 0, 1, 1},
8363 {&__pyx_n_s_Request_string, __pyx_k_Request_string, sizeof(__pyx_k_Request_string), 0, 0, 1, 1},
8364 {&__pyx_n_s_SIZE_1, __pyx_k_SIZE_1, sizeof(__pyx_k_SIZE_1), 0, 0, 1, 1},
8365 {&__pyx_n_s_SIZE_2, __pyx_k_SIZE_2, sizeof(__pyx_k_SIZE_2), 0, 0, 1, 1},
8366 {&__pyx_n_s_SIZE_4, __pyx_k_SIZE_4, sizeof(__pyx_k_SIZE_4), 0, 0, 1, 1},
8367 {&__pyx_n_s_SIZE_N, __pyx_k_SIZE_N, sizeof(__pyx_k_SIZE_N), 0, 0, 1, 1},
8368 {&__pyx_n_s_STRICT_MAPPING_FLAG, __pyx_k_STRICT_MAPPING_FLAG, sizeof(__pyx_k_STRICT_MAPPING_FLAG), 0, 0, 1, 1},
8369 {&__pyx_n_s_STRING_TO_UCS2, __pyx_k_STRING_TO_UCS2, sizeof(__pyx_k_STRING_TO_UCS2), 0, 0, 1, 1},
8370 {&__pyx_n_s_STRIP_DATA, __pyx_k_STRIP_DATA, sizeof(__pyx_k_STRIP_DATA), 0, 0, 1, 1},
8371 {&__pyx_n_s_STRIP_SIZE, __pyx_k_STRIP_SIZE, sizeof(__pyx_k_STRIP_SIZE), 0, 0, 1, 1},
8372 {&__pyx_n_s_SWAP_NO, __pyx_k_SWAP_NO, sizeof(__pyx_k_SWAP_NO), 0, 0, 1, 1},
8373 {&__pyx_n_s_SWAP_UNDECIDED, __pyx_k_SWAP_UNDECIDED, sizeof(__pyx_k_SWAP_UNDECIDED), 0, 0, 1, 1},
8374 {&__pyx_n_s_SWAP_YES, __pyx_k_SWAP_YES, sizeof(__pyx_k_SWAP_YES), 0, 0, 1, 1},
8375 {&__pyx_n_s_SYMBOL_CREATE_CHARSET, __pyx_k_SYMBOL_CREATE_CHARSET, sizeof(__pyx_k_SYMBOL_CREATE_CHARSET), 0, 0, 1, 1},
8376 {&__pyx_n_s_SYMBOL_CREATE_DATA_SURFACE, __pyx_k_SYMBOL_CREATE_DATA_SURFACE, sizeof(__pyx_k_SYMBOL_CREATE_DATA_SURFACE), 0, 0, 1, 1},
8377 {&__pyx_n_s_SYSTEM_ERROR, __pyx_k_SYSTEM_ERROR, sizeof(__pyx_k_SYSTEM_ERROR), 0, 0, 1, 1},
8378 {&__pyx_n_s_Task, __pyx_k_Task, sizeof(__pyx_k_Task), 0, 0, 1, 1},
8379 {&__pyx_n_s_Task___reduce_cython, __pyx_k_Task___reduce_cython, sizeof(__pyx_k_Task___reduce_cython), 0, 0, 1, 1},
8380 {&__pyx_n_s_Task___setstate_cython, __pyx_k_Task___setstate_cython, sizeof(__pyx_k_Task___setstate_cython), 0, 0, 1, 1},
8381 {&__pyx_n_s_Task_get_error, __pyx_k_Task_get_error, sizeof(__pyx_k_Task_get_error), 0, 0, 1, 1},
8382 {&__pyx_n_s_Task_get_output, __pyx_k_Task_get_output, sizeof(__pyx_k_Task_get_output), 0, 0, 1, 1},
8383 {&__pyx_n_s_Task_perform, __pyx_k_Task_perform, sizeof(__pyx_k_Task_perform), 0, 0, 1, 1},
8384 {&__pyx_n_s_Task_set_abort_level, __pyx_k_Task_set_abort_level, sizeof(__pyx_k_Task_set_abort_level), 0, 0, 1, 1},
8385 {&__pyx_n_s_Task_set_byte_order_mark, __pyx_k_Task_set_byte_order_mark, sizeof(__pyx_k_Task_set_byte_order_mark), 0, 0, 1, 1},
8386 {&__pyx_n_s_Task_set_fail_level, __pyx_k_Task_set_fail_level, sizeof(__pyx_k_Task_set_fail_level), 0, 0, 1, 1},
8387 {&__pyx_n_s_Task_set_input, __pyx_k_Task_set_input, sizeof(__pyx_k_Task_set_input), 0, 0, 1, 1},
8388 {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
8389 {&__pyx_n_s_UCS2_TO_BYTE, __pyx_k_UCS2_TO_BYTE, sizeof(__pyx_k_UCS2_TO_BYTE), 0, 0, 1, 1},
8390 {&__pyx_n_s_UCS2_TO_STRING, __pyx_k_UCS2_TO_STRING, sizeof(__pyx_k_UCS2_TO_STRING), 0, 0, 1, 1},
8391 {&__pyx_n_s_UNTRANSLATABLE, __pyx_k_UNTRANSLATABLE, sizeof(__pyx_k_UNTRANSLATABLE), 0, 0, 1, 1},
8392 {&__pyx_n_s_USER_ERROR, __pyx_k_USER_ERROR, sizeof(__pyx_k_USER_ERROR), 0, 0, 1, 1},
8393 {&__pyx_n_s__41, __pyx_k__41, sizeof(__pyx_k__41), 0, 0, 1, 1},
8394 {&__pyx_n_s_abort_level, __pyx_k_abort_level, sizeof(__pyx_k_abort_level), 0, 0, 1, 1},
8395 {&__pyx_n_s_all_charsets, __pyx_k_all_charsets, sizeof(__pyx_k_all_charsets), 0, 0, 1, 1},
8396 {&__pyx_n_s_all_surfaces, __pyx_k_all_surfaces, sizeof(__pyx_k_all_surfaces), 0, 0, 1, 1},
8397 {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
8398 {&__pyx_n_s_auto_abort, __pyx_k_auto_abort, sizeof(__pyx_k_auto_abort), 0, 0, 1, 1},
8399 {&__pyx_n_s_charset, __pyx_k_charset, sizeof(__pyx_k_charset), 0, 0, 1, 1},
8400 {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
8401 {&__pyx_n_s_command, __pyx_k_command, sizeof(__pyx_k_command), 0, 0, 1, 1},
8402 {&__pyx_n_s_concise_charset, __pyx_k_concise_charset, sizeof(__pyx_k_concise_charset), 0, 0, 1, 1},
8403 {&__pyx_n_s_counter, __pyx_k_counter, sizeof(__pyx_k_counter), 0, 0, 1, 1},
8404 {&__pyx_n_s_default_charset, __pyx_k_default_charset, sizeof(__pyx_k_default_charset), 0, 0, 1, 1},
8405 {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
8406 {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0},
8407 {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
8408 {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0},
8409 {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
8410 {&__pyx_n_s_fail_level, __pyx_k_fail_level, sizeof(__pyx_k_fail_level), 0, 0, 1, 1},
8411 {&__pyx_n_s_flag, __pyx_k_flag, sizeof(__pyx_k_flag), 0, 0, 1, 1},
8412 {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
8413 {&__pyx_n_s_format_table, __pyx_k_format_table, sizeof(__pyx_k_format_table), 0, 0, 1, 1},
8414 {&__pyx_n_s_full_charset, __pyx_k_full_charset, sizeof(__pyx_k_full_charset), 0, 0, 1, 1},
8415 {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0},
8416 {&__pyx_n_s_get_error, __pyx_k_get_error, sizeof(__pyx_k_get_error), 0, 0, 1, 1},
8417 {&__pyx_n_s_get_output, __pyx_k_get_output, sizeof(__pyx_k_get_output), 0, 0, 1, 1},
8418 {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
8419 {&__pyx_n_s_iconv, __pyx_k_iconv, sizeof(__pyx_k_iconv), 0, 0, 1, 1},
8420 {&__pyx_n_s_init_subclass, __pyx_k_init_subclass, sizeof(__pyx_k_init_subclass), 0, 0, 1, 1},
8421 {&__pyx_n_s_input, __pyx_k_input, sizeof(__pyx_k_input), 0, 0, 1, 1},
8422 {&__pyx_n_s_input_len, __pyx_k_input_len, sizeof(__pyx_k_input_len), 0, 0, 1, 1},
8423 {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1},
8424 {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0},
8425 {&__pyx_n_s_language, __pyx_k_language, sizeof(__pyx_k_language), 0, 0, 1, 1},
8426 {&__pyx_n_s_list, __pyx_k_list, sizeof(__pyx_k_list), 0, 0, 1, 1},
8427 {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
8428 {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
8429 {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
8430 {&__pyx_n_s_mro_entries, __pyx_k_mro_entries, sizeof(__pyx_k_mro_entries), 0, 0, 1, 1},
8431 {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
8432 {&__pyx_n_s_ok, __pyx_k_ok, sizeof(__pyx_k_ok), 0, 0, 1, 1},
8433 {&__pyx_n_s_outer, __pyx_k_outer, sizeof(__pyx_k_outer), 0, 0, 1, 1},
8434 {&__pyx_n_s_output, __pyx_k_output, sizeof(__pyx_k_output), 0, 0, 1, 1},
8435 {&__pyx_n_s_output_allocated, __pyx_k_output_allocated, sizeof(__pyx_k_output_allocated), 0, 0, 1, 1},
8436 {&__pyx_n_s_output_len, __pyx_k_output_len, sizeof(__pyx_k_output_len), 0, 0, 1, 1},
8437 {&__pyx_n_s_pair_sequence, __pyx_k_pair_sequence, sizeof(__pyx_k_pair_sequence), 0, 0, 1, 1},
8438 {&__pyx_n_s_perform, __pyx_k_perform, sizeof(__pyx_k_perform), 0, 0, 1, 1},
8439 {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
8440 {&__pyx_n_s_previous, __pyx_k_previous, sizeof(__pyx_k_previous), 0, 0, 1, 1},
8441 {&__pyx_n_s_py_string, __pyx_k_py_string, sizeof(__pyx_k_py_string), 0, 0, 1, 1},
8442 {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
8443 {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
8444 {&__pyx_n_s_recode, __pyx_k_recode, sizeof(__pyx_k_recode), 0, 0, 1, 1},
8445 {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
8446 {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
8447 {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
8448 {&__pyx_n_s_request, __pyx_k_request, sizeof(__pyx_k_request), 0, 0, 1, 1},
8449 {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
8450 {&__pyx_n_s_saved, __pyx_k_saved, sizeof(__pyx_k_saved), 0, 0, 1, 1},
8451 {&__pyx_n_s_scan, __pyx_k_scan, sizeof(__pyx_k_scan), 0, 0, 1, 1},
8452 {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
8453 {&__pyx_kp_s_self_outer_cannot_be_converted_t, __pyx_k_self_outer_cannot_be_converted_t, sizeof(__pyx_k_self_outer_cannot_be_converted_t), 0, 0, 1, 0},
8454 {&__pyx_kp_s_self_request_cannot_be_converted, __pyx_k_self_request_cannot_be_converted, sizeof(__pyx_k_self_request_cannot_be_converted), 0, 0, 1, 0},
8455 {&__pyx_kp_s_self_task_cannot_be_converted_to, __pyx_k_self_task_cannot_be_converted_to, sizeof(__pyx_k_self_task_cannot_be_converted_to), 0, 0, 1, 0},
8456 {&__pyx_n_s_set_abort_level, __pyx_k_set_abort_level, sizeof(__pyx_k_set_abort_level), 0, 0, 1, 1},
8457 {&__pyx_n_s_set_byte_order_mark, __pyx_k_set_byte_order_mark, sizeof(__pyx_k_set_byte_order_mark), 0, 0, 1, 1},
8458 {&__pyx_n_s_set_fail_level, __pyx_k_set_fail_level, sizeof(__pyx_k_set_fail_level), 0, 0, 1, 1},
8459 {&__pyx_n_s_set_input, __pyx_k_set_input, sizeof(__pyx_k_set_input), 0, 0, 1, 1},
8460 {&__pyx_n_s_set_name, __pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 0, 1, 1},
8461 {&__pyx_n_s_set_verbose, __pyx_k_set_verbose, sizeof(__pyx_k_set_verbose), 0, 0, 1, 1},
8462 {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
8463 {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
8464 {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
8465 {&__pyx_n_s_strict, __pyx_k_strict, sizeof(__pyx_k_strict), 0, 0, 1, 1},
8466 {&__pyx_n_s_string, __pyx_k_string, sizeof(__pyx_k_string), 0, 0, 1, 1},
8467 {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
8468 {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
8469 {&__pyx_n_s_symbol, __pyx_k_symbol, sizeof(__pyx_k_symbol), 0, 0, 1, 1},
8470 {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
8471 {&__pyx_n_s_text, __pyx_k_text, sizeof(__pyx_k_text), 0, 0, 1, 1},
8472 {&__pyx_n_s_verbose, __pyx_k_verbose, sizeof(__pyx_k_verbose), 0, 0, 1, 1},
8473 {&__pyx_n_s_xDONE, __pyx_k_xDONE, sizeof(__pyx_k_xDONE), 0, 0, 1, 1},
8474 {&__pyx_n_s_xELSE, __pyx_k_xELSE, sizeof(__pyx_k_xELSE), 0, 0, 1, 1},
8475 {0, 0, 0, 0, 0, 0, 0}
8476 };
8477 return __Pyx_InitStrings(__pyx_string_tab);
8478 }
8479 /* #### Code section: cached_builtins ### */
8480 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
8481 __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error)
8482 return 0;
8483 __pyx_L1_error:;
8484 return -1;
8485 }
8486 /* #### Code section: cached_constants ### */
8487
8488 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
8489 __Pyx_RefNannyDeclarations
8490 __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
8491
8492 /* "Recode.pyx":545
8493 * recode_delete_outer(self.outer)
8494 *
8495 * def default_charset(self): # <<<<<<<<<<<<<<
8496 * return locale_charset()
8497 *
8498 */
8499 __pyx_tuple__2 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(1, 545, __pyx_L1_error)
8500 __Pyx_GOTREF(__pyx_tuple__2);
8501 __Pyx_GIVEREF(__pyx_tuple__2);
8502 __pyx_codeobj__3 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__2, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Recode_pyx, __pyx_n_s_default_charset, 545, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__3)) __PYX_ERR(1, 545, __pyx_L1_error)
8503
8504 /* "Recode.pyx":548
8505 * return locale_charset()
8506 *
8507 * def all_charsets(self): # <<<<<<<<<<<<<<
8508 * list = []
8509 * cdef RECODE_SYMBOL symbol
8510 */
8511 __pyx_tuple__4 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_list, __pyx_n_s_symbol); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 548, __pyx_L1_error)
8512 __Pyx_GOTREF(__pyx_tuple__4);
8513 __Pyx_GIVEREF(__pyx_tuple__4);
8514 __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Recode_pyx, __pyx_n_s_all_charsets, 548, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(1, 548, __pyx_L1_error)
8515
8516 /* "Recode.pyx":560
8517 * return list
8518 *
8519 * def all_surfaces(self): # <<<<<<<<<<<<<<
8520 * list = []
8521 * cdef RECODE_SYMBOL symbol
8522 */
8523 __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Recode_pyx, __pyx_n_s_all_surfaces, 560, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(1, 560, __pyx_L1_error)
8524
8525 /* "Recode.pyx":570
8526 * return list
8527 *
8528 * def concise_charset(self, format=NO_FORMAT): # <<<<<<<<<<<<<<
8529 * ok = recode_list_concise_charset(self.outer, NULL, format)
8530 * if not ok:
8531 */
8532 __pyx_tuple__7 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_format, __pyx_n_s_ok); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(1, 570, __pyx_L1_error)
8533 __Pyx_GOTREF(__pyx_tuple__7);
8534 __Pyx_GIVEREF(__pyx_tuple__7);
8535 __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Recode_pyx, __pyx_n_s_concise_charset, 570, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(1, 570, __pyx_L1_error)
8536
8537 /* "Recode.pyx":575
8538 * raise error
8539 *
8540 * def full_charset(self): # <<<<<<<<<<<<<<
8541 * ok = recode_list_full_charset(self.outer, NULL)
8542 * if not ok:
8543 */
8544 __pyx_tuple__9 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_ok); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(1, 575, __pyx_L1_error)
8545 __Pyx_GOTREF(__pyx_tuple__9);
8546 __Pyx_GIVEREF(__pyx_tuple__9);
8547 __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Recode_pyx, __pyx_n_s_full_charset, 575, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(1, 575, __pyx_L1_error)
8548
8549 /* "Recode.pyx":581
8550 *
8551 * # Lazy, all in one call.
8552 * def recode(self, char *command, char *input, verbose=False): # <<<<<<<<<<<<<<
8553 * request = Request(self)
8554 * request.set_verbose(verbose)
8555 */
8556 __pyx_tuple__11 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_command, __pyx_n_s_input, __pyx_n_s_verbose, __pyx_n_s_request); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(1, 581, __pyx_L1_error)
8557 __Pyx_GOTREF(__pyx_tuple__11);
8558 __Pyx_GIVEREF(__pyx_tuple__11);
8559 __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Recode_pyx, __pyx_n_s_recode, 581, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(1, 581, __pyx_L1_error)
8560 __pyx_tuple__13 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(1, 581, __pyx_L1_error)
8561 __Pyx_GOTREF(__pyx_tuple__13);
8562 __Pyx_GIVEREF(__pyx_tuple__13);
8563
8564 /* "(tree fragment)":1
8565 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
8566 * raise TypeError, "self.outer cannot be converted to a Python object for pickling"
8567 * def __setstate_cython__(self, __pyx_state):
8568 */
8569 __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__2, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 1, __pyx_L1_error)
8570
8571 /* "(tree fragment)":3
8572 * def __reduce_cython__(self):
8573 * raise TypeError, "self.outer cannot be converted to a Python object for pickling"
8574 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
8575 * raise TypeError, "self.outer cannot be converted to a Python object for pickling"
8576 */
8577 __pyx_tuple__15 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 3, __pyx_L1_error)
8578 __Pyx_GOTREF(__pyx_tuple__15);
8579 __Pyx_GIVEREF(__pyx_tuple__15);
8580 __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 3, __pyx_L1_error)
8581
8582 /* "Recode.pyx":598
8583 * recode_delete_request(self.request)
8584 *
8585 * def set_verbose(self, flag): # <<<<<<<<<<<<<<
8586 * previous = self.request.verbose_flag != 0
8587 * self.request.verbose_flag = int(flag)
8588 */
8589 __pyx_tuple__17 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_flag, __pyx_n_s_previous); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 598, __pyx_L1_error)
8590 __Pyx_GOTREF(__pyx_tuple__17);
8591 __Pyx_GIVEREF(__pyx_tuple__17);
8592 __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Recode_pyx, __pyx_n_s_set_verbose, 598, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(1, 598, __pyx_L1_error)
8593
8594 /* "Recode.pyx":603
8595 * return previous
8596 *
8597 * def scan(self, char *text): # <<<<<<<<<<<<<<
8598 * ok = recode_scan_request(self.request, text)
8599 * if not ok:
8600 */
8601 __pyx_tuple__19 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_text, __pyx_n_s_ok); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(1, 603, __pyx_L1_error)
8602 __Pyx_GOTREF(__pyx_tuple__19);
8603 __Pyx_GIVEREF(__pyx_tuple__19);
8604 __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Recode_pyx, __pyx_n_s_scan, 603, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(1, 603, __pyx_L1_error)
8605
8606 /* "Recode.pyx":608
8607 * raise error
8608 *
8609 * def pair_sequence(self): # <<<<<<<<<<<<<<
8610 * list = []
8611 * cdef recode_step step
8612 */
8613 __pyx_tuple__21 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_list, __pyx_n_s_step, __pyx_n_s_counter); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(1, 608, __pyx_L1_error)
8614 __Pyx_GOTREF(__pyx_tuple__21);
8615 __Pyx_GIVEREF(__pyx_tuple__21);
8616 __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Recode_pyx, __pyx_n_s_pair_sequence, 608, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(1, 608, __pyx_L1_error)
8617
8618 /* "Recode.pyx":617
8619 * return list
8620 *
8621 * def format_table(self, int language, char *charset): # <<<<<<<<<<<<<<
8622 * cdef RECODE_OUTER outer
8623 * cdef bool saved
8624 */
8625 __pyx_tuple__23 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_language, __pyx_n_s_charset, __pyx_n_s_outer, __pyx_n_s_saved, __pyx_n_s_ok); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(1, 617, __pyx_L1_error)
8626 __Pyx_GOTREF(__pyx_tuple__23);
8627 __Pyx_GIVEREF(__pyx_tuple__23);
8628 __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Recode_pyx, __pyx_n_s_format_table, 617, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(1, 617, __pyx_L1_error)
8629
8630 /* "Recode.pyx":629
8631 * raise error
8632 *
8633 * def string(self, text): # <<<<<<<<<<<<<<
8634 * cdef char *input = text
8635 * cdef size_t input_len = len(text)
8636 */
8637 __pyx_tuple__25 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_text, __pyx_n_s_input, __pyx_n_s_input_len, __pyx_n_s_output, __pyx_n_s_output_len, __pyx_n_s_output_allocated, __pyx_n_s_result, __pyx_n_s_py_string); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(1, 629, __pyx_L1_error)
8638 __Pyx_GOTREF(__pyx_tuple__25);
8639 __Pyx_GIVEREF(__pyx_tuple__25);
8640 __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Recode_pyx, __pyx_n_s_string, 629, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(1, 629, __pyx_L1_error)
8641
8642 /* "(tree fragment)":1
8643 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
8644 * raise TypeError, "self.request cannot be converted to a Python object for pickling"
8645 * def __setstate_cython__(self, __pyx_state):
8646 */
8647 __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__2, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 1, __pyx_L1_error)
8648
8649 /* "(tree fragment)":3
8650 * def __reduce_cython__(self):
8651 * raise TypeError, "self.request cannot be converted to a Python object for pickling"
8652 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
8653 * raise TypeError, "self.request cannot be converted to a Python object for pickling"
8654 */
8655 __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 3, __pyx_L1_error)
8656
8657 /* "Recode.pyx":678
8658 * recode_delete_task(self.task)
8659 *
8660 * def set_byte_order_mark(self, flag): # <<<<<<<<<<<<<<
8661 * previous = self.task.byte_order_mark != 0
8662 * self.task.byte_order_mark = int(flag)
8663 */
8664 __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Recode_pyx, __pyx_n_s_set_byte_order_mark, 678, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(1, 678, __pyx_L1_error)
8665
8666 /* "Recode.pyx":683
8667 * return previous
8668 *
8669 * def get_error(self): # <<<<<<<<<<<<<<
8670 * return self.task.error_so_far
8671 *
8672 */
8673 __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__2, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Recode_pyx, __pyx_n_s_get_error, 683, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(1, 683, __pyx_L1_error)
8674
8675 /* "Recode.pyx":686
8676 * return self.task.error_so_far
8677 *
8678 * def set_fail_level(self, fail_level): # <<<<<<<<<<<<<<
8679 * previous = self.task.fail_level
8680 * self.task.fail_level = fail_level
8681 */
8682 __pyx_tuple__31 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_fail_level, __pyx_n_s_previous); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(1, 686, __pyx_L1_error)
8683 __Pyx_GOTREF(__pyx_tuple__31);
8684 __Pyx_GIVEREF(__pyx_tuple__31);
8685 __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Recode_pyx, __pyx_n_s_set_fail_level, 686, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(1, 686, __pyx_L1_error)
8686
8687 /* "Recode.pyx":691
8688 * return previous
8689 *
8690 * def set_abort_level(self, abort_level): # <<<<<<<<<<<<<<
8691 * previous = self.task.abort_level
8692 * self.task.abort_level = abort_level
8693 */
8694 __pyx_tuple__33 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_abort_level, __pyx_n_s_previous); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(1, 691, __pyx_L1_error)
8695 __Pyx_GOTREF(__pyx_tuple__33);
8696 __Pyx_GIVEREF(__pyx_tuple__33);
8697 __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Recode_pyx, __pyx_n_s_set_abort_level, 691, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(1, 691, __pyx_L1_error)
8698
8699 /* "Recode.pyx":696
8700 * return previous
8701 *
8702 * def set_input(self, text): # <<<<<<<<<<<<<<
8703 * cdef char *input = text
8704 * cdef size_t input_len = len(text)
8705 */
8706 __pyx_tuple__35 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_text, __pyx_n_s_input, __pyx_n_s_input_len); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(1, 696, __pyx_L1_error)
8707 __Pyx_GOTREF(__pyx_tuple__35);
8708 __Pyx_GIVEREF(__pyx_tuple__35);
8709 __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Recode_pyx, __pyx_n_s_set_input, 696, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(1, 696, __pyx_L1_error)
8710
8711 /* "Recode.pyx":703
8712 * self.task.input.limit = input + input_len
8713 *
8714 * def get_output(self): # <<<<<<<<<<<<<<
8715 * return self.task.output.buffer[:self.task.output.cursor - self.task.output.buffer]
8716 *
8717 */
8718 __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__2, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Recode_pyx, __pyx_n_s_get_output, 703, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(1, 703, __pyx_L1_error)
8719
8720 /* "Recode.pyx":706
8721 * return self.task.output.buffer[:self.task.output.cursor - self.task.output.buffer]
8722 *
8723 * def perform(self): # <<<<<<<<<<<<<<
8724 * return recode_perform_task(self.task)
8725 */
8726 __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__2, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Recode_pyx, __pyx_n_s_perform, 706, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(1, 706, __pyx_L1_error)
8727
8728 /* "(tree fragment)":1
8729 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
8730 * raise TypeError, "self.task cannot be converted to a Python object for pickling"
8731 * def __setstate_cython__(self, __pyx_state):
8732 */
8733 __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__2, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 1, __pyx_L1_error)
8734
8735 /* "(tree fragment)":3
8736 * def __reduce_cython__(self):
8737 * raise TypeError, "self.task cannot be converted to a Python object for pickling"
8738 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
8739 * raise TypeError, "self.task cannot be converted to a Python object for pickling"
8740 */
8741 __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 3, __pyx_L1_error)
8742 __Pyx_RefNannyFinishContext();
8743 return 0;
8744 __pyx_L1_error:;
8745 __Pyx_RefNannyFinishContext();
8746 return -1;
8747 }
8748 /* #### Code section: init_constants ### */
8749
8750 static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) {
8751 if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(1, 1, __pyx_L1_error);
8752 return 0;
8753 __pyx_L1_error:;
8754 return -1;
8755 }
8756 /* #### Code section: init_globals ### */
8757
8758 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
8759 return 0;
8760 }
8761 /* #### Code section: init_module ### */
8762
8763 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
8764 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
8765 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
8766 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
8767 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
8768 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
8769 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
8770
8771 static int __Pyx_modinit_global_init_code(void) {
8772 __Pyx_RefNannyDeclarations
8773 __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
8774 /*--- Global init code ---*/
8775 __Pyx_RefNannyFinishContext();
8776 return 0;
8777 }
8778
8779 static int __Pyx_modinit_variable_export_code(void) {
8780 __Pyx_RefNannyDeclarations
8781 __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
8782 /*--- Variable export code ---*/
8783 __Pyx_RefNannyFinishContext();
8784 return 0;
8785 }
8786
8787 static int __Pyx_modinit_function_export_code(void) {
8788 __Pyx_RefNannyDeclarations
8789 __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
8790 /*--- Function export code ---*/
8791 __Pyx_RefNannyFinishContext();
8792 return 0;
8793 }
8794
8795 static int __Pyx_modinit_type_init_code(void) {
8796 __Pyx_RefNannyDeclarations
8797 int __pyx_lineno = 0;
8798 const char *__pyx_filename = NULL;
8799 int __pyx_clineno = 0;
8800 __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
8801 /*--- Type init code ---*/
8802 #if CYTHON_USE_TYPE_SPECS
8803 __pyx_ptype_6Recode_Outer = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6Recode_Outer_spec, NULL); if (unlikely(!__pyx_ptype_6Recode_Outer)) __PYX_ERR(1, 522, __pyx_L1_error)
8804 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6Recode_Outer_spec, __pyx_ptype_6Recode_Outer) < 0) __PYX_ERR(1, 522, __pyx_L1_error)
8805 #else
8806 __pyx_ptype_6Recode_Outer = &__pyx_type_6Recode_Outer;
8807 #endif
8808 #if !CYTHON_COMPILING_IN_LIMITED_API
8809 #endif
8810 #if !CYTHON_USE_TYPE_SPECS
8811 if (__Pyx_PyType_Ready(__pyx_ptype_6Recode_Outer) < 0) __PYX_ERR(1, 522, __pyx_L1_error)
8812 #endif
8813 #if PY_MAJOR_VERSION < 3
8814 __pyx_ptype_6Recode_Outer->tp_print = 0;
8815 #endif
8816 #if !CYTHON_COMPILING_IN_LIMITED_API
8817 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6Recode_Outer->tp_dictoffset && __pyx_ptype_6Recode_Outer->tp_getattro == PyObject_GenericGetAttr)) {
8818 __pyx_ptype_6Recode_Outer->tp_getattro = __Pyx_PyObject_GenericGetAttr;
8819 }
8820 #endif
8821 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Outer, (PyObject *) __pyx_ptype_6Recode_Outer) < 0) __PYX_ERR(1, 522, __pyx_L1_error)
8822 #if !CYTHON_COMPILING_IN_LIMITED_API
8823 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6Recode_Outer) < 0) __PYX_ERR(1, 522, __pyx_L1_error)
8824 #endif
8825 #if CYTHON_USE_TYPE_SPECS
8826 __pyx_ptype_6Recode_Request = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6Recode_Request_spec, NULL); if (unlikely(!__pyx_ptype_6Recode_Request)) __PYX_ERR(1, 589, __pyx_L1_error)
8827 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6Recode_Request_spec, __pyx_ptype_6Recode_Request) < 0) __PYX_ERR(1, 589, __pyx_L1_error)
8828 #else
8829 __pyx_ptype_6Recode_Request = &__pyx_type_6Recode_Request;
8830 #endif
8831 #if !CYTHON_COMPILING_IN_LIMITED_API
8832 #endif
8833 #if !CYTHON_USE_TYPE_SPECS
8834 if (__Pyx_PyType_Ready(__pyx_ptype_6Recode_Request) < 0) __PYX_ERR(1, 589, __pyx_L1_error)
8835 #endif
8836 #if PY_MAJOR_VERSION < 3
8837 __pyx_ptype_6Recode_Request->tp_print = 0;
8838 #endif
8839 #if !CYTHON_COMPILING_IN_LIMITED_API
8840 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6Recode_Request->tp_dictoffset && __pyx_ptype_6Recode_Request->tp_getattro == PyObject_GenericGetAttr)) {
8841 __pyx_ptype_6Recode_Request->tp_getattro = __Pyx_PyObject_GenericGetAttr;
8842 }
8843 #endif
8844 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Request, (PyObject *) __pyx_ptype_6Recode_Request) < 0) __PYX_ERR(1, 589, __pyx_L1_error)
8845 #if !CYTHON_COMPILING_IN_LIMITED_API
8846 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6Recode_Request) < 0) __PYX_ERR(1, 589, __pyx_L1_error)
8847 #endif
8848 #if CYTHON_USE_TYPE_SPECS
8849 __pyx_ptype_6Recode_Task = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6Recode_Task_spec, NULL); if (unlikely(!__pyx_ptype_6Recode_Task)) __PYX_ERR(1, 668, __pyx_L1_error)
8850 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6Recode_Task_spec, __pyx_ptype_6Recode_Task) < 0) __PYX_ERR(1, 668, __pyx_L1_error)
8851 #else
8852 __pyx_ptype_6Recode_Task = &__pyx_type_6Recode_Task;
8853 #endif
8854 #if !CYTHON_COMPILING_IN_LIMITED_API
8855 #endif
8856 #if !CYTHON_USE_TYPE_SPECS
8857 if (__Pyx_PyType_Ready(__pyx_ptype_6Recode_Task) < 0) __PYX_ERR(1, 668, __pyx_L1_error)
8858 #endif
8859 #if PY_MAJOR_VERSION < 3
8860 __pyx_ptype_6Recode_Task->tp_print = 0;
8861 #endif
8862 #if !CYTHON_COMPILING_IN_LIMITED_API
8863 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6Recode_Task->tp_dictoffset && __pyx_ptype_6Recode_Task->tp_getattro == PyObject_GenericGetAttr)) {
8864 __pyx_ptype_6Recode_Task->tp_getattro = __Pyx_PyObject_GenericGetAttr;
8865 }
8866 #endif
8867 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Task, (PyObject *) __pyx_ptype_6Recode_Task) < 0) __PYX_ERR(1, 668, __pyx_L1_error)
8868 #if !CYTHON_COMPILING_IN_LIMITED_API
8869 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6Recode_Task) < 0) __PYX_ERR(1, 668, __pyx_L1_error)
8870 #endif
8871 __Pyx_RefNannyFinishContext();
8872 return 0;
8873 __pyx_L1_error:;
8874 __Pyx_RefNannyFinishContext();
8875 return -1;
8876 }
8877
8878 static int __Pyx_modinit_type_import_code(void) {
8879 __Pyx_RefNannyDeclarations
8880 __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
8881 /*--- Type import code ---*/
8882 __Pyx_RefNannyFinishContext();
8883 return 0;
8884 }
8885
8886 static int __Pyx_modinit_variable_import_code(void) {
8887 __Pyx_RefNannyDeclarations
8888 __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
8889 /*--- Variable import code ---*/
8890 __Pyx_RefNannyFinishContext();
8891 return 0;
8892 }
8893
8894 static int __Pyx_modinit_function_import_code(void) {
8895 __Pyx_RefNannyDeclarations
8896 __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
8897 /*--- Function import code ---*/
8898 __Pyx_RefNannyFinishContext();
8899 return 0;
8900 }
8901
8902
8903 #if PY_MAJOR_VERSION >= 3
8904 #if CYTHON_PEP489_MULTI_PHASE_INIT
8905 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
8906 static int __pyx_pymod_exec_Recode(PyObject* module); /*proto*/
8907 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
8908 {Py_mod_create, (void*)__pyx_pymod_create},
8909 {Py_mod_exec, (void*)__pyx_pymod_exec_Recode},
8910 {0, NULL}
8911 };
8912 #endif
8913
8914 #ifdef __cplusplus
8915 namespace {
8916 struct PyModuleDef __pyx_moduledef =
8917 #else
8918 static struct PyModuleDef __pyx_moduledef =
8919 #endif
8920 {
8921 PyModuleDef_HEAD_INIT,
8922 "Recode",
8923 0, /* m_doc */
8924 #if CYTHON_PEP489_MULTI_PHASE_INIT
8925 0, /* m_size */
8926 #elif CYTHON_USE_MODULE_STATE
8927 sizeof(__pyx_mstate), /* m_size */
8928 #else
8929 -1, /* m_size */
8930 #endif
8931 __pyx_methods /* m_methods */,
8932 #if CYTHON_PEP489_MULTI_PHASE_INIT
8933 __pyx_moduledef_slots, /* m_slots */
8934 #else
8935 NULL, /* m_reload */
8936 #endif
8937 #if CYTHON_USE_MODULE_STATE
8938 __pyx_m_traverse, /* m_traverse */
8939 __pyx_m_clear, /* m_clear */
8940 NULL /* m_free */
8941 #else
8942 NULL, /* m_traverse */
8943 NULL, /* m_clear */
8944 NULL /* m_free */
8945 #endif
8946 };
8947 #ifdef __cplusplus
8948 } /* anonymous namespace */
8949 #endif
8950 #endif
8951
8952 #ifndef CYTHON_NO_PYINIT_EXPORT
8953 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
8954 #elif PY_MAJOR_VERSION < 3
8955 #ifdef __cplusplus
8956 #define __Pyx_PyMODINIT_FUNC extern "C" void
8957 #else
8958 #define __Pyx_PyMODINIT_FUNC void
8959 #endif
8960 #else
8961 #ifdef __cplusplus
8962 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
8963 #else
8964 #define __Pyx_PyMODINIT_FUNC PyObject *
8965 #endif
8966 #endif
8967
8968
8969 #if PY_MAJOR_VERSION < 3
8970 __Pyx_PyMODINIT_FUNC initRecode(void) CYTHON_SMALL_CODE; /*proto*/
8971 __Pyx_PyMODINIT_FUNC initRecode(void)
8972 #else
8973 __Pyx_PyMODINIT_FUNC PyInit_Recode(void) CYTHON_SMALL_CODE; /*proto*/
8974 __Pyx_PyMODINIT_FUNC PyInit_Recode(void)
8975 #if CYTHON_PEP489_MULTI_PHASE_INIT
8976 {
8977 return PyModuleDef_Init(&__pyx_moduledef);
8978 }
8979 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
8980 #if PY_VERSION_HEX >= 0x030700A1
8981 static PY_INT64_T main_interpreter_id = -1;
8982 PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
8983 if (main_interpreter_id == -1) {
8984 main_interpreter_id = current_id;
8985 return (unlikely(current_id == -1)) ? -1 : 0;
8986 } else if (unlikely(main_interpreter_id != current_id))
8987 #else
8988 static PyInterpreterState *main_interpreter = NULL;
8989 PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
8990 if (!main_interpreter) {
8991 main_interpreter = current_interpreter;
8992 } else if (unlikely(main_interpreter != current_interpreter))
8993 #endif
8994 {
8995 PyErr_SetString(
8996 PyExc_ImportError,
8997 "Interpreter change detected - this module can only be loaded into one interpreter per process.");
8998 return -1;
8999 }
9000 return 0;
9001 }
9002 #if CYTHON_COMPILING_IN_LIMITED_API
9003 static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none)
9004 #else
9005 static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
9006 #endif
9007 {
9008 PyObject *value = PyObject_GetAttrString(spec, from_name);
9009 int result = 0;
9010 if (likely(value)) {
9011 if (allow_none || value != Py_None) {
9012 #if CYTHON_COMPILING_IN_LIMITED_API
9013 result = PyModule_AddObject(module, to_name, value);
9014 #else
9015 result = PyDict_SetItemString(moddict, to_name, value);
9016 #endif
9017 }
9018 Py_DECREF(value);
9019 } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
9020 PyErr_Clear();
9021 } else {
9022 result = -1;
9023 }
9024 return result;
9025 }
9026 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
9027 PyObject *module = NULL, *moddict, *modname;
9028 CYTHON_UNUSED_VAR(def);
9029 if (__Pyx_check_single_interpreter())
9030 return NULL;
9031 if (__pyx_m)
9032 return __Pyx_NewRef(__pyx_m);
9033 modname = PyObject_GetAttrString(spec, "name");
9034 if (unlikely(!modname)) goto bad;
9035 module = PyModule_NewObject(modname);
9036 Py_DECREF(modname);
9037 if (unlikely(!module)) goto bad;
9038 #if CYTHON_COMPILING_IN_LIMITED_API
9039 moddict = module;
9040 #else
9041 moddict = PyModule_GetDict(module);
9042 if (unlikely(!moddict)) goto bad;
9043 #endif
9044 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
9045 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
9046 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
9047 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
9048 return module;
9049 bad:
9050 Py_XDECREF(module);
9051 return NULL;
9052 }
9053
9054
9055 static CYTHON_SMALL_CODE int __pyx_pymod_exec_Recode(PyObject *__pyx_pyinit_module)
9056 #endif
9057 #endif
9058 {
9059 int stringtab_initialized = 0;
9060 #if CYTHON_USE_MODULE_STATE
9061 int pystate_addmodule_run = 0;
9062 #endif
9063 PyObject *__pyx_t_1 = NULL;
9064 PyObject *__pyx_t_2 = NULL;
9065 PyObject *__pyx_t_3 = NULL;
9066 PyObject *__pyx_t_4 = NULL;
9067 PyObject *__pyx_t_5 = NULL;
9068 int __pyx_lineno = 0;
9069 const char *__pyx_filename = NULL;
9070 int __pyx_clineno = 0;
9071 __Pyx_RefNannyDeclarations
9072 #if CYTHON_PEP489_MULTI_PHASE_INIT
9073 if (__pyx_m) {
9074 if (__pyx_m == __pyx_pyinit_module) return 0;
9075 PyErr_SetString(PyExc_RuntimeError, "Module 'Recode' has already been imported. Re-initialisation is not supported.");
9076 return -1;
9077 }
9078 #elif PY_MAJOR_VERSION >= 3
9079 if (__pyx_m) return __Pyx_NewRef(__pyx_m);
9080 #endif
9081 /*--- Module creation code ---*/
9082 #if CYTHON_PEP489_MULTI_PHASE_INIT
9083 __pyx_m = __pyx_pyinit_module;
9084 Py_INCREF(__pyx_m);
9085 #else
9086 #if PY_MAJOR_VERSION < 3
9087 __pyx_m = Py_InitModule4("Recode", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
9088 if (unlikely(!__pyx_m)) __PYX_ERR(1, 1, __pyx_L1_error)
9089 #elif CYTHON_USE_MODULE_STATE
9090 __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
9091 {
9092 int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef);
9093 __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "Recode" pseudovariable */
9094 if (unlikely((add_module_result < 0))) __PYX_ERR(1, 1, __pyx_L1_error)
9095 pystate_addmodule_run = 1;
9096 }
9097 #else
9098 __pyx_m = PyModule_Create(&__pyx_moduledef);
9099 if (unlikely(!__pyx_m)) __PYX_ERR(1, 1, __pyx_L1_error)
9100 #endif
9101 #endif
9102 CYTHON_UNUSED_VAR(__pyx_t_1);
9103 __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(1, 1, __pyx_L1_error)
9104 Py_INCREF(__pyx_d);
9105 __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(1, 1, __pyx_L1_error)
9106 __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(1, 1, __pyx_L1_error)
9107 if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
9108 #if CYTHON_REFNANNY
9109 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
9110 if (!__Pyx_RefNanny) {
9111 PyErr_Clear();
9112 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
9113 if (!__Pyx_RefNanny)
9114 Py_FatalError("failed to import 'refnanny' module");
9115 }
9116 #endif
9117 __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_Recode(void)", 0);
9118 if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
9119 #ifdef __Pxy_PyFrame_Initialize_Offsets
9120 __Pxy_PyFrame_Initialize_Offsets();
9121 #endif
9122 __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(1, 1, __pyx_L1_error)
9123 __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(1, 1, __pyx_L1_error)
9124 __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(1, 1, __pyx_L1_error)
9125 #ifdef __Pyx_CyFunction_USED
9126 if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
9127 #endif
9128 #ifdef __Pyx_FusedFunction_USED
9129 if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
9130 #endif
9131 #ifdef __Pyx_Coroutine_USED
9132 if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
9133 #endif
9134 #ifdef __Pyx_Generator_USED
9135 if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
9136 #endif
9137 #ifdef __Pyx_AsyncGen_USED
9138 if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
9139 #endif
9140 #ifdef __Pyx_StopAsyncIteration_USED
9141 if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
9142 #endif
9143 /*--- Library function declarations ---*/
9144 /*--- Threads initialization code ---*/
9145 #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
9146 PyEval_InitThreads();
9147 #endif
9148 /*--- Initialize various global constants etc. ---*/
9149 if (__Pyx_InitConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
9150 stringtab_initialized = 1;
9151 if (__Pyx_InitGlobals() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
9152 #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
9153 if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
9154 #endif
9155 if (__pyx_module_is_main_Recode) {
9156 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
9157 }
9158 #if PY_MAJOR_VERSION >= 3
9159 {
9160 PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(1, 1, __pyx_L1_error)
9161 if (!PyDict_GetItemString(modules, "Recode")) {
9162 if (unlikely((PyDict_SetItemString(modules, "Recode", __pyx_m) < 0))) __PYX_ERR(1, 1, __pyx_L1_error)
9163 }
9164 }
9165 #endif
9166 /*--- Builtin init code ---*/
9167 if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
9168 /*--- Constants init code ---*/
9169 if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
9170 /*--- Global type/function init code ---*/
9171 (void)__Pyx_modinit_global_init_code();
9172 (void)__Pyx_modinit_variable_export_code();
9173 (void)__Pyx_modinit_function_export_code();
9174 if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(1, 1, __pyx_L1_error)
9175 (void)__Pyx_modinit_type_import_code();
9176 (void)__Pyx_modinit_variable_import_code();
9177 (void)__Pyx_modinit_function_import_code();
9178 /*--- Execution code ---*/
9179 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
9180 if (__Pyx_patch_abc() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
9181 #endif
9182
9183 /* "Recode.pyx":447
9184 * bool recode_perform_task(RECODE_TASK)
9185 *
9186 * class error(Exception): # <<<<<<<<<<<<<<
9187 * pass
9188 *
9189 */
9190 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 447, __pyx_L1_error)
9191 __Pyx_GOTREF(__pyx_t_2);
9192 __Pyx_INCREF((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]));
9193 __Pyx_GIVEREF((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]));
9194 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])))) __PYX_ERR(1, 447, __pyx_L1_error);
9195 __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 447, __pyx_L1_error)
9196 __Pyx_GOTREF(__pyx_t_3);
9197 __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 447, __pyx_L1_error)
9198 __Pyx_GOTREF(__pyx_t_4);
9199 __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_3, __pyx_n_s_error, __pyx_n_s_error, (PyObject *) NULL, __pyx_n_s_Recode, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 447, __pyx_L1_error)
9200 __Pyx_GOTREF(__pyx_t_5);
9201 if (__pyx_t_3 != __pyx_t_2) {
9202 if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(1, 447, __pyx_L1_error)
9203 }
9204 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9205 __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_error, __pyx_t_3, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 447, __pyx_L1_error)
9206 __Pyx_GOTREF(__pyx_t_2);
9207 if (PyDict_SetItem(__pyx_d, __pyx_n_s_error, __pyx_t_2) < 0) __PYX_ERR(1, 447, __pyx_L1_error)
9208 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9209 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
9210 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9211 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9212
9213 /* "Recode.pyx":452
9214 * ## Enums repeated for Python.
9215 *
9216 * NO_SYMBOL_TYPE = RECODE_NO_SYMBOL_TYPE # <<<<<<<<<<<<<<
9217 * CHARSET = RECODE_CHARSET
9218 * DATA_SURFACE = RECODE_DATA_SURFACE
9219 */
9220 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_symbol_type(RECODE_NO_SYMBOL_TYPE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 452, __pyx_L1_error)
9221 __Pyx_GOTREF(__pyx_t_3);
9222 if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_SYMBOL_TYPE, __pyx_t_3) < 0) __PYX_ERR(1, 452, __pyx_L1_error)
9223 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9224
9225 /* "Recode.pyx":453
9226 *
9227 * NO_SYMBOL_TYPE = RECODE_NO_SYMBOL_TYPE
9228 * CHARSET = RECODE_CHARSET # <<<<<<<<<<<<<<
9229 * DATA_SURFACE = RECODE_DATA_SURFACE
9230 *
9231 */
9232 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_symbol_type(RECODE_CHARSET); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 453, __pyx_L1_error)
9233 __Pyx_GOTREF(__pyx_t_3);
9234 if (PyDict_SetItem(__pyx_d, __pyx_n_s_CHARSET, __pyx_t_3) < 0) __PYX_ERR(1, 453, __pyx_L1_error)
9235 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9236
9237 /* "Recode.pyx":454
9238 * NO_SYMBOL_TYPE = RECODE_NO_SYMBOL_TYPE
9239 * CHARSET = RECODE_CHARSET
9240 * DATA_SURFACE = RECODE_DATA_SURFACE # <<<<<<<<<<<<<<
9241 *
9242 * NO_CHARSET_DATA = RECODE_NO_CHARSET_DATA
9243 */
9244 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_symbol_type(RECODE_DATA_SURFACE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 454, __pyx_L1_error)
9245 __Pyx_GOTREF(__pyx_t_3);
9246 if (PyDict_SetItem(__pyx_d, __pyx_n_s_DATA_SURFACE, __pyx_t_3) < 0) __PYX_ERR(1, 454, __pyx_L1_error)
9247 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9248
9249 /* "Recode.pyx":456
9250 * DATA_SURFACE = RECODE_DATA_SURFACE
9251 *
9252 * NO_CHARSET_DATA = RECODE_NO_CHARSET_DATA # <<<<<<<<<<<<<<
9253 * STRIP_DATA = RECODE_STRIP_DATA
9254 * EXPLODE_DATA = RECODE_EXPLODE_DATA
9255 */
9256 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_data_type(RECODE_NO_CHARSET_DATA); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 456, __pyx_L1_error)
9257 __Pyx_GOTREF(__pyx_t_3);
9258 if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_CHARSET_DATA, __pyx_t_3) < 0) __PYX_ERR(1, 456, __pyx_L1_error)
9259 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9260
9261 /* "Recode.pyx":457
9262 *
9263 * NO_CHARSET_DATA = RECODE_NO_CHARSET_DATA
9264 * STRIP_DATA = RECODE_STRIP_DATA # <<<<<<<<<<<<<<
9265 * EXPLODE_DATA = RECODE_EXPLODE_DATA
9266 *
9267 */
9268 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_data_type(RECODE_STRIP_DATA); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 457, __pyx_L1_error)
9269 __Pyx_GOTREF(__pyx_t_3);
9270 if (PyDict_SetItem(__pyx_d, __pyx_n_s_STRIP_DATA, __pyx_t_3) < 0) __PYX_ERR(1, 457, __pyx_L1_error)
9271 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9272
9273 /* "Recode.pyx":458
9274 * NO_CHARSET_DATA = RECODE_NO_CHARSET_DATA
9275 * STRIP_DATA = RECODE_STRIP_DATA
9276 * EXPLODE_DATA = RECODE_EXPLODE_DATA # <<<<<<<<<<<<<<
9277 *
9278 * SIZE_1 = RECODE_1
9279 */
9280 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_data_type(RECODE_EXPLODE_DATA); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 458, __pyx_L1_error)
9281 __Pyx_GOTREF(__pyx_t_3);
9282 if (PyDict_SetItem(__pyx_d, __pyx_n_s_EXPLODE_DATA, __pyx_t_3) < 0) __PYX_ERR(1, 458, __pyx_L1_error)
9283 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9284
9285 /* "Recode.pyx":460
9286 * EXPLODE_DATA = RECODE_EXPLODE_DATA
9287 *
9288 * SIZE_1 = RECODE_1 # <<<<<<<<<<<<<<
9289 * SIZE_2 = RECODE_2
9290 * SIZE_4 = RECODE_4
9291 */
9292 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_size(RECODE_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 460, __pyx_L1_error)
9293 __Pyx_GOTREF(__pyx_t_3);
9294 if (PyDict_SetItem(__pyx_d, __pyx_n_s_SIZE_1, __pyx_t_3) < 0) __PYX_ERR(1, 460, __pyx_L1_error)
9295 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9296
9297 /* "Recode.pyx":461
9298 *
9299 * SIZE_1 = RECODE_1
9300 * SIZE_2 = RECODE_2 # <<<<<<<<<<<<<<
9301 * SIZE_4 = RECODE_4
9302 * SIZE_N = RECODE_N
9303 */
9304 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_size(RECODE_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 461, __pyx_L1_error)
9305 __Pyx_GOTREF(__pyx_t_3);
9306 if (PyDict_SetItem(__pyx_d, __pyx_n_s_SIZE_2, __pyx_t_3) < 0) __PYX_ERR(1, 461, __pyx_L1_error)
9307 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9308
9309 /* "Recode.pyx":462
9310 * SIZE_1 = RECODE_1
9311 * SIZE_2 = RECODE_2
9312 * SIZE_4 = RECODE_4 # <<<<<<<<<<<<<<
9313 * SIZE_N = RECODE_N
9314 *
9315 */
9316 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_size(RECODE_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 462, __pyx_L1_error)
9317 __Pyx_GOTREF(__pyx_t_3);
9318 if (PyDict_SetItem(__pyx_d, __pyx_n_s_SIZE_4, __pyx_t_3) < 0) __PYX_ERR(1, 462, __pyx_L1_error)
9319 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9320
9321 /* "Recode.pyx":463
9322 * SIZE_2 = RECODE_2
9323 * SIZE_4 = RECODE_4
9324 * SIZE_N = RECODE_N # <<<<<<<<<<<<<<
9325 *
9326 * NO_STEP_TABLE = RECODE_NO_STEP_TABLE
9327 */
9328 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_size(RECODE_N); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 463, __pyx_L1_error)
9329 __Pyx_GOTREF(__pyx_t_3);
9330 if (PyDict_SetItem(__pyx_d, __pyx_n_s_SIZE_N, __pyx_t_3) < 0) __PYX_ERR(1, 463, __pyx_L1_error)
9331 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9332
9333 /* "Recode.pyx":465
9334 * SIZE_N = RECODE_N
9335 *
9336 * NO_STEP_TABLE = RECODE_NO_STEP_TABLE # <<<<<<<<<<<<<<
9337 * BYTE_TO_BYTE = RECODE_BYTE_TO_BYTE
9338 * BYTE_TO_STRING = RECODE_BYTE_TO_STRING
9339 */
9340 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_step_type(RECODE_NO_STEP_TABLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 465, __pyx_L1_error)
9341 __Pyx_GOTREF(__pyx_t_3);
9342 if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_STEP_TABLE, __pyx_t_3) < 0) __PYX_ERR(1, 465, __pyx_L1_error)
9343 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9344
9345 /* "Recode.pyx":466
9346 *
9347 * NO_STEP_TABLE = RECODE_NO_STEP_TABLE
9348 * BYTE_TO_BYTE = RECODE_BYTE_TO_BYTE # <<<<<<<<<<<<<<
9349 * BYTE_TO_STRING = RECODE_BYTE_TO_STRING
9350 * UCS2_TO_BYTE = RECODE_UCS2_TO_BYTE
9351 */
9352 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_step_type(RECODE_BYTE_TO_BYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 466, __pyx_L1_error)
9353 __Pyx_GOTREF(__pyx_t_3);
9354 if (PyDict_SetItem(__pyx_d, __pyx_n_s_BYTE_TO_BYTE, __pyx_t_3) < 0) __PYX_ERR(1, 466, __pyx_L1_error)
9355 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9356
9357 /* "Recode.pyx":467
9358 * NO_STEP_TABLE = RECODE_NO_STEP_TABLE
9359 * BYTE_TO_BYTE = RECODE_BYTE_TO_BYTE
9360 * BYTE_TO_STRING = RECODE_BYTE_TO_STRING # <<<<<<<<<<<<<<
9361 * UCS2_TO_BYTE = RECODE_UCS2_TO_BYTE
9362 * UCS2_TO_STRING = RECODE_UCS2_TO_STRING
9363 */
9364 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_step_type(RECODE_BYTE_TO_STRING); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 467, __pyx_L1_error)
9365 __Pyx_GOTREF(__pyx_t_3);
9366 if (PyDict_SetItem(__pyx_d, __pyx_n_s_BYTE_TO_STRING, __pyx_t_3) < 0) __PYX_ERR(1, 467, __pyx_L1_error)
9367 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9368
9369 /* "Recode.pyx":468
9370 * BYTE_TO_BYTE = RECODE_BYTE_TO_BYTE
9371 * BYTE_TO_STRING = RECODE_BYTE_TO_STRING
9372 * UCS2_TO_BYTE = RECODE_UCS2_TO_BYTE # <<<<<<<<<<<<<<
9373 * UCS2_TO_STRING = RECODE_UCS2_TO_STRING
9374 * STRING_TO_UCS2 = RECODE_STRING_TO_UCS2
9375 */
9376 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_step_type(RECODE_UCS2_TO_BYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 468, __pyx_L1_error)
9377 __Pyx_GOTREF(__pyx_t_3);
9378 if (PyDict_SetItem(__pyx_d, __pyx_n_s_UCS2_TO_BYTE, __pyx_t_3) < 0) __PYX_ERR(1, 468, __pyx_L1_error)
9379 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9380
9381 /* "Recode.pyx":469
9382 * BYTE_TO_STRING = RECODE_BYTE_TO_STRING
9383 * UCS2_TO_BYTE = RECODE_UCS2_TO_BYTE
9384 * UCS2_TO_STRING = RECODE_UCS2_TO_STRING # <<<<<<<<<<<<<<
9385 * STRING_TO_UCS2 = RECODE_STRING_TO_UCS2
9386 * COMBINE_EXPLODE = RECODE_COMBINE_EXPLODE
9387 */
9388 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_step_type(RECODE_UCS2_TO_STRING); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 469, __pyx_L1_error)
9389 __Pyx_GOTREF(__pyx_t_3);
9390 if (PyDict_SetItem(__pyx_d, __pyx_n_s_UCS2_TO_STRING, __pyx_t_3) < 0) __PYX_ERR(1, 469, __pyx_L1_error)
9391 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9392
9393 /* "Recode.pyx":470
9394 * UCS2_TO_BYTE = RECODE_UCS2_TO_BYTE
9395 * UCS2_TO_STRING = RECODE_UCS2_TO_STRING
9396 * STRING_TO_UCS2 = RECODE_STRING_TO_UCS2 # <<<<<<<<<<<<<<
9397 * COMBINE_EXPLODE = RECODE_COMBINE_EXPLODE
9398 * COMBINE_STEP = RECODE_COMBINE_STEP
9399 */
9400 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_step_type(RECODE_STRING_TO_UCS2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 470, __pyx_L1_error)
9401 __Pyx_GOTREF(__pyx_t_3);
9402 if (PyDict_SetItem(__pyx_d, __pyx_n_s_STRING_TO_UCS2, __pyx_t_3) < 0) __PYX_ERR(1, 470, __pyx_L1_error)
9403 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9404
9405 /* "Recode.pyx":471
9406 * UCS2_TO_STRING = RECODE_UCS2_TO_STRING
9407 * STRING_TO_UCS2 = RECODE_STRING_TO_UCS2
9408 * COMBINE_EXPLODE = RECODE_COMBINE_EXPLODE # <<<<<<<<<<<<<<
9409 * COMBINE_STEP = RECODE_COMBINE_STEP
9410 * EXPLODE_STEP = RECODE_EXPLODE_STEP
9411 */
9412 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_step_type(RECODE_COMBINE_EXPLODE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 471, __pyx_L1_error)
9413 __Pyx_GOTREF(__pyx_t_3);
9414 if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMBINE_EXPLODE, __pyx_t_3) < 0) __PYX_ERR(1, 471, __pyx_L1_error)
9415 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9416
9417 /* "Recode.pyx":472
9418 * STRING_TO_UCS2 = RECODE_STRING_TO_UCS2
9419 * COMBINE_EXPLODE = RECODE_COMBINE_EXPLODE
9420 * COMBINE_STEP = RECODE_COMBINE_STEP # <<<<<<<<<<<<<<
9421 * EXPLODE_STEP = RECODE_EXPLODE_STEP
9422 *
9423 */
9424 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_step_type(RECODE_COMBINE_STEP); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 472, __pyx_L1_error)
9425 __Pyx_GOTREF(__pyx_t_3);
9426 if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMBINE_STEP, __pyx_t_3) < 0) __PYX_ERR(1, 472, __pyx_L1_error)
9427 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9428
9429 /* "Recode.pyx":473
9430 * COMBINE_EXPLODE = RECODE_COMBINE_EXPLODE
9431 * COMBINE_STEP = RECODE_COMBINE_STEP
9432 * EXPLODE_STEP = RECODE_EXPLODE_STEP # <<<<<<<<<<<<<<
9433 *
9434 * SWAP_UNDECIDED = RECODE_SWAP_UNDECIDED
9435 */
9436 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_step_type(RECODE_EXPLODE_STEP); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 473, __pyx_L1_error)
9437 __Pyx_GOTREF(__pyx_t_3);
9438 if (PyDict_SetItem(__pyx_d, __pyx_n_s_EXPLODE_STEP, __pyx_t_3) < 0) __PYX_ERR(1, 473, __pyx_L1_error)
9439 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9440
9441 /* "Recode.pyx":475
9442 * EXPLODE_STEP = RECODE_EXPLODE_STEP
9443 *
9444 * SWAP_UNDECIDED = RECODE_SWAP_UNDECIDED # <<<<<<<<<<<<<<
9445 * SWAP_NO = RECODE_SWAP_NO
9446 * SWAP_YES = RECODE_SWAP_YES
9447 */
9448 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_swap_input(RECODE_SWAP_UNDECIDED); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 475, __pyx_L1_error)
9449 __Pyx_GOTREF(__pyx_t_3);
9450 if (PyDict_SetItem(__pyx_d, __pyx_n_s_SWAP_UNDECIDED, __pyx_t_3) < 0) __PYX_ERR(1, 475, __pyx_L1_error)
9451 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9452
9453 /* "Recode.pyx":476
9454 *
9455 * SWAP_UNDECIDED = RECODE_SWAP_UNDECIDED
9456 * SWAP_NO = RECODE_SWAP_NO # <<<<<<<<<<<<<<
9457 * SWAP_YES = RECODE_SWAP_YES
9458 *
9459 */
9460 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_swap_input(RECODE_SWAP_NO); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 476, __pyx_L1_error)
9461 __Pyx_GOTREF(__pyx_t_3);
9462 if (PyDict_SetItem(__pyx_d, __pyx_n_s_SWAP_NO, __pyx_t_3) < 0) __PYX_ERR(1, 476, __pyx_L1_error)
9463 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9464
9465 /* "Recode.pyx":477
9466 * SWAP_UNDECIDED = RECODE_SWAP_UNDECIDED
9467 * SWAP_NO = RECODE_SWAP_NO
9468 * SWAP_YES = RECODE_SWAP_YES # <<<<<<<<<<<<<<
9469 *
9470 * NO_ERROR = RECODE_NO_ERROR
9471 */
9472 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_swap_input(RECODE_SWAP_YES); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 477, __pyx_L1_error)
9473 __Pyx_GOTREF(__pyx_t_3);
9474 if (PyDict_SetItem(__pyx_d, __pyx_n_s_SWAP_YES, __pyx_t_3) < 0) __PYX_ERR(1, 477, __pyx_L1_error)
9475 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9476
9477 /* "Recode.pyx":479
9478 * SWAP_YES = RECODE_SWAP_YES
9479 *
9480 * NO_ERROR = RECODE_NO_ERROR # <<<<<<<<<<<<<<
9481 * NOT_CANONICAL = RECODE_NOT_CANONICAL
9482 * AMBIGUOUS_OUTPUT = RECODE_AMBIGUOUS_OUTPUT
9483 */
9484 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_error(RECODE_NO_ERROR); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 479, __pyx_L1_error)
9485 __Pyx_GOTREF(__pyx_t_3);
9486 if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_ERROR, __pyx_t_3) < 0) __PYX_ERR(1, 479, __pyx_L1_error)
9487 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9488
9489 /* "Recode.pyx":480
9490 *
9491 * NO_ERROR = RECODE_NO_ERROR
9492 * NOT_CANONICAL = RECODE_NOT_CANONICAL # <<<<<<<<<<<<<<
9493 * AMBIGUOUS_OUTPUT = RECODE_AMBIGUOUS_OUTPUT
9494 * UNTRANSLATABLE = RECODE_UNTRANSLATABLE
9495 */
9496 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_error(RECODE_NOT_CANONICAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 480, __pyx_L1_error)
9497 __Pyx_GOTREF(__pyx_t_3);
9498 if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_CANONICAL, __pyx_t_3) < 0) __PYX_ERR(1, 480, __pyx_L1_error)
9499 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9500
9501 /* "Recode.pyx":481
9502 * NO_ERROR = RECODE_NO_ERROR
9503 * NOT_CANONICAL = RECODE_NOT_CANONICAL
9504 * AMBIGUOUS_OUTPUT = RECODE_AMBIGUOUS_OUTPUT # <<<<<<<<<<<<<<
9505 * UNTRANSLATABLE = RECODE_UNTRANSLATABLE
9506 * INVALID_INPUT = RECODE_INVALID_INPUT
9507 */
9508 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_error(RECODE_AMBIGUOUS_OUTPUT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 481, __pyx_L1_error)
9509 __Pyx_GOTREF(__pyx_t_3);
9510 if (PyDict_SetItem(__pyx_d, __pyx_n_s_AMBIGUOUS_OUTPUT, __pyx_t_3) < 0) __PYX_ERR(1, 481, __pyx_L1_error)
9511 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9512
9513 /* "Recode.pyx":482
9514 * NOT_CANONICAL = RECODE_NOT_CANONICAL
9515 * AMBIGUOUS_OUTPUT = RECODE_AMBIGUOUS_OUTPUT
9516 * UNTRANSLATABLE = RECODE_UNTRANSLATABLE # <<<<<<<<<<<<<<
9517 * INVALID_INPUT = RECODE_INVALID_INPUT
9518 * SYSTEM_ERROR = RECODE_SYSTEM_ERROR
9519 */
9520 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_error(RECODE_UNTRANSLATABLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 482, __pyx_L1_error)
9521 __Pyx_GOTREF(__pyx_t_3);
9522 if (PyDict_SetItem(__pyx_d, __pyx_n_s_UNTRANSLATABLE, __pyx_t_3) < 0) __PYX_ERR(1, 482, __pyx_L1_error)
9523 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9524
9525 /* "Recode.pyx":483
9526 * AMBIGUOUS_OUTPUT = RECODE_AMBIGUOUS_OUTPUT
9527 * UNTRANSLATABLE = RECODE_UNTRANSLATABLE
9528 * INVALID_INPUT = RECODE_INVALID_INPUT # <<<<<<<<<<<<<<
9529 * SYSTEM_ERROR = RECODE_SYSTEM_ERROR
9530 * USER_ERROR = RECODE_USER_ERROR
9531 */
9532 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_error(RECODE_INVALID_INPUT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 483, __pyx_L1_error)
9533 __Pyx_GOTREF(__pyx_t_3);
9534 if (PyDict_SetItem(__pyx_d, __pyx_n_s_INVALID_INPUT, __pyx_t_3) < 0) __PYX_ERR(1, 483, __pyx_L1_error)
9535 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9536
9537 /* "Recode.pyx":484
9538 * UNTRANSLATABLE = RECODE_UNTRANSLATABLE
9539 * INVALID_INPUT = RECODE_INVALID_INPUT
9540 * SYSTEM_ERROR = RECODE_SYSTEM_ERROR # <<<<<<<<<<<<<<
9541 * USER_ERROR = RECODE_USER_ERROR
9542 * INTERNAL_ERROR = RECODE_INTERNAL_ERROR
9543 */
9544 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_error(RECODE_SYSTEM_ERROR); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 484, __pyx_L1_error)
9545 __Pyx_GOTREF(__pyx_t_3);
9546 if (PyDict_SetItem(__pyx_d, __pyx_n_s_SYSTEM_ERROR, __pyx_t_3) < 0) __PYX_ERR(1, 484, __pyx_L1_error)
9547 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9548
9549 /* "Recode.pyx":485
9550 * INVALID_INPUT = RECODE_INVALID_INPUT
9551 * SYSTEM_ERROR = RECODE_SYSTEM_ERROR
9552 * USER_ERROR = RECODE_USER_ERROR # <<<<<<<<<<<<<<
9553 * INTERNAL_ERROR = RECODE_INTERNAL_ERROR
9554 * MAXIMUM_ERROR = RECODE_MAXIMUM_ERROR
9555 */
9556 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_error(RECODE_USER_ERROR); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 485, __pyx_L1_error)
9557 __Pyx_GOTREF(__pyx_t_3);
9558 if (PyDict_SetItem(__pyx_d, __pyx_n_s_USER_ERROR, __pyx_t_3) < 0) __PYX_ERR(1, 485, __pyx_L1_error)
9559 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9560
9561 /* "Recode.pyx":486
9562 * SYSTEM_ERROR = RECODE_SYSTEM_ERROR
9563 * USER_ERROR = RECODE_USER_ERROR
9564 * INTERNAL_ERROR = RECODE_INTERNAL_ERROR # <<<<<<<<<<<<<<
9565 * MAXIMUM_ERROR = RECODE_MAXIMUM_ERROR
9566 *
9567 */
9568 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_error(RECODE_INTERNAL_ERROR); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 486, __pyx_L1_error)
9569 __Pyx_GOTREF(__pyx_t_3);
9570 if (PyDict_SetItem(__pyx_d, __pyx_n_s_INTERNAL_ERROR, __pyx_t_3) < 0) __PYX_ERR(1, 486, __pyx_L1_error)
9571 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9572
9573 /* "Recode.pyx":487
9574 * USER_ERROR = RECODE_USER_ERROR
9575 * INTERNAL_ERROR = RECODE_INTERNAL_ERROR
9576 * MAXIMUM_ERROR = RECODE_MAXIMUM_ERROR # <<<<<<<<<<<<<<
9577 *
9578 * NO_FORMAT = RECODE_NO_FORMAT
9579 */
9580 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_error(RECODE_MAXIMUM_ERROR); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 487, __pyx_L1_error)
9581 __Pyx_GOTREF(__pyx_t_3);
9582 if (PyDict_SetItem(__pyx_d, __pyx_n_s_MAXIMUM_ERROR, __pyx_t_3) < 0) __PYX_ERR(1, 487, __pyx_L1_error)
9583 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9584
9585 /* "Recode.pyx":489
9586 * MAXIMUM_ERROR = RECODE_MAXIMUM_ERROR
9587 *
9588 * NO_FORMAT = RECODE_NO_FORMAT # <<<<<<<<<<<<<<
9589 * DECIMAL_FORMAT = RECODE_DECIMAL_FORMAT
9590 * OCTAL_FORMAT = RECODE_OCTAL_FORMAT
9591 */
9592 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_list_format(RECODE_NO_FORMAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 489, __pyx_L1_error)
9593 __Pyx_GOTREF(__pyx_t_3);
9594 if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_FORMAT, __pyx_t_3) < 0) __PYX_ERR(1, 489, __pyx_L1_error)
9595 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9596
9597 /* "Recode.pyx":490
9598 *
9599 * NO_FORMAT = RECODE_NO_FORMAT
9600 * DECIMAL_FORMAT = RECODE_DECIMAL_FORMAT # <<<<<<<<<<<<<<
9601 * OCTAL_FORMAT = RECODE_OCTAL_FORMAT
9602 * HEXADECIMAL_FORMAT = RECODE_HEXADECIMAL_FORMAT
9603 */
9604 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_list_format(RECODE_DECIMAL_FORMAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 490, __pyx_L1_error)
9605 __Pyx_GOTREF(__pyx_t_3);
9606 if (PyDict_SetItem(__pyx_d, __pyx_n_s_DECIMAL_FORMAT, __pyx_t_3) < 0) __PYX_ERR(1, 490, __pyx_L1_error)
9607 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9608
9609 /* "Recode.pyx":491
9610 * NO_FORMAT = RECODE_NO_FORMAT
9611 * DECIMAL_FORMAT = RECODE_DECIMAL_FORMAT
9612 * OCTAL_FORMAT = RECODE_OCTAL_FORMAT # <<<<<<<<<<<<<<
9613 * HEXADECIMAL_FORMAT = RECODE_HEXADECIMAL_FORMAT
9614 * FULL_FORMAT = RECODE_FULL_FORMAT
9615 */
9616 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_list_format(RECODE_OCTAL_FORMAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 491, __pyx_L1_error)
9617 __Pyx_GOTREF(__pyx_t_3);
9618 if (PyDict_SetItem(__pyx_d, __pyx_n_s_OCTAL_FORMAT, __pyx_t_3) < 0) __PYX_ERR(1, 491, __pyx_L1_error)
9619 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9620
9621 /* "Recode.pyx":492
9622 * DECIMAL_FORMAT = RECODE_DECIMAL_FORMAT
9623 * OCTAL_FORMAT = RECODE_OCTAL_FORMAT
9624 * HEXADECIMAL_FORMAT = RECODE_HEXADECIMAL_FORMAT # <<<<<<<<<<<<<<
9625 * FULL_FORMAT = RECODE_FULL_FORMAT
9626 *
9627 */
9628 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_list_format(RECODE_HEXADECIMAL_FORMAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 492, __pyx_L1_error)
9629 __Pyx_GOTREF(__pyx_t_3);
9630 if (PyDict_SetItem(__pyx_d, __pyx_n_s_HEXADECIMAL_FORMAT, __pyx_t_3) < 0) __PYX_ERR(1, 492, __pyx_L1_error)
9631 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9632
9633 /* "Recode.pyx":493
9634 * OCTAL_FORMAT = RECODE_OCTAL_FORMAT
9635 * HEXADECIMAL_FORMAT = RECODE_HEXADECIMAL_FORMAT
9636 * FULL_FORMAT = RECODE_FULL_FORMAT # <<<<<<<<<<<<<<
9637 *
9638 * NO_LANGUAGE = RECODE_NO_LANGUAGE
9639 */
9640 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_list_format(RECODE_FULL_FORMAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 493, __pyx_L1_error)
9641 __Pyx_GOTREF(__pyx_t_3);
9642 if (PyDict_SetItem(__pyx_d, __pyx_n_s_FULL_FORMAT, __pyx_t_3) < 0) __PYX_ERR(1, 493, __pyx_L1_error)
9643 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9644
9645 /* "Recode.pyx":495
9646 * FULL_FORMAT = RECODE_FULL_FORMAT
9647 *
9648 * NO_LANGUAGE = RECODE_NO_LANGUAGE # <<<<<<<<<<<<<<
9649 * LANGUAGE_C = RECODE_LANGUAGE_C
9650 * LANGUAGE_PERL = RECODE_LANGUAGE_PERL
9651 */
9652 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_programming_language(RECODE_NO_LANGUAGE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 495, __pyx_L1_error)
9653 __Pyx_GOTREF(__pyx_t_3);
9654 if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_LANGUAGE, __pyx_t_3) < 0) __PYX_ERR(1, 495, __pyx_L1_error)
9655 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9656
9657 /* "Recode.pyx":496
9658 *
9659 * NO_LANGUAGE = RECODE_NO_LANGUAGE
9660 * LANGUAGE_C = RECODE_LANGUAGE_C # <<<<<<<<<<<<<<
9661 * LANGUAGE_PERL = RECODE_LANGUAGE_PERL
9662 *
9663 */
9664 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_programming_language(RECODE_LANGUAGE_C); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 496, __pyx_L1_error)
9665 __Pyx_GOTREF(__pyx_t_3);
9666 if (PyDict_SetItem(__pyx_d, __pyx_n_s_LANGUAGE_C, __pyx_t_3) < 0) __PYX_ERR(1, 496, __pyx_L1_error)
9667 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9668
9669 /* "Recode.pyx":497
9670 * NO_LANGUAGE = RECODE_NO_LANGUAGE
9671 * LANGUAGE_C = RECODE_LANGUAGE_C
9672 * LANGUAGE_PERL = RECODE_LANGUAGE_PERL # <<<<<<<<<<<<<<
9673 *
9674 * NUL = NUL_
9675 */
9676 __pyx_t_3 = __Pyx_PyInt_From_enum__recode_programming_language(RECODE_LANGUAGE_PERL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 497, __pyx_L1_error)
9677 __Pyx_GOTREF(__pyx_t_3);
9678 if (PyDict_SetItem(__pyx_d, __pyx_n_s_LANGUAGE_PERL, __pyx_t_3) < 0) __PYX_ERR(1, 497, __pyx_L1_error)
9679 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9680
9681 /* "Recode.pyx":499
9682 * LANGUAGE_PERL = RECODE_LANGUAGE_PERL
9683 *
9684 * NUL = NUL_ # <<<<<<<<<<<<<<
9685 * STRIP_SIZE = STRIP_SIZE_
9686 *
9687 */
9688 __pyx_t_3 = __Pyx_PyInt_From___pyx_anon_enum(NUL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 499, __pyx_L1_error)
9689 __Pyx_GOTREF(__pyx_t_3);
9690 if (PyDict_SetItem(__pyx_d, __pyx_n_s_NUL, __pyx_t_3) < 0) __PYX_ERR(1, 499, __pyx_L1_error)
9691 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9692
9693 /* "Recode.pyx":500
9694 *
9695 * NUL = NUL_
9696 * STRIP_SIZE = STRIP_SIZE_ # <<<<<<<<<<<<<<
9697 *
9698 * SYMBOL_CREATE_CHARSET = SYMBOL_CREATE_CHARSET_
9699 */
9700 __pyx_t_3 = __Pyx_PyInt_From___pyx_anon_enum(STRIP_SIZE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 500, __pyx_L1_error)
9701 __Pyx_GOTREF(__pyx_t_3);
9702 if (PyDict_SetItem(__pyx_d, __pyx_n_s_STRIP_SIZE, __pyx_t_3) < 0) __PYX_ERR(1, 500, __pyx_L1_error)
9703 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9704
9705 /* "Recode.pyx":502
9706 * STRIP_SIZE = STRIP_SIZE_
9707 *
9708 * SYMBOL_CREATE_CHARSET = SYMBOL_CREATE_CHARSET_ # <<<<<<<<<<<<<<
9709 * SYMBOL_CREATE_DATA_SURFACE = SYMBOL_CREATE_DATA_SURFACE_
9710 * ALIAS_FIND_AS_CHARSET = ALIAS_FIND_AS_CHARSET_
9711 */
9712 __pyx_t_3 = __Pyx_PyInt_From_enum__alias_find_type(SYMBOL_CREATE_CHARSET); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 502, __pyx_L1_error)
9713 __Pyx_GOTREF(__pyx_t_3);
9714 if (PyDict_SetItem(__pyx_d, __pyx_n_s_SYMBOL_CREATE_CHARSET, __pyx_t_3) < 0) __PYX_ERR(1, 502, __pyx_L1_error)
9715 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9716
9717 /* "Recode.pyx":503
9718 *
9719 * SYMBOL_CREATE_CHARSET = SYMBOL_CREATE_CHARSET_
9720 * SYMBOL_CREATE_DATA_SURFACE = SYMBOL_CREATE_DATA_SURFACE_ # <<<<<<<<<<<<<<
9721 * ALIAS_FIND_AS_CHARSET = ALIAS_FIND_AS_CHARSET_
9722 * ALIAS_FIND_AS_SURFACE = ALIAS_FIND_AS_SURFACE_
9723 */
9724 __pyx_t_3 = __Pyx_PyInt_From_enum__alias_find_type(SYMBOL_CREATE_DATA_SURFACE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 503, __pyx_L1_error)
9725 __Pyx_GOTREF(__pyx_t_3);
9726 if (PyDict_SetItem(__pyx_d, __pyx_n_s_SYMBOL_CREATE_DATA_SURFACE, __pyx_t_3) < 0) __PYX_ERR(1, 503, __pyx_L1_error)
9727 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9728
9729 /* "Recode.pyx":504
9730 * SYMBOL_CREATE_CHARSET = SYMBOL_CREATE_CHARSET_
9731 * SYMBOL_CREATE_DATA_SURFACE = SYMBOL_CREATE_DATA_SURFACE_
9732 * ALIAS_FIND_AS_CHARSET = ALIAS_FIND_AS_CHARSET_ # <<<<<<<<<<<<<<
9733 * ALIAS_FIND_AS_SURFACE = ALIAS_FIND_AS_SURFACE_
9734 * ALIAS_FIND_AS_EITHER = ALIAS_FIND_AS_EITHER_
9735 */
9736 __pyx_t_3 = __Pyx_PyInt_From_enum__alias_find_type(ALIAS_FIND_AS_CHARSET); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 504, __pyx_L1_error)
9737 __Pyx_GOTREF(__pyx_t_3);
9738 if (PyDict_SetItem(__pyx_d, __pyx_n_s_ALIAS_FIND_AS_CHARSET, __pyx_t_3) < 0) __PYX_ERR(1, 504, __pyx_L1_error)
9739 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9740
9741 /* "Recode.pyx":505
9742 * SYMBOL_CREATE_DATA_SURFACE = SYMBOL_CREATE_DATA_SURFACE_
9743 * ALIAS_FIND_AS_CHARSET = ALIAS_FIND_AS_CHARSET_
9744 * ALIAS_FIND_AS_SURFACE = ALIAS_FIND_AS_SURFACE_ # <<<<<<<<<<<<<<
9745 * ALIAS_FIND_AS_EITHER = ALIAS_FIND_AS_EITHER_
9746 *
9747 */
9748 __pyx_t_3 = __Pyx_PyInt_From_enum__alias_find_type(ALIAS_FIND_AS_SURFACE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 505, __pyx_L1_error)
9749 __Pyx_GOTREF(__pyx_t_3);
9750 if (PyDict_SetItem(__pyx_d, __pyx_n_s_ALIAS_FIND_AS_SURFACE, __pyx_t_3) < 0) __PYX_ERR(1, 505, __pyx_L1_error)
9751 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9752
9753 /* "Recode.pyx":506
9754 * ALIAS_FIND_AS_CHARSET = ALIAS_FIND_AS_CHARSET_
9755 * ALIAS_FIND_AS_SURFACE = ALIAS_FIND_AS_SURFACE_
9756 * ALIAS_FIND_AS_EITHER = ALIAS_FIND_AS_EITHER_ # <<<<<<<<<<<<<<
9757 *
9758 * xDONE = DONE
9759 */
9760 __pyx_t_3 = __Pyx_PyInt_From_enum__alias_find_type(ALIAS_FIND_AS_EITHER); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 506, __pyx_L1_error)
9761 __Pyx_GOTREF(__pyx_t_3);
9762 if (PyDict_SetItem(__pyx_d, __pyx_n_s_ALIAS_FIND_AS_EITHER, __pyx_t_3) < 0) __PYX_ERR(1, 506, __pyx_L1_error)
9763 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9764
9765 /* "Recode.pyx":508
9766 * ALIAS_FIND_AS_EITHER = ALIAS_FIND_AS_EITHER_
9767 *
9768 * xDONE = DONE # <<<<<<<<<<<<<<
9769 * xELSE = ELSE_
9770 *
9771 */
9772 __pyx_t_3 = __Pyx_PyInt_From___pyx_anon_enum(DONE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 508, __pyx_L1_error)
9773 __Pyx_GOTREF(__pyx_t_3);
9774 if (PyDict_SetItem(__pyx_d, __pyx_n_s_xDONE, __pyx_t_3) < 0) __PYX_ERR(1, 508, __pyx_L1_error)
9775 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9776
9777 /* "Recode.pyx":509
9778 *
9779 * xDONE = DONE
9780 * xELSE = ELSE_ # <<<<<<<<<<<<<<
9781 *
9782 * REPLACEMENT_CHARACTER = REPLACEMENT_CHARACTER_
9783 */
9784 __pyx_t_3 = __Pyx_PyInt_From___pyx_anon_enum(ELSE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 509, __pyx_L1_error)
9785 __Pyx_GOTREF(__pyx_t_3);
9786 if (PyDict_SetItem(__pyx_d, __pyx_n_s_xELSE, __pyx_t_3) < 0) __PYX_ERR(1, 509, __pyx_L1_error)
9787 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9788
9789 /* "Recode.pyx":511
9790 * xELSE = ELSE_
9791 *
9792 * REPLACEMENT_CHARACTER = REPLACEMENT_CHARACTER_ # <<<<<<<<<<<<<<
9793 * NOT_A_CHARACTER = NOT_A_CHARACTER_
9794 * BYTE_ORDER_MARK = BYTE_ORDER_MARK_
9795 */
9796 __pyx_t_3 = __Pyx_PyInt_From___pyx_anon_enum(REPLACEMENT_CHARACTER); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 511, __pyx_L1_error)
9797 __Pyx_GOTREF(__pyx_t_3);
9798 if (PyDict_SetItem(__pyx_d, __pyx_n_s_REPLACEMENT_CHARACTER, __pyx_t_3) < 0) __PYX_ERR(1, 511, __pyx_L1_error)
9799 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9800
9801 /* "Recode.pyx":512
9802 *
9803 * REPLACEMENT_CHARACTER = REPLACEMENT_CHARACTER_
9804 * NOT_A_CHARACTER = NOT_A_CHARACTER_ # <<<<<<<<<<<<<<
9805 * BYTE_ORDER_MARK = BYTE_ORDER_MARK_
9806 * BYTE_ORDER_MARK_SWAPPED = BYTE_ORDER_MARK_SWAPPED_
9807 */
9808 __pyx_t_3 = __Pyx_PyInt_From___pyx_anon_enum(NOT_A_CHARACTER); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 512, __pyx_L1_error)
9809 __Pyx_GOTREF(__pyx_t_3);
9810 if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_A_CHARACTER, __pyx_t_3) < 0) __PYX_ERR(1, 512, __pyx_L1_error)
9811 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9812
9813 /* "Recode.pyx":513
9814 * REPLACEMENT_CHARACTER = REPLACEMENT_CHARACTER_
9815 * NOT_A_CHARACTER = NOT_A_CHARACTER_
9816 * BYTE_ORDER_MARK = BYTE_ORDER_MARK_ # <<<<<<<<<<<<<<
9817 * BYTE_ORDER_MARK_SWAPPED = BYTE_ORDER_MARK_SWAPPED_
9818 *
9819 */
9820 __pyx_t_3 = __Pyx_PyInt_From___pyx_anon_enum(BYTE_ORDER_MARK); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 513, __pyx_L1_error)
9821 __Pyx_GOTREF(__pyx_t_3);
9822 if (PyDict_SetItem(__pyx_d, __pyx_n_s_BYTE_ORDER_MARK, __pyx_t_3) < 0) __PYX_ERR(1, 513, __pyx_L1_error)
9823 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9824
9825 /* "Recode.pyx":514
9826 * NOT_A_CHARACTER = NOT_A_CHARACTER_
9827 * BYTE_ORDER_MARK = BYTE_ORDER_MARK_
9828 * BYTE_ORDER_MARK_SWAPPED = BYTE_ORDER_MARK_SWAPPED_ # <<<<<<<<<<<<<<
9829 *
9830 * AUTO_ABORT_FLAG = RECODE_AUTO_ABORT_FLAG
9831 */
9832 __pyx_t_3 = __Pyx_PyInt_From___pyx_anon_enum(BYTE_ORDER_MARK_SWAPPED); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error)
9833 __Pyx_GOTREF(__pyx_t_3);
9834 if (PyDict_SetItem(__pyx_d, __pyx_n_s_BYTE_ORDER_MARK_SWAPPED, __pyx_t_3) < 0) __PYX_ERR(1, 514, __pyx_L1_error)
9835 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9836
9837 /* "Recode.pyx":516
9838 * BYTE_ORDER_MARK_SWAPPED = BYTE_ORDER_MARK_SWAPPED_
9839 *
9840 * AUTO_ABORT_FLAG = RECODE_AUTO_ABORT_FLAG # <<<<<<<<<<<<<<
9841 * NO_ICONV_FLAG = RECODE_NO_ICONV_FLAG
9842 * STRICT_MAPPING_FLAG = RECODE_STRICT_MAPPING_FLAG
9843 */
9844 __pyx_t_3 = __Pyx_PyInt_From___pyx_anon_enum(RECODE_AUTO_ABORT_FLAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 516, __pyx_L1_error)
9845 __Pyx_GOTREF(__pyx_t_3);
9846 if (PyDict_SetItem(__pyx_d, __pyx_n_s_AUTO_ABORT_FLAG, __pyx_t_3) < 0) __PYX_ERR(1, 516, __pyx_L1_error)
9847 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9848
9849 /* "Recode.pyx":517
9850 *
9851 * AUTO_ABORT_FLAG = RECODE_AUTO_ABORT_FLAG
9852 * NO_ICONV_FLAG = RECODE_NO_ICONV_FLAG # <<<<<<<<<<<<<<
9853 * STRICT_MAPPING_FLAG = RECODE_STRICT_MAPPING_FLAG
9854 *
9855 */
9856 __pyx_t_3 = __Pyx_PyInt_From___pyx_anon_enum(RECODE_NO_ICONV_FLAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 517, __pyx_L1_error)
9857 __Pyx_GOTREF(__pyx_t_3);
9858 if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_ICONV_FLAG, __pyx_t_3) < 0) __PYX_ERR(1, 517, __pyx_L1_error)
9859 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9860
9861 /* "Recode.pyx":518
9862 * AUTO_ABORT_FLAG = RECODE_AUTO_ABORT_FLAG
9863 * NO_ICONV_FLAG = RECODE_NO_ICONV_FLAG
9864 * STRICT_MAPPING_FLAG = RECODE_STRICT_MAPPING_FLAG # <<<<<<<<<<<<<<
9865 *
9866 * ## Recode library at OUTER level.
9867 */
9868 __pyx_t_3 = __Pyx_PyInt_From___pyx_anon_enum(RECODE_STRICT_MAPPING_FLAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 518, __pyx_L1_error)
9869 __Pyx_GOTREF(__pyx_t_3);
9870 if (PyDict_SetItem(__pyx_d, __pyx_n_s_STRICT_MAPPING_FLAG, __pyx_t_3) < 0) __PYX_ERR(1, 518, __pyx_L1_error)
9871 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9872
9873 /* "Recode.pyx":545
9874 * recode_delete_outer(self.outer)
9875 *
9876 * def default_charset(self): # <<<<<<<<<<<<<<
9877 * return locale_charset()
9878 *
9879 */
9880 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6Recode_5Outer_5default_charset, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Outer_default_charset, NULL, __pyx_n_s_Recode, __pyx_d, ((PyObject *)__pyx_codeobj__3)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 545, __pyx_L1_error)
9881 __Pyx_GOTREF(__pyx_t_3);
9882 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6Recode_Outer, __pyx_n_s_default_charset, __pyx_t_3) < 0) __PYX_ERR(1, 545, __pyx_L1_error)
9883 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9884 PyType_Modified(__pyx_ptype_6Recode_Outer);
9885
9886 /* "Recode.pyx":548
9887 * return locale_charset()
9888 *
9889 * def all_charsets(self): # <<<<<<<<<<<<<<
9890 * list = []
9891 * cdef RECODE_SYMBOL symbol
9892 */
9893 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6Recode_5Outer_7all_charsets, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Outer_all_charsets, NULL, __pyx_n_s_Recode, __pyx_d, ((PyObject *)__pyx_codeobj__5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 548, __pyx_L1_error)
9894 __Pyx_GOTREF(__pyx_t_3);
9895 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6Recode_Outer, __pyx_n_s_all_charsets, __pyx_t_3) < 0) __PYX_ERR(1, 548, __pyx_L1_error)
9896 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9897 PyType_Modified(__pyx_ptype_6Recode_Outer);
9898
9899 /* "Recode.pyx":560
9900 * return list
9901 *
9902 * def all_surfaces(self): # <<<<<<<<<<<<<<
9903 * list = []
9904 * cdef RECODE_SYMBOL symbol
9905 */
9906 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6Recode_5Outer_9all_surfaces, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Outer_all_surfaces, NULL, __pyx_n_s_Recode, __pyx_d, ((PyObject *)__pyx_codeobj__6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 560, __pyx_L1_error)
9907 __Pyx_GOTREF(__pyx_t_3);
9908 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6Recode_Outer, __pyx_n_s_all_surfaces, __pyx_t_3) < 0) __PYX_ERR(1, 560, __pyx_L1_error)
9909 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9910 PyType_Modified(__pyx_ptype_6Recode_Outer);
9911
9912 /* "Recode.pyx":570
9913 * return list
9914 *
9915 * def concise_charset(self, format=NO_FORMAT): # <<<<<<<<<<<<<<
9916 * ok = recode_list_concise_charset(self.outer, NULL, format)
9917 * if not ok:
9918 */
9919 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NO_FORMAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 570, __pyx_L1_error)
9920 __Pyx_GOTREF(__pyx_t_3);
9921 __pyx_k_ = __pyx_t_3;
9922 __Pyx_GIVEREF(__pyx_t_3);
9923 __pyx_t_3 = 0;
9924 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NO_FORMAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 570, __pyx_L1_error)
9925 __Pyx_GOTREF(__pyx_t_3);
9926 __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 570, __pyx_L1_error)
9927 __Pyx_GOTREF(__pyx_t_4);
9928 __Pyx_GIVEREF(__pyx_t_3);
9929 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 570, __pyx_L1_error);
9930 __pyx_t_3 = 0;
9931 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6Recode_5Outer_11concise_charset, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Outer_concise_charset, NULL, __pyx_n_s_Recode, __pyx_d, ((PyObject *)__pyx_codeobj__8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 570, __pyx_L1_error)
9932 __Pyx_GOTREF(__pyx_t_3);
9933 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_4);
9934 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9935 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6Recode_Outer, __pyx_n_s_concise_charset, __pyx_t_3) < 0) __PYX_ERR(1, 570, __pyx_L1_error)
9936 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9937 PyType_Modified(__pyx_ptype_6Recode_Outer);
9938
9939 /* "Recode.pyx":575
9940 * raise error
9941 *
9942 * def full_charset(self): # <<<<<<<<<<<<<<
9943 * ok = recode_list_full_charset(self.outer, NULL)
9944 * if not ok:
9945 */
9946 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6Recode_5Outer_13full_charset, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Outer_full_charset, NULL, __pyx_n_s_Recode, __pyx_d, ((PyObject *)__pyx_codeobj__10)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 575, __pyx_L1_error)
9947 __Pyx_GOTREF(__pyx_t_3);
9948 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6Recode_Outer, __pyx_n_s_full_charset, __pyx_t_3) < 0) __PYX_ERR(1, 575, __pyx_L1_error)
9949 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9950 PyType_Modified(__pyx_ptype_6Recode_Outer);
9951
9952 /* "Recode.pyx":581
9953 *
9954 * # Lazy, all in one call.
9955 * def recode(self, char *command, char *input, verbose=False): # <<<<<<<<<<<<<<
9956 * request = Request(self)
9957 * request.set_verbose(verbose)
9958 */
9959 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6Recode_5Outer_15recode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Outer_recode, NULL, __pyx_n_s_Recode, __pyx_d, ((PyObject *)__pyx_codeobj__12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 581, __pyx_L1_error)
9960 __Pyx_GOTREF(__pyx_t_3);
9961 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__13);
9962 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6Recode_Outer, __pyx_n_s_recode, __pyx_t_3) < 0) __PYX_ERR(1, 581, __pyx_L1_error)
9963 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9964 PyType_Modified(__pyx_ptype_6Recode_Outer);
9965
9966 /* "(tree fragment)":1
9967 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
9968 * raise TypeError, "self.outer cannot be converted to a Python object for pickling"
9969 * def __setstate_cython__(self, __pyx_state):
9970 */
9971 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6Recode_5Outer_17__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Outer___reduce_cython, NULL, __pyx_n_s_Recode, __pyx_d, ((PyObject *)__pyx_codeobj__14)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1, __pyx_L1_error)
9972 __Pyx_GOTREF(__pyx_t_3);
9973 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
9974 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9975
9976 /* "(tree fragment)":3
9977 * def __reduce_cython__(self):
9978 * raise TypeError, "self.outer cannot be converted to a Python object for pickling"
9979 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
9980 * raise TypeError, "self.outer cannot be converted to a Python object for pickling"
9981 */
9982 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6Recode_5Outer_19__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Outer___setstate_cython, NULL, __pyx_n_s_Recode, __pyx_d, ((PyObject *)__pyx_codeobj__16)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3, __pyx_L1_error)
9983 __Pyx_GOTREF(__pyx_t_3);
9984 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
9985 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9986
9987 /* "Recode.pyx":598
9988 * recode_delete_request(self.request)
9989 *
9990 * def set_verbose(self, flag): # <<<<<<<<<<<<<<
9991 * previous = self.request.verbose_flag != 0
9992 * self.request.verbose_flag = int(flag)
9993 */
9994 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6Recode_7Request_5set_verbose, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Request_set_verbose, NULL, __pyx_n_s_Recode, __pyx_d, ((PyObject *)__pyx_codeobj__18)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 598, __pyx_L1_error)
9995 __Pyx_GOTREF(__pyx_t_3);
9996 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6Recode_Request, __pyx_n_s_set_verbose, __pyx_t_3) < 0) __PYX_ERR(1, 598, __pyx_L1_error)
9997 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9998 PyType_Modified(__pyx_ptype_6Recode_Request);
9999
10000 /* "Recode.pyx":603
10001 * return previous
10002 *
10003 * def scan(self, char *text): # <<<<<<<<<<<<<<
10004 * ok = recode_scan_request(self.request, text)
10005 * if not ok:
10006 */
10007 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6Recode_7Request_7scan, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Request_scan, NULL, __pyx_n_s_Recode, __pyx_d, ((PyObject *)__pyx_codeobj__20)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 603, __pyx_L1_error)
10008 __Pyx_GOTREF(__pyx_t_3);
10009 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6Recode_Request, __pyx_n_s_scan, __pyx_t_3) < 0) __PYX_ERR(1, 603, __pyx_L1_error)
10010 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10011 PyType_Modified(__pyx_ptype_6Recode_Request);
10012
10013 /* "Recode.pyx":608
10014 * raise error
10015 *
10016 * def pair_sequence(self): # <<<<<<<<<<<<<<
10017 * list = []
10018 * cdef recode_step step
10019 */
10020 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6Recode_7Request_9pair_sequence, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Request_pair_sequence, NULL, __pyx_n_s_Recode, __pyx_d, ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 608, __pyx_L1_error)
10021 __Pyx_GOTREF(__pyx_t_3);
10022 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6Recode_Request, __pyx_n_s_pair_sequence, __pyx_t_3) < 0) __PYX_ERR(1, 608, __pyx_L1_error)
10023 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10024 PyType_Modified(__pyx_ptype_6Recode_Request);
10025
10026 /* "Recode.pyx":617
10027 * return list
10028 *
10029 * def format_table(self, int language, char *charset): # <<<<<<<<<<<<<<
10030 * cdef RECODE_OUTER outer
10031 * cdef bool saved
10032 */
10033 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6Recode_7Request_11format_table, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Request_format_table, NULL, __pyx_n_s_Recode, __pyx_d, ((PyObject *)__pyx_codeobj__24)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 617, __pyx_L1_error)
10034 __Pyx_GOTREF(__pyx_t_3);
10035 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6Recode_Request, __pyx_n_s_format_table, __pyx_t_3) < 0) __PYX_ERR(1, 617, __pyx_L1_error)
10036 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10037 PyType_Modified(__pyx_ptype_6Recode_Request);
10038
10039 /* "Recode.pyx":629
10040 * raise error
10041 *
10042 * def string(self, text): # <<<<<<<<<<<<<<
10043 * cdef char *input = text
10044 * cdef size_t input_len = len(text)
10045 */
10046 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6Recode_7Request_13string, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Request_string, NULL, __pyx_n_s_Recode, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 629, __pyx_L1_error)
10047 __Pyx_GOTREF(__pyx_t_3);
10048 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6Recode_Request, __pyx_n_s_string, __pyx_t_3) < 0) __PYX_ERR(1, 629, __pyx_L1_error)
10049 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10050 PyType_Modified(__pyx_ptype_6Recode_Request);
10051
10052 /* "(tree fragment)":1
10053 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
10054 * raise TypeError, "self.request cannot be converted to a Python object for pickling"
10055 * def __setstate_cython__(self, __pyx_state):
10056 */
10057 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6Recode_7Request_15__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Request___reduce_cython, NULL, __pyx_n_s_Recode, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1, __pyx_L1_error)
10058 __Pyx_GOTREF(__pyx_t_3);
10059 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10060 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10061
10062 /* "(tree fragment)":3
10063 * def __reduce_cython__(self):
10064 * raise TypeError, "self.request cannot be converted to a Python object for pickling"
10065 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
10066 * raise TypeError, "self.request cannot be converted to a Python object for pickling"
10067 */
10068 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6Recode_7Request_17__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Request___setstate_cython, NULL, __pyx_n_s_Recode, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3, __pyx_L1_error)
10069 __Pyx_GOTREF(__pyx_t_3);
10070 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
10071 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10072
10073 /* "Recode.pyx":678
10074 * recode_delete_task(self.task)
10075 *
10076 * def set_byte_order_mark(self, flag): # <<<<<<<<<<<<<<
10077 * previous = self.task.byte_order_mark != 0
10078 * self.task.byte_order_mark = int(flag)
10079 */
10080 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6Recode_4Task_5set_byte_order_mark, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Task_set_byte_order_mark, NULL, __pyx_n_s_Recode, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 678, __pyx_L1_error)
10081 __Pyx_GOTREF(__pyx_t_3);
10082 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6Recode_Task, __pyx_n_s_set_byte_order_mark, __pyx_t_3) < 0) __PYX_ERR(1, 678, __pyx_L1_error)
10083 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10084 PyType_Modified(__pyx_ptype_6Recode_Task);
10085
10086 /* "Recode.pyx":683
10087 * return previous
10088 *
10089 * def get_error(self): # <<<<<<<<<<<<<<
10090 * return self.task.error_so_far
10091 *
10092 */
10093 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6Recode_4Task_7get_error, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Task_get_error, NULL, __pyx_n_s_Recode, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 683, __pyx_L1_error)
10094 __Pyx_GOTREF(__pyx_t_3);
10095 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6Recode_Task, __pyx_n_s_get_error, __pyx_t_3) < 0) __PYX_ERR(1, 683, __pyx_L1_error)
10096 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10097 PyType_Modified(__pyx_ptype_6Recode_Task);
10098
10099 /* "Recode.pyx":686
10100 * return self.task.error_so_far
10101 *
10102 * def set_fail_level(self, fail_level): # <<<<<<<<<<<<<<
10103 * previous = self.task.fail_level
10104 * self.task.fail_level = fail_level
10105 */
10106 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6Recode_4Task_9set_fail_level, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Task_set_fail_level, NULL, __pyx_n_s_Recode, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 686, __pyx_L1_error)
10107 __Pyx_GOTREF(__pyx_t_3);
10108 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6Recode_Task, __pyx_n_s_set_fail_level, __pyx_t_3) < 0) __PYX_ERR(1, 686, __pyx_L1_error)
10109 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10110 PyType_Modified(__pyx_ptype_6Recode_Task);
10111
10112 /* "Recode.pyx":691
10113 * return previous
10114 *
10115 * def set_abort_level(self, abort_level): # <<<<<<<<<<<<<<
10116 * previous = self.task.abort_level
10117 * self.task.abort_level = abort_level
10118 */
10119 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6Recode_4Task_11set_abort_level, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Task_set_abort_level, NULL, __pyx_n_s_Recode, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 691, __pyx_L1_error)
10120 __Pyx_GOTREF(__pyx_t_3);
10121 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6Recode_Task, __pyx_n_s_set_abort_level, __pyx_t_3) < 0) __PYX_ERR(1, 691, __pyx_L1_error)
10122 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10123 PyType_Modified(__pyx_ptype_6Recode_Task);
10124
10125 /* "Recode.pyx":696
10126 * return previous
10127 *
10128 * def set_input(self, text): # <<<<<<<<<<<<<<
10129 * cdef char *input = text
10130 * cdef size_t input_len = len(text)
10131 */
10132 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6Recode_4Task_13set_input, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Task_set_input, NULL, __pyx_n_s_Recode, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 696, __pyx_L1_error)
10133 __Pyx_GOTREF(__pyx_t_3);
10134 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6Recode_Task, __pyx_n_s_set_input, __pyx_t_3) < 0) __PYX_ERR(1, 696, __pyx_L1_error)
10135 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10136 PyType_Modified(__pyx_ptype_6Recode_Task);
10137
10138 /* "Recode.pyx":703
10139 * self.task.input.limit = input + input_len
10140 *
10141 * def get_output(self): # <<<<<<<<<<<<<<
10142 * return self.task.output.buffer[:self.task.output.cursor - self.task.output.buffer]
10143 *
10144 */
10145 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6Recode_4Task_15get_output, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Task_get_output, NULL, __pyx_n_s_Recode, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 703, __pyx_L1_error)
10146 __Pyx_GOTREF(__pyx_t_3);
10147 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6Recode_Task, __pyx_n_s_get_output, __pyx_t_3) < 0) __PYX_ERR(1, 703, __pyx_L1_error)
10148 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10149 PyType_Modified(__pyx_ptype_6Recode_Task);
10150
10151 /* "Recode.pyx":706
10152 * return self.task.output.buffer[:self.task.output.cursor - self.task.output.buffer]
10153 *
10154 * def perform(self): # <<<<<<<<<<<<<<
10155 * return recode_perform_task(self.task)
10156 */
10157 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6Recode_4Task_17perform, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Task_perform, NULL, __pyx_n_s_Recode, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 706, __pyx_L1_error)
10158 __Pyx_GOTREF(__pyx_t_3);
10159 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6Recode_Task, __pyx_n_s_perform, __pyx_t_3) < 0) __PYX_ERR(1, 706, __pyx_L1_error)
10160 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10161 PyType_Modified(__pyx_ptype_6Recode_Task);
10162
10163 /* "(tree fragment)":1
10164 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
10165 * raise TypeError, "self.task cannot be converted to a Python object for pickling"
10166 * def __setstate_cython__(self, __pyx_state):
10167 */
10168 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6Recode_4Task_19__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Task___reduce_cython, NULL, __pyx_n_s_Recode, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1, __pyx_L1_error)
10169 __Pyx_GOTREF(__pyx_t_3);
10170 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10171 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10172
10173 /* "(tree fragment)":3
10174 * def __reduce_cython__(self):
10175 * raise TypeError, "self.task cannot be converted to a Python object for pickling"
10176 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
10177 * raise TypeError, "self.task cannot be converted to a Python object for pickling"
10178 */
10179 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6Recode_4Task_21__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Task___setstate_cython, NULL, __pyx_n_s_Recode, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3, __pyx_L1_error)
10180 __Pyx_GOTREF(__pyx_t_3);
10181 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
10182 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10183
10184 /* "Recode.pyx":1
10185 * # -*- coding: utf-8 -*- # <<<<<<<<<<<<<<
10186 * # Python interface to the Recode C library, for testing.
10187 * # Copyright 1996-2008 Free Software Foundation, Inc.
10188 */
10189 __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error)
10190 __Pyx_GOTREF(__pyx_t_3);
10191 if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
10192 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10193
10194 /*--- Wrapped vars code ---*/
10195
10196 goto __pyx_L0;
10197 __pyx_L1_error:;
10198 __Pyx_XDECREF(__pyx_t_2);
10199 __Pyx_XDECREF(__pyx_t_3);
10200 __Pyx_XDECREF(__pyx_t_4);
10201 __Pyx_XDECREF(__pyx_t_5);
10202 if (__pyx_m) {
10203 if (__pyx_d && stringtab_initialized) {
10204 __Pyx_AddTraceback("init Recode", __pyx_clineno, __pyx_lineno, __pyx_filename);
10205 }
10206 #if !CYTHON_USE_MODULE_STATE
10207 Py_CLEAR(__pyx_m);
10208 #else
10209 Py_DECREF(__pyx_m);
10210 if (pystate_addmodule_run) {
10211 PyObject *tp, *value, *tb;
10212 PyErr_Fetch(&tp, &value, &tb);
10213 PyState_RemoveModule(&__pyx_moduledef);
10214 PyErr_Restore(tp, value, tb);
10215 }
10216 #endif
10217 } else if (!PyErr_Occurred()) {
10218 PyErr_SetString(PyExc_ImportError, "init Recode");
10219 }
10220 __pyx_L0:;
10221 __Pyx_RefNannyFinishContext();
10222 #if CYTHON_PEP489_MULTI_PHASE_INIT
10223 return (__pyx_m != NULL) ? 0 : -1;
10224 #elif PY_MAJOR_VERSION >= 3
10225 return __pyx_m;
10226 #else
10227 return;
10228 #endif
10229 }
10230 /* #### Code section: cleanup_globals ### */
10231 /* #### Code section: cleanup_module ### */
10232 /* #### Code section: main_method ### */
10233 /* #### Code section: utility_code_pragmas ### */
10234 #ifdef _MSC_VER
10235 #pragma warning( push )
10236 /* Warning 4127: conditional expression is constant
10237 * Cython uses constant conditional expressions to allow in inline functions to be optimized at
10238 * compile-time, so this warning is not useful
10239 */
10240 #pragma warning( disable : 4127 )
10241 #endif
10242
10243
10244
10245 /* #### Code section: utility_code_def ### */
10246
10247 /* --- Runtime support code --- */
10248 /* Refnanny */
10249 #if CYTHON_REFNANNY
10250 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
10251 PyObject *m = NULL, *p = NULL;
10252 void *r = NULL;
10253 m = PyImport_ImportModule(modname);
10254 if (!m) goto end;
10255 p = PyObject_GetAttrString(m, "RefNannyAPI");
10256 if (!p) goto end;
10257 r = PyLong_AsVoidPtr(p);
10258 end:
10259 Py_XDECREF(p);
10260 Py_XDECREF(m);
10261 return (__Pyx_RefNannyAPIStruct *)r;
10262 }
10263 #endif
10264
10265 /* PyErrExceptionMatches */
10266 #if CYTHON_FAST_THREAD_STATE
10267 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
10268 Py_ssize_t i, n;
10269 n = PyTuple_GET_SIZE(tuple);
10270 #if PY_MAJOR_VERSION >= 3
10271 for (i=0; i<n; i++) {
10272 if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
10273 }
10274 #endif
10275 for (i=0; i<n; i++) {
10276 if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
10277 }
10278 return 0;
10279 }
10280 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
10281 int result;
10282 PyObject *exc_type;
10283 #if PY_VERSION_HEX >= 0x030C00A6
10284 PyObject *current_exception = tstate->current_exception;
10285 if (unlikely(!current_exception)) return 0;
10286 exc_type = (PyObject*) Py_TYPE(current_exception);
10287 if (exc_type == err) return 1;
10288 #else
10289 exc_type = tstate->curexc_type;
10290 if (exc_type == err) return 1;
10291 if (unlikely(!exc_type)) return 0;
10292 #endif
10293 #if CYTHON_AVOID_BORROWED_REFS
10294 Py_INCREF(exc_type);
10295 #endif
10296 if (unlikely(PyTuple_Check(err))) {
10297 result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
10298 } else {
10299 result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
10300 }
10301 #if CYTHON_AVOID_BORROWED_REFS
10302 Py_DECREF(exc_type);
10303 #endif
10304 return result;
10305 }
10306 #endif
10307
10308 /* PyErrFetchRestore */
10309 #if CYTHON_FAST_THREAD_STATE
10310 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
10311 #if PY_VERSION_HEX >= 0x030C00A6
10312 PyObject *tmp_value;
10313 assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
10314 if (value) {
10315 #if CYTHON_COMPILING_IN_CPYTHON
10316 if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
10317 #endif
10318 PyException_SetTraceback(value, tb);
10319 }
10320 tmp_value = tstate->current_exception;
10321 tstate->current_exception = value;
10322 Py_XDECREF(tmp_value);
10323 Py_XDECREF(type);
10324 Py_XDECREF(tb);
10325 #else
10326 PyObject *tmp_type, *tmp_value, *tmp_tb;
10327 tmp_type = tstate->curexc_type;
10328 tmp_value = tstate->curexc_value;
10329 tmp_tb = tstate->curexc_traceback;
10330 tstate->curexc_type = type;
10331 tstate->curexc_value = value;
10332 tstate->curexc_traceback = tb;
10333 Py_XDECREF(tmp_type);
10334 Py_XDECREF(tmp_value);
10335 Py_XDECREF(tmp_tb);
10336 #endif
10337 }
10338 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
10339 #if PY_VERSION_HEX >= 0x030C00A6
10340 PyObject* exc_value;
10341 exc_value = tstate->current_exception;
10342 tstate->current_exception = 0;
10343 *value = exc_value;
10344 *type = NULL;
10345 *tb = NULL;
10346 if (exc_value) {
10347 *type = (PyObject*) Py_TYPE(exc_value);
10348 Py_INCREF(*type);
10349 #if CYTHON_COMPILING_IN_CPYTHON
10350 *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
10351 Py_XINCREF(*tb);
10352 #else
10353 *tb = PyException_GetTraceback(exc_value);
10354 #endif
10355 }
10356 #else
10357 *type = tstate->curexc_type;
10358 *value = tstate->curexc_value;
10359 *tb = tstate->curexc_traceback;
10360 tstate->curexc_type = 0;
10361 tstate->curexc_value = 0;
10362 tstate->curexc_traceback = 0;
10363 #endif
10364 }
10365 #endif
10366
10367 /* PyObjectGetAttrStr */
10368 #if CYTHON_USE_TYPE_SLOTS
10369 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
10370 PyTypeObject* tp = Py_TYPE(obj);
10371 if (likely(tp->tp_getattro))
10372 return tp->tp_getattro(obj, attr_name);
10373 #if PY_MAJOR_VERSION < 3
10374 if (likely(tp->tp_getattr))
10375 return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
10376 #endif
10377 return PyObject_GetAttr(obj, attr_name);
10378 }
10379 #endif
10380
10381 /* PyObjectGetAttrStrNoError */
10382 #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
10383 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
10384 __Pyx_PyThreadState_declare
10385 __Pyx_PyThreadState_assign
10386 if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
10387 __Pyx_PyErr_Clear();
10388 }
10389 #endif
10390 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
10391 PyObject *result;
10392 #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
10393 (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
10394 return result;
10395 #else
10396 #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
10397 PyTypeObject* tp = Py_TYPE(obj);
10398 if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
10399 return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
10400 }
10401 #endif
10402 result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
10403 if (unlikely(!result)) {
10404 __Pyx_PyObject_GetAttrStr_ClearAttributeError();
10405 }
10406 return result;
10407 #endif
10408 }
10409
10410 /* GetBuiltinName */
10411 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
10412 PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name);
10413 if (unlikely(!result) && !PyErr_Occurred()) {
10414 PyErr_Format(PyExc_NameError,
10415 #if PY_MAJOR_VERSION >= 3
10416 "name '%U' is not defined", name);
10417 #else
10418 "name '%.200s' is not defined", PyString_AS_STRING(name));
10419 #endif
10420 }
10421 return result;
10422 }
10423
10424 /* TupleAndListFromArray */
10425 #if CYTHON_COMPILING_IN_CPYTHON
10426 static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
10427 PyObject *v;
10428 Py_ssize_t i;
10429 for (i = 0; i < length; i++) {
10430 v = dest[i] = src[i];
10431 Py_INCREF(v);
10432 }
10433 }
10434 static CYTHON_INLINE PyObject *
10435 __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
10436 {
10437 PyObject *res;
10438 if (n <= 0) {
10439 Py_INCREF(__pyx_empty_tuple);
10440 return __pyx_empty_tuple;
10441 }
10442 res = PyTuple_New(n);
10443 if (unlikely(res == NULL)) return NULL;
10444 __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
10445 return res;
10446 }
10447 static CYTHON_INLINE PyObject *
10448 __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
10449 {
10450 PyObject *res;
10451 if (n <= 0) {
10452 return PyList_New(0);
10453 }
10454 res = PyList_New(n);
10455 if (unlikely(res == NULL)) return NULL;
10456 __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
10457 return res;
10458 }
10459 #endif
10460
10461 /* BytesEquals */
10462 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
10463 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
10464 return PyObject_RichCompareBool(s1, s2, equals);
10465 #else
10466 if (s1 == s2) {
10467 return (equals == Py_EQ);
10468 } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
10469 const char *ps1, *ps2;
10470 Py_ssize_t length = PyBytes_GET_SIZE(s1);
10471 if (length != PyBytes_GET_SIZE(s2))
10472 return (equals == Py_NE);
10473 ps1 = PyBytes_AS_STRING(s1);
10474 ps2 = PyBytes_AS_STRING(s2);
10475 if (ps1[0] != ps2[0]) {
10476 return (equals == Py_NE);
10477 } else if (length == 1) {
10478 return (equals == Py_EQ);
10479 } else {
10480 int result;
10481 #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
10482 Py_hash_t hash1, hash2;
10483 hash1 = ((PyBytesObject*)s1)->ob_shash;
10484 hash2 = ((PyBytesObject*)s2)->ob_shash;
10485 if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
10486 return (equals == Py_NE);
10487 }
10488 #endif
10489 result = memcmp(ps1, ps2, (size_t)length);
10490 return (equals == Py_EQ) ? (result == 0) : (result != 0);
10491 }
10492 } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
10493 return (equals == Py_NE);
10494 } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
10495 return (equals == Py_NE);
10496 } else {
10497 int result;
10498 PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
10499 if (!py_result)
10500 return -1;
10501 result = __Pyx_PyObject_IsTrue(py_result);
10502 Py_DECREF(py_result);
10503 return result;
10504 }
10505 #endif
10506 }
10507
10508 /* UnicodeEquals */
10509 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
10510 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
10511 return PyObject_RichCompareBool(s1, s2, equals);
10512 #else
10513 #if PY_MAJOR_VERSION < 3
10514 PyObject* owned_ref = NULL;
10515 #endif
10516 int s1_is_unicode, s2_is_unicode;
10517 if (s1 == s2) {
10518 goto return_eq;
10519 }
10520 s1_is_unicode = PyUnicode_CheckExact(s1);
10521 s2_is_unicode = PyUnicode_CheckExact(s2);
10522 #if PY_MAJOR_VERSION < 3
10523 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
10524 owned_ref = PyUnicode_FromObject(s2);
10525 if (unlikely(!owned_ref))
10526 return -1;
10527 s2 = owned_ref;
10528 s2_is_unicode = 1;
10529 } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
10530 owned_ref = PyUnicode_FromObject(s1);
10531 if (unlikely(!owned_ref))
10532 return -1;
10533 s1 = owned_ref;
10534 s1_is_unicode = 1;
10535 } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
10536 return __Pyx_PyBytes_Equals(s1, s2, equals);
10537 }
10538 #endif
10539 if (s1_is_unicode & s2_is_unicode) {
10540 Py_ssize_t length;
10541 int kind;
10542 void *data1, *data2;
10543 if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
10544 return -1;
10545 length = __Pyx_PyUnicode_GET_LENGTH(s1);
10546 if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
10547 goto return_ne;
10548 }
10549 #if CYTHON_USE_UNICODE_INTERNALS
10550 {
10551 Py_hash_t hash1, hash2;
10552 #if CYTHON_PEP393_ENABLED
10553 hash1 = ((PyASCIIObject*)s1)->hash;
10554 hash2 = ((PyASCIIObject*)s2)->hash;
10555 #else
10556 hash1 = ((PyUnicodeObject*)s1)->hash;
10557 hash2 = ((PyUnicodeObject*)s2)->hash;
10558 #endif
10559 if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
10560 goto return_ne;
10561 }
10562 }
10563 #endif
10564 kind = __Pyx_PyUnicode_KIND(s1);
10565 if (kind != __Pyx_PyUnicode_KIND(s2)) {
10566 goto return_ne;
10567 }
10568 data1 = __Pyx_PyUnicode_DATA(s1);
10569 data2 = __Pyx_PyUnicode_DATA(s2);
10570 if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
10571 goto return_ne;
10572 } else if (length == 1) {
10573 goto return_eq;
10574 } else {
10575 int result = memcmp(data1, data2, (size_t)(length * kind));
10576 #if PY_MAJOR_VERSION < 3
10577 Py_XDECREF(owned_ref);
10578 #endif
10579 return (equals == Py_EQ) ? (result == 0) : (result != 0);
10580 }
10581 } else if ((s1 == Py_None) & s2_is_unicode) {
10582 goto return_ne;
10583 } else if ((s2 == Py_None) & s1_is_unicode) {
10584 goto return_ne;
10585 } else {
10586 int result;
10587 PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
10588 #if PY_MAJOR_VERSION < 3
10589 Py_XDECREF(owned_ref);
10590 #endif
10591 if (!py_result)
10592 return -1;
10593 result = __Pyx_PyObject_IsTrue(py_result);
10594 Py_DECREF(py_result);
10595 return result;
10596 }
10597 return_eq:
10598 #if PY_MAJOR_VERSION < 3
10599 Py_XDECREF(owned_ref);
10600 #endif
10601 return (equals == Py_EQ);
10602 return_ne:
10603 #if PY_MAJOR_VERSION < 3
10604 Py_XDECREF(owned_ref);
10605 #endif
10606 return (equals == Py_NE);
10607 #endif
10608 }
10609
10610 /* fastcall */
10611 #if CYTHON_METH_FASTCALL
10612 static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
10613 {
10614 Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames);
10615 for (i = 0; i < n; i++)
10616 {
10617 if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i];
10618 }
10619 for (i = 0; i < n; i++)
10620 {
10621 int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ);
10622 if (unlikely(eq != 0)) {
10623 if (unlikely(eq < 0)) return NULL;
10624 return kwvalues[i];
10625 }
10626 }
10627 return NULL;
10628 }
10629 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
10630 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
10631 Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames);
10632 PyObject *dict;
10633 dict = PyDict_New();
10634 if (unlikely(!dict))
10635 return NULL;
10636 for (i=0; i<nkwargs; i++) {
10637 PyObject *key = PyTuple_GET_ITEM(kwnames, i);
10638 if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
10639 goto bad;
10640 }
10641 return dict;
10642 bad:
10643 Py_DECREF(dict);
10644 return NULL;
10645 }
10646 #endif
10647 #endif
10648
10649 /* RaiseDoubleKeywords */
10650 static void __Pyx_RaiseDoubleKeywordsError(
10651 const char* func_name,
10652 PyObject* kw_name)
10653 {
10654 PyErr_Format(PyExc_TypeError,
10655 #if PY_MAJOR_VERSION >= 3
10656 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
10657 #else
10658 "%s() got multiple values for keyword argument '%s'", func_name,
10659 PyString_AsString(kw_name));
10660 #endif
10661 }
10662
10663 /* ParseKeywords */
10664 static int __Pyx_ParseOptionalKeywords(
10665 PyObject *kwds,
10666 PyObject *const *kwvalues,
10667 PyObject **argnames[],
10668 PyObject *kwds2,
10669 PyObject *values[],
10670 Py_ssize_t num_pos_args,
10671 const char* function_name)
10672 {
10673 PyObject *key = 0, *value = 0;
10674 Py_ssize_t pos = 0;
10675 PyObject*** name;
10676 PyObject*** first_kw_arg = argnames + num_pos_args;
10677 int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds));
10678 while (1) {
10679 Py_XDECREF(key); key = NULL;
10680 Py_XDECREF(value); value = NULL;
10681 if (kwds_is_tuple) {
10682 Py_ssize_t size;
10683 #if CYTHON_ASSUME_SAFE_MACROS
10684 size = PyTuple_GET_SIZE(kwds);
10685 #else
10686 size = PyTuple_Size(kwds);
10687 if (size < 0) goto bad;
10688 #endif
10689 if (pos >= size) break;
10690 #if CYTHON_AVOID_BORROWED_REFS
10691 key = __Pyx_PySequence_ITEM(kwds, pos);
10692 if (!key) goto bad;
10693 #elif CYTHON_ASSUME_SAFE_MACROS
10694 key = PyTuple_GET_ITEM(kwds, pos);
10695 #else
10696 key = PyTuple_GetItem(kwds, pos);
10697 if (!key) goto bad;
10698 #endif
10699 value = kwvalues[pos];
10700 pos++;
10701 }
10702 else
10703 {
10704 if (!PyDict_Next(kwds, &pos, &key, &value)) break;
10705 #if CYTHON_AVOID_BORROWED_REFS
10706 Py_INCREF(key);
10707 #endif
10708 }
10709 name = first_kw_arg;
10710 while (*name && (**name != key)) name++;
10711 if (*name) {
10712 values[name-argnames] = value;
10713 #if CYTHON_AVOID_BORROWED_REFS
10714 Py_INCREF(value);
10715 Py_DECREF(key);
10716 #endif
10717 key = NULL;
10718 value = NULL;
10719 continue;
10720 }
10721 #if !CYTHON_AVOID_BORROWED_REFS
10722 Py_INCREF(key);
10723 #endif
10724 Py_INCREF(value);
10725 name = first_kw_arg;
10726 #if PY_MAJOR_VERSION < 3
10727 if (likely(PyString_Check(key))) {
10728 while (*name) {
10729 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
10730 && _PyString_Eq(**name, key)) {
10731 values[name-argnames] = value;
10732 #if CYTHON_AVOID_BORROWED_REFS
10733 value = NULL;
10734 #endif
10735 break;
10736 }
10737 name++;
10738 }
10739 if (*name) continue;
10740 else {
10741 PyObject*** argname = argnames;
10742 while (argname != first_kw_arg) {
10743 if ((**argname == key) || (
10744 (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
10745 && _PyString_Eq(**argname, key))) {
10746 goto arg_passed_twice;
10747 }
10748 argname++;
10749 }
10750 }
10751 } else
10752 #endif
10753 if (likely(PyUnicode_Check(key))) {
10754 while (*name) {
10755 int cmp = (
10756 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
10757 (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
10758 #endif
10759 PyUnicode_Compare(**name, key)
10760 );
10761 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
10762 if (cmp == 0) {
10763 values[name-argnames] = value;
10764 #if CYTHON_AVOID_BORROWED_REFS
10765 value = NULL;
10766 #endif
10767 break;
10768 }
10769 name++;
10770 }
10771 if (*name) continue;
10772 else {
10773 PyObject*** argname = argnames;
10774 while (argname != first_kw_arg) {
10775 int cmp = (**argname == key) ? 0 :
10776 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
10777 (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
10778 #endif
10779 PyUnicode_Compare(**argname, key);
10780 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
10781 if (cmp == 0) goto arg_passed_twice;
10782 argname++;
10783 }
10784 }
10785 } else
10786 goto invalid_keyword_type;
10787 if (kwds2) {
10788 if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
10789 } else {
10790 goto invalid_keyword;
10791 }
10792 }
10793 Py_XDECREF(key);
10794 Py_XDECREF(value);
10795 return 0;
10796 arg_passed_twice:
10797 __Pyx_RaiseDoubleKeywordsError(function_name, key);
10798 goto bad;
10799 invalid_keyword_type:
10800 PyErr_Format(PyExc_TypeError,
10801 "%.200s() keywords must be strings", function_name);
10802 goto bad;
10803 invalid_keyword:
10804 #if PY_MAJOR_VERSION < 3
10805 PyErr_Format(PyExc_TypeError,
10806 "%.200s() got an unexpected keyword argument '%.200s'",
10807 function_name, PyString_AsString(key));
10808 #else
10809 PyErr_Format(PyExc_TypeError,
10810 "%s() got an unexpected keyword argument '%U'",
10811 function_name, key);
10812 #endif
10813 bad:
10814 Py_XDECREF(key);
10815 Py_XDECREF(value);
10816 return -1;
10817 }
10818
10819 /* RaiseArgTupleInvalid */
10820 static void __Pyx_RaiseArgtupleInvalid(
10821 const char* func_name,
10822 int exact,
10823 Py_ssize_t num_min,
10824 Py_ssize_t num_max,
10825 Py_ssize_t num_found)
10826 {
10827 Py_ssize_t num_expected;
10828 const char *more_or_less;
10829 if (num_found < num_min) {
10830 num_expected = num_min;
10831 more_or_less = "at least";
10832 } else {
10833 num_expected = num_max;
10834 more_or_less = "at most";
10835 }
10836 if (exact) {
10837 more_or_less = "exactly";
10838 }
10839 PyErr_Format(PyExc_TypeError,
10840 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
10841 func_name, more_or_less, num_expected,
10842 (num_expected == 1) ? "" : "s", num_found);
10843 }
10844
10845 /* KeywordStringCheck */
10846 static int __Pyx_CheckKeywordStrings(
10847 PyObject *kw,
10848 const char* function_name,
10849 int kw_allowed)
10850 {
10851 PyObject* key = 0;
10852 Py_ssize_t pos = 0;
10853 #if CYTHON_COMPILING_IN_PYPY
10854 if (!kw_allowed && PyDict_Next(kw, &pos, &key, 0))
10855 goto invalid_keyword;
10856 return 1;
10857 #else
10858 if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) {
10859 Py_ssize_t kwsize;
10860 #if CYTHON_ASSUME_SAFE_MACROS
10861 kwsize = PyTuple_GET_SIZE(kw);
10862 #else
10863 kwsize = PyTuple_Size(kw);
10864 if (kwsize < 0) return 0;
10865 #endif
10866 if (unlikely(kwsize == 0))
10867 return 1;
10868 if (!kw_allowed) {
10869 #if CYTHON_ASSUME_SAFE_MACROS
10870 key = PyTuple_GET_ITEM(kw, 0);
10871 #else
10872 key = PyTuple_GetItem(kw, pos);
10873 if (!key) return 0;
10874 #endif
10875 goto invalid_keyword;
10876 }
10877 #if PY_VERSION_HEX < 0x03090000
10878 for (pos = 0; pos < kwsize; pos++) {
10879 #if CYTHON_ASSUME_SAFE_MACROS
10880 key = PyTuple_GET_ITEM(kw, pos);
10881 #else
10882 key = PyTuple_GetItem(kw, pos);
10883 if (!key) return 0;
10884 #endif
10885 if (unlikely(!PyUnicode_Check(key)))
10886 goto invalid_keyword_type;
10887 }
10888 #endif
10889 return 1;
10890 }
10891 while (PyDict_Next(kw, &pos, &key, 0)) {
10892 #if PY_MAJOR_VERSION < 3
10893 if (unlikely(!PyString_Check(key)))
10894 #endif
10895 if (unlikely(!PyUnicode_Check(key)))
10896 goto invalid_keyword_type;
10897 }
10898 if (!kw_allowed && unlikely(key))
10899 goto invalid_keyword;
10900 return 1;
10901 invalid_keyword_type:
10902 PyErr_Format(PyExc_TypeError,
10903 "%.200s() keywords must be strings", function_name);
10904 return 0;
10905 #endif
10906 invalid_keyword:
10907 #if PY_MAJOR_VERSION < 3
10908 PyErr_Format(PyExc_TypeError,
10909 "%.200s() got an unexpected keyword argument '%.200s'",
10910 function_name, PyString_AsString(key));
10911 #else
10912 PyErr_Format(PyExc_TypeError,
10913 "%s() got an unexpected keyword argument '%U'",
10914 function_name, key);
10915 #endif
10916 return 0;
10917 }
10918
10919 /* PyDictVersioning */
10920 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
10921 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
10922 PyObject *dict = Py_TYPE(obj)->tp_dict;
10923 return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
10924 }
10925 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
10926 PyObject **dictptr = NULL;
10927 Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
10928 if (offset) {
10929 #if CYTHON_COMPILING_IN_CPYTHON
10930 dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
10931 #else
10932 dictptr = _PyObject_GetDictPtr(obj);
10933 #endif
10934 }
10935 return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
10936 }
10937 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
10938 PyObject *dict = Py_TYPE(obj)->tp_dict;
10939 if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
10940 return 0;
10941 return obj_dict_version == __Pyx_get_object_dict_version(obj);
10942 }
10943 #endif
10944
10945 /* GetModuleGlobalName */
10946 #if CYTHON_USE_DICT_VERSIONS
10947 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
10948 #else
10949 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
10950 #endif
10951 {
10952 PyObject *result;
10953 #if !CYTHON_AVOID_BORROWED_REFS
10954 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000
10955 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
10956 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
10957 if (likely(result)) {
10958 return __Pyx_NewRef(result);
10959 } else if (unlikely(PyErr_Occurred())) {
10960 return NULL;
10961 }
10962 #elif CYTHON_COMPILING_IN_LIMITED_API
10963 if (unlikely(!__pyx_m)) {
10964 return NULL;
10965 }
10966 result = PyObject_GetAttr(__pyx_m, name);
10967 if (likely(result)) {
10968 return result;
10969 }
10970 #else
10971 result = PyDict_GetItem(__pyx_d, name);
10972 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
10973 if (likely(result)) {
10974 return __Pyx_NewRef(result);
10975 }
10976 #endif
10977 #else
10978 result = PyObject_GetItem(__pyx_d, name);
10979 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
10980 if (likely(result)) {
10981 return __Pyx_NewRef(result);
10982 }
10983 PyErr_Clear();
10984 #endif
10985 return __Pyx_GetBuiltinName(name);
10986 }
10987
10988 /* RaiseException */
10989 #if PY_MAJOR_VERSION < 3
10990 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
10991 __Pyx_PyThreadState_declare
10992 CYTHON_UNUSED_VAR(cause);
10993 Py_XINCREF(type);
10994 if (!value || value == Py_None)
10995 value = NULL;
10996 else
10997 Py_INCREF(value);
10998 if (!tb || tb == Py_None)
10999 tb = NULL;
11000 else {
11001 Py_INCREF(tb);
11002 if (!PyTraceBack_Check(tb)) {
11003 PyErr_SetString(PyExc_TypeError,
11004 "raise: arg 3 must be a traceback or None");
11005 goto raise_error;
11006 }
11007 }
11008 if (PyType_Check(type)) {
11009 #if CYTHON_COMPILING_IN_PYPY
11010 if (!value) {
11011 Py_INCREF(Py_None);
11012 value = Py_None;
11013 }
11014 #endif
11015 PyErr_NormalizeException(&type, &value, &tb);
11016 } else {
11017 if (value) {
11018 PyErr_SetString(PyExc_TypeError,
11019 "instance exception may not have a separate value");
11020 goto raise_error;
11021 }
11022 value = type;
11023 type = (PyObject*) Py_TYPE(type);
11024 Py_INCREF(type);
11025 if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
11026 PyErr_SetString(PyExc_TypeError,
11027 "raise: exception class must be a subclass of BaseException");
11028 goto raise_error;
11029 }
11030 }
11031 __Pyx_PyThreadState_assign
11032 __Pyx_ErrRestore(type, value, tb);
11033 return;
11034 raise_error:
11035 Py_XDECREF(value);
11036 Py_XDECREF(type);
11037 Py_XDECREF(tb);
11038 return;
11039 }
11040 #else
11041 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
11042 PyObject* owned_instance = NULL;
11043 if (tb == Py_None) {
11044 tb = 0;
11045 } else if (tb && !PyTraceBack_Check(tb)) {
11046 PyErr_SetString(PyExc_TypeError,
11047 "raise: arg 3 must be a traceback or None");
11048 goto bad;
11049 }
11050 if (value == Py_None)
11051 value = 0;
11052 if (PyExceptionInstance_Check(type)) {
11053 if (value) {
11054 PyErr_SetString(PyExc_TypeError,
11055 "instance exception may not have a separate value");
11056 goto bad;
11057 }
11058 value = type;
11059 type = (PyObject*) Py_TYPE(value);
11060 } else if (PyExceptionClass_Check(type)) {
11061 PyObject *instance_class = NULL;
11062 if (value && PyExceptionInstance_Check(value)) {
11063 instance_class = (PyObject*) Py_TYPE(value);
11064 if (instance_class != type) {
11065 int is_subclass = PyObject_IsSubclass(instance_class, type);
11066 if (!is_subclass) {
11067 instance_class = NULL;
11068 } else if (unlikely(is_subclass == -1)) {
11069 goto bad;
11070 } else {
11071 type = instance_class;
11072 }
11073 }
11074 }
11075 if (!instance_class) {
11076 PyObject *args;
11077 if (!value)
11078 args = PyTuple_New(0);
11079 else if (PyTuple_Check(value)) {
11080 Py_INCREF(value);
11081 args = value;
11082 } else
11083 args = PyTuple_Pack(1, value);
11084 if (!args)
11085 goto bad;
11086 owned_instance = PyObject_Call(type, args, NULL);
11087 Py_DECREF(args);
11088 if (!owned_instance)
11089 goto bad;
11090 value = owned_instance;
11091 if (!PyExceptionInstance_Check(value)) {
11092 PyErr_Format(PyExc_TypeError,
11093 "calling %R should have returned an instance of "
11094 "BaseException, not %R",
11095 type, Py_TYPE(value));
11096 goto bad;
11097 }
11098 }
11099 } else {
11100 PyErr_SetString(PyExc_TypeError,
11101 "raise: exception class must be a subclass of BaseException");
11102 goto bad;
11103 }
11104 if (cause) {
11105 PyObject *fixed_cause;
11106 if (cause == Py_None) {
11107 fixed_cause = NULL;
11108 } else if (PyExceptionClass_Check(cause)) {
11109 fixed_cause = PyObject_CallObject(cause, NULL);
11110 if (fixed_cause == NULL)
11111 goto bad;
11112 } else if (PyExceptionInstance_Check(cause)) {
11113 fixed_cause = cause;
11114 Py_INCREF(fixed_cause);
11115 } else {
11116 PyErr_SetString(PyExc_TypeError,
11117 "exception causes must derive from "
11118 "BaseException");
11119 goto bad;
11120 }
11121 PyException_SetCause(value, fixed_cause);
11122 }
11123 PyErr_SetObject(type, value);
11124 if (tb) {
11125 #if PY_VERSION_HEX >= 0x030C00A6
11126 PyException_SetTraceback(value, tb);
11127 #elif CYTHON_FAST_THREAD_STATE
11128 PyThreadState *tstate = __Pyx_PyThreadState_Current;
11129 PyObject* tmp_tb = tstate->curexc_traceback;
11130 if (tb != tmp_tb) {
11131 Py_INCREF(tb);
11132 tstate->curexc_traceback = tb;
11133 Py_XDECREF(tmp_tb);
11134 }
11135 #else
11136 PyObject *tmp_type, *tmp_value, *tmp_tb;
11137 PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
11138 Py_INCREF(tb);
11139 PyErr_Restore(tmp_type, tmp_value, tb);
11140 Py_XDECREF(tmp_tb);
11141 #endif
11142 }
11143 bad:
11144 Py_XDECREF(owned_instance);
11145 return;
11146 }
11147 #endif
11148
11149 /* PyFunctionFastCall */
11150 #if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL
11151 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
11152 PyObject *globals) {
11153 PyFrameObject *f;
11154 PyThreadState *tstate = __Pyx_PyThreadState_Current;
11155 PyObject **fastlocals;
11156 Py_ssize_t i;
11157 PyObject *result;
11158 assert(globals != NULL);
11159 /* XXX Perhaps we should create a specialized
11160 PyFrame_New() that doesn't take locals, but does
11161 take builtins without sanity checking them.
11162 */
11163 assert(tstate != NULL);
11164 f = PyFrame_New(tstate, co, globals, NULL);
11165 if (f == NULL) {
11166 return NULL;
11167 }
11168 fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
11169 for (i = 0; i < na; i++) {
11170 Py_INCREF(*args);
11171 fastlocals[i] = *args++;
11172 }
11173 result = PyEval_EvalFrameEx(f,0);
11174 ++tstate->recursion_depth;
11175 Py_DECREF(f);
11176 --tstate->recursion_depth;
11177 return result;
11178 }
11179 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
11180 PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
11181 PyObject *globals = PyFunction_GET_GLOBALS(func);
11182 PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
11183 PyObject *closure;
11184 #if PY_MAJOR_VERSION >= 3
11185 PyObject *kwdefs;
11186 #endif
11187 PyObject *kwtuple, **k;
11188 PyObject **d;
11189 Py_ssize_t nd;
11190 Py_ssize_t nk;
11191 PyObject *result;
11192 assert(kwargs == NULL || PyDict_Check(kwargs));
11193 nk = kwargs ? PyDict_Size(kwargs) : 0;
11194 #if PY_MAJOR_VERSION < 3
11195 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) {
11196 return NULL;
11197 }
11198 #else
11199 if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) {
11200 return NULL;
11201 }
11202 #endif
11203 if (
11204 #if PY_MAJOR_VERSION >= 3
11205 co->co_kwonlyargcount == 0 &&
11206 #endif
11207 likely(kwargs == NULL || nk == 0) &&
11208 co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
11209 if (argdefs == NULL && co->co_argcount == nargs) {
11210 result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
11211 goto done;
11212 }
11213 else if (nargs == 0 && argdefs != NULL
11214 && co->co_argcount == Py_SIZE(argdefs)) {
11215 /* function called with no arguments, but all parameters have
11216 a default value: use default values as arguments .*/
11217 args = &PyTuple_GET_ITEM(argdefs, 0);
11218 result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
11219 goto done;
11220 }
11221 }
11222 if (kwargs != NULL) {
11223 Py_ssize_t pos, i;
11224 kwtuple = PyTuple_New(2 * nk);
11225 if (kwtuple == NULL) {
11226 result = NULL;
11227 goto done;
11228 }
11229 k = &PyTuple_GET_ITEM(kwtuple, 0);
11230 pos = i = 0;
11231 while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
11232 Py_INCREF(k[i]);
11233 Py_INCREF(k[i+1]);
11234 i += 2;
11235 }
11236 nk = i / 2;
11237 }
11238 else {
11239 kwtuple = NULL;
11240 k = NULL;
11241 }
11242 closure = PyFunction_GET_CLOSURE(func);
11243 #if PY_MAJOR_VERSION >= 3
11244 kwdefs = PyFunction_GET_KW_DEFAULTS(func);
11245 #endif
11246 if (argdefs != NULL) {
11247 d = &PyTuple_GET_ITEM(argdefs, 0);
11248 nd = Py_SIZE(argdefs);
11249 }
11250 else {
11251 d = NULL;
11252 nd = 0;
11253 }
11254 #if PY_MAJOR_VERSION >= 3
11255 result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
11256 args, (int)nargs,
11257 k, (int)nk,
11258 d, (int)nd, kwdefs, closure);
11259 #else
11260 result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
11261 args, (int)nargs,
11262 k, (int)nk,
11263 d, (int)nd, closure);
11264 #endif
11265 Py_XDECREF(kwtuple);
11266 done:
11267 Py_LeaveRecursiveCall();
11268 return result;
11269 }
11270 #endif
11271
11272 /* PyObjectCall */
11273 #if CYTHON_COMPILING_IN_CPYTHON
11274 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
11275 PyObject *result;
11276 ternaryfunc call = Py_TYPE(func)->tp_call;
11277 if (unlikely(!call))
11278 return PyObject_Call(func, arg, kw);
11279 #if PY_MAJOR_VERSION < 3
11280 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
11281 return NULL;
11282 #else
11283 if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
11284 return NULL;
11285 #endif
11286 result = (*call)(func, arg, kw);
11287 Py_LeaveRecursiveCall();
11288 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
11289 PyErr_SetString(
11290 PyExc_SystemError,
11291 "NULL result without error in PyObject_Call");
11292 }
11293 return result;
11294 }
11295 #endif
11296
11297 /* PyObjectCallMethO */
11298 #if CYTHON_COMPILING_IN_CPYTHON
11299 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
11300 PyObject *self, *result;
11301 PyCFunction cfunc;
11302 cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
11303 self = __Pyx_CyOrPyCFunction_GET_SELF(func);
11304 #if PY_MAJOR_VERSION < 3
11305 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
11306 return NULL;
11307 #else
11308 if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
11309 return NULL;
11310 #endif
11311 result = cfunc(self, arg);
11312 Py_LeaveRecursiveCall();
11313 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
11314 PyErr_SetString(
11315 PyExc_SystemError,
11316 "NULL result without error in PyObject_Call");
11317 }
11318 return result;
11319 }
11320 #endif
11321
11322 /* PyObjectFastCall */
11323 #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
11324 static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) {
11325 PyObject *argstuple;
11326 PyObject *result = 0;
11327 size_t i;
11328 argstuple = PyTuple_New((Py_ssize_t)nargs);
11329 if (unlikely(!argstuple)) return NULL;
11330 for (i = 0; i < nargs; i++) {
11331 Py_INCREF(args[i]);
11332 if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) < 0) goto bad;
11333 }
11334 result = __Pyx_PyObject_Call(func, argstuple, kwargs);
11335 bad:
11336 Py_DECREF(argstuple);
11337 return result;
11338 }
11339 #endif
11340 static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) {
11341 Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
11342 #if CYTHON_COMPILING_IN_CPYTHON
11343 if (nargs == 0 && kwargs == NULL) {
11344 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
11345 return __Pyx_PyObject_CallMethO(func, NULL);
11346 }
11347 else if (nargs == 1 && kwargs == NULL) {
11348 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
11349 return __Pyx_PyObject_CallMethO(func, args[0]);
11350 }
11351 #endif
11352 #if PY_VERSION_HEX < 0x030800B1
11353 #if CYTHON_FAST_PYCCALL
11354 if (PyCFunction_Check(func)) {
11355 if (kwargs) {
11356 return _PyCFunction_FastCallDict(func, args, nargs, kwargs);
11357 } else {
11358 return _PyCFunction_FastCallKeywords(func, args, nargs, NULL);
11359 }
11360 }
11361 #if PY_VERSION_HEX >= 0x030700A1
11362 if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) {
11363 return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL);
11364 }
11365 #endif
11366 #endif
11367 #if CYTHON_FAST_PYCALL
11368 if (PyFunction_Check(func)) {
11369 return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs);
11370 }
11371 #endif
11372 #endif
11373 if (kwargs == NULL) {
11374 #if CYTHON_VECTORCALL
11375 #if PY_VERSION_HEX < 0x03090000
11376 vectorcallfunc f = _PyVectorcall_Function(func);
11377 #else
11378 vectorcallfunc f = PyVectorcall_Function(func);
11379 #endif
11380 if (f) {
11381 return f(func, args, (size_t)nargs, NULL);
11382 }
11383 #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
11384 if (__Pyx_CyFunction_CheckExact(func)) {
11385 __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
11386 if (f) return f(func, args, (size_t)nargs, NULL);
11387 }
11388 #endif
11389 }
11390 if (nargs == 0) {
11391 return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs);
11392 }
11393 #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
11394 return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
11395 #else
11396 return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
11397 #endif
11398 }
11399
11400 /* PyObjectCallOneArg */
11401 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
11402 PyObject *args[2] = {NULL, arg};
11403 return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
11404 }
11405
11406 /* ArgTypeTest */
11407 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
11408 {
11409 __Pyx_TypeName type_name;
11410 __Pyx_TypeName obj_type_name;
11411 if (unlikely(!type)) {
11412 PyErr_SetString(PyExc_SystemError, "Missing type object");
11413 return 0;
11414 }
11415 else if (exact) {
11416 #if PY_MAJOR_VERSION == 2
11417 if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
11418 #endif
11419 }
11420 else {
11421 if (likely(__Pyx_TypeCheck(obj, type))) return 1;
11422 }
11423 type_name = __Pyx_PyType_GetName(type);
11424 obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
11425 PyErr_Format(PyExc_TypeError,
11426 "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
11427 ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name);
11428 __Pyx_DECREF_TypeName(type_name);
11429 __Pyx_DECREF_TypeName(obj_type_name);
11430 return 0;
11431 }
11432
11433 /* GetException */
11434 #if CYTHON_FAST_THREAD_STATE
11435 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
11436 #else
11437 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
11438 #endif
11439 {
11440 PyObject *local_type = NULL, *local_value, *local_tb = NULL;
11441 #if CYTHON_FAST_THREAD_STATE
11442 PyObject *tmp_type, *tmp_value, *tmp_tb;
11443 #if PY_VERSION_HEX >= 0x030C00A6
11444 local_value = tstate->current_exception;
11445 tstate->current_exception = 0;
11446 if (likely(local_value)) {
11447 local_type = (PyObject*) Py_TYPE(local_value);
11448 Py_INCREF(local_type);
11449 local_tb = PyException_GetTraceback(local_value);
11450 }
11451 #else
11452 local_type = tstate->curexc_type;
11453 local_value = tstate->curexc_value;
11454 local_tb = tstate->curexc_traceback;
11455 tstate->curexc_type = 0;
11456 tstate->curexc_value = 0;
11457 tstate->curexc_traceback = 0;
11458 #endif
11459 #else
11460 PyErr_Fetch(&local_type, &local_value, &local_tb);
11461 #endif
11462 PyErr_NormalizeException(&local_type, &local_value, &local_tb);
11463 #if CYTHON_FAST_THREAD_STATE && PY_VERSION_HEX >= 0x030C00A6
11464 if (unlikely(tstate->current_exception))
11465 #elif CYTHON_FAST_THREAD_STATE
11466 if (unlikely(tstate->curexc_type))
11467 #else
11468 if (unlikely(PyErr_Occurred()))
11469 #endif
11470 goto bad;
11471 #if PY_MAJOR_VERSION >= 3
11472 if (local_tb) {
11473 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
11474 goto bad;
11475 }
11476 #endif
11477 Py_XINCREF(local_tb);
11478 Py_XINCREF(local_type);
11479 Py_XINCREF(local_value);
11480 *type = local_type;
11481 *value = local_value;
11482 *tb = local_tb;
11483 #if CYTHON_FAST_THREAD_STATE
11484 #if CYTHON_USE_EXC_INFO_STACK
11485 {
11486 _PyErr_StackItem *exc_info = tstate->exc_info;
11487 #if PY_VERSION_HEX >= 0x030B00a4
11488 tmp_value = exc_info->exc_value;
11489 exc_info->exc_value = local_value;
11490 tmp_type = NULL;
11491 tmp_tb = NULL;
11492 Py_XDECREF(local_type);
11493 Py_XDECREF(local_tb);
11494 #else
11495 tmp_type = exc_info->exc_type;
11496 tmp_value = exc_info->exc_value;
11497 tmp_tb = exc_info->exc_traceback;
11498 exc_info->exc_type = local_type;
11499 exc_info->exc_value = local_value;
11500 exc_info->exc_traceback = local_tb;
11501 #endif
11502 }
11503 #else
11504 tmp_type = tstate->exc_type;
11505 tmp_value = tstate->exc_value;
11506 tmp_tb = tstate->exc_traceback;
11507 tstate->exc_type = local_type;
11508 tstate->exc_value = local_value;
11509 tstate->exc_traceback = local_tb;
11510 #endif
11511 Py_XDECREF(tmp_type);
11512 Py_XDECREF(tmp_value);
11513 Py_XDECREF(tmp_tb);
11514 #else
11515 PyErr_SetExcInfo(local_type, local_value, local_tb);
11516 #endif
11517 return 0;
11518 bad:
11519 *type = 0;
11520 *value = 0;
11521 *tb = 0;
11522 Py_XDECREF(local_type);
11523 Py_XDECREF(local_value);
11524 Py_XDECREF(local_tb);
11525 return -1;
11526 }
11527
11528 /* SwapException */
11529 #if CYTHON_FAST_THREAD_STATE
11530 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
11531 PyObject *tmp_type, *tmp_value, *tmp_tb;
11532 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
11533 _PyErr_StackItem *exc_info = tstate->exc_info;
11534 tmp_value = exc_info->exc_value;
11535 exc_info->exc_value = *value;
11536 if (tmp_value == NULL || tmp_value == Py_None) {
11537 Py_XDECREF(tmp_value);
11538 tmp_value = NULL;
11539 tmp_type = NULL;
11540 tmp_tb = NULL;
11541 } else {
11542 tmp_type = (PyObject*) Py_TYPE(tmp_value);
11543 Py_INCREF(tmp_type);
11544 #if CYTHON_COMPILING_IN_CPYTHON
11545 tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback;
11546 Py_XINCREF(tmp_tb);
11547 #else
11548 tmp_tb = PyException_GetTraceback(tmp_value);
11549 #endif
11550 }
11551 #elif CYTHON_USE_EXC_INFO_STACK
11552 _PyErr_StackItem *exc_info = tstate->exc_info;
11553 tmp_type = exc_info->exc_type;
11554 tmp_value = exc_info->exc_value;
11555 tmp_tb = exc_info->exc_traceback;
11556 exc_info->exc_type = *type;
11557 exc_info->exc_value = *value;
11558 exc_info->exc_traceback = *tb;
11559 #else
11560 tmp_type = tstate->exc_type;
11561 tmp_value = tstate->exc_value;
11562 tmp_tb = tstate->exc_traceback;
11563 tstate->exc_type = *type;
11564 tstate->exc_value = *value;
11565 tstate->exc_traceback = *tb;
11566 #endif
11567 *type = tmp_type;
11568 *value = tmp_value;
11569 *tb = tmp_tb;
11570 }
11571 #else
11572 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
11573 PyObject *tmp_type, *tmp_value, *tmp_tb;
11574 PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
11575 PyErr_SetExcInfo(*type, *value, *tb);
11576 *type = tmp_type;
11577 *value = tmp_value;
11578 *tb = tmp_tb;
11579 }
11580 #endif
11581
11582 /* GetTopmostException */
11583 #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
11584 static _PyErr_StackItem *
11585 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
11586 {
11587 _PyErr_StackItem *exc_info = tstate->exc_info;
11588 while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
11589 exc_info->previous_item != NULL)
11590 {
11591 exc_info = exc_info->previous_item;
11592 }
11593 return exc_info;
11594 }
11595 #endif
11596
11597 /* SaveResetException */
11598 #if CYTHON_FAST_THREAD_STATE
11599 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
11600 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
11601 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
11602 PyObject *exc_value = exc_info->exc_value;
11603 if (exc_value == NULL || exc_value == Py_None) {
11604 *value = NULL;
11605 *type = NULL;
11606 *tb = NULL;
11607 } else {
11608 *value = exc_value;
11609 Py_INCREF(*value);
11610 *type = (PyObject*) Py_TYPE(exc_value);
11611 Py_INCREF(*type);
11612 *tb = PyException_GetTraceback(exc_value);
11613 }
11614 #elif CYTHON_USE_EXC_INFO_STACK
11615 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
11616 *type = exc_info->exc_type;
11617 *value = exc_info->exc_value;
11618 *tb = exc_info->exc_traceback;
11619 Py_XINCREF(*type);
11620 Py_XINCREF(*value);
11621 Py_XINCREF(*tb);
11622 #else
11623 *type = tstate->exc_type;
11624 *value = tstate->exc_value;
11625 *tb = tstate->exc_traceback;
11626 Py_XINCREF(*type);
11627 Py_XINCREF(*value);
11628 Py_XINCREF(*tb);
11629 #endif
11630 }
11631 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
11632 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
11633 _PyErr_StackItem *exc_info = tstate->exc_info;
11634 PyObject *tmp_value = exc_info->exc_value;
11635 exc_info->exc_value = value;
11636 Py_XDECREF(tmp_value);
11637 Py_XDECREF(type);
11638 Py_XDECREF(tb);
11639 #else
11640 PyObject *tmp_type, *tmp_value, *tmp_tb;
11641 #if CYTHON_USE_EXC_INFO_STACK
11642 _PyErr_StackItem *exc_info = tstate->exc_info;
11643 tmp_type = exc_info->exc_type;
11644 tmp_value = exc_info->exc_value;
11645 tmp_tb = exc_info->exc_traceback;
11646 exc_info->exc_type = type;
11647 exc_info->exc_value = value;
11648 exc_info->exc_traceback = tb;
11649 #else
11650 tmp_type = tstate->exc_type;
11651 tmp_value = tstate->exc_value;
11652 tmp_tb = tstate->exc_traceback;
11653 tstate->exc_type = type;
11654 tstate->exc_value = value;
11655 tstate->exc_traceback = tb;
11656 #endif
11657 Py_XDECREF(tmp_type);
11658 Py_XDECREF(tmp_value);
11659 Py_XDECREF(tmp_tb);
11660 #endif
11661 }
11662 #endif
11663
11664 /* FixUpExtensionType */
11665 #if CYTHON_USE_TYPE_SPECS
11666 static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
11667 #if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
11668 CYTHON_UNUSED_VAR(spec);
11669 CYTHON_UNUSED_VAR(type);
11670 #else
11671 const PyType_Slot *slot = spec->slots;
11672 while (slot && slot->slot && slot->slot != Py_tp_members)
11673 slot++;
11674 if (slot && slot->slot == Py_tp_members) {
11675 int changed = 0;
11676 #if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON)
11677 const
11678 #endif
11679 PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
11680 while (memb && memb->name) {
11681 if (memb->name[0] == '_' && memb->name[1] == '_') {
11682 #if PY_VERSION_HEX < 0x030900b1
11683 if (strcmp(memb->name, "__weaklistoffset__") == 0) {
11684 assert(memb->type == T_PYSSIZET);
11685 assert(memb->flags == READONLY);
11686 type->tp_weaklistoffset = memb->offset;
11687 changed = 1;
11688 }
11689 else if (strcmp(memb->name, "__dictoffset__") == 0) {
11690 assert(memb->type == T_PYSSIZET);
11691 assert(memb->flags == READONLY);
11692 type->tp_dictoffset = memb->offset;
11693 changed = 1;
11694 }
11695 #if CYTHON_METH_FASTCALL
11696 else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
11697 assert(memb->type == T_PYSSIZET);
11698 assert(memb->flags == READONLY);
11699 #if PY_VERSION_HEX >= 0x030800b4
11700 type->tp_vectorcall_offset = memb->offset;
11701 #else
11702 type->tp_print = (printfunc) memb->offset;
11703 #endif
11704 changed = 1;
11705 }
11706 #endif
11707 #else
11708 if ((0));
11709 #endif
11710 #if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON
11711 else if (strcmp(memb->name, "__module__") == 0) {
11712 PyObject *descr;
11713 assert(memb->type == T_OBJECT);
11714 assert(memb->flags == 0 || memb->flags == READONLY);
11715 descr = PyDescr_NewMember(type, memb);
11716 if (unlikely(!descr))
11717 return -1;
11718 if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) {
11719 Py_DECREF(descr);
11720 return -1;
11721 }
11722 Py_DECREF(descr);
11723 changed = 1;
11724 }
11725 #endif
11726 }
11727 memb++;
11728 }
11729 if (changed)
11730 PyType_Modified(type);
11731 }
11732 #endif
11733 return 0;
11734 }
11735 #endif
11736
11737 /* PyObjectCallNoArg */
11738 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
11739 PyObject *arg[2] = {NULL, NULL};
11740 return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
11741 }
11742
11743 /* PyObjectGetMethod */
11744 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
11745 PyObject *attr;
11746 #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
11747 __Pyx_TypeName type_name;
11748 PyTypeObject *tp = Py_TYPE(obj);
11749 PyObject *descr;
11750 descrgetfunc f = NULL;
11751 PyObject **dictptr, *dict;
11752 int meth_found = 0;
11753 assert (*method == NULL);
11754 if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
11755 attr = __Pyx_PyObject_GetAttrStr(obj, name);
11756 goto try_unpack;
11757 }
11758 if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
11759 return 0;
11760 }
11761 descr = _PyType_Lookup(tp, name);
11762 if (likely(descr != NULL)) {
11763 Py_INCREF(descr);
11764 #if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
11765 if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
11766 #elif PY_MAJOR_VERSION >= 3
11767 #ifdef __Pyx_CyFunction_USED
11768 if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
11769 #else
11770 if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
11771 #endif
11772 #else
11773 #ifdef __Pyx_CyFunction_USED
11774 if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
11775 #else
11776 if (likely(PyFunction_Check(descr)))
11777 #endif
11778 #endif
11779 {
11780 meth_found = 1;
11781 } else {
11782 f = Py_TYPE(descr)->tp_descr_get;
11783 if (f != NULL && PyDescr_IsData(descr)) {
11784 attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
11785 Py_DECREF(descr);
11786 goto try_unpack;
11787 }
11788 }
11789 }
11790 dictptr = _PyObject_GetDictPtr(obj);
11791 if (dictptr != NULL && (dict = *dictptr) != NULL) {
11792 Py_INCREF(dict);
11793 attr = __Pyx_PyDict_GetItemStr(dict, name);
11794 if (attr != NULL) {
11795 Py_INCREF(attr);
11796 Py_DECREF(dict);
11797 Py_XDECREF(descr);
11798 goto try_unpack;
11799 }
11800 Py_DECREF(dict);
11801 }
11802 if (meth_found) {
11803 *method = descr;
11804 return 1;
11805 }
11806 if (f != NULL) {
11807 attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
11808 Py_DECREF(descr);
11809 goto try_unpack;
11810 }
11811 if (likely(descr != NULL)) {
11812 *method = descr;
11813 return 0;
11814 }
11815 type_name = __Pyx_PyType_GetName(tp);
11816 PyErr_Format(PyExc_AttributeError,
11817 #if PY_MAJOR_VERSION >= 3
11818 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
11819 type_name, name);
11820 #else
11821 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
11822 type_name, PyString_AS_STRING(name));
11823 #endif
11824 __Pyx_DECREF_TypeName(type_name);
11825 return 0;
11826 #else
11827 attr = __Pyx_PyObject_GetAttrStr(obj, name);
11828 goto try_unpack;
11829 #endif
11830 try_unpack:
11831 #if CYTHON_UNPACK_METHODS
11832 if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
11833 PyObject *function = PyMethod_GET_FUNCTION(attr);
11834 Py_INCREF(function);
11835 Py_DECREF(attr);
11836 *method = function;
11837 return 1;
11838 }
11839 #endif
11840 *method = attr;
11841 return 0;
11842 }
11843
11844 /* PyObjectCallMethod0 */
11845 static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
11846 PyObject *method = NULL, *result = NULL;
11847 int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
11848 if (likely(is_method)) {
11849 result = __Pyx_PyObject_CallOneArg(method, obj);
11850 Py_DECREF(method);
11851 return result;
11852 }
11853 if (unlikely(!method)) goto bad;
11854 result = __Pyx_PyObject_CallNoArg(method);
11855 Py_DECREF(method);
11856 bad:
11857 return result;
11858 }
11859
11860 /* ValidateBasesTuple */
11861 #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
11862 static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) {
11863 Py_ssize_t i, n;
11864 #if CYTHON_ASSUME_SAFE_MACROS
11865 n = PyTuple_GET_SIZE(bases);
11866 #else
11867 n = PyTuple_Size(bases);
11868 if (n < 0) return -1;
11869 #endif
11870 for (i = 1; i < n; i++)
11871 {
11872 #if CYTHON_AVOID_BORROWED_REFS
11873 PyObject *b0 = PySequence_GetItem(bases, i);
11874 if (!b0) return -1;
11875 #elif CYTHON_ASSUME_SAFE_MACROS
11876 PyObject *b0 = PyTuple_GET_ITEM(bases, i);
11877 #else
11878 PyObject *b0 = PyTuple_GetItem(bases, i);
11879 if (!b0) return -1;
11880 #endif
11881 PyTypeObject *b;
11882 #if PY_MAJOR_VERSION < 3
11883 if (PyClass_Check(b0))
11884 {
11885 PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class",
11886 PyString_AS_STRING(((PyClassObject*)b0)->cl_name));
11887 #if CYTHON_AVOID_BORROWED_REFS
11888 Py_DECREF(b0);
11889 #endif
11890 return -1;
11891 }
11892 #endif
11893 b = (PyTypeObject*) b0;
11894 if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
11895 {
11896 __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
11897 PyErr_Format(PyExc_TypeError,
11898 "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name);
11899 __Pyx_DECREF_TypeName(b_name);
11900 #if CYTHON_AVOID_BORROWED_REFS
11901 Py_DECREF(b0);
11902 #endif
11903 return -1;
11904 }
11905 if (dictoffset == 0)
11906 {
11907 Py_ssize_t b_dictoffset = 0;
11908 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
11909 b_dictoffset = b->tp_dictoffset;
11910 #else
11911 PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__");
11912 if (!py_b_dictoffset) goto dictoffset_return;
11913 b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset);
11914 Py_DECREF(py_b_dictoffset);
11915 if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return;
11916 #endif
11917 if (b_dictoffset) {
11918 {
11919 __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
11920 PyErr_Format(PyExc_TypeError,
11921 "extension type '%.200s' has no __dict__ slot, "
11922 "but base type '" __Pyx_FMT_TYPENAME "' has: "
11923 "either add 'cdef dict __dict__' to the extension type "
11924 "or add '__slots__ = [...]' to the base type",
11925 type_name, b_name);
11926 __Pyx_DECREF_TypeName(b_name);
11927 }
11928 #if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY)
11929 dictoffset_return:
11930 #endif
11931 #if CYTHON_AVOID_BORROWED_REFS
11932 Py_DECREF(b0);
11933 #endif
11934 return -1;
11935 }
11936 }
11937 #if CYTHON_AVOID_BORROWED_REFS
11938 Py_DECREF(b0);
11939 #endif
11940 }
11941 return 0;
11942 }
11943 #endif
11944
11945 /* PyType_Ready */
11946 static int __Pyx_PyType_Ready(PyTypeObject *t) {
11947 #if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION)
11948 (void)__Pyx_PyObject_CallMethod0;
11949 #if CYTHON_USE_TYPE_SPECS
11950 (void)__Pyx_validate_bases_tuple;
11951 #endif
11952 return PyType_Ready(t);
11953 #else
11954 int r;
11955 PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
11956 if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1))
11957 return -1;
11958 #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
11959 {
11960 int gc_was_enabled;
11961 #if PY_VERSION_HEX >= 0x030A00b1
11962 gc_was_enabled = PyGC_Disable();
11963 (void)__Pyx_PyObject_CallMethod0;
11964 #else
11965 PyObject *ret, *py_status;
11966 PyObject *gc = NULL;
11967 #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400)
11968 gc = PyImport_GetModule(__pyx_kp_u_gc);
11969 #endif
11970 if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc);
11971 if (unlikely(!gc)) return -1;
11972 py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled);
11973 if (unlikely(!py_status)) {
11974 Py_DECREF(gc);
11975 return -1;
11976 }
11977 gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
11978 Py_DECREF(py_status);
11979 if (gc_was_enabled > 0) {
11980 ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable);
11981 if (unlikely(!ret)) {
11982 Py_DECREF(gc);
11983 return -1;
11984 }
11985 Py_DECREF(ret);
11986 } else if (unlikely(gc_was_enabled == -1)) {
11987 Py_DECREF(gc);
11988 return -1;
11989 }
11990 #endif
11991 t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
11992 #if PY_VERSION_HEX >= 0x030A0000
11993 t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
11994 #endif
11995 #else
11996 (void)__Pyx_PyObject_CallMethod0;
11997 #endif
11998 r = PyType_Ready(t);
11999 #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
12000 t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
12001 #if PY_VERSION_HEX >= 0x030A00b1
12002 if (gc_was_enabled)
12003 PyGC_Enable();
12004 #else
12005 if (gc_was_enabled) {
12006 PyObject *tp, *v, *tb;
12007 PyErr_Fetch(&tp, &v, &tb);
12008 ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable);
12009 if (likely(ret || r == -1)) {
12010 Py_XDECREF(ret);
12011 PyErr_Restore(tp, v, tb);
12012 } else {
12013 Py_XDECREF(tp);
12014 Py_XDECREF(v);
12015 Py_XDECREF(tb);
12016 r = -1;
12017 }
12018 }
12019 Py_DECREF(gc);
12020 #endif
12021 }
12022 #endif
12023 return r;
12024 #endif
12025 }
12026
12027 /* PyObject_GenericGetAttrNoDict */
12028 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
12029 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
12030 __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp);
12031 PyErr_Format(PyExc_AttributeError,
12032 #if PY_MAJOR_VERSION >= 3
12033 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
12034 type_name, attr_name);
12035 #else
12036 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
12037 type_name, PyString_AS_STRING(attr_name));
12038 #endif
12039 __Pyx_DECREF_TypeName(type_name);
12040 return NULL;
12041 }
12042 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
12043 PyObject *descr;
12044 PyTypeObject *tp = Py_TYPE(obj);
12045 if (unlikely(!PyString_Check(attr_name))) {
12046 return PyObject_GenericGetAttr(obj, attr_name);
12047 }
12048 assert(!tp->tp_dictoffset);
12049 descr = _PyType_Lookup(tp, attr_name);
12050 if (unlikely(!descr)) {
12051 return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
12052 }
12053 Py_INCREF(descr);
12054 #if PY_MAJOR_VERSION < 3
12055 if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
12056 #endif
12057 {
12058 descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
12059 if (unlikely(f)) {
12060 PyObject *res = f(descr, obj, (PyObject *)tp);
12061 Py_DECREF(descr);
12062 return res;
12063 }
12064 }
12065 return descr;
12066 }
12067 #endif
12068
12069 /* PyObject_GenericGetAttr */
12070 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
12071 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
12072 if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
12073 return PyObject_GenericGetAttr(obj, attr_name);
12074 }
12075 return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
12076 }
12077 #endif
12078
12079 /* SetupReduce */
12080 #if !CYTHON_COMPILING_IN_LIMITED_API
12081 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
12082 int ret;
12083 PyObject *name_attr;
12084 name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_n_s_name);
12085 if (likely(name_attr)) {
12086 ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
12087 } else {
12088 ret = -1;
12089 }
12090 if (unlikely(ret < 0)) {
12091 PyErr_Clear();
12092 ret = 0;
12093 }
12094 Py_XDECREF(name_attr);
12095 return ret;
12096 }
12097 static int __Pyx_setup_reduce(PyObject* type_obj) {
12098 int ret = 0;
12099 PyObject *object_reduce = NULL;
12100 PyObject *object_getstate = NULL;
12101 PyObject *object_reduce_ex = NULL;
12102 PyObject *reduce = NULL;
12103 PyObject *reduce_ex = NULL;
12104 PyObject *reduce_cython = NULL;
12105 PyObject *setstate = NULL;
12106 PyObject *setstate_cython = NULL;
12107 PyObject *getstate = NULL;
12108 #if CYTHON_USE_PYTYPE_LOOKUP
12109 getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);
12110 #else
12111 getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
12112 if (!getstate && PyErr_Occurred()) {
12113 goto __PYX_BAD;
12114 }
12115 #endif
12116 if (getstate) {
12117 #if CYTHON_USE_PYTYPE_LOOKUP
12118 object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
12119 #else
12120 object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);
12121 if (!object_getstate && PyErr_Occurred()) {
12122 goto __PYX_BAD;
12123 }
12124 #endif
12125 if (object_getstate != getstate) {
12126 goto __PYX_GOOD;
12127 }
12128 }
12129 #if CYTHON_USE_PYTYPE_LOOKUP
12130 object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
12131 #else
12132 object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
12133 #endif
12134 reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
12135 if (reduce_ex == object_reduce_ex) {
12136 #if CYTHON_USE_PYTYPE_LOOKUP
12137 object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
12138 #else
12139 object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
12140 #endif
12141 reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
12142 if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
12143 reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
12144 if (likely(reduce_cython)) {
12145 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
12146 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
12147 } else if (reduce == object_reduce || PyErr_Occurred()) {
12148 goto __PYX_BAD;
12149 }
12150 setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate);
12151 if (!setstate) PyErr_Clear();
12152 if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
12153 setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
12154 if (likely(setstate_cython)) {
12155 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
12156 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
12157 } else if (!setstate || PyErr_Occurred()) {
12158 goto __PYX_BAD;
12159 }
12160 }
12161 PyType_Modified((PyTypeObject*)type_obj);
12162 }
12163 }
12164 goto __PYX_GOOD;
12165 __PYX_BAD:
12166 if (!PyErr_Occurred()) {
12167 __Pyx_TypeName type_obj_name =
12168 __Pyx_PyType_GetName((PyTypeObject*)type_obj);
12169 PyErr_Format(PyExc_RuntimeError,
12170 "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name);
12171 __Pyx_DECREF_TypeName(type_obj_name);
12172 }
12173 ret = -1;
12174 __PYX_GOOD:
12175 #if !CYTHON_USE_PYTYPE_LOOKUP
12176 Py_XDECREF(object_reduce);
12177 Py_XDECREF(object_reduce_ex);
12178 Py_XDECREF(object_getstate);
12179 Py_XDECREF(getstate);
12180 #endif
12181 Py_XDECREF(reduce);
12182 Py_XDECREF(reduce_ex);
12183 Py_XDECREF(reduce_cython);
12184 Py_XDECREF(setstate);
12185 Py_XDECREF(setstate_cython);
12186 return ret;
12187 }
12188 #endif
12189
12190 /* Py3UpdateBases */
12191 static PyObject*
12192 __Pyx_PEP560_update_bases(PyObject *bases)
12193 {
12194 Py_ssize_t i, j, size_bases;
12195 PyObject *base, *meth, *new_base, *result, *new_bases = NULL;
12196 size_bases = PyTuple_GET_SIZE(bases);
12197 for (i = 0; i < size_bases; i++) {
12198 base = PyTuple_GET_ITEM(bases, i);
12199 if (PyType_Check(base)) {
12200 if (new_bases) {
12201 if (PyList_Append(new_bases, base) < 0) {
12202 goto error;
12203 }
12204 }
12205 continue;
12206 }
12207 meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_n_s_mro_entries);
12208 if (!meth && PyErr_Occurred()) {
12209 goto error;
12210 }
12211 if (!meth) {
12212 if (new_bases) {
12213 if (PyList_Append(new_bases, base) < 0) {
12214 goto error;
12215 }
12216 }
12217 continue;
12218 }
12219 new_base = __Pyx_PyObject_CallOneArg(meth, bases);
12220 Py_DECREF(meth);
12221 if (!new_base) {
12222 goto error;
12223 }
12224 if (!PyTuple_Check(new_base)) {
12225 PyErr_SetString(PyExc_TypeError,
12226 "__mro_entries__ must return a tuple");
12227 Py_DECREF(new_base);
12228 goto error;
12229 }
12230 if (!new_bases) {
12231 if (!(new_bases = PyList_New(i))) {
12232 goto error;
12233 }
12234 for (j = 0; j < i; j++) {
12235 base = PyTuple_GET_ITEM(bases, j);
12236 PyList_SET_ITEM(new_bases, j, base);
12237 Py_INCREF(base);
12238 }
12239 }
12240 j = PyList_GET_SIZE(new_bases);
12241 if (PyList_SetSlice(new_bases, j, j, new_base) < 0) {
12242 goto error;
12243 }
12244 Py_DECREF(new_base);
12245 }
12246 if (!new_bases) {
12247 Py_INCREF(bases);
12248 return bases;
12249 }
12250 result = PyList_AsTuple(new_bases);
12251 Py_DECREF(new_bases);
12252 return result;
12253 error:
12254 Py_XDECREF(new_bases);
12255 return NULL;
12256 }
12257
12258 /* CalculateMetaclass */
12259 static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
12260 Py_ssize_t i, nbases;
12261 #if CYTHON_ASSUME_SAFE_MACROS
12262 nbases = PyTuple_GET_SIZE(bases);
12263 #else
12264 nbases = PyTuple_Size(bases);
12265 if (nbases < 0) return NULL;
12266 #endif
12267 for (i=0; i < nbases; i++) {
12268 PyTypeObject *tmptype;
12269 #if CYTHON_ASSUME_SAFE_MACROS
12270 PyObject *tmp = PyTuple_GET_ITEM(bases, i);
12271 #else
12272 PyObject *tmp = PyTuple_GetItem(bases, i);
12273 if (!tmp) return NULL;
12274 #endif
12275 tmptype = Py_TYPE(tmp);
12276 #if PY_MAJOR_VERSION < 3
12277 if (tmptype == &PyClass_Type)
12278 continue;
12279 #endif
12280 if (!metaclass) {
12281 metaclass = tmptype;
12282 continue;
12283 }
12284 if (PyType_IsSubtype(metaclass, tmptype))
12285 continue;
12286 if (PyType_IsSubtype(tmptype, metaclass)) {
12287 metaclass = tmptype;
12288 continue;
12289 }
12290 PyErr_SetString(PyExc_TypeError,
12291 "metaclass conflict: "
12292 "the metaclass of a derived class "
12293 "must be a (non-strict) subclass "
12294 "of the metaclasses of all its bases");
12295 return NULL;
12296 }
12297 if (!metaclass) {
12298 #if PY_MAJOR_VERSION < 3
12299 metaclass = &PyClass_Type;
12300 #else
12301 metaclass = &PyType_Type;
12302 #endif
12303 }
12304 Py_INCREF((PyObject*) metaclass);
12305 return (PyObject*) metaclass;
12306 }
12307
12308 /* PyObjectCall2Args */
12309 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
12310 PyObject *args[3] = {NULL, arg1, arg2};
12311 return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
12312 }
12313
12314 /* PyObjectLookupSpecial */
12315 #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
12316 static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) {
12317 PyObject *res;
12318 PyTypeObject *tp = Py_TYPE(obj);
12319 #if PY_MAJOR_VERSION < 3
12320 if (unlikely(PyInstance_Check(obj)))
12321 return with_error ? __Pyx_PyObject_GetAttrStr(obj, attr_name) : __Pyx_PyObject_GetAttrStrNoError(obj, attr_name);
12322 #endif
12323 res = _PyType_Lookup(tp, attr_name);
12324 if (likely(res)) {
12325 descrgetfunc f = Py_TYPE(res)->tp_descr_get;
12326 if (!f) {
12327 Py_INCREF(res);
12328 } else {
12329 res = f(res, obj, (PyObject *)tp);
12330 }
12331 } else if (with_error) {
12332 PyErr_SetObject(PyExc_AttributeError, attr_name);
12333 }
12334 return res;
12335 }
12336 #endif
12337
12338 /* Py3ClassCreate */
12339 static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
12340 PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
12341 PyObject *ns;
12342 if (metaclass) {
12343 PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_n_s_prepare);
12344 if (prep) {
12345 PyObject *pargs[3] = {NULL, name, bases};
12346 ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
12347 Py_DECREF(prep);
12348 } else {
12349 if (unlikely(PyErr_Occurred()))
12350 return NULL;
12351 ns = PyDict_New();
12352 }
12353 } else {
12354 ns = PyDict_New();
12355 }
12356 if (unlikely(!ns))
12357 return NULL;
12358 if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
12359 #if PY_VERSION_HEX >= 0x03030000
12360 if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
12361 #else
12362 CYTHON_MAYBE_UNUSED_VAR(qualname);
12363 #endif
12364 if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
12365 return ns;
12366 bad:
12367 Py_DECREF(ns);
12368 return NULL;
12369 }
12370 #if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS
12371 static int __Pyx_SetNamesPEP487(PyObject *type_obj) {
12372 PyTypeObject *type = (PyTypeObject*) type_obj;
12373 PyObject *names_to_set, *key, *value, *set_name, *tmp;
12374 Py_ssize_t i = 0;
12375 #if CYTHON_USE_TYPE_SLOTS
12376 names_to_set = PyDict_Copy(type->tp_dict);
12377 #else
12378 {
12379 PyObject *d = PyObject_GetAttr(type_obj, __pyx_n_s_dict);
12380 names_to_set = NULL;
12381 if (likely(d)) {
12382 PyObject *names_to_set = PyDict_New();
12383 int ret = likely(names_to_set) ? PyDict_Update(names_to_set, d) : -1;
12384 Py_DECREF(d);
12385 if (unlikely(ret < 0))
12386 Py_CLEAR(names_to_set);
12387 }
12388 }
12389 #endif
12390 if (unlikely(names_to_set == NULL))
12391 goto bad;
12392 while (PyDict_Next(names_to_set, &i, &key, &value)) {
12393 set_name = __Pyx_PyObject_LookupSpecialNoError(value, __pyx_n_s_set_name);
12394 if (unlikely(set_name != NULL)) {
12395 tmp = __Pyx_PyObject_Call2Args(set_name, type_obj, key);
12396 Py_DECREF(set_name);
12397 if (unlikely(tmp == NULL)) {
12398 __Pyx_TypeName value_type_name =
12399 __Pyx_PyType_GetName(Py_TYPE(value));
12400 __Pyx_TypeName type_name = __Pyx_PyType_GetName(type);
12401 PyErr_Format(PyExc_RuntimeError,
12402 #if PY_MAJOR_VERSION >= 3
12403 "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %R " "in '" __Pyx_FMT_TYPENAME "'",
12404 value_type_name, key, type_name);
12405 #else
12406 "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %.100s in '" __Pyx_FMT_TYPENAME "'",
12407 value_type_name,
12408 PyString_Check(key) ? PyString_AS_STRING(key) : "?",
12409 type_name);
12410 #endif
12411 goto bad;
12412 } else {
12413 Py_DECREF(tmp);
12414 }
12415 }
12416 else if (unlikely(PyErr_Occurred())) {
12417 goto bad;
12418 }
12419 }
12420 Py_DECREF(names_to_set);
12421 return 0;
12422 bad:
12423 Py_XDECREF(names_to_set);
12424 return -1;
12425 }
12426 static PyObject *__Pyx_InitSubclassPEP487(PyObject *type_obj, PyObject *mkw) {
12427 #if CYTHON_USE_TYPE_SLOTS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12428 PyTypeObject *type = (PyTypeObject*) type_obj;
12429 PyObject *mro = type->tp_mro;
12430 Py_ssize_t i, nbases;
12431 if (unlikely(!mro)) goto done;
12432 (void) &__Pyx_GetBuiltinName;
12433 Py_INCREF(mro);
12434 nbases = PyTuple_GET_SIZE(mro);
12435 assert(PyTuple_GET_ITEM(mro, 0) == type_obj);
12436 for (i = 1; i < nbases-1; i++) {
12437 PyObject *base, *dict, *meth;
12438 base = PyTuple_GET_ITEM(mro, i);
12439 dict = ((PyTypeObject *)base)->tp_dict;
12440 meth = __Pyx_PyDict_GetItemStrWithError(dict, __pyx_n_s_init_subclass);
12441 if (unlikely(meth)) {
12442 descrgetfunc f = Py_TYPE(meth)->tp_descr_get;
12443 PyObject *res;
12444 Py_INCREF(meth);
12445 if (likely(f)) {
12446 res = f(meth, NULL, type_obj);
12447 Py_DECREF(meth);
12448 if (unlikely(!res)) goto bad;
12449 meth = res;
12450 }
12451 res = __Pyx_PyObject_FastCallDict(meth, NULL, 0, mkw);
12452 Py_DECREF(meth);
12453 if (unlikely(!res)) goto bad;
12454 Py_DECREF(res);
12455 goto done;
12456 } else if (unlikely(PyErr_Occurred())) {
12457 goto bad;
12458 }
12459 }
12460 done:
12461 Py_XDECREF(mro);
12462 return type_obj;
12463 bad:
12464 Py_XDECREF(mro);
12465 Py_DECREF(type_obj);
12466 return NULL;
12467 #else
12468 PyObject *super_type, *super, *func, *res;
12469 #if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type)
12470 super_type = __Pyx_GetBuiltinName(__pyx_n_s_super);
12471 #else
12472 super_type = (PyObject*) &PySuper_Type;
12473 (void) &__Pyx_GetBuiltinName;
12474 #endif
12475 super = likely(super_type) ? __Pyx_PyObject_Call2Args(super_type, type_obj, type_obj) : NULL;
12476 #if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type)
12477 Py_XDECREF(super_type);
12478 #endif
12479 if (unlikely(!super)) {
12480 Py_CLEAR(type_obj);
12481 goto done;
12482 }
12483 func = __Pyx_PyObject_GetAttrStrNoError(super, __pyx_n_s_init_subclass);
12484 Py_DECREF(super);
12485 if (likely(!func)) {
12486 if (unlikely(PyErr_Occurred()))
12487 Py_CLEAR(type_obj);
12488 goto done;
12489 }
12490 res = __Pyx_PyObject_FastCallDict(func, NULL, 0, mkw);
12491 Py_DECREF(func);
12492 if (unlikely(!res))
12493 Py_CLEAR(type_obj);
12494 Py_XDECREF(res);
12495 done:
12496 return type_obj;
12497 #endif
12498 }
12499 #endif
12500 static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
12501 PyObject *dict, PyObject *mkw,
12502 int calculate_metaclass, int allow_py2_metaclass) {
12503 PyObject *result;
12504 PyObject *owned_metaclass = NULL;
12505 PyObject *margs[4] = {NULL, name, bases, dict};
12506 if (allow_py2_metaclass) {
12507 owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
12508 if (owned_metaclass) {
12509 metaclass = owned_metaclass;
12510 } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
12511 PyErr_Clear();
12512 } else {
12513 return NULL;
12514 }
12515 }
12516 if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
12517 metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
12518 Py_XDECREF(owned_metaclass);
12519 if (unlikely(!metaclass))
12520 return NULL;
12521 owned_metaclass = metaclass;
12522 }
12523 result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET,
12524 #if PY_VERSION_HEX < 0x030600A4
12525 (metaclass == (PyObject*)&PyType_Type) ? NULL : mkw
12526 #else
12527 mkw
12528 #endif
12529 );
12530 Py_XDECREF(owned_metaclass);
12531 #if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS
12532 if (likely(result) && likely(PyType_Check(result))) {
12533 if (unlikely(__Pyx_SetNamesPEP487(result) < 0)) {
12534 Py_CLEAR(result);
12535 } else {
12536 result = __Pyx_InitSubclassPEP487(result, mkw);
12537 }
12538 }
12539 #else
12540 (void) &__Pyx_GetBuiltinName;
12541 #endif
12542 return result;
12543 }
12544
12545 /* FetchSharedCythonModule */
12546 static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
12547 return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME);
12548 }
12549
12550 /* FetchCommonType */
12551 static int __Pyx_VerifyCachedType(PyObject *cached_type,
12552 const char *name,
12553 Py_ssize_t basicsize,
12554 Py_ssize_t expected_basicsize) {
12555 if (!PyType_Check(cached_type)) {
12556 PyErr_Format(PyExc_TypeError,
12557 "Shared Cython type %.200s is not a type object", name);
12558 return -1;
12559 }
12560 if (basicsize != expected_basicsize) {
12561 PyErr_Format(PyExc_TypeError,
12562 "Shared Cython type %.200s has the wrong size, try recompiling",
12563 name);
12564 return -1;
12565 }
12566 return 0;
12567 }
12568 #if !CYTHON_USE_TYPE_SPECS
12569 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
12570 PyObject* abi_module;
12571 const char* object_name;
12572 PyTypeObject *cached_type = NULL;
12573 abi_module = __Pyx_FetchSharedCythonABIModule();
12574 if (!abi_module) return NULL;
12575 object_name = strrchr(type->tp_name, '.');
12576 object_name = object_name ? object_name+1 : type->tp_name;
12577 cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name);
12578 if (cached_type) {
12579 if (__Pyx_VerifyCachedType(
12580 (PyObject *)cached_type,
12581 object_name,
12582 cached_type->tp_basicsize,
12583 type->tp_basicsize) < 0) {
12584 goto bad;
12585 }
12586 goto done;
12587 }
12588 if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
12589 PyErr_Clear();
12590 if (PyType_Ready(type) < 0) goto bad;
12591 if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0)
12592 goto bad;
12593 Py_INCREF(type);
12594 cached_type = type;
12595 done:
12596 Py_DECREF(abi_module);
12597 return cached_type;
12598 bad:
12599 Py_XDECREF(cached_type);
12600 cached_type = NULL;
12601 goto done;
12602 }
12603 #else
12604 static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) {
12605 PyObject *abi_module, *cached_type = NULL;
12606 const char* object_name = strrchr(spec->name, '.');
12607 object_name = object_name ? object_name+1 : spec->name;
12608 abi_module = __Pyx_FetchSharedCythonABIModule();
12609 if (!abi_module) return NULL;
12610 cached_type = PyObject_GetAttrString(abi_module, object_name);
12611 if (cached_type) {
12612 Py_ssize_t basicsize;
12613 #if CYTHON_COMPILING_IN_LIMITED_API
12614 PyObject *py_basicsize;
12615 py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
12616 if (unlikely(!py_basicsize)) goto bad;
12617 basicsize = PyLong_AsSsize_t(py_basicsize);
12618 Py_DECREF(py_basicsize);
12619 py_basicsize = 0;
12620 if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
12621 #else
12622 basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1;
12623 #endif
12624 if (__Pyx_VerifyCachedType(
12625 cached_type,
12626 object_name,
12627 basicsize,
12628 spec->basicsize) < 0) {
12629 goto bad;
12630 }
12631 goto done;
12632 }
12633 if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
12634 PyErr_Clear();
12635 CYTHON_UNUSED_VAR(module);
12636 cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases);
12637 if (unlikely(!cached_type)) goto bad;
12638 if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
12639 if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad;
12640 done:
12641 Py_DECREF(abi_module);
12642 assert(cached_type == NULL || PyType_Check(cached_type));
12643 return (PyTypeObject *) cached_type;
12644 bad:
12645 Py_XDECREF(cached_type);
12646 cached_type = NULL;
12647 goto done;
12648 }
12649 #endif
12650
12651 /* PyVectorcallFastCallDict */
12652 #if CYTHON_METH_FASTCALL
12653 static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
12654 {
12655 PyObject *res = NULL;
12656 PyObject *kwnames;
12657 PyObject **newargs;
12658 PyObject **kwvalues;
12659 Py_ssize_t i, pos;
12660 size_t j;
12661 PyObject *key, *value;
12662 unsigned long keys_are_strings;
12663 Py_ssize_t nkw = PyDict_GET_SIZE(kw);
12664 newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
12665 if (unlikely(newargs == NULL)) {
12666 PyErr_NoMemory();
12667 return NULL;
12668 }
12669 for (j = 0; j < nargs; j++) newargs[j] = args[j];
12670 kwnames = PyTuple_New(nkw);
12671 if (unlikely(kwnames == NULL)) {
12672 PyMem_Free(newargs);
12673 return NULL;
12674 }
12675 kwvalues = newargs + nargs;
12676 pos = i = 0;
12677 keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
12678 while (PyDict_Next(kw, &pos, &key, &value)) {
12679 keys_are_strings &= Py_TYPE(key)->tp_flags;
12680 Py_INCREF(key);
12681 Py_INCREF(value);
12682 PyTuple_SET_ITEM(kwnames, i, key);
12683 kwvalues[i] = value;
12684 i++;
12685 }
12686 if (unlikely(!keys_are_strings)) {
12687 PyErr_SetString(PyExc_TypeError, "keywords must be strings");
12688 goto cleanup;
12689 }
12690 res = vc(func, newargs, nargs, kwnames);
12691 cleanup:
12692 Py_DECREF(kwnames);
12693 for (i = 0; i < nkw; i++)
12694 Py_DECREF(kwvalues[i]);
12695 PyMem_Free(newargs);
12696 return res;
12697 }
12698 static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
12699 {
12700 if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) {
12701 return vc(func, args, nargs, NULL);
12702 }
12703 return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
12704 }
12705 #endif
12706
12707 /* CythonFunctionShared */
12708 #if CYTHON_COMPILING_IN_LIMITED_API
12709 static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
12710 if (__Pyx_CyFunction_Check(func)) {
12711 return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
12712 } else if (PyCFunction_Check(func)) {
12713 return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
12714 }
12715 return 0;
12716 }
12717 #else
12718 static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
12719 return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
12720 }
12721 #endif
12722 static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
12723 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
12724 __Pyx_Py_XDECREF_SET(
12725 __Pyx_CyFunction_GetClassObj(f),
12726 ((classobj) ? __Pyx_NewRef(classobj) : NULL));
12727 #else
12728 __Pyx_Py_XDECREF_SET(
12729 ((PyCMethodObject *) (f))->mm_class,
12730 (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
12731 #endif
12732 }
12733 static PyObject *
12734 __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure)
12735 {
12736 CYTHON_UNUSED_VAR(closure);
12737 if (unlikely(op->func_doc == NULL)) {
12738 #if CYTHON_COMPILING_IN_LIMITED_API
12739 op->func_doc = PyObject_GetAttrString(op->func, "__doc__");
12740 if (unlikely(!op->func_doc)) return NULL;
12741 #else
12742 if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
12743 #if PY_MAJOR_VERSION >= 3
12744 op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
12745 #else
12746 op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
12747 #endif
12748 if (unlikely(op->func_doc == NULL))
12749 return NULL;
12750 } else {
12751 Py_INCREF(Py_None);
12752 return Py_None;
12753 }
12754 #endif
12755 }
12756 Py_INCREF(op->func_doc);
12757 return op->func_doc;
12758 }
12759 static int
12760 __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
12761 {
12762 CYTHON_UNUSED_VAR(context);
12763 if (value == NULL) {
12764 value = Py_None;
12765 }
12766 Py_INCREF(value);
12767 __Pyx_Py_XDECREF_SET(op->func_doc, value);
12768 return 0;
12769 }
12770 static PyObject *
12771 __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
12772 {
12773 CYTHON_UNUSED_VAR(context);
12774 if (unlikely(op->func_name == NULL)) {
12775 #if CYTHON_COMPILING_IN_LIMITED_API
12776 op->func_name = PyObject_GetAttrString(op->func, "__name__");
12777 #elif PY_MAJOR_VERSION >= 3
12778 op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
12779 #else
12780 op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
12781 #endif
12782 if (unlikely(op->func_name == NULL))
12783 return NULL;
12784 }
12785 Py_INCREF(op->func_name);
12786 return op->func_name;
12787 }
12788 static int
12789 __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
12790 {
12791 CYTHON_UNUSED_VAR(context);
12792 #if PY_MAJOR_VERSION >= 3
12793 if (unlikely(value == NULL || !PyUnicode_Check(value)))
12794 #else
12795 if (unlikely(value == NULL || !PyString_Check(value)))
12796 #endif
12797 {
12798 PyErr_SetString(PyExc_TypeError,
12799 "__name__ must be set to a string object");
12800 return -1;
12801 }
12802 Py_INCREF(value);
12803 __Pyx_Py_XDECREF_SET(op->func_name, value);
12804 return 0;
12805 }
12806 static PyObject *
12807 __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
12808 {
12809 CYTHON_UNUSED_VAR(context);
12810 Py_INCREF(op->func_qualname);
12811 return op->func_qualname;
12812 }
12813 static int
12814 __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
12815 {
12816 CYTHON_UNUSED_VAR(context);
12817 #if PY_MAJOR_VERSION >= 3
12818 if (unlikely(value == NULL || !PyUnicode_Check(value)))
12819 #else
12820 if (unlikely(value == NULL || !PyString_Check(value)))
12821 #endif
12822 {
12823 PyErr_SetString(PyExc_TypeError,
12824 "__qualname__ must be set to a string object");
12825 return -1;
12826 }
12827 Py_INCREF(value);
12828 __Pyx_Py_XDECREF_SET(op->func_qualname, value);
12829 return 0;
12830 }
12831 static PyObject *
12832 __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
12833 {
12834 CYTHON_UNUSED_VAR(context);
12835 if (unlikely(op->func_dict == NULL)) {
12836 op->func_dict = PyDict_New();
12837 if (unlikely(op->func_dict == NULL))
12838 return NULL;
12839 }
12840 Py_INCREF(op->func_dict);
12841 return op->func_dict;
12842 }
12843 static int
12844 __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context)
12845 {
12846 CYTHON_UNUSED_VAR(context);
12847 if (unlikely(value == NULL)) {
12848 PyErr_SetString(PyExc_TypeError,
12849 "function's dictionary may not be deleted");
12850 return -1;
12851 }
12852 if (unlikely(!PyDict_Check(value))) {
12853 PyErr_SetString(PyExc_TypeError,
12854 "setting function's dictionary to a non-dict");
12855 return -1;
12856 }
12857 Py_INCREF(value);
12858 __Pyx_Py_XDECREF_SET(op->func_dict, value);
12859 return 0;
12860 }
12861 static PyObject *
12862 __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
12863 {
12864 CYTHON_UNUSED_VAR(context);
12865 Py_INCREF(op->func_globals);
12866 return op->func_globals;
12867 }
12868 static PyObject *
12869 __Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
12870 {
12871 CYTHON_UNUSED_VAR(op);
12872 CYTHON_UNUSED_VAR(context);
12873 Py_INCREF(Py_None);
12874 return Py_None;
12875 }
12876 static PyObject *
12877 __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
12878 {
12879 PyObject* result = (op->func_code) ? op->func_code : Py_None;
12880 CYTHON_UNUSED_VAR(context);
12881 Py_INCREF(result);
12882 return result;
12883 }
12884 static int
12885 __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
12886 int result = 0;
12887 PyObject *res = op->defaults_getter((PyObject *) op);
12888 if (unlikely(!res))
12889 return -1;
12890 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12891 op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
12892 Py_INCREF(op->defaults_tuple);
12893 op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
12894 Py_INCREF(op->defaults_kwdict);
12895 #else
12896 op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
12897 if (unlikely(!op->defaults_tuple)) result = -1;
12898 else {
12899 op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
12900 if (unlikely(!op->defaults_kwdict)) result = -1;
12901 }
12902 #endif
12903 Py_DECREF(res);
12904 return result;
12905 }
12906 static int
12907 __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
12908 CYTHON_UNUSED_VAR(context);
12909 if (!value) {
12910 value = Py_None;
12911 } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
12912 PyErr_SetString(PyExc_TypeError,
12913 "__defaults__ must be set to a tuple object");
12914 return -1;
12915 }
12916 PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
12917 "currently affect the values used in function calls", 1);
12918 Py_INCREF(value);
12919 __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
12920 return 0;
12921 }
12922 static PyObject *
12923 __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
12924 PyObject* result = op->defaults_tuple;
12925 CYTHON_UNUSED_VAR(context);
12926 if (unlikely(!result)) {
12927 if (op->defaults_getter) {
12928 if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
12929 result = op->defaults_tuple;
12930 } else {
12931 result = Py_None;
12932 }
12933 }
12934 Py_INCREF(result);
12935 return result;
12936 }
12937 static int
12938 __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
12939 CYTHON_UNUSED_VAR(context);
12940 if (!value) {
12941 value = Py_None;
12942 } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
12943 PyErr_SetString(PyExc_TypeError,
12944 "__kwdefaults__ must be set to a dict object");
12945 return -1;
12946 }
12947 PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
12948 "currently affect the values used in function calls", 1);
12949 Py_INCREF(value);
12950 __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
12951 return 0;
12952 }
12953 static PyObject *
12954 __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
12955 PyObject* result = op->defaults_kwdict;
12956 CYTHON_UNUSED_VAR(context);
12957 if (unlikely(!result)) {
12958 if (op->defaults_getter) {
12959 if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
12960 result = op->defaults_kwdict;
12961 } else {
12962 result = Py_None;
12963 }
12964 }
12965 Py_INCREF(result);
12966 return result;
12967 }
12968 static int
12969 __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
12970 CYTHON_UNUSED_VAR(context);
12971 if (!value || value == Py_None) {
12972 value = NULL;
12973 } else if (unlikely(!PyDict_Check(value))) {
12974 PyErr_SetString(PyExc_TypeError,
12975 "__annotations__ must be set to a dict object");
12976 return -1;
12977 }
12978 Py_XINCREF(value);
12979 __Pyx_Py_XDECREF_SET(op->func_annotations, value);
12980 return 0;
12981 }
12982 static PyObject *
12983 __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
12984 PyObject* result = op->func_annotations;
12985 CYTHON_UNUSED_VAR(context);
12986 if (unlikely(!result)) {
12987 result = PyDict_New();
12988 if (unlikely(!result)) return NULL;
12989 op->func_annotations = result;
12990 }
12991 Py_INCREF(result);
12992 return result;
12993 }
12994 static PyObject *
12995 __Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
12996 int is_coroutine;
12997 CYTHON_UNUSED_VAR(context);
12998 if (op->func_is_coroutine) {
12999 return __Pyx_NewRef(op->func_is_coroutine);
13000 }
13001 is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
13002 #if PY_VERSION_HEX >= 0x03050000
13003 if (is_coroutine) {
13004 PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine;
13005 fromlist = PyList_New(1);
13006 if (unlikely(!fromlist)) return NULL;
13007 Py_INCREF(marker);
13008 #if CYTHON_ASSUME_SAFE_MACROS
13009 PyList_SET_ITEM(fromlist, 0, marker);
13010 #else
13011 if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
13012 Py_DECREF(marker);
13013 Py_DECREF(fromlist);
13014 return NULL;
13015 }
13016 #endif
13017 module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0);
13018 Py_DECREF(fromlist);
13019 if (unlikely(!module)) goto ignore;
13020 op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker);
13021 Py_DECREF(module);
13022 if (likely(op->func_is_coroutine)) {
13023 return __Pyx_NewRef(op->func_is_coroutine);
13024 }
13025 ignore:
13026 PyErr_Clear();
13027 }
13028 #endif
13029 op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine);
13030 return __Pyx_NewRef(op->func_is_coroutine);
13031 }
13032 #if CYTHON_COMPILING_IN_LIMITED_API
13033 static PyObject *
13034 __Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) {
13035 CYTHON_UNUSED_VAR(context);
13036 return PyObject_GetAttrString(op->func, "__module__");
13037 }
13038 static int
13039 __Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
13040 CYTHON_UNUSED_VAR(context);
13041 return PyObject_SetAttrString(op->func, "__module__", value);
13042 }
13043 #endif
13044 static PyGetSetDef __pyx_CyFunction_getsets[] = {
13045 {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
13046 {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
13047 {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
13048 {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
13049 {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
13050 {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
13051 {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
13052 {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
13053 {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
13054 {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
13055 {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
13056 {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
13057 {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
13058 {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
13059 {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
13060 {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
13061 {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
13062 {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
13063 #if CYTHON_COMPILING_IN_LIMITED_API
13064 {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
13065 #endif
13066 {0, 0, 0, 0, 0}
13067 };
13068 static PyMemberDef __pyx_CyFunction_members[] = {
13069 #if !CYTHON_COMPILING_IN_LIMITED_API
13070 {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
13071 #endif
13072 #if CYTHON_USE_TYPE_SPECS
13073 {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
13074 #if CYTHON_METH_FASTCALL
13075 #if CYTHON_BACKPORT_VECTORCALL
13076 {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
13077 #else
13078 #if !CYTHON_COMPILING_IN_LIMITED_API
13079 {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
13080 #endif
13081 #endif
13082 #endif
13083 #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
13084 {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
13085 #else
13086 {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
13087 #endif
13088 #endif
13089 {0, 0, 0, 0, 0}
13090 };
13091 static PyObject *
13092 __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
13093 {
13094 CYTHON_UNUSED_VAR(args);
13095 #if PY_MAJOR_VERSION >= 3
13096 Py_INCREF(m->func_qualname);
13097 return m->func_qualname;
13098 #else
13099 return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name);
13100 #endif
13101 }
13102 static PyMethodDef __pyx_CyFunction_methods[] = {
13103 {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
13104 {0, 0, 0, 0}
13105 };
13106 #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
13107 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
13108 #else
13109 #define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
13110 #endif
13111 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
13112 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
13113 #if !CYTHON_COMPILING_IN_LIMITED_API
13114 PyCFunctionObject *cf = (PyCFunctionObject*) op;
13115 #endif
13116 if (unlikely(op == NULL))
13117 return NULL;
13118 #if CYTHON_COMPILING_IN_LIMITED_API
13119 op->func = PyCFunction_NewEx(ml, (PyObject*)op, module);
13120 if (unlikely(!op->func)) return NULL;
13121 #endif
13122 op->flags = flags;
13123 __Pyx_CyFunction_weakreflist(op) = NULL;
13124 #if !CYTHON_COMPILING_IN_LIMITED_API
13125 cf->m_ml = ml;
13126 cf->m_self = (PyObject *) op;
13127 #endif
13128 Py_XINCREF(closure);
13129 op->func_closure = closure;
13130 #if !CYTHON_COMPILING_IN_LIMITED_API
13131 Py_XINCREF(module);
13132 cf->m_module = module;
13133 #endif
13134 op->func_dict = NULL;
13135 op->func_name = NULL;
13136 Py_INCREF(qualname);
13137 op->func_qualname = qualname;
13138 op->func_doc = NULL;
13139 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
13140 op->func_classobj = NULL;
13141 #else
13142 ((PyCMethodObject*)op)->mm_class = NULL;
13143 #endif
13144 op->func_globals = globals;
13145 Py_INCREF(op->func_globals);
13146 Py_XINCREF(code);
13147 op->func_code = code;
13148 op->defaults_pyobjects = 0;
13149 op->defaults_size = 0;
13150 op->defaults = NULL;
13151 op->defaults_tuple = NULL;
13152 op->defaults_kwdict = NULL;
13153 op->defaults_getter = NULL;
13154 op->func_annotations = NULL;
13155 op->func_is_coroutine = NULL;
13156 #if CYTHON_METH_FASTCALL
13157 switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
13158 case METH_NOARGS:
13159 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
13160 break;
13161 case METH_O:
13162 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
13163 break;
13164 case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
13165 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
13166 break;
13167 case METH_FASTCALL | METH_KEYWORDS:
13168 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
13169 break;
13170 case METH_VARARGS | METH_KEYWORDS:
13171 __Pyx_CyFunction_func_vectorcall(op) = NULL;
13172 break;
13173 default:
13174 PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
13175 Py_DECREF(op);
13176 return NULL;
13177 }
13178 #endif
13179 return (PyObject *) op;
13180 }
13181 static int
13182 __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
13183 {
13184 Py_CLEAR(m->func_closure);
13185 #if CYTHON_COMPILING_IN_LIMITED_API
13186 Py_CLEAR(m->func);
13187 #else
13188 Py_CLEAR(((PyCFunctionObject*)m)->m_module);
13189 #endif
13190 Py_CLEAR(m->func_dict);
13191 Py_CLEAR(m->func_name);
13192 Py_CLEAR(m->func_qualname);
13193 Py_CLEAR(m->func_doc);
13194 Py_CLEAR(m->func_globals);
13195 Py_CLEAR(m->func_code);
13196 #if !CYTHON_COMPILING_IN_LIMITED_API
13197 #if PY_VERSION_HEX < 0x030900B1
13198 Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
13199 #else
13200 {
13201 PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
13202 ((PyCMethodObject *) (m))->mm_class = NULL;
13203 Py_XDECREF(cls);
13204 }
13205 #endif
13206 #endif
13207 Py_CLEAR(m->defaults_tuple);
13208 Py_CLEAR(m->defaults_kwdict);
13209 Py_CLEAR(m->func_annotations);
13210 Py_CLEAR(m->func_is_coroutine);
13211 if (m->defaults) {
13212 PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
13213 int i;
13214 for (i = 0; i < m->defaults_pyobjects; i++)
13215 Py_XDECREF(pydefaults[i]);
13216 PyObject_Free(m->defaults);
13217 m->defaults = NULL;
13218 }
13219 return 0;
13220 }
13221 static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
13222 {
13223 if (__Pyx_CyFunction_weakreflist(m) != NULL)
13224 PyObject_ClearWeakRefs((PyObject *) m);
13225 __Pyx_CyFunction_clear(m);
13226 __Pyx_PyHeapTypeObject_GC_Del(m);
13227 }
13228 static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
13229 {
13230 PyObject_GC_UnTrack(m);
13231 __Pyx__CyFunction_dealloc(m);
13232 }
13233 static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
13234 {
13235 Py_VISIT(m->func_closure);
13236 #if CYTHON_COMPILING_IN_LIMITED_API
13237 Py_VISIT(m->func);
13238 #else
13239 Py_VISIT(((PyCFunctionObject*)m)->m_module);
13240 #endif
13241 Py_VISIT(m->func_dict);
13242 Py_VISIT(m->func_name);
13243 Py_VISIT(m->func_qualname);
13244 Py_VISIT(m->func_doc);
13245 Py_VISIT(m->func_globals);
13246 Py_VISIT(m->func_code);
13247 #if !CYTHON_COMPILING_IN_LIMITED_API
13248 Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
13249 #endif
13250 Py_VISIT(m->defaults_tuple);
13251 Py_VISIT(m->defaults_kwdict);
13252 Py_VISIT(m->func_is_coroutine);
13253 if (m->defaults) {
13254 PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
13255 int i;
13256 for (i = 0; i < m->defaults_pyobjects; i++)
13257 Py_VISIT(pydefaults[i]);
13258 }
13259 return 0;
13260 }
13261 static PyObject*
13262 __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
13263 {
13264 #if PY_MAJOR_VERSION >= 3
13265 return PyUnicode_FromFormat("<cyfunction %U at %p>",
13266 op->func_qualname, (void *)op);
13267 #else
13268 return PyString_FromFormat("<cyfunction %s at %p>",
13269 PyString_AsString(op->func_qualname), (void *)op);
13270 #endif
13271 }
13272 static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
13273 #if CYTHON_COMPILING_IN_LIMITED_API
13274 PyObject *f = ((__pyx_CyFunctionObject*)func)->func;
13275 PyObject *py_name = NULL;
13276 PyCFunction meth;
13277 int flags;
13278 meth = PyCFunction_GetFunction(f);
13279 if (unlikely(!meth)) return NULL;
13280 flags = PyCFunction_GetFlags(f);
13281 if (unlikely(flags < 0)) return NULL;
13282 #else
13283 PyCFunctionObject* f = (PyCFunctionObject*)func;
13284 PyCFunction meth = f->m_ml->ml_meth;
13285 int flags = f->m_ml->ml_flags;
13286 #endif
13287 Py_ssize_t size;
13288 switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
13289 case METH_VARARGS:
13290 if (likely(kw == NULL || PyDict_Size(kw) == 0))
13291 return (*meth)(self, arg);
13292 break;
13293 case METH_VARARGS | METH_KEYWORDS:
13294 return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
13295 case METH_NOARGS:
13296 if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
13297 #if CYTHON_ASSUME_SAFE_MACROS
13298 size = PyTuple_GET_SIZE(arg);
13299 #else
13300 size = PyTuple_Size(arg);
13301 if (unlikely(size < 0)) return NULL;
13302 #endif
13303 if (likely(size == 0))
13304 return (*meth)(self, NULL);
13305 #if CYTHON_COMPILING_IN_LIMITED_API
13306 py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
13307 if (!py_name) return NULL;
13308 PyErr_Format(PyExc_TypeError,
13309 "%.200S() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
13310 py_name, size);
13311 Py_DECREF(py_name);
13312 #else
13313 PyErr_Format(PyExc_TypeError,
13314 "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
13315 f->m_ml->ml_name, size);
13316 #endif
13317 return NULL;
13318 }
13319 break;
13320 case METH_O:
13321 if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
13322 #if CYTHON_ASSUME_SAFE_MACROS
13323 size = PyTuple_GET_SIZE(arg);
13324 #else
13325 size = PyTuple_Size(arg);
13326 if (unlikely(size < 0)) return NULL;
13327 #endif
13328 if (likely(size == 1)) {
13329 PyObject *result, *arg0;
13330 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13331 arg0 = PyTuple_GET_ITEM(arg, 0);
13332 #else
13333 arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
13334 #endif
13335 result = (*meth)(self, arg0);
13336 #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
13337 Py_DECREF(arg0);
13338 #endif
13339 return result;
13340 }
13341 #if CYTHON_COMPILING_IN_LIMITED_API
13342 py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
13343 if (!py_name) return NULL;
13344 PyErr_Format(PyExc_TypeError,
13345 "%.200S() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
13346 py_name, size);
13347 Py_DECREF(py_name);
13348 #else
13349 PyErr_Format(PyExc_TypeError,
13350 "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
13351 f->m_ml->ml_name, size);
13352 #endif
13353 return NULL;
13354 }
13355 break;
13356 default:
13357 PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
13358 return NULL;
13359 }
13360 #if CYTHON_COMPILING_IN_LIMITED_API
13361 py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
13362 if (!py_name) return NULL;
13363 PyErr_Format(PyExc_TypeError, "%.200S() takes no keyword arguments",
13364 py_name);
13365 Py_DECREF(py_name);
13366 #else
13367 PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
13368 f->m_ml->ml_name);
13369 #endif
13370 return NULL;
13371 }
13372 static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
13373 PyObject *self, *result;
13374 #if CYTHON_COMPILING_IN_LIMITED_API
13375 self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func);
13376 if (unlikely(!self) && PyErr_Occurred()) return NULL;
13377 #else
13378 self = ((PyCFunctionObject*)func)->m_self;
13379 #endif
13380 result = __Pyx_CyFunction_CallMethod(func, self, arg, kw);
13381 return result;
13382 }
13383 static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
13384 PyObject *result;
13385 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
13386 #if CYTHON_METH_FASTCALL
13387 __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
13388 if (vc) {
13389 #if CYTHON_ASSUME_SAFE_MACROS
13390 return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
13391 #else
13392 (void) &__Pyx_PyVectorcall_FastCallDict;
13393 return PyVectorcall_Call(func, args, kw);
13394 #endif
13395 }
13396 #endif
13397 if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
13398 Py_ssize_t argc;
13399 PyObject *new_args;
13400 PyObject *self;
13401 #if CYTHON_ASSUME_SAFE_MACROS
13402 argc = PyTuple_GET_SIZE(args);
13403 #else
13404 argc = PyTuple_Size(args);
13405 if (unlikely(!argc) < 0) return NULL;
13406 #endif
13407 new_args = PyTuple_GetSlice(args, 1, argc);
13408 if (unlikely(!new_args))
13409 return NULL;
13410 self = PyTuple_GetItem(args, 0);
13411 if (unlikely(!self)) {
13412 Py_DECREF(new_args);
13413 #if PY_MAJOR_VERSION > 2
13414 PyErr_Format(PyExc_TypeError,
13415 "unbound method %.200S() needs an argument",
13416 cyfunc->func_qualname);
13417 #else
13418 PyErr_SetString(PyExc_TypeError,
13419 "unbound method needs an argument");
13420 #endif
13421 return NULL;
13422 }
13423 result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
13424 Py_DECREF(new_args);
13425 } else {
13426 result = __Pyx_CyFunction_Call(func, args, kw);
13427 }
13428 return result;
13429 }
13430 #if CYTHON_METH_FASTCALL
13431 static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
13432 {
13433 int ret = 0;
13434 if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
13435 if (unlikely(nargs < 1)) {
13436 PyErr_Format(PyExc_TypeError, "%.200s() needs an argument",
13437 ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
13438 return -1;
13439 }
13440 ret = 1;
13441 }
13442 if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) {
13443 PyErr_Format(PyExc_TypeError,
13444 "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
13445 return -1;
13446 }
13447 return ret;
13448 }
13449 static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
13450 {
13451 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
13452 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
13453 #if CYTHON_BACKPORT_VECTORCALL
13454 Py_ssize_t nargs = (Py_ssize_t)nargsf;
13455 #else
13456 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
13457 #endif
13458 PyObject *self;
13459 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
13460 case 1:
13461 self = args[0];
13462 args += 1;
13463 nargs -= 1;
13464 break;
13465 case 0:
13466 self = ((PyCFunctionObject*)cyfunc)->m_self;
13467 break;
13468 default:
13469 return NULL;
13470 }
13471 if (unlikely(nargs != 0)) {
13472 PyErr_Format(PyExc_TypeError,
13473 "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
13474 def->ml_name, nargs);
13475 return NULL;
13476 }
13477 return def->ml_meth(self, NULL);
13478 }
13479 static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
13480 {
13481 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
13482 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
13483 #if CYTHON_BACKPORT_VECTORCALL
13484 Py_ssize_t nargs = (Py_ssize_t)nargsf;
13485 #else
13486 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
13487 #endif
13488 PyObject *self;
13489 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
13490 case 1:
13491 self = args[0];
13492 args += 1;
13493 nargs -= 1;
13494 break;
13495 case 0:
13496 self = ((PyCFunctionObject*)cyfunc)->m_self;
13497 break;
13498 default:
13499 return NULL;
13500 }
13501 if (unlikely(nargs != 1)) {
13502 PyErr_Format(PyExc_TypeError,
13503 "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
13504 def->ml_name, nargs);
13505 return NULL;
13506 }
13507 return def->ml_meth(self, args[0]);
13508 }
13509 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
13510 {
13511 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
13512 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
13513 #if CYTHON_BACKPORT_VECTORCALL
13514 Py_ssize_t nargs = (Py_ssize_t)nargsf;
13515 #else
13516 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
13517 #endif
13518 PyObject *self;
13519 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
13520 case 1:
13521 self = args[0];
13522 args += 1;
13523 nargs -= 1;
13524 break;
13525 case 0:
13526 self = ((PyCFunctionObject*)cyfunc)->m_self;
13527 break;
13528 default:
13529 return NULL;
13530 }
13531 return ((_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames);
13532 }
13533 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
13534 {
13535 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
13536 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
13537 PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
13538 #if CYTHON_BACKPORT_VECTORCALL
13539 Py_ssize_t nargs = (Py_ssize_t)nargsf;
13540 #else
13541 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
13542 #endif
13543 PyObject *self;
13544 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
13545 case 1:
13546 self = args[0];
13547 args += 1;
13548 nargs -= 1;
13549 break;
13550 case 0:
13551 self = ((PyCFunctionObject*)cyfunc)->m_self;
13552 break;
13553 default:
13554 return NULL;
13555 }
13556 return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames);
13557 }
13558 #endif
13559 #if CYTHON_USE_TYPE_SPECS
13560 static PyType_Slot __pyx_CyFunctionType_slots[] = {
13561 {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
13562 {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
13563 {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
13564 {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
13565 {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
13566 {Py_tp_methods, (void *)__pyx_CyFunction_methods},
13567 {Py_tp_members, (void *)__pyx_CyFunction_members},
13568 {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
13569 {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
13570 {0, 0},
13571 };
13572 static PyType_Spec __pyx_CyFunctionType_spec = {
13573 __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
13574 sizeof(__pyx_CyFunctionObject),
13575 0,
13576 #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
13577 Py_TPFLAGS_METHOD_DESCRIPTOR |
13578 #endif
13579 #if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL)
13580 _Py_TPFLAGS_HAVE_VECTORCALL |
13581 #endif
13582 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
13583 __pyx_CyFunctionType_slots
13584 };
13585 #else
13586 static PyTypeObject __pyx_CyFunctionType_type = {
13587 PyVarObject_HEAD_INIT(0, 0)
13588 __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
13589 sizeof(__pyx_CyFunctionObject),
13590 0,
13591 (destructor) __Pyx_CyFunction_dealloc,
13592 #if !CYTHON_METH_FASTCALL
13593 0,
13594 #elif CYTHON_BACKPORT_VECTORCALL
13595 (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall),
13596 #else
13597 offsetof(PyCFunctionObject, vectorcall),
13598 #endif
13599 0,
13600 0,
13601 #if PY_MAJOR_VERSION < 3
13602 0,
13603 #else
13604 0,
13605 #endif
13606 (reprfunc) __Pyx_CyFunction_repr,
13607 0,
13608 0,
13609 0,
13610 0,
13611 __Pyx_CyFunction_CallAsMethod,
13612 0,
13613 0,
13614 0,
13615 0,
13616 #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
13617 Py_TPFLAGS_METHOD_DESCRIPTOR |
13618 #endif
13619 #if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL
13620 _Py_TPFLAGS_HAVE_VECTORCALL |
13621 #endif
13622 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
13623 0,
13624 (traverseproc) __Pyx_CyFunction_traverse,
13625 (inquiry) __Pyx_CyFunction_clear,
13626 0,
13627 #if PY_VERSION_HEX < 0x030500A0
13628 offsetof(__pyx_CyFunctionObject, func_weakreflist),
13629 #else
13630 offsetof(PyCFunctionObject, m_weakreflist),
13631 #endif
13632 0,
13633 0,
13634 __pyx_CyFunction_methods,
13635 __pyx_CyFunction_members,
13636 __pyx_CyFunction_getsets,
13637 0,
13638 0,
13639 __Pyx_PyMethod_New,
13640 0,
13641 offsetof(__pyx_CyFunctionObject, func_dict),
13642 0,
13643 0,
13644 0,
13645 0,
13646 0,
13647 0,
13648 0,
13649 0,
13650 0,
13651 0,
13652 0,
13653 0,
13654 #if PY_VERSION_HEX >= 0x030400a1
13655 0,
13656 #endif
13657 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
13658 0,
13659 #endif
13660 #if __PYX_NEED_TP_PRINT_SLOT
13661 0,
13662 #endif
13663 #if PY_VERSION_HEX >= 0x030C0000
13664 0,
13665 #endif
13666 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
13667 0,
13668 #endif
13669 };
13670 #endif
13671 static int __pyx_CyFunction_init(PyObject *module) {
13672 #if CYTHON_USE_TYPE_SPECS
13673 __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL);
13674 #else
13675 CYTHON_UNUSED_VAR(module);
13676 __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
13677 #endif
13678 if (unlikely(__pyx_CyFunctionType == NULL)) {
13679 return -1;
13680 }
13681 return 0;
13682 }
13683 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
13684 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
13685 m->defaults = PyObject_Malloc(size);
13686 if (unlikely(!m->defaults))
13687 return PyErr_NoMemory();
13688 memset(m->defaults, 0, size);
13689 m->defaults_pyobjects = pyobjects;
13690 m->defaults_size = size;
13691 return m->defaults;
13692 }
13693 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
13694 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
13695 m->defaults_tuple = tuple;
13696 Py_INCREF(tuple);
13697 }
13698 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
13699 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
13700 m->defaults_kwdict = dict;
13701 Py_INCREF(dict);
13702 }
13703 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
13704 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
13705 m->func_annotations = dict;
13706 Py_INCREF(dict);
13707 }
13708
13709 /* CythonFunction */
13710 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
13711 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
13712 PyObject *op = __Pyx_CyFunction_Init(
13713 PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
13714 ml, flags, qualname, closure, module, globals, code
13715 );
13716 if (likely(op)) {
13717 PyObject_GC_Track(op);
13718 }
13719 return op;
13720 }
13721
13722 /* CLineInTraceback */
13723 #ifndef CYTHON_CLINE_IN_TRACEBACK
13724 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
13725 PyObject *use_cline;
13726 PyObject *ptype, *pvalue, *ptraceback;
13727 #if CYTHON_COMPILING_IN_CPYTHON
13728 PyObject **cython_runtime_dict;
13729 #endif
13730 CYTHON_MAYBE_UNUSED_VAR(tstate);
13731 if (unlikely(!__pyx_cython_runtime)) {
13732 return c_line;
13733 }
13734 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
13735 #if CYTHON_COMPILING_IN_CPYTHON
13736 cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
13737 if (likely(cython_runtime_dict)) {
13738 __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
13739 use_cline, *cython_runtime_dict,
13740 __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
13741 } else
13742 #endif
13743 {
13744 PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
13745 if (use_cline_obj) {
13746 use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
13747 Py_DECREF(use_cline_obj);
13748 } else {
13749 PyErr_Clear();
13750 use_cline = NULL;
13751 }
13752 }
13753 if (!use_cline) {
13754 c_line = 0;
13755 (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
13756 }
13757 else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
13758 c_line = 0;
13759 }
13760 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
13761 return c_line;
13762 }
13763 #endif
13764
13765 /* CodeObjectCache */
13766 #if !CYTHON_COMPILING_IN_LIMITED_API
13767 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
13768 int start = 0, mid = 0, end = count - 1;
13769 if (end >= 0 && code_line > entries[end].code_line) {
13770 return count;
13771 }
13772 while (start < end) {
13773 mid = start + (end - start) / 2;
13774 if (code_line < entries[mid].code_line) {
13775 end = mid;
13776 } else if (code_line > entries[mid].code_line) {
13777 start = mid + 1;
13778 } else {
13779 return mid;
13780 }
13781 }
13782 if (code_line <= entries[mid].code_line) {
13783 return mid;
13784 } else {
13785 return mid + 1;
13786 }
13787 }
13788 static PyCodeObject *__pyx_find_code_object(int code_line) {
13789 PyCodeObject* code_object;
13790 int pos;
13791 if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
13792 return NULL;
13793 }
13794 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
13795 if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
13796 return NULL;
13797 }
13798 code_object = __pyx_code_cache.entries[pos].code_object;
13799 Py_INCREF(code_object);
13800 return code_object;
13801 }
13802 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
13803 int pos, i;
13804 __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
13805 if (unlikely(!code_line)) {
13806 return;
13807 }
13808 if (unlikely(!entries)) {
13809 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
13810 if (likely(entries)) {
13811 __pyx_code_cache.entries = entries;
13812 __pyx_code_cache.max_count = 64;
13813 __pyx_code_cache.count = 1;
13814 entries[0].code_line = code_line;
13815 entries[0].code_object = code_object;
13816 Py_INCREF(code_object);
13817 }
13818 return;
13819 }
13820 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
13821 if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
13822 PyCodeObject* tmp = entries[pos].code_object;
13823 entries[pos].code_object = code_object;
13824 Py_DECREF(tmp);
13825 return;
13826 }
13827 if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
13828 int new_max = __pyx_code_cache.max_count + 64;
13829 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
13830 __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
13831 if (unlikely(!entries)) {
13832 return;
13833 }
13834 __pyx_code_cache.entries = entries;
13835 __pyx_code_cache.max_count = new_max;
13836 }
13837 for (i=__pyx_code_cache.count; i>pos; i--) {
13838 entries[i] = entries[i-1];
13839 }
13840 entries[pos].code_line = code_line;
13841 entries[pos].code_object = code_object;
13842 __pyx_code_cache.count++;
13843 Py_INCREF(code_object);
13844 }
13845 #endif
13846
13847 /* AddTraceback */
13848 #include "compile.h"
13849 #include "frameobject.h"
13850 #include "traceback.h"
13851 #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
13852 #ifndef Py_BUILD_CORE
13853 #define Py_BUILD_CORE 1
13854 #endif
13855 #include "internal/pycore_frame.h"
13856 #endif
13857 #if CYTHON_COMPILING_IN_LIMITED_API
13858 static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
13859 PyObject *firstlineno, PyObject *name) {
13860 PyObject *replace = NULL;
13861 if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
13862 if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
13863 replace = PyObject_GetAttrString(code, "replace");
13864 if (likely(replace)) {
13865 PyObject *result;
13866 result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict);
13867 Py_DECREF(replace);
13868 return result;
13869 }
13870 PyErr_Clear();
13871 #if __PYX_LIMITED_VERSION_HEX < 0x030780000
13872 {
13873 PyObject *compiled = NULL, *result = NULL;
13874 if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL;
13875 if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL;
13876 compiled = Py_CompileString(
13877 "out = type(code)(\n"
13878 " code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n"
13879 " code.co_flags, code.co_code, code.co_consts, code.co_names,\n"
13880 " code.co_varnames, code.co_filename, co_name, co_firstlineno,\n"
13881 " code.co_lnotab)\n", "<dummy>", Py_file_input);
13882 if (!compiled) return NULL;
13883 result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict);
13884 Py_DECREF(compiled);
13885 if (!result) PyErr_Print();
13886 Py_DECREF(result);
13887 result = PyDict_GetItemString(scratch_dict, "out");
13888 if (result) Py_INCREF(result);
13889 return result;
13890 }
13891 #else
13892 return NULL;
13893 #endif
13894 }
13895 static void __Pyx_AddTraceback(const char *funcname, int c_line,
13896 int py_line, const char *filename) {
13897 PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
13898 PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
13899 PyObject *exc_type, *exc_value, *exc_traceback;
13900 int success = 0;
13901 if (c_line) {
13902 (void) __pyx_cfilenm;
13903 (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
13904 }
13905 PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
13906 code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
13907 if (unlikely(!code_object)) goto bad;
13908 py_py_line = PyLong_FromLong(py_line);
13909 if (unlikely(!py_py_line)) goto bad;
13910 py_funcname = PyUnicode_FromString(funcname);
13911 if (unlikely(!py_funcname)) goto bad;
13912 dict = PyDict_New();
13913 if (unlikely(!dict)) goto bad;
13914 {
13915 PyObject *old_code_object = code_object;
13916 code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
13917 Py_DECREF(old_code_object);
13918 }
13919 if (unlikely(!code_object)) goto bad;
13920 getframe = PySys_GetObject("_getframe");
13921 if (unlikely(!getframe)) goto bad;
13922 if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
13923 frame = PyEval_EvalCode(code_object, dict, dict);
13924 if (unlikely(!frame) || frame == Py_None) goto bad;
13925 success = 1;
13926 bad:
13927 PyErr_Restore(exc_type, exc_value, exc_traceback);
13928 Py_XDECREF(code_object);
13929 Py_XDECREF(py_py_line);
13930 Py_XDECREF(py_funcname);
13931 Py_XDECREF(dict);
13932 Py_XDECREF(replace);
13933 if (success) {
13934 PyTraceBack_Here(
13935 (struct _frame*)frame);
13936 }
13937 Py_XDECREF(frame);
13938 }
13939 #else
13940 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
13941 const char *funcname, int c_line,
13942 int py_line, const char *filename) {
13943 PyCodeObject *py_code = NULL;
13944 PyObject *py_funcname = NULL;
13945 #if PY_MAJOR_VERSION < 3
13946 PyObject *py_srcfile = NULL;
13947 py_srcfile = PyString_FromString(filename);
13948 if (!py_srcfile) goto bad;
13949 #endif
13950 if (c_line) {
13951 #if PY_MAJOR_VERSION < 3
13952 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
13953 if (!py_funcname) goto bad;
13954 #else
13955 py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
13956 if (!py_funcname) goto bad;
13957 funcname = PyUnicode_AsUTF8(py_funcname);
13958 if (!funcname) goto bad;
13959 #endif
13960 }
13961 else {
13962 #if PY_MAJOR_VERSION < 3
13963 py_funcname = PyString_FromString(funcname);
13964 if (!py_funcname) goto bad;
13965 #endif
13966 }
13967 #if PY_MAJOR_VERSION < 3
13968 py_code = __Pyx_PyCode_New(
13969 0,
13970 0,
13971 0,
13972 0,
13973 0,
13974 0,
13975 __pyx_empty_bytes, /*PyObject *code,*/
13976 __pyx_empty_tuple, /*PyObject *consts,*/
13977 __pyx_empty_tuple, /*PyObject *names,*/
13978 __pyx_empty_tuple, /*PyObject *varnames,*/
13979 __pyx_empty_tuple, /*PyObject *freevars,*/
13980 __pyx_empty_tuple, /*PyObject *cellvars,*/
13981 py_srcfile, /*PyObject *filename,*/
13982 py_funcname, /*PyObject *name,*/
13983 py_line,
13984 __pyx_empty_bytes /*PyObject *lnotab*/
13985 );
13986 Py_DECREF(py_srcfile);
13987 #else
13988 py_code = PyCode_NewEmpty(filename, funcname, py_line);
13989 #endif
13990 Py_XDECREF(py_funcname);
13991 return py_code;
13992 bad:
13993 Py_XDECREF(py_funcname);
13994 #if PY_MAJOR_VERSION < 3
13995 Py_XDECREF(py_srcfile);
13996 #endif
13997 return NULL;
13998 }
13999 static void __Pyx_AddTraceback(const char *funcname, int c_line,
14000 int py_line, const char *filename) {
14001 PyCodeObject *py_code = 0;
14002 PyFrameObject *py_frame = 0;
14003 PyThreadState *tstate = __Pyx_PyThreadState_Current;
14004 PyObject *ptype, *pvalue, *ptraceback;
14005 if (c_line) {
14006 c_line = __Pyx_CLineForTraceback(tstate, c_line);
14007 }
14008 py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
14009 if (!py_code) {
14010 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
14011 py_code = __Pyx_CreateCodeObjectForTraceback(
14012 funcname, c_line, py_line, filename);
14013 if (!py_code) {
14014 /* If the code object creation fails, then we should clear the
14015 fetched exception references and propagate the new exception */
14016 Py_XDECREF(ptype);
14017 Py_XDECREF(pvalue);
14018 Py_XDECREF(ptraceback);
14019 goto bad;
14020 }
14021 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
14022 __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
14023 }
14024 py_frame = PyFrame_New(
14025 tstate, /*PyThreadState *tstate,*/
14026 py_code, /*PyCodeObject *code,*/
14027 __pyx_d, /*PyObject *globals,*/
14028 0 /*PyObject *locals*/
14029 );
14030 if (!py_frame) goto bad;
14031 __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
14032 PyTraceBack_Here(py_frame);
14033 bad:
14034 Py_XDECREF(py_code);
14035 Py_XDECREF(py_frame);
14036 }
14037 #endif
14038
14039 /* CIntFromPyVerify */
14040 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
14041 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
14042 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
14043 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
14044 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
14045 {\
14046 func_type value = func_value;\
14047 if (sizeof(target_type) < sizeof(func_type)) {\
14048 if (unlikely(value != (func_type) (target_type) value)) {\
14049 func_type zero = 0;\
14050 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
14051 return (target_type) -1;\
14052 if (is_unsigned && unlikely(value < zero))\
14053 goto raise_neg_overflow;\
14054 else\
14055 goto raise_overflow;\
14056 }\
14057 }\
14058 return (target_type) value;\
14059 }
14060
14061 /* CIntToPy */
14062 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__recode_symbol_type(enum recode_symbol_type value) {
14063 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
14064 #pragma GCC diagnostic push
14065 #pragma GCC diagnostic ignored "-Wconversion"
14066 #endif
14067 const enum recode_symbol_type neg_one = (enum recode_symbol_type) -1, const_zero = (enum recode_symbol_type) 0;
14068 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
14069 #pragma GCC diagnostic pop
14070 #endif
14071 const int is_unsigned = neg_one > const_zero;
14072 if (is_unsigned) {
14073 if (sizeof(enum recode_symbol_type) < sizeof(long)) {
14074 return PyInt_FromLong((long) value);
14075 } else if (sizeof(enum recode_symbol_type) <= sizeof(unsigned long)) {
14076 return PyLong_FromUnsignedLong((unsigned long) value);
14077 #ifdef HAVE_LONG_LONG
14078 } else if (sizeof(enum recode_symbol_type) <= sizeof(unsigned PY_LONG_LONG)) {
14079 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
14080 #endif
14081 }
14082 } else {
14083 if (sizeof(enum recode_symbol_type) <= sizeof(long)) {
14084 return PyInt_FromLong((long) value);
14085 #ifdef HAVE_LONG_LONG
14086 } else if (sizeof(enum recode_symbol_type) <= sizeof(PY_LONG_LONG)) {
14087 return PyLong_FromLongLong((PY_LONG_LONG) value);
14088 #endif
14089 }
14090 }
14091 {
14092 int one = 1; int little = (int)*(unsigned char *)&one;
14093 unsigned char *bytes = (unsigned char *)&value;
14094 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
14095 return _PyLong_FromByteArray(bytes, sizeof(enum recode_symbol_type),
14096 little, !is_unsigned);
14097 #else
14098 PyObject *from_bytes, *result = NULL;
14099 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
14100 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
14101 if (!from_bytes) return NULL;
14102 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(enum recode_symbol_type));
14103 if (!py_bytes) goto limited_bad;
14104 order_str = PyUnicode_FromString(little ? "little" : "big");
14105 if (!order_str) goto limited_bad;
14106 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
14107 if (!arg_tuple) goto limited_bad;
14108 if (!is_unsigned) {
14109 kwds = PyDict_New();
14110 if (!kwds) goto limited_bad;
14111 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
14112 }
14113 result = PyObject_Call(from_bytes, arg_tuple, kwds);
14114 limited_bad:
14115 Py_XDECREF(kwds);
14116 Py_XDECREF(arg_tuple);
14117 Py_XDECREF(order_str);
14118 Py_XDECREF(py_bytes);
14119 Py_XDECREF(from_bytes);
14120 return result;
14121 #endif
14122 }
14123 }
14124
14125 /* CIntToPy */
14126 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__recode_data_type(enum recode_data_type value) {
14127 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
14128 #pragma GCC diagnostic push
14129 #pragma GCC diagnostic ignored "-Wconversion"
14130 #endif
14131 const enum recode_data_type neg_one = (enum recode_data_type) -1, const_zero = (enum recode_data_type) 0;
14132 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
14133 #pragma GCC diagnostic pop
14134 #endif
14135 const int is_unsigned = neg_one > const_zero;
14136 if (is_unsigned) {
14137 if (sizeof(enum recode_data_type) < sizeof(long)) {
14138 return PyInt_FromLong((long) value);
14139 } else if (sizeof(enum recode_data_type) <= sizeof(unsigned long)) {
14140 return PyLong_FromUnsignedLong((unsigned long) value);
14141 #ifdef HAVE_LONG_LONG
14142 } else if (sizeof(enum recode_data_type) <= sizeof(unsigned PY_LONG_LONG)) {
14143 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
14144 #endif
14145 }
14146 } else {
14147 if (sizeof(enum recode_data_type) <= sizeof(long)) {
14148 return PyInt_FromLong((long) value);
14149 #ifdef HAVE_LONG_LONG
14150 } else if (sizeof(enum recode_data_type) <= sizeof(PY_LONG_LONG)) {
14151 return PyLong_FromLongLong((PY_LONG_LONG) value);
14152 #endif
14153 }
14154 }
14155 {
14156 int one = 1; int little = (int)*(unsigned char *)&one;
14157 unsigned char *bytes = (unsigned char *)&value;
14158 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
14159 return _PyLong_FromByteArray(bytes, sizeof(enum recode_data_type),
14160 little, !is_unsigned);
14161 #else
14162 PyObject *from_bytes, *result = NULL;
14163 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
14164 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
14165 if (!from_bytes) return NULL;
14166 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(enum recode_data_type));
14167 if (!py_bytes) goto limited_bad;
14168 order_str = PyUnicode_FromString(little ? "little" : "big");
14169 if (!order_str) goto limited_bad;
14170 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
14171 if (!arg_tuple) goto limited_bad;
14172 if (!is_unsigned) {
14173 kwds = PyDict_New();
14174 if (!kwds) goto limited_bad;
14175 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
14176 }
14177 result = PyObject_Call(from_bytes, arg_tuple, kwds);
14178 limited_bad:
14179 Py_XDECREF(kwds);
14180 Py_XDECREF(arg_tuple);
14181 Py_XDECREF(order_str);
14182 Py_XDECREF(py_bytes);
14183 Py_XDECREF(from_bytes);
14184 return result;
14185 #endif
14186 }
14187 }
14188
14189 /* CIntToPy */
14190 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__recode_size(enum recode_size value) {
14191 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
14192 #pragma GCC diagnostic push
14193 #pragma GCC diagnostic ignored "-Wconversion"
14194 #endif
14195 const enum recode_size neg_one = (enum recode_size) -1, const_zero = (enum recode_size) 0;
14196 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
14197 #pragma GCC diagnostic pop
14198 #endif
14199 const int is_unsigned = neg_one > const_zero;
14200 if (is_unsigned) {
14201 if (sizeof(enum recode_size) < sizeof(long)) {
14202 return PyInt_FromLong((long) value);
14203 } else if (sizeof(enum recode_size) <= sizeof(unsigned long)) {
14204 return PyLong_FromUnsignedLong((unsigned long) value);
14205 #ifdef HAVE_LONG_LONG
14206 } else if (sizeof(enum recode_size) <= sizeof(unsigned PY_LONG_LONG)) {
14207 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
14208 #endif
14209 }
14210 } else {
14211 if (sizeof(enum recode_size) <= sizeof(long)) {
14212 return PyInt_FromLong((long) value);
14213 #ifdef HAVE_LONG_LONG
14214 } else if (sizeof(enum recode_size) <= sizeof(PY_LONG_LONG)) {
14215 return PyLong_FromLongLong((PY_LONG_LONG) value);
14216 #endif
14217 }
14218 }
14219 {
14220 int one = 1; int little = (int)*(unsigned char *)&one;
14221 unsigned char *bytes = (unsigned char *)&value;
14222 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
14223 return _PyLong_FromByteArray(bytes, sizeof(enum recode_size),
14224 little, !is_unsigned);
14225 #else
14226 PyObject *from_bytes, *result = NULL;
14227 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
14228 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
14229 if (!from_bytes) return NULL;
14230 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(enum recode_size));
14231 if (!py_bytes) goto limited_bad;
14232 order_str = PyUnicode_FromString(little ? "little" : "big");
14233 if (!order_str) goto limited_bad;
14234 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
14235 if (!arg_tuple) goto limited_bad;
14236 if (!is_unsigned) {
14237 kwds = PyDict_New();
14238 if (!kwds) goto limited_bad;
14239 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
14240 }
14241 result = PyObject_Call(from_bytes, arg_tuple, kwds);
14242 limited_bad:
14243 Py_XDECREF(kwds);
14244 Py_XDECREF(arg_tuple);
14245 Py_XDECREF(order_str);
14246 Py_XDECREF(py_bytes);
14247 Py_XDECREF(from_bytes);
14248 return result;
14249 #endif
14250 }
14251 }
14252
14253 /* CIntToPy */
14254 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__recode_step_type(enum recode_step_type value) {
14255 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
14256 #pragma GCC diagnostic push
14257 #pragma GCC diagnostic ignored "-Wconversion"
14258 #endif
14259 const enum recode_step_type neg_one = (enum recode_step_type) -1, const_zero = (enum recode_step_type) 0;
14260 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
14261 #pragma GCC diagnostic pop
14262 #endif
14263 const int is_unsigned = neg_one > const_zero;
14264 if (is_unsigned) {
14265 if (sizeof(enum recode_step_type) < sizeof(long)) {
14266 return PyInt_FromLong((long) value);
14267 } else if (sizeof(enum recode_step_type) <= sizeof(unsigned long)) {
14268 return PyLong_FromUnsignedLong((unsigned long) value);
14269 #ifdef HAVE_LONG_LONG
14270 } else if (sizeof(enum recode_step_type) <= sizeof(unsigned PY_LONG_LONG)) {
14271 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
14272 #endif
14273 }
14274 } else {
14275 if (sizeof(enum recode_step_type) <= sizeof(long)) {
14276 return PyInt_FromLong((long) value);
14277 #ifdef HAVE_LONG_LONG
14278 } else if (sizeof(enum recode_step_type) <= sizeof(PY_LONG_LONG)) {
14279 return PyLong_FromLongLong((PY_LONG_LONG) value);
14280 #endif
14281 }
14282 }
14283 {
14284 int one = 1; int little = (int)*(unsigned char *)&one;
14285 unsigned char *bytes = (unsigned char *)&value;
14286 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
14287 return _PyLong_FromByteArray(bytes, sizeof(enum recode_step_type),
14288 little, !is_unsigned);
14289 #else
14290 PyObject *from_bytes, *result = NULL;
14291 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
14292 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
14293 if (!from_bytes) return NULL;
14294 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(enum recode_step_type));
14295 if (!py_bytes) goto limited_bad;
14296 order_str = PyUnicode_FromString(little ? "little" : "big");
14297 if (!order_str) goto limited_bad;
14298 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
14299 if (!arg_tuple) goto limited_bad;
14300 if (!is_unsigned) {
14301 kwds = PyDict_New();
14302 if (!kwds) goto limited_bad;
14303 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
14304 }
14305 result = PyObject_Call(from_bytes, arg_tuple, kwds);
14306 limited_bad:
14307 Py_XDECREF(kwds);
14308 Py_XDECREF(arg_tuple);
14309 Py_XDECREF(order_str);
14310 Py_XDECREF(py_bytes);
14311 Py_XDECREF(from_bytes);
14312 return result;
14313 #endif
14314 }
14315 }
14316
14317 /* CIntToPy */
14318 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__recode_swap_input(enum recode_swap_input value) {
14319 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
14320 #pragma GCC diagnostic push
14321 #pragma GCC diagnostic ignored "-Wconversion"
14322 #endif
14323 const enum recode_swap_input neg_one = (enum recode_swap_input) -1, const_zero = (enum recode_swap_input) 0;
14324 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
14325 #pragma GCC diagnostic pop
14326 #endif
14327 const int is_unsigned = neg_one > const_zero;
14328 if (is_unsigned) {
14329 if (sizeof(enum recode_swap_input) < sizeof(long)) {
14330 return PyInt_FromLong((long) value);
14331 } else if (sizeof(enum recode_swap_input) <= sizeof(unsigned long)) {
14332 return PyLong_FromUnsignedLong((unsigned long) value);
14333 #ifdef HAVE_LONG_LONG
14334 } else if (sizeof(enum recode_swap_input) <= sizeof(unsigned PY_LONG_LONG)) {
14335 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
14336 #endif
14337 }
14338 } else {
14339 if (sizeof(enum recode_swap_input) <= sizeof(long)) {
14340 return PyInt_FromLong((long) value);
14341 #ifdef HAVE_LONG_LONG
14342 } else if (sizeof(enum recode_swap_input) <= sizeof(PY_LONG_LONG)) {
14343 return PyLong_FromLongLong((PY_LONG_LONG) value);
14344 #endif
14345 }
14346 }
14347 {
14348 int one = 1; int little = (int)*(unsigned char *)&one;
14349 unsigned char *bytes = (unsigned char *)&value;
14350 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
14351 return _PyLong_FromByteArray(bytes, sizeof(enum recode_swap_input),
14352 little, !is_unsigned);
14353 #else
14354 PyObject *from_bytes, *result = NULL;
14355 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
14356 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
14357 if (!from_bytes) return NULL;
14358 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(enum recode_swap_input));
14359 if (!py_bytes) goto limited_bad;
14360 order_str = PyUnicode_FromString(little ? "little" : "big");
14361 if (!order_str) goto limited_bad;
14362 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
14363 if (!arg_tuple) goto limited_bad;
14364 if (!is_unsigned) {
14365 kwds = PyDict_New();
14366 if (!kwds) goto limited_bad;
14367 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
14368 }
14369 result = PyObject_Call(from_bytes, arg_tuple, kwds);
14370 limited_bad:
14371 Py_XDECREF(kwds);
14372 Py_XDECREF(arg_tuple);
14373 Py_XDECREF(order_str);
14374 Py_XDECREF(py_bytes);
14375 Py_XDECREF(from_bytes);
14376 return result;
14377 #endif
14378 }
14379 }
14380
14381 /* CIntToPy */
14382 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__recode_error(enum recode_error value) {
14383 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
14384 #pragma GCC diagnostic push
14385 #pragma GCC diagnostic ignored "-Wconversion"
14386 #endif
14387 const enum recode_error neg_one = (enum recode_error) -1, const_zero = (enum recode_error) 0;
14388 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
14389 #pragma GCC diagnostic pop
14390 #endif
14391 const int is_unsigned = neg_one > const_zero;
14392 if (is_unsigned) {
14393 if (sizeof(enum recode_error) < sizeof(long)) {
14394 return PyInt_FromLong((long) value);
14395 } else if (sizeof(enum recode_error) <= sizeof(unsigned long)) {
14396 return PyLong_FromUnsignedLong((unsigned long) value);
14397 #ifdef HAVE_LONG_LONG
14398 } else if (sizeof(enum recode_error) <= sizeof(unsigned PY_LONG_LONG)) {
14399 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
14400 #endif
14401 }
14402 } else {
14403 if (sizeof(enum recode_error) <= sizeof(long)) {
14404 return PyInt_FromLong((long) value);
14405 #ifdef HAVE_LONG_LONG
14406 } else if (sizeof(enum recode_error) <= sizeof(PY_LONG_LONG)) {
14407 return PyLong_FromLongLong((PY_LONG_LONG) value);
14408 #endif
14409 }
14410 }
14411 {
14412 int one = 1; int little = (int)*(unsigned char *)&one;
14413 unsigned char *bytes = (unsigned char *)&value;
14414 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
14415 return _PyLong_FromByteArray(bytes, sizeof(enum recode_error),
14416 little, !is_unsigned);
14417 #else
14418 PyObject *from_bytes, *result = NULL;
14419 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
14420 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
14421 if (!from_bytes) return NULL;
14422 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(enum recode_error));
14423 if (!py_bytes) goto limited_bad;
14424 order_str = PyUnicode_FromString(little ? "little" : "big");
14425 if (!order_str) goto limited_bad;
14426 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
14427 if (!arg_tuple) goto limited_bad;
14428 if (!is_unsigned) {
14429 kwds = PyDict_New();
14430 if (!kwds) goto limited_bad;
14431 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
14432 }
14433 result = PyObject_Call(from_bytes, arg_tuple, kwds);
14434 limited_bad:
14435 Py_XDECREF(kwds);
14436 Py_XDECREF(arg_tuple);
14437 Py_XDECREF(order_str);
14438 Py_XDECREF(py_bytes);
14439 Py_XDECREF(from_bytes);
14440 return result;
14441 #endif
14442 }
14443 }
14444
14445 /* CIntToPy */
14446 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__recode_list_format(enum recode_list_format value) {
14447 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
14448 #pragma GCC diagnostic push
14449 #pragma GCC diagnostic ignored "-Wconversion"
14450 #endif
14451 const enum recode_list_format neg_one = (enum recode_list_format) -1, const_zero = (enum recode_list_format) 0;
14452 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
14453 #pragma GCC diagnostic pop
14454 #endif
14455 const int is_unsigned = neg_one > const_zero;
14456 if (is_unsigned) {
14457 if (sizeof(enum recode_list_format) < sizeof(long)) {
14458 return PyInt_FromLong((long) value);
14459 } else if (sizeof(enum recode_list_format) <= sizeof(unsigned long)) {
14460 return PyLong_FromUnsignedLong((unsigned long) value);
14461 #ifdef HAVE_LONG_LONG
14462 } else if (sizeof(enum recode_list_format) <= sizeof(unsigned PY_LONG_LONG)) {
14463 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
14464 #endif
14465 }
14466 } else {
14467 if (sizeof(enum recode_list_format) <= sizeof(long)) {
14468 return PyInt_FromLong((long) value);
14469 #ifdef HAVE_LONG_LONG
14470 } else if (sizeof(enum recode_list_format) <= sizeof(PY_LONG_LONG)) {
14471 return PyLong_FromLongLong((PY_LONG_LONG) value);
14472 #endif
14473 }
14474 }
14475 {
14476 int one = 1; int little = (int)*(unsigned char *)&one;
14477 unsigned char *bytes = (unsigned char *)&value;
14478 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
14479 return _PyLong_FromByteArray(bytes, sizeof(enum recode_list_format),
14480 little, !is_unsigned);
14481 #else
14482 PyObject *from_bytes, *result = NULL;
14483 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
14484 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
14485 if (!from_bytes) return NULL;
14486 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(enum recode_list_format));
14487 if (!py_bytes) goto limited_bad;
14488 order_str = PyUnicode_FromString(little ? "little" : "big");
14489 if (!order_str) goto limited_bad;
14490 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
14491 if (!arg_tuple) goto limited_bad;
14492 if (!is_unsigned) {
14493 kwds = PyDict_New();
14494 if (!kwds) goto limited_bad;
14495 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
14496 }
14497 result = PyObject_Call(from_bytes, arg_tuple, kwds);
14498 limited_bad:
14499 Py_XDECREF(kwds);
14500 Py_XDECREF(arg_tuple);
14501 Py_XDECREF(order_str);
14502 Py_XDECREF(py_bytes);
14503 Py_XDECREF(from_bytes);
14504 return result;
14505 #endif
14506 }
14507 }
14508
14509 /* CIntToPy */
14510 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__recode_programming_language(enum recode_programming_language value) {
14511 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
14512 #pragma GCC diagnostic push
14513 #pragma GCC diagnostic ignored "-Wconversion"
14514 #endif
14515 const enum recode_programming_language neg_one = (enum recode_programming_language) -1, const_zero = (enum recode_programming_language) 0;
14516 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
14517 #pragma GCC diagnostic pop
14518 #endif
14519 const int is_unsigned = neg_one > const_zero;
14520 if (is_unsigned) {
14521 if (sizeof(enum recode_programming_language) < sizeof(long)) {
14522 return PyInt_FromLong((long) value);
14523 } else if (sizeof(enum recode_programming_language) <= sizeof(unsigned long)) {
14524 return PyLong_FromUnsignedLong((unsigned long) value);
14525 #ifdef HAVE_LONG_LONG
14526 } else if (sizeof(enum recode_programming_language) <= sizeof(unsigned PY_LONG_LONG)) {
14527 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
14528 #endif
14529 }
14530 } else {
14531 if (sizeof(enum recode_programming_language) <= sizeof(long)) {
14532 return PyInt_FromLong((long) value);
14533 #ifdef HAVE_LONG_LONG
14534 } else if (sizeof(enum recode_programming_language) <= sizeof(PY_LONG_LONG)) {
14535 return PyLong_FromLongLong((PY_LONG_LONG) value);
14536 #endif
14537 }
14538 }
14539 {
14540 int one = 1; int little = (int)*(unsigned char *)&one;
14541 unsigned char *bytes = (unsigned char *)&value;
14542 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
14543 return _PyLong_FromByteArray(bytes, sizeof(enum recode_programming_language),
14544 little, !is_unsigned);
14545 #else
14546 PyObject *from_bytes, *result = NULL;
14547 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
14548 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
14549 if (!from_bytes) return NULL;
14550 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(enum recode_programming_language));
14551 if (!py_bytes) goto limited_bad;
14552 order_str = PyUnicode_FromString(little ? "little" : "big");
14553 if (!order_str) goto limited_bad;
14554 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
14555 if (!arg_tuple) goto limited_bad;
14556 if (!is_unsigned) {
14557 kwds = PyDict_New();
14558 if (!kwds) goto limited_bad;
14559 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
14560 }
14561 result = PyObject_Call(from_bytes, arg_tuple, kwds);
14562 limited_bad:
14563 Py_XDECREF(kwds);
14564 Py_XDECREF(arg_tuple);
14565 Py_XDECREF(order_str);
14566 Py_XDECREF(py_bytes);
14567 Py_XDECREF(from_bytes);
14568 return result;
14569 #endif
14570 }
14571 }
14572
14573 /* CIntToPy */
14574 static CYTHON_INLINE PyObject* __Pyx_PyInt_From___pyx_anon_enum(int value) {
14575 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
14576 #pragma GCC diagnostic push
14577 #pragma GCC diagnostic ignored "-Wconversion"
14578 #endif
14579 const int neg_one = (int) -1, const_zero = (int) 0;
14580 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
14581 #pragma GCC diagnostic pop
14582 #endif
14583 const int is_unsigned = neg_one > const_zero;
14584 if (is_unsigned) {
14585 if (sizeof(int) < sizeof(long)) {
14586 return PyInt_FromLong((long) value);
14587 } else if (sizeof(int) <= sizeof(unsigned long)) {
14588 return PyLong_FromUnsignedLong((unsigned long) value);
14589 #ifdef HAVE_LONG_LONG
14590 } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
14591 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
14592 #endif
14593 }
14594 } else {
14595 if (sizeof(int) <= sizeof(long)) {
14596 return PyInt_FromLong((long) value);
14597 #ifdef HAVE_LONG_LONG
14598 } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
14599 return PyLong_FromLongLong((PY_LONG_LONG) value);
14600 #endif
14601 }
14602 }
14603 {
14604 int one = 1; int little = (int)*(unsigned char *)&one;
14605 unsigned char *bytes = (unsigned char *)&value;
14606 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
14607 return _PyLong_FromByteArray(bytes, sizeof(int),
14608 little, !is_unsigned);
14609 #else
14610 PyObject *from_bytes, *result = NULL;
14611 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
14612 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
14613 if (!from_bytes) return NULL;
14614 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int));
14615 if (!py_bytes) goto limited_bad;
14616 order_str = PyUnicode_FromString(little ? "little" : "big");
14617 if (!order_str) goto limited_bad;
14618 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
14619 if (!arg_tuple) goto limited_bad;
14620 if (!is_unsigned) {
14621 kwds = PyDict_New();
14622 if (!kwds) goto limited_bad;
14623 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
14624 }
14625 result = PyObject_Call(from_bytes, arg_tuple, kwds);
14626 limited_bad:
14627 Py_XDECREF(kwds);
14628 Py_XDECREF(arg_tuple);
14629 Py_XDECREF(order_str);
14630 Py_XDECREF(py_bytes);
14631 Py_XDECREF(from_bytes);
14632 return result;
14633 #endif
14634 }
14635 }
14636
14637 /* CIntToPy */
14638 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__alias_find_type(enum alias_find_type value) {
14639 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
14640 #pragma GCC diagnostic push
14641 #pragma GCC diagnostic ignored "-Wconversion"
14642 #endif
14643 const enum alias_find_type neg_one = (enum alias_find_type) -1, const_zero = (enum alias_find_type) 0;
14644 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
14645 #pragma GCC diagnostic pop
14646 #endif
14647 const int is_unsigned = neg_one > const_zero;
14648 if (is_unsigned) {
14649 if (sizeof(enum alias_find_type) < sizeof(long)) {
14650 return PyInt_FromLong((long) value);
14651 } else if (sizeof(enum alias_find_type) <= sizeof(unsigned long)) {
14652 return PyLong_FromUnsignedLong((unsigned long) value);
14653 #ifdef HAVE_LONG_LONG
14654 } else if (sizeof(enum alias_find_type) <= sizeof(unsigned PY_LONG_LONG)) {
14655 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
14656 #endif
14657 }
14658 } else {
14659 if (sizeof(enum alias_find_type) <= sizeof(long)) {
14660 return PyInt_FromLong((long) value);
14661 #ifdef HAVE_LONG_LONG
14662 } else if (sizeof(enum alias_find_type) <= sizeof(PY_LONG_LONG)) {
14663 return PyLong_FromLongLong((PY_LONG_LONG) value);
14664 #endif
14665 }
14666 }
14667 {
14668 int one = 1; int little = (int)*(unsigned char *)&one;
14669 unsigned char *bytes = (unsigned char *)&value;
14670 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
14671 return _PyLong_FromByteArray(bytes, sizeof(enum alias_find_type),
14672 little, !is_unsigned);
14673 #else
14674 PyObject *from_bytes, *result = NULL;
14675 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
14676 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
14677 if (!from_bytes) return NULL;
14678 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(enum alias_find_type));
14679 if (!py_bytes) goto limited_bad;
14680 order_str = PyUnicode_FromString(little ? "little" : "big");
14681 if (!order_str) goto limited_bad;
14682 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
14683 if (!arg_tuple) goto limited_bad;
14684 if (!is_unsigned) {
14685 kwds = PyDict_New();
14686 if (!kwds) goto limited_bad;
14687 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
14688 }
14689 result = PyObject_Call(from_bytes, arg_tuple, kwds);
14690 limited_bad:
14691 Py_XDECREF(kwds);
14692 Py_XDECREF(arg_tuple);
14693 Py_XDECREF(order_str);
14694 Py_XDECREF(py_bytes);
14695 Py_XDECREF(from_bytes);
14696 return result;
14697 #endif
14698 }
14699 }
14700
14701 /* CIntFromPy */
14702 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
14703 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
14704 #pragma GCC diagnostic push
14705 #pragma GCC diagnostic ignored "-Wconversion"
14706 #endif
14707 const int neg_one = (int) -1, const_zero = (int) 0;
14708 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
14709 #pragma GCC diagnostic pop
14710 #endif
14711 const int is_unsigned = neg_one > const_zero;
14712 #if PY_MAJOR_VERSION < 3
14713 if (likely(PyInt_Check(x))) {
14714 if ((sizeof(int) < sizeof(long))) {
14715 __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
14716 } else {
14717 long val = PyInt_AS_LONG(x);
14718 if (is_unsigned && unlikely(val < 0)) {
14719 goto raise_neg_overflow;
14720 }
14721 return (int) val;
14722 }
14723 } else
14724 #endif
14725 if (likely(PyLong_Check(x))) {
14726 if (is_unsigned) {
14727 #if CYTHON_USE_PYLONG_INTERNALS
14728 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
14729 goto raise_neg_overflow;
14730 } else if (__Pyx_PyLong_IsCompact(x)) {
14731 __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
14732 } else {
14733 const digit* digits = __Pyx_PyLong_Digits(x);
14734 assert(__Pyx_PyLong_DigitCount(x) > 1);
14735 switch (__Pyx_PyLong_DigitCount(x)) {
14736 case 2:
14737 if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
14738 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
14739 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
14740 } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
14741 return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
14742 }
14743 }
14744 break;
14745 case 3:
14746 if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
14747 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
14748 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
14749 } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
14750 return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
14751 }
14752 }
14753 break;
14754 case 4:
14755 if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
14756 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
14757 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
14758 } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
14759 return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
14760 }
14761 }
14762 break;
14763 }
14764 }
14765 #endif
14766 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
14767 if (unlikely(Py_SIZE(x) < 0)) {
14768 goto raise_neg_overflow;
14769 }
14770 #else
14771 {
14772 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
14773 if (unlikely(result < 0))
14774 return (int) -1;
14775 if (unlikely(result == 1))
14776 goto raise_neg_overflow;
14777 }
14778 #endif
14779 if ((sizeof(int) <= sizeof(unsigned long))) {
14780 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
14781 #ifdef HAVE_LONG_LONG
14782 } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
14783 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
14784 #endif
14785 }
14786 } else {
14787 #if CYTHON_USE_PYLONG_INTERNALS
14788 if (__Pyx_PyLong_IsCompact(x)) {
14789 __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
14790 } else {
14791 const digit* digits = __Pyx_PyLong_Digits(x);
14792 assert(__Pyx_PyLong_DigitCount(x) > 1);
14793 switch (__Pyx_PyLong_SignedDigitCount(x)) {
14794 case -2:
14795 if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) {
14796 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
14797 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
14798 } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
14799 return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
14800 }
14801 }
14802 break;
14803 case 2:
14804 if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
14805 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
14806 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
14807 } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
14808 return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
14809 }
14810 }
14811 break;
14812 case -3:
14813 if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
14814 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
14815 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
14816 } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
14817 return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
14818 }
14819 }
14820 break;
14821 case 3:
14822 if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
14823 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
14824 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
14825 } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
14826 return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
14827 }
14828 }
14829 break;
14830 case -4:
14831 if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
14832 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
14833 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
14834 } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
14835 return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
14836 }
14837 }
14838 break;
14839 case 4:
14840 if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
14841 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
14842 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
14843 } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
14844 return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
14845 }
14846 }
14847 break;
14848 }
14849 }
14850 #endif
14851 if ((sizeof(int) <= sizeof(long))) {
14852 __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
14853 #ifdef HAVE_LONG_LONG
14854 } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
14855 __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
14856 #endif
14857 }
14858 }
14859 {
14860 int val;
14861 PyObject *v = __Pyx_PyNumber_IntOrLong(x);
14862 #if PY_MAJOR_VERSION < 3
14863 if (likely(v) && !PyLong_Check(v)) {
14864 PyObject *tmp = v;
14865 v = PyNumber_Long(tmp);
14866 Py_DECREF(tmp);
14867 }
14868 #endif
14869 if (likely(v)) {
14870 int ret = -1;
14871 #if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
14872 int one = 1; int is_little = (int)*(unsigned char *)&one;
14873 unsigned char *bytes = (unsigned char *)&val;
14874 ret = _PyLong_AsByteArray((PyLongObject *)v,
14875 bytes, sizeof(val),
14876 is_little, !is_unsigned);
14877 #else
14878 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
14879 int bits, remaining_bits, is_negative = 0;
14880 long idigit;
14881 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
14882 if (unlikely(!PyLong_CheckExact(v))) {
14883 PyObject *tmp = v;
14884 v = PyNumber_Long(v);
14885 assert(PyLong_CheckExact(v));
14886 Py_DECREF(tmp);
14887 if (unlikely(!v)) return (int) -1;
14888 }
14889 #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
14890 if (Py_SIZE(x) == 0)
14891 return (int) 0;
14892 is_negative = Py_SIZE(x) < 0;
14893 #else
14894 {
14895 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
14896 if (unlikely(result < 0))
14897 return (int) -1;
14898 is_negative = result == 1;
14899 }
14900 #endif
14901 if (is_unsigned && unlikely(is_negative)) {
14902 goto raise_neg_overflow;
14903 } else if (is_negative) {
14904 stepval = PyNumber_Invert(v);
14905 if (unlikely(!stepval))
14906 return (int) -1;
14907 } else {
14908 stepval = __Pyx_NewRef(v);
14909 }
14910 val = (int) 0;
14911 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
14912 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
14913 for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
14914 PyObject *tmp, *digit;
14915 digit = PyNumber_And(stepval, mask);
14916 if (unlikely(!digit)) goto done;
14917 idigit = PyLong_AsLong(digit);
14918 Py_DECREF(digit);
14919 if (unlikely(idigit < 0)) goto done;
14920 tmp = PyNumber_Rshift(stepval, shift);
14921 if (unlikely(!tmp)) goto done;
14922 Py_DECREF(stepval); stepval = tmp;
14923 val |= ((int) idigit) << bits;
14924 #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
14925 if (Py_SIZE(stepval) == 0)
14926 goto unpacking_done;
14927 #endif
14928 }
14929 idigit = PyLong_AsLong(stepval);
14930 if (unlikely(idigit < 0)) goto done;
14931 remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
14932 if (unlikely(idigit >= (1L << remaining_bits)))
14933 goto raise_overflow;
14934 val |= ((int) idigit) << bits;
14935 #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
14936 unpacking_done:
14937 #endif
14938 if (!is_unsigned) {
14939 if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
14940 goto raise_overflow;
14941 if (is_negative)
14942 val = ~val;
14943 }
14944 ret = 0;
14945 done:
14946 Py_XDECREF(shift);
14947 Py_XDECREF(mask);
14948 Py_XDECREF(stepval);
14949 #endif
14950 Py_DECREF(v);
14951 if (likely(!ret))
14952 return val;
14953 }
14954 return (int) -1;
14955 }
14956 } else {
14957 int val;
14958 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
14959 if (!tmp) return (int) -1;
14960 val = __Pyx_PyInt_As_int(tmp);
14961 Py_DECREF(tmp);
14962 return val;
14963 }
14964 raise_overflow:
14965 PyErr_SetString(PyExc_OverflowError,
14966 "value too large to convert to int");
14967 return (int) -1;
14968 raise_neg_overflow:
14969 PyErr_SetString(PyExc_OverflowError,
14970 "can't convert negative value to int");
14971 return (int) -1;
14972 }
14973
14974 /* CIntFromPy */
14975 static CYTHON_INLINE enum recode_list_format __Pyx_PyInt_As_enum__recode_list_format(PyObject *x) {
14976 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
14977 #pragma GCC diagnostic push
14978 #pragma GCC diagnostic ignored "-Wconversion"
14979 #endif
14980 const enum recode_list_format neg_one = (enum recode_list_format) -1, const_zero = (enum recode_list_format) 0;
14981 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
14982 #pragma GCC diagnostic pop
14983 #endif
14984 const int is_unsigned = neg_one > const_zero;
14985 #if PY_MAJOR_VERSION < 3
14986 if (likely(PyInt_Check(x))) {
14987 if ((sizeof(enum recode_list_format) < sizeof(long))) {
14988 __PYX_VERIFY_RETURN_INT(enum recode_list_format, long, PyInt_AS_LONG(x))
14989 } else {
14990 long val = PyInt_AS_LONG(x);
14991 if (is_unsigned && unlikely(val < 0)) {
14992 goto raise_neg_overflow;
14993 }
14994 return (enum recode_list_format) val;
14995 }
14996 } else
14997 #endif
14998 if (likely(PyLong_Check(x))) {
14999 if (is_unsigned) {
15000 #if CYTHON_USE_PYLONG_INTERNALS
15001 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
15002 goto raise_neg_overflow;
15003 } else if (__Pyx_PyLong_IsCompact(x)) {
15004 __PYX_VERIFY_RETURN_INT(enum recode_list_format, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
15005 } else {
15006 const digit* digits = __Pyx_PyLong_Digits(x);
15007 assert(__Pyx_PyLong_DigitCount(x) > 1);
15008 switch (__Pyx_PyLong_DigitCount(x)) {
15009 case 2:
15010 if ((8 * sizeof(enum recode_list_format) > 1 * PyLong_SHIFT)) {
15011 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
15012 __PYX_VERIFY_RETURN_INT(enum recode_list_format, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15013 } else if ((8 * sizeof(enum recode_list_format) >= 2 * PyLong_SHIFT)) {
15014 return (enum recode_list_format) (((((enum recode_list_format)digits[1]) << PyLong_SHIFT) | (enum recode_list_format)digits[0]));
15015 }
15016 }
15017 break;
15018 case 3:
15019 if ((8 * sizeof(enum recode_list_format) > 2 * PyLong_SHIFT)) {
15020 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
15021 __PYX_VERIFY_RETURN_INT(enum recode_list_format, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15022 } else if ((8 * sizeof(enum recode_list_format) >= 3 * PyLong_SHIFT)) {
15023 return (enum recode_list_format) (((((((enum recode_list_format)digits[2]) << PyLong_SHIFT) | (enum recode_list_format)digits[1]) << PyLong_SHIFT) | (enum recode_list_format)digits[0]));
15024 }
15025 }
15026 break;
15027 case 4:
15028 if ((8 * sizeof(enum recode_list_format) > 3 * PyLong_SHIFT)) {
15029 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
15030 __PYX_VERIFY_RETURN_INT(enum recode_list_format, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15031 } else if ((8 * sizeof(enum recode_list_format) >= 4 * PyLong_SHIFT)) {
15032 return (enum recode_list_format) (((((((((enum recode_list_format)digits[3]) << PyLong_SHIFT) | (enum recode_list_format)digits[2]) << PyLong_SHIFT) | (enum recode_list_format)digits[1]) << PyLong_SHIFT) | (enum recode_list_format)digits[0]));
15033 }
15034 }
15035 break;
15036 }
15037 }
15038 #endif
15039 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
15040 if (unlikely(Py_SIZE(x) < 0)) {
15041 goto raise_neg_overflow;
15042 }
15043 #else
15044 {
15045 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
15046 if (unlikely(result < 0))
15047 return (enum recode_list_format) -1;
15048 if (unlikely(result == 1))
15049 goto raise_neg_overflow;
15050 }
15051 #endif
15052 if ((sizeof(enum recode_list_format) <= sizeof(unsigned long))) {
15053 __PYX_VERIFY_RETURN_INT_EXC(enum recode_list_format, unsigned long, PyLong_AsUnsignedLong(x))
15054 #ifdef HAVE_LONG_LONG
15055 } else if ((sizeof(enum recode_list_format) <= sizeof(unsigned PY_LONG_LONG))) {
15056 __PYX_VERIFY_RETURN_INT_EXC(enum recode_list_format, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
15057 #endif
15058 }
15059 } else {
15060 #if CYTHON_USE_PYLONG_INTERNALS
15061 if (__Pyx_PyLong_IsCompact(x)) {
15062 __PYX_VERIFY_RETURN_INT(enum recode_list_format, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
15063 } else {
15064 const digit* digits = __Pyx_PyLong_Digits(x);
15065 assert(__Pyx_PyLong_DigitCount(x) > 1);
15066 switch (__Pyx_PyLong_SignedDigitCount(x)) {
15067 case -2:
15068 if ((8 * sizeof(enum recode_list_format) - 1 > 1 * PyLong_SHIFT)) {
15069 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
15070 __PYX_VERIFY_RETURN_INT(enum recode_list_format, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15071 } else if ((8 * sizeof(enum recode_list_format) - 1 > 2 * PyLong_SHIFT)) {
15072 return (enum recode_list_format) (((enum recode_list_format)-1)*(((((enum recode_list_format)digits[1]) << PyLong_SHIFT) | (enum recode_list_format)digits[0])));
15073 }
15074 }
15075 break;
15076 case 2:
15077 if ((8 * sizeof(enum recode_list_format) > 1 * PyLong_SHIFT)) {
15078 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
15079 __PYX_VERIFY_RETURN_INT(enum recode_list_format, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15080 } else if ((8 * sizeof(enum recode_list_format) - 1 > 2 * PyLong_SHIFT)) {
15081 return (enum recode_list_format) ((((((enum recode_list_format)digits[1]) << PyLong_SHIFT) | (enum recode_list_format)digits[0])));
15082 }
15083 }
15084 break;
15085 case -3:
15086 if ((8 * sizeof(enum recode_list_format) - 1 > 2 * PyLong_SHIFT)) {
15087 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
15088 __PYX_VERIFY_RETURN_INT(enum recode_list_format, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15089 } else if ((8 * sizeof(enum recode_list_format) - 1 > 3 * PyLong_SHIFT)) {
15090 return (enum recode_list_format) (((enum recode_list_format)-1)*(((((((enum recode_list_format)digits[2]) << PyLong_SHIFT) | (enum recode_list_format)digits[1]) << PyLong_SHIFT) | (enum recode_list_format)digits[0])));
15091 }
15092 }
15093 break;
15094 case 3:
15095 if ((8 * sizeof(enum recode_list_format) > 2 * PyLong_SHIFT)) {
15096 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
15097 __PYX_VERIFY_RETURN_INT(enum recode_list_format, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15098 } else if ((8 * sizeof(enum recode_list_format) - 1 > 3 * PyLong_SHIFT)) {
15099 return (enum recode_list_format) ((((((((enum recode_list_format)digits[2]) << PyLong_SHIFT) | (enum recode_list_format)digits[1]) << PyLong_SHIFT) | (enum recode_list_format)digits[0])));
15100 }
15101 }
15102 break;
15103 case -4:
15104 if ((8 * sizeof(enum recode_list_format) - 1 > 3 * PyLong_SHIFT)) {
15105 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
15106 __PYX_VERIFY_RETURN_INT(enum recode_list_format, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15107 } else if ((8 * sizeof(enum recode_list_format) - 1 > 4 * PyLong_SHIFT)) {
15108 return (enum recode_list_format) (((enum recode_list_format)-1)*(((((((((enum recode_list_format)digits[3]) << PyLong_SHIFT) | (enum recode_list_format)digits[2]) << PyLong_SHIFT) | (enum recode_list_format)digits[1]) << PyLong_SHIFT) | (enum recode_list_format)digits[0])));
15109 }
15110 }
15111 break;
15112 case 4:
15113 if ((8 * sizeof(enum recode_list_format) > 3 * PyLong_SHIFT)) {
15114 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
15115 __PYX_VERIFY_RETURN_INT(enum recode_list_format, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15116 } else if ((8 * sizeof(enum recode_list_format) - 1 > 4 * PyLong_SHIFT)) {
15117 return (enum recode_list_format) ((((((((((enum recode_list_format)digits[3]) << PyLong_SHIFT) | (enum recode_list_format)digits[2]) << PyLong_SHIFT) | (enum recode_list_format)digits[1]) << PyLong_SHIFT) | (enum recode_list_format)digits[0])));
15118 }
15119 }
15120 break;
15121 }
15122 }
15123 #endif
15124 if ((sizeof(enum recode_list_format) <= sizeof(long))) {
15125 __PYX_VERIFY_RETURN_INT_EXC(enum recode_list_format, long, PyLong_AsLong(x))
15126 #ifdef HAVE_LONG_LONG
15127 } else if ((sizeof(enum recode_list_format) <= sizeof(PY_LONG_LONG))) {
15128 __PYX_VERIFY_RETURN_INT_EXC(enum recode_list_format, PY_LONG_LONG, PyLong_AsLongLong(x))
15129 #endif
15130 }
15131 }
15132 PyErr_SetString(PyExc_RuntimeError,
15133 "_PyLong_AsByteArray() not available, cannot convert large enums");
15134 return (enum recode_list_format) -1;
15135 } else {
15136 enum recode_list_format val;
15137 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
15138 if (!tmp) return (enum recode_list_format) -1;
15139 val = __Pyx_PyInt_As_enum__recode_list_format(tmp);
15140 Py_DECREF(tmp);
15141 return val;
15142 }
15143 raise_overflow:
15144 PyErr_SetString(PyExc_OverflowError,
15145 "value too large to convert to enum recode_list_format");
15146 return (enum recode_list_format) -1;
15147 raise_neg_overflow:
15148 PyErr_SetString(PyExc_OverflowError,
15149 "can't convert negative value to enum recode_list_format");
15150 return (enum recode_list_format) -1;
15151 }
15152
15153 /* CIntFromPy */
15154 static CYTHON_INLINE enum recode_error __Pyx_PyInt_As_enum__recode_error(PyObject *x) {
15155 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
15156 #pragma GCC diagnostic push
15157 #pragma GCC diagnostic ignored "-Wconversion"
15158 #endif
15159 const enum recode_error neg_one = (enum recode_error) -1, const_zero = (enum recode_error) 0;
15160 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
15161 #pragma GCC diagnostic pop
15162 #endif
15163 const int is_unsigned = neg_one > const_zero;
15164 #if PY_MAJOR_VERSION < 3
15165 if (likely(PyInt_Check(x))) {
15166 if ((sizeof(enum recode_error) < sizeof(long))) {
15167 __PYX_VERIFY_RETURN_INT(enum recode_error, long, PyInt_AS_LONG(x))
15168 } else {
15169 long val = PyInt_AS_LONG(x);
15170 if (is_unsigned && unlikely(val < 0)) {
15171 goto raise_neg_overflow;
15172 }
15173 return (enum recode_error) val;
15174 }
15175 } else
15176 #endif
15177 if (likely(PyLong_Check(x))) {
15178 if (is_unsigned) {
15179 #if CYTHON_USE_PYLONG_INTERNALS
15180 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
15181 goto raise_neg_overflow;
15182 } else if (__Pyx_PyLong_IsCompact(x)) {
15183 __PYX_VERIFY_RETURN_INT(enum recode_error, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
15184 } else {
15185 const digit* digits = __Pyx_PyLong_Digits(x);
15186 assert(__Pyx_PyLong_DigitCount(x) > 1);
15187 switch (__Pyx_PyLong_DigitCount(x)) {
15188 case 2:
15189 if ((8 * sizeof(enum recode_error) > 1 * PyLong_SHIFT)) {
15190 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
15191 __PYX_VERIFY_RETURN_INT(enum recode_error, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15192 } else if ((8 * sizeof(enum recode_error) >= 2 * PyLong_SHIFT)) {
15193 return (enum recode_error) (((((enum recode_error)digits[1]) << PyLong_SHIFT) | (enum recode_error)digits[0]));
15194 }
15195 }
15196 break;
15197 case 3:
15198 if ((8 * sizeof(enum recode_error) > 2 * PyLong_SHIFT)) {
15199 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
15200 __PYX_VERIFY_RETURN_INT(enum recode_error, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15201 } else if ((8 * sizeof(enum recode_error) >= 3 * PyLong_SHIFT)) {
15202 return (enum recode_error) (((((((enum recode_error)digits[2]) << PyLong_SHIFT) | (enum recode_error)digits[1]) << PyLong_SHIFT) | (enum recode_error)digits[0]));
15203 }
15204 }
15205 break;
15206 case 4:
15207 if ((8 * sizeof(enum recode_error) > 3 * PyLong_SHIFT)) {
15208 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
15209 __PYX_VERIFY_RETURN_INT(enum recode_error, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15210 } else if ((8 * sizeof(enum recode_error) >= 4 * PyLong_SHIFT)) {
15211 return (enum recode_error) (((((((((enum recode_error)digits[3]) << PyLong_SHIFT) | (enum recode_error)digits[2]) << PyLong_SHIFT) | (enum recode_error)digits[1]) << PyLong_SHIFT) | (enum recode_error)digits[0]));
15212 }
15213 }
15214 break;
15215 }
15216 }
15217 #endif
15218 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
15219 if (unlikely(Py_SIZE(x) < 0)) {
15220 goto raise_neg_overflow;
15221 }
15222 #else
15223 {
15224 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
15225 if (unlikely(result < 0))
15226 return (enum recode_error) -1;
15227 if (unlikely(result == 1))
15228 goto raise_neg_overflow;
15229 }
15230 #endif
15231 if ((sizeof(enum recode_error) <= sizeof(unsigned long))) {
15232 __PYX_VERIFY_RETURN_INT_EXC(enum recode_error, unsigned long, PyLong_AsUnsignedLong(x))
15233 #ifdef HAVE_LONG_LONG
15234 } else if ((sizeof(enum recode_error) <= sizeof(unsigned PY_LONG_LONG))) {
15235 __PYX_VERIFY_RETURN_INT_EXC(enum recode_error, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
15236 #endif
15237 }
15238 } else {
15239 #if CYTHON_USE_PYLONG_INTERNALS
15240 if (__Pyx_PyLong_IsCompact(x)) {
15241 __PYX_VERIFY_RETURN_INT(enum recode_error, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
15242 } else {
15243 const digit* digits = __Pyx_PyLong_Digits(x);
15244 assert(__Pyx_PyLong_DigitCount(x) > 1);
15245 switch (__Pyx_PyLong_SignedDigitCount(x)) {
15246 case -2:
15247 if ((8 * sizeof(enum recode_error) - 1 > 1 * PyLong_SHIFT)) {
15248 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
15249 __PYX_VERIFY_RETURN_INT(enum recode_error, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15250 } else if ((8 * sizeof(enum recode_error) - 1 > 2 * PyLong_SHIFT)) {
15251 return (enum recode_error) (((enum recode_error)-1)*(((((enum recode_error)digits[1]) << PyLong_SHIFT) | (enum recode_error)digits[0])));
15252 }
15253 }
15254 break;
15255 case 2:
15256 if ((8 * sizeof(enum recode_error) > 1 * PyLong_SHIFT)) {
15257 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
15258 __PYX_VERIFY_RETURN_INT(enum recode_error, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15259 } else if ((8 * sizeof(enum recode_error) - 1 > 2 * PyLong_SHIFT)) {
15260 return (enum recode_error) ((((((enum recode_error)digits[1]) << PyLong_SHIFT) | (enum recode_error)digits[0])));
15261 }
15262 }
15263 break;
15264 case -3:
15265 if ((8 * sizeof(enum recode_error) - 1 > 2 * PyLong_SHIFT)) {
15266 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
15267 __PYX_VERIFY_RETURN_INT(enum recode_error, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15268 } else if ((8 * sizeof(enum recode_error) - 1 > 3 * PyLong_SHIFT)) {
15269 return (enum recode_error) (((enum recode_error)-1)*(((((((enum recode_error)digits[2]) << PyLong_SHIFT) | (enum recode_error)digits[1]) << PyLong_SHIFT) | (enum recode_error)digits[0])));
15270 }
15271 }
15272 break;
15273 case 3:
15274 if ((8 * sizeof(enum recode_error) > 2 * PyLong_SHIFT)) {
15275 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
15276 __PYX_VERIFY_RETURN_INT(enum recode_error, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15277 } else if ((8 * sizeof(enum recode_error) - 1 > 3 * PyLong_SHIFT)) {
15278 return (enum recode_error) ((((((((enum recode_error)digits[2]) << PyLong_SHIFT) | (enum recode_error)digits[1]) << PyLong_SHIFT) | (enum recode_error)digits[0])));
15279 }
15280 }
15281 break;
15282 case -4:
15283 if ((8 * sizeof(enum recode_error) - 1 > 3 * PyLong_SHIFT)) {
15284 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
15285 __PYX_VERIFY_RETURN_INT(enum recode_error, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15286 } else if ((8 * sizeof(enum recode_error) - 1 > 4 * PyLong_SHIFT)) {
15287 return (enum recode_error) (((enum recode_error)-1)*(((((((((enum recode_error)digits[3]) << PyLong_SHIFT) | (enum recode_error)digits[2]) << PyLong_SHIFT) | (enum recode_error)digits[1]) << PyLong_SHIFT) | (enum recode_error)digits[0])));
15288 }
15289 }
15290 break;
15291 case 4:
15292 if ((8 * sizeof(enum recode_error) > 3 * PyLong_SHIFT)) {
15293 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
15294 __PYX_VERIFY_RETURN_INT(enum recode_error, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15295 } else if ((8 * sizeof(enum recode_error) - 1 > 4 * PyLong_SHIFT)) {
15296 return (enum recode_error) ((((((((((enum recode_error)digits[3]) << PyLong_SHIFT) | (enum recode_error)digits[2]) << PyLong_SHIFT) | (enum recode_error)digits[1]) << PyLong_SHIFT) | (enum recode_error)digits[0])));
15297 }
15298 }
15299 break;
15300 }
15301 }
15302 #endif
15303 if ((sizeof(enum recode_error) <= sizeof(long))) {
15304 __PYX_VERIFY_RETURN_INT_EXC(enum recode_error, long, PyLong_AsLong(x))
15305 #ifdef HAVE_LONG_LONG
15306 } else if ((sizeof(enum recode_error) <= sizeof(PY_LONG_LONG))) {
15307 __PYX_VERIFY_RETURN_INT_EXC(enum recode_error, PY_LONG_LONG, PyLong_AsLongLong(x))
15308 #endif
15309 }
15310 }
15311 PyErr_SetString(PyExc_RuntimeError,
15312 "_PyLong_AsByteArray() not available, cannot convert large enums");
15313 return (enum recode_error) -1;
15314 } else {
15315 enum recode_error val;
15316 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
15317 if (!tmp) return (enum recode_error) -1;
15318 val = __Pyx_PyInt_As_enum__recode_error(tmp);
15319 Py_DECREF(tmp);
15320 return val;
15321 }
15322 raise_overflow:
15323 PyErr_SetString(PyExc_OverflowError,
15324 "value too large to convert to enum recode_error");
15325 return (enum recode_error) -1;
15326 raise_neg_overflow:
15327 PyErr_SetString(PyExc_OverflowError,
15328 "can't convert negative value to enum recode_error");
15329 return (enum recode_error) -1;
15330 }
15331
15332 /* FormatTypeName */
15333 #if CYTHON_COMPILING_IN_LIMITED_API
15334 static __Pyx_TypeName
15335 __Pyx_PyType_GetName(PyTypeObject* tp)
15336 {
15337 PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
15338 __pyx_n_s_name);
15339 if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) {
15340 PyErr_Clear();
15341 Py_XDECREF(name);
15342 name = __Pyx_NewRef(__pyx_n_s__41);
15343 }
15344 return name;
15345 }
15346 #endif
15347
15348 /* CIntToPy */
15349 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
15350 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
15351 #pragma GCC diagnostic push
15352 #pragma GCC diagnostic ignored "-Wconversion"
15353 #endif
15354 const long neg_one = (long) -1, const_zero = (long) 0;
15355 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
15356 #pragma GCC diagnostic pop
15357 #endif
15358 const int is_unsigned = neg_one > const_zero;
15359 if (is_unsigned) {
15360 if (sizeof(long) < sizeof(long)) {
15361 return PyInt_FromLong((long) value);
15362 } else if (sizeof(long) <= sizeof(unsigned long)) {
15363 return PyLong_FromUnsignedLong((unsigned long) value);
15364 #ifdef HAVE_LONG_LONG
15365 } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
15366 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
15367 #endif
15368 }
15369 } else {
15370 if (sizeof(long) <= sizeof(long)) {
15371 return PyInt_FromLong((long) value);
15372 #ifdef HAVE_LONG_LONG
15373 } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
15374 return PyLong_FromLongLong((PY_LONG_LONG) value);
15375 #endif
15376 }
15377 }
15378 {
15379 int one = 1; int little = (int)*(unsigned char *)&one;
15380 unsigned char *bytes = (unsigned char *)&value;
15381 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
15382 return _PyLong_FromByteArray(bytes, sizeof(long),
15383 little, !is_unsigned);
15384 #else
15385 PyObject *from_bytes, *result = NULL;
15386 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
15387 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
15388 if (!from_bytes) return NULL;
15389 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
15390 if (!py_bytes) goto limited_bad;
15391 order_str = PyUnicode_FromString(little ? "little" : "big");
15392 if (!order_str) goto limited_bad;
15393 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
15394 if (!arg_tuple) goto limited_bad;
15395 if (!is_unsigned) {
15396 kwds = PyDict_New();
15397 if (!kwds) goto limited_bad;
15398 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
15399 }
15400 result = PyObject_Call(from_bytes, arg_tuple, kwds);
15401 limited_bad:
15402 Py_XDECREF(kwds);
15403 Py_XDECREF(arg_tuple);
15404 Py_XDECREF(order_str);
15405 Py_XDECREF(py_bytes);
15406 Py_XDECREF(from_bytes);
15407 return result;
15408 #endif
15409 }
15410 }
15411
15412 /* CIntFromPy */
15413 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
15414 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
15415 #pragma GCC diagnostic push
15416 #pragma GCC diagnostic ignored "-Wconversion"
15417 #endif
15418 const long neg_one = (long) -1, const_zero = (long) 0;
15419 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
15420 #pragma GCC diagnostic pop
15421 #endif
15422 const int is_unsigned = neg_one > const_zero;
15423 #if PY_MAJOR_VERSION < 3
15424 if (likely(PyInt_Check(x))) {
15425 if ((sizeof(long) < sizeof(long))) {
15426 __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
15427 } else {
15428 long val = PyInt_AS_LONG(x);
15429 if (is_unsigned && unlikely(val < 0)) {
15430 goto raise_neg_overflow;
15431 }
15432 return (long) val;
15433 }
15434 } else
15435 #endif
15436 if (likely(PyLong_Check(x))) {
15437 if (is_unsigned) {
15438 #if CYTHON_USE_PYLONG_INTERNALS
15439 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
15440 goto raise_neg_overflow;
15441 } else if (__Pyx_PyLong_IsCompact(x)) {
15442 __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
15443 } else {
15444 const digit* digits = __Pyx_PyLong_Digits(x);
15445 assert(__Pyx_PyLong_DigitCount(x) > 1);
15446 switch (__Pyx_PyLong_DigitCount(x)) {
15447 case 2:
15448 if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
15449 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
15450 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15451 } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
15452 return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
15453 }
15454 }
15455 break;
15456 case 3:
15457 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
15458 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
15459 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15460 } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
15461 return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
15462 }
15463 }
15464 break;
15465 case 4:
15466 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
15467 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
15468 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15469 } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
15470 return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
15471 }
15472 }
15473 break;
15474 }
15475 }
15476 #endif
15477 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
15478 if (unlikely(Py_SIZE(x) < 0)) {
15479 goto raise_neg_overflow;
15480 }
15481 #else
15482 {
15483 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
15484 if (unlikely(result < 0))
15485 return (long) -1;
15486 if (unlikely(result == 1))
15487 goto raise_neg_overflow;
15488 }
15489 #endif
15490 if ((sizeof(long) <= sizeof(unsigned long))) {
15491 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
15492 #ifdef HAVE_LONG_LONG
15493 } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
15494 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
15495 #endif
15496 }
15497 } else {
15498 #if CYTHON_USE_PYLONG_INTERNALS
15499 if (__Pyx_PyLong_IsCompact(x)) {
15500 __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
15501 } else {
15502 const digit* digits = __Pyx_PyLong_Digits(x);
15503 assert(__Pyx_PyLong_DigitCount(x) > 1);
15504 switch (__Pyx_PyLong_SignedDigitCount(x)) {
15505 case -2:
15506 if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) {
15507 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
15508 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15509 } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
15510 return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
15511 }
15512 }
15513 break;
15514 case 2:
15515 if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
15516 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
15517 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15518 } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
15519 return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
15520 }
15521 }
15522 break;
15523 case -3:
15524 if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
15525 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
15526 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15527 } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
15528 return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
15529 }
15530 }
15531 break;
15532 case 3:
15533 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
15534 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
15535 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15536 } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
15537 return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
15538 }
15539 }
15540 break;
15541 case -4:
15542 if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
15543 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
15544 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15545 } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
15546 return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
15547 }
15548 }
15549 break;
15550 case 4:
15551 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
15552 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
15553 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15554 } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
15555 return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
15556 }
15557 }
15558 break;
15559 }
15560 }
15561 #endif
15562 if ((sizeof(long) <= sizeof(long))) {
15563 __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
15564 #ifdef HAVE_LONG_LONG
15565 } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
15566 __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
15567 #endif
15568 }
15569 }
15570 {
15571 long val;
15572 PyObject *v = __Pyx_PyNumber_IntOrLong(x);
15573 #if PY_MAJOR_VERSION < 3
15574 if (likely(v) && !PyLong_Check(v)) {
15575 PyObject *tmp = v;
15576 v = PyNumber_Long(tmp);
15577 Py_DECREF(tmp);
15578 }
15579 #endif
15580 if (likely(v)) {
15581 int ret = -1;
15582 #if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
15583 int one = 1; int is_little = (int)*(unsigned char *)&one;
15584 unsigned char *bytes = (unsigned char *)&val;
15585 ret = _PyLong_AsByteArray((PyLongObject *)v,
15586 bytes, sizeof(val),
15587 is_little, !is_unsigned);
15588 #else
15589 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
15590 int bits, remaining_bits, is_negative = 0;
15591 long idigit;
15592 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
15593 if (unlikely(!PyLong_CheckExact(v))) {
15594 PyObject *tmp = v;
15595 v = PyNumber_Long(v);
15596 assert(PyLong_CheckExact(v));
15597 Py_DECREF(tmp);
15598 if (unlikely(!v)) return (long) -1;
15599 }
15600 #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
15601 if (Py_SIZE(x) == 0)
15602 return (long) 0;
15603 is_negative = Py_SIZE(x) < 0;
15604 #else
15605 {
15606 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
15607 if (unlikely(result < 0))
15608 return (long) -1;
15609 is_negative = result == 1;
15610 }
15611 #endif
15612 if (is_unsigned && unlikely(is_negative)) {
15613 goto raise_neg_overflow;
15614 } else if (is_negative) {
15615 stepval = PyNumber_Invert(v);
15616 if (unlikely(!stepval))
15617 return (long) -1;
15618 } else {
15619 stepval = __Pyx_NewRef(v);
15620 }
15621 val = (long) 0;
15622 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
15623 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
15624 for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
15625 PyObject *tmp, *digit;
15626 digit = PyNumber_And(stepval, mask);
15627 if (unlikely(!digit)) goto done;
15628 idigit = PyLong_AsLong(digit);
15629 Py_DECREF(digit);
15630 if (unlikely(idigit < 0)) goto done;
15631 tmp = PyNumber_Rshift(stepval, shift);
15632 if (unlikely(!tmp)) goto done;
15633 Py_DECREF(stepval); stepval = tmp;
15634 val |= ((long) idigit) << bits;
15635 #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
15636 if (Py_SIZE(stepval) == 0)
15637 goto unpacking_done;
15638 #endif
15639 }
15640 idigit = PyLong_AsLong(stepval);
15641 if (unlikely(idigit < 0)) goto done;
15642 remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
15643 if (unlikely(idigit >= (1L << remaining_bits)))
15644 goto raise_overflow;
15645 val |= ((long) idigit) << bits;
15646 #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
15647 unpacking_done:
15648 #endif
15649 if (!is_unsigned) {
15650 if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
15651 goto raise_overflow;
15652 if (is_negative)
15653 val = ~val;
15654 }
15655 ret = 0;
15656 done:
15657 Py_XDECREF(shift);
15658 Py_XDECREF(mask);
15659 Py_XDECREF(stepval);
15660 #endif
15661 Py_DECREF(v);
15662 if (likely(!ret))
15663 return val;
15664 }
15665 return (long) -1;
15666 }
15667 } else {
15668 long val;
15669 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
15670 if (!tmp) return (long) -1;
15671 val = __Pyx_PyInt_As_long(tmp);
15672 Py_DECREF(tmp);
15673 return val;
15674 }
15675 raise_overflow:
15676 PyErr_SetString(PyExc_OverflowError,
15677 "value too large to convert to long");
15678 return (long) -1;
15679 raise_neg_overflow:
15680 PyErr_SetString(PyExc_OverflowError,
15681 "can't convert negative value to long");
15682 return (long) -1;
15683 }
15684
15685 /* FastTypeChecks */
15686 #if CYTHON_COMPILING_IN_CPYTHON
15687 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
15688 while (a) {
15689 a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
15690 if (a == b)
15691 return 1;
15692 }
15693 return b == &PyBaseObject_Type;
15694 }
15695 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
15696 PyObject *mro;
15697 if (a == b) return 1;
15698 mro = a->tp_mro;
15699 if (likely(mro)) {
15700 Py_ssize_t i, n;
15701 n = PyTuple_GET_SIZE(mro);
15702 for (i = 0; i < n; i++) {
15703 if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
15704 return 1;
15705 }
15706 return 0;
15707 }
15708 return __Pyx_InBases(a, b);
15709 }
15710 static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
15711 PyObject *mro;
15712 if (cls == a || cls == b) return 1;
15713 mro = cls->tp_mro;
15714 if (likely(mro)) {
15715 Py_ssize_t i, n;
15716 n = PyTuple_GET_SIZE(mro);
15717 for (i = 0; i < n; i++) {
15718 PyObject *base = PyTuple_GET_ITEM(mro, i);
15719 if (base == (PyObject *)a || base == (PyObject *)b)
15720 return 1;
15721 }
15722 return 0;
15723 }
15724 return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
15725 }
15726 #if PY_MAJOR_VERSION == 2
15727 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
15728 PyObject *exception, *value, *tb;
15729 int res;
15730 __Pyx_PyThreadState_declare
15731 __Pyx_PyThreadState_assign
15732 __Pyx_ErrFetch(&exception, &value, &tb);
15733 res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
15734 if (unlikely(res == -1)) {
15735 PyErr_WriteUnraisable(err);
15736 res = 0;
15737 }
15738 if (!res) {
15739 res = PyObject_IsSubclass(err, exc_type2);
15740 if (unlikely(res == -1)) {
15741 PyErr_WriteUnraisable(err);
15742 res = 0;
15743 }
15744 }
15745 __Pyx_ErrRestore(exception, value, tb);
15746 return res;
15747 }
15748 #else
15749 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
15750 if (exc_type1) {
15751 return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
15752 } else {
15753 return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
15754 }
15755 }
15756 #endif
15757 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
15758 Py_ssize_t i, n;
15759 assert(PyExceptionClass_Check(exc_type));
15760 n = PyTuple_GET_SIZE(tuple);
15761 #if PY_MAJOR_VERSION >= 3
15762 for (i=0; i<n; i++) {
15763 if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
15764 }
15765 #endif
15766 for (i=0; i<n; i++) {
15767 PyObject *t = PyTuple_GET_ITEM(tuple, i);
15768 #if PY_MAJOR_VERSION < 3
15769 if (likely(exc_type == t)) return 1;
15770 #endif
15771 if (likely(PyExceptionClass_Check(t))) {
15772 if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
15773 } else {
15774 }
15775 }
15776 return 0;
15777 }
15778 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
15779 if (likely(err == exc_type)) return 1;
15780 if (likely(PyExceptionClass_Check(err))) {
15781 if (likely(PyExceptionClass_Check(exc_type))) {
15782 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
15783 } else if (likely(PyTuple_Check(exc_type))) {
15784 return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
15785 } else {
15786 }
15787 }
15788 return PyErr_GivenExceptionMatches(err, exc_type);
15789 }
15790 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
15791 assert(PyExceptionClass_Check(exc_type1));
15792 assert(PyExceptionClass_Check(exc_type2));
15793 if (likely(err == exc_type1 || err == exc_type2)) return 1;
15794 if (likely(PyExceptionClass_Check(err))) {
15795 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
15796 }
15797 return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
15798 }
15799 #endif
15800
15801 /* CheckBinaryVersion */
15802 static unsigned long __Pyx_get_runtime_version(void) {
15803 #if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4
15804 return Py_Version & ~0xFFUL;
15805 #else
15806 const char* rt_version = Py_GetVersion();
15807 unsigned long version = 0;
15808 unsigned long factor = 0x01000000UL;
15809 unsigned int digit = 0;
15810 int i = 0;
15811 while (factor) {
15812 while ('0' <= rt_version[i] && rt_version[i] <= '9') {
15813 digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
15814 ++i;
15815 }
15816 version += factor * digit;
15817 if (rt_version[i] != '.')
15818 break;
15819 digit = 0;
15820 factor >>= 8;
15821 ++i;
15822 }
15823 return version;
15824 #endif
15825 }
15826 static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
15827 const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
15828 if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
15829 return 0;
15830 if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
15831 return 1;
15832 {
15833 char message[200];
15834 PyOS_snprintf(message, sizeof(message),
15835 "compile time Python version %d.%d "
15836 "of module '%.100s' "
15837 "%s "
15838 "runtime version %d.%d",
15839 (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
15840 __Pyx_MODULE_NAME,
15841 (allow_newer) ? "was newer than" : "does not match",
15842 (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
15843 );
15844 return PyErr_WarnEx(NULL, message, 1);
15845 }
15846 }
15847
15848 /* InitStrings */
15849 #if PY_MAJOR_VERSION >= 3
15850 static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) {
15851 if (t.is_unicode | t.is_str) {
15852 if (t.intern) {
15853 *str = PyUnicode_InternFromString(t.s);
15854 } else if (t.encoding) {
15855 *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL);
15856 } else {
15857 *str = PyUnicode_FromStringAndSize(t.s, t.n - 1);
15858 }
15859 } else {
15860 *str = PyBytes_FromStringAndSize(t.s, t.n - 1);
15861 }
15862 if (!*str)
15863 return -1;
15864 if (PyObject_Hash(*str) == -1)
15865 return -1;
15866 return 0;
15867 }
15868 #endif
15869 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
15870 while (t->p) {
15871 #if PY_MAJOR_VERSION >= 3
15872 __Pyx_InitString(*t, t->p);
15873 #else
15874 if (t->is_unicode) {
15875 *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
15876 } else if (t->intern) {
15877 *t->p = PyString_InternFromString(t->s);
15878 } else {
15879 *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
15880 }
15881 if (!*t->p)
15882 return -1;
15883 if (PyObject_Hash(*t->p) == -1)
15884 return -1;
15885 #endif
15886 ++t;
15887 }
15888 return 0;
15889 }
15890
15891 #include <string.h>
15892 static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
15893 size_t len = strlen(s);
15894 if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
15895 PyErr_SetString(PyExc_OverflowError, "byte string is too long");
15896 return -1;
15897 }
15898 return (Py_ssize_t) len;
15899 }
15900 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
15901 Py_ssize_t len = __Pyx_ssize_strlen(c_str);
15902 if (unlikely(len < 0)) return NULL;
15903 return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
15904 }
15905 static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
15906 Py_ssize_t len = __Pyx_ssize_strlen(c_str);
15907 if (unlikely(len < 0)) return NULL;
15908 return PyByteArray_FromStringAndSize(c_str, len);
15909 }
15910 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
15911 Py_ssize_t ignore;
15912 return __Pyx_PyObject_AsStringAndSize(o, &ignore);
15913 }
15914 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
15915 #if !CYTHON_PEP393_ENABLED
15916 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
15917 char* defenc_c;
15918 PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
15919 if (!defenc) return NULL;
15920 defenc_c = PyBytes_AS_STRING(defenc);
15921 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
15922 {
15923 char* end = defenc_c + PyBytes_GET_SIZE(defenc);
15924 char* c;
15925 for (c = defenc_c; c < end; c++) {
15926 if ((unsigned char) (*c) >= 128) {
15927 PyUnicode_AsASCIIString(o);
15928 return NULL;
15929 }
15930 }
15931 }
15932 #endif
15933 *length = PyBytes_GET_SIZE(defenc);
15934 return defenc_c;
15935 }
15936 #else
15937 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
15938 if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
15939 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
15940 if (likely(PyUnicode_IS_ASCII(o))) {
15941 *length = PyUnicode_GET_LENGTH(o);
15942 return PyUnicode_AsUTF8(o);
15943 } else {
15944 PyUnicode_AsASCIIString(o);
15945 return NULL;
15946 }
15947 #else
15948 return PyUnicode_AsUTF8AndSize(o, length);
15949 #endif
15950 }
15951 #endif
15952 #endif
15953 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
15954 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
15955 if (
15956 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
15957 __Pyx_sys_getdefaultencoding_not_ascii &&
15958 #endif
15959 PyUnicode_Check(o)) {
15960 return __Pyx_PyUnicode_AsStringAndSize(o, length);
15961 } else
15962 #endif
15963 #if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
15964 if (PyByteArray_Check(o)) {
15965 *length = PyByteArray_GET_SIZE(o);
15966 return PyByteArray_AS_STRING(o);
15967 } else
15968 #endif
15969 {
15970 char* result;
15971 int r = PyBytes_AsStringAndSize(o, &result, length);
15972 if (unlikely(r < 0)) {
15973 return NULL;
15974 } else {
15975 return result;
15976 }
15977 }
15978 }
15979 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
15980 int is_true = x == Py_True;
15981 if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
15982 else return PyObject_IsTrue(x);
15983 }
15984 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
15985 int retval;
15986 if (unlikely(!x)) return -1;
15987 retval = __Pyx_PyObject_IsTrue(x);
15988 Py_DECREF(x);
15989 return retval;
15990 }
15991 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
15992 __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result));
15993 #if PY_MAJOR_VERSION >= 3
15994 if (PyLong_Check(result)) {
15995 if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
15996 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). "
15997 "The ability to return an instance of a strict subclass of int is deprecated, "
15998 "and may be removed in a future version of Python.",
15999 result_type_name)) {
16000 __Pyx_DECREF_TypeName(result_type_name);
16001 Py_DECREF(result);
16002 return NULL;
16003 }
16004 __Pyx_DECREF_TypeName(result_type_name);
16005 return result;
16006 }
16007 #endif
16008 PyErr_Format(PyExc_TypeError,
16009 "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")",
16010 type_name, type_name, result_type_name);
16011 __Pyx_DECREF_TypeName(result_type_name);
16012 Py_DECREF(result);
16013 return NULL;
16014 }
16015 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
16016 #if CYTHON_USE_TYPE_SLOTS
16017 PyNumberMethods *m;
16018 #endif
16019 const char *name = NULL;
16020 PyObject *res = NULL;
16021 #if PY_MAJOR_VERSION < 3
16022 if (likely(PyInt_Check(x) || PyLong_Check(x)))
16023 #else
16024 if (likely(PyLong_Check(x)))
16025 #endif
16026 return __Pyx_NewRef(x);
16027 #if CYTHON_USE_TYPE_SLOTS
16028 m = Py_TYPE(x)->tp_as_number;
16029 #if PY_MAJOR_VERSION < 3
16030 if (m && m->nb_int) {
16031 name = "int";
16032 res = m->nb_int(x);
16033 }
16034 else if (m && m->nb_long) {
16035 name = "long";
16036 res = m->nb_long(x);
16037 }
16038 #else
16039 if (likely(m && m->nb_int)) {
16040 name = "int";
16041 res = m->nb_int(x);
16042 }
16043 #endif
16044 #else
16045 if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
16046 res = PyNumber_Int(x);
16047 }
16048 #endif
16049 if (likely(res)) {
16050 #if PY_MAJOR_VERSION < 3
16051 if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
16052 #else
16053 if (unlikely(!PyLong_CheckExact(res))) {
16054 #endif
16055 return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
16056 }
16057 }
16058 else if (!PyErr_Occurred()) {
16059 PyErr_SetString(PyExc_TypeError,
16060 "an integer is required");
16061 }
16062 return res;
16063 }
16064 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
16065 Py_ssize_t ival;
16066 PyObject *x;
16067 #if PY_MAJOR_VERSION < 3
16068 if (likely(PyInt_CheckExact(b))) {
16069 if (sizeof(Py_ssize_t) >= sizeof(long))
16070 return PyInt_AS_LONG(b);
16071 else
16072 return PyInt_AsSsize_t(b);
16073 }
16074 #endif
16075 if (likely(PyLong_CheckExact(b))) {
16076 #if CYTHON_USE_PYLONG_INTERNALS
16077 if (likely(__Pyx_PyLong_IsCompact(b))) {
16078 return __Pyx_PyLong_CompactValue(b);
16079 } else {
16080 const digit* digits = __Pyx_PyLong_Digits(b);
16081 const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
16082 switch (size) {
16083 case 2:
16084 if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
16085 return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
16086 }
16087 break;
16088 case -2:
16089 if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
16090 return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
16091 }
16092 break;
16093 case 3:
16094 if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
16095 return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
16096 }
16097 break;
16098 case -3:
16099 if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
16100 return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
16101 }
16102 break;
16103 case 4:
16104 if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
16105 return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
16106 }
16107 break;
16108 case -4:
16109 if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
16110 return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
16111 }
16112 break;
16113 }
16114 }
16115 #endif
16116 return PyLong_AsSsize_t(b);
16117 }
16118 x = PyNumber_Index(b);
16119 if (!x) return -1;
16120 ival = PyInt_AsSsize_t(x);
16121 Py_DECREF(x);
16122 return ival;
16123 }
16124 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
16125 if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
16126 return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
16127 #if PY_MAJOR_VERSION < 3
16128 } else if (likely(PyInt_CheckExact(o))) {
16129 return PyInt_AS_LONG(o);
16130 #endif
16131 } else {
16132 Py_ssize_t ival;
16133 PyObject *x;
16134 x = PyNumber_Index(o);
16135 if (!x) return -1;
16136 ival = PyInt_AsLong(x);
16137 Py_DECREF(x);
16138 return ival;
16139 }
16140 }
16141 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
16142 return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
16143 }
16144 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
16145 return PyInt_FromSize_t(ival);
16146 }
16147
16148
16149 /* #### Code section: utility_code_pragmas_end ### */
16150 #ifdef _MSC_VER
16151 #pragma warning( pop )
16152 #endif
16153
16154
16155
16156 /* #### Code section: end ### */
16157 #endif /* Py_PYTHON_H */