0 1 0
default
Jean-Francois Pieronne - 11 years ago 2009-01-03 16:42:41
jf.pieronne@laposte.net
Cython upgrade
1 file changed with 1019 insertions and 256 deletions:
↑ Collapse Diff ↑
1
 
/* Generated by Cython 0.25.1 */
1
 
/* Generated by Cython 0.28.6 */
2 2
 

	
3 3
 
#define PY_SSIZE_T_CLEAN
4 4
 
#include "Python.h"
5 5
 
#ifndef Py_PYTHON_H
6 6
 
    #error Python headers needed to compile C extensions, please install development version of Python.
7
 
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
8
 
    #error Cython requires Python 2.6+ or Python 3.2+.
7
 
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
8
 
    #error Cython requires Python 2.6+ or Python 3.3+.
9 9
 
#else
10
 
#define CYTHON_ABI "0_25_1"
10
 
#define CYTHON_ABI "0_28_6"
11
 
#define CYTHON_FUTURE_DIVISION 0
11 12
 
#include <stddef.h>
12 13
 
#ifndef offsetof
13 14
 
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
...
 
@@ -29,8 +30,9 @@
29 30
 
#ifndef DL_EXPORT
30 31
 
  #define DL_EXPORT(t) t
31 32
 
#endif
33
 
#define __PYX_COMMA ,
32 34
 
#ifndef HAVE_LONG_LONG
33
 
  #if PY_VERSION_HEX >= 0x03030000 || (PY_MAJOR_VERSION == 2 && PY_VERSION_HEX >= 0x02070000)
35
 
  #if PY_VERSION_HEX >= 0x02070000
34 36
 
    #define HAVE_LONG_LONG
35 37
 
  #endif
36 38
 
#endif
...
 
@@ -46,8 +48,14 @@
46 48
 
  #define CYTHON_COMPILING_IN_CPYTHON 0
47 49
 
  #undef CYTHON_USE_TYPE_SLOTS
48 50
 
  #define CYTHON_USE_TYPE_SLOTS 0
49
 
  #undef CYTHON_USE_ASYNC_SLOTS
50
 
  #define CYTHON_USE_ASYNC_SLOTS 0
51
 
  #undef CYTHON_USE_PYTYPE_LOOKUP
52
 
  #define CYTHON_USE_PYTYPE_LOOKUP 0
53
 
  #if PY_VERSION_HEX < 0x03050000
54
 
    #undef CYTHON_USE_ASYNC_SLOTS
55
 
    #define CYTHON_USE_ASYNC_SLOTS 0
56
 
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
57
 
    #define CYTHON_USE_ASYNC_SLOTS 1
58
 
  #endif
51 59
 
  #undef CYTHON_USE_PYLIST_INTERNALS
52 60
 
  #define CYTHON_USE_PYLIST_INTERNALS 0
53 61
 
  #undef CYTHON_USE_UNICODE_INTERNALS
...
 
@@ -66,6 +74,10 @@
66 74
 
  #define CYTHON_FAST_THREAD_STATE 0
67 75
 
  #undef CYTHON_FAST_PYCALL
68 76
 
  #define CYTHON_FAST_PYCALL 0
77
 
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
78
 
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
79
 
  #undef CYTHON_USE_TP_FINALIZE
80
 
  #define CYTHON_USE_TP_FINALIZE 0
69 81
 
#elif defined(PYSTON_VERSION)
70 82
 
  #define CYTHON_COMPILING_IN_PYPY 0
71 83
 
  #define CYTHON_COMPILING_IN_PYSTON 1
...
 
@@ -73,6 +85,8 @@
73 85
 
  #ifndef CYTHON_USE_TYPE_SLOTS
74 86
 
    #define CYTHON_USE_TYPE_SLOTS 1
75 87
 
  #endif
88
 
  #undef CYTHON_USE_PYTYPE_LOOKUP
89
 
  #define CYTHON_USE_PYTYPE_LOOKUP 0
76 90
 
  #undef CYTHON_USE_ASYNC_SLOTS
77 91
 
  #define CYTHON_USE_ASYNC_SLOTS 0
78 92
 
  #undef CYTHON_USE_PYLIST_INTERNALS
...
 
@@ -97,6 +111,10 @@
97 111
 
  #define CYTHON_FAST_THREAD_STATE 0
98 112
 
  #undef CYTHON_FAST_PYCALL
99 113
 
  #define CYTHON_FAST_PYCALL 0
114
 
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
115
 
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
116
 
  #undef CYTHON_USE_TP_FINALIZE
117
 
  #define CYTHON_USE_TP_FINALIZE 0
100 118
 
#else
101 119
 
  #define CYTHON_COMPILING_IN_PYPY 0
102 120
 
  #define CYTHON_COMPILING_IN_PYSTON 0
...
 
@@ -104,6 +122,12 @@
104 122
 
  #ifndef CYTHON_USE_TYPE_SLOTS
105 123
 
    #define CYTHON_USE_TYPE_SLOTS 1
106 124
 
  #endif
125
 
  #if PY_VERSION_HEX < 0x02070000
126
 
    #undef CYTHON_USE_PYTYPE_LOOKUP
127
 
    #define CYTHON_USE_PYTYPE_LOOKUP 0
128
 
  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
129
 
    #define CYTHON_USE_PYTYPE_LOOKUP 1
130
 
  #endif
107 131
 
  #if PY_MAJOR_VERSION < 3
108 132
 
    #undef CYTHON_USE_ASYNC_SLOTS
109 133
 
    #define CYTHON_USE_ASYNC_SLOTS 0
...
 
@@ -143,6 +167,12 @@
143 167
 
  #ifndef CYTHON_FAST_PYCALL
144 168
 
    #define CYTHON_FAST_PYCALL 1
145 169
 
  #endif
170
 
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
171
 
    #define CYTHON_PEP489_MULTI_PHASE_INIT (0 && PY_VERSION_HEX >= 0x03050000)
172
 
  #endif
173
 
  #ifndef CYTHON_USE_TP_FINALIZE
174
 
    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
175
 
  #endif
146 176
 
#endif
147 177
 
#if !defined(CYTHON_FAST_PYCCALL)
148 178
 
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
...
 
@@ -152,7 +182,109 @@
152 182
 
  #undef SHIFT
153 183
 
  #undef BASE
154 184
 
  #undef MASK
185
 
  #ifdef SIZEOF_VOID_P
186
 
    enum { __pyx_check_sizeof_voidp = 1/(SIZEOF_VOID_P == sizeof(void*)) };
187
 
  #endif
155 188
 
#endif
189
 
#ifndef __has_attribute
190
 
  #define __has_attribute(x) 0
191
 
#endif
192
 
#ifndef __has_cpp_attribute
193
 
  #define __has_cpp_attribute(x) 0
194
 
#endif
195
 
#ifndef CYTHON_RESTRICT
196
 
  #if defined(__GNUC__)
197
 
    #define CYTHON_RESTRICT __restrict__
198
 
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
199
 
    #define CYTHON_RESTRICT __restrict
200
 
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
201
 
    #define CYTHON_RESTRICT restrict
202
 
  #else
203
 
    #define CYTHON_RESTRICT
204
 
  #endif
205
 
#endif
206
 
#ifndef CYTHON_UNUSED
207
 
# if defined(__GNUC__)
208
 
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
209
 
#     define CYTHON_UNUSED __attribute__ ((__unused__))
210
 
#   else
211
 
#     define CYTHON_UNUSED
212
 
#   endif
213
 
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
214
 
#   define CYTHON_UNUSED __attribute__ ((__unused__))
215
 
# else
216
 
#   define CYTHON_UNUSED
217
 
# endif
218
 
#endif
219
 
#ifndef CYTHON_MAYBE_UNUSED_VAR
220
 
#  if defined(__cplusplus)
221
 
     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
222
 
#  else
223
 
#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
224
 
#  endif
225
 
#endif
226
 
#ifndef CYTHON_NCP_UNUSED
227
 
# if CYTHON_COMPILING_IN_CPYTHON
228
 
#  define CYTHON_NCP_UNUSED
229
 
# else
230
 
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
231
 
# endif
232
 
#endif
233
 
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
234
 
#ifdef _MSC_VER
235
 
    #ifndef _MSC_STDINT_H_
236
 
        #if _MSC_VER < 1300
237
 
           typedef unsigned char     uint8_t;
238
 
           typedef unsigned int      uint32_t;
239
 
        #else
240
 
           typedef unsigned __int8   uint8_t;
241
 
           typedef unsigned __int32  uint32_t;
242
 
        #endif
243
 
    #endif
244
 
#else
245
 
   #ifndef __VMS
246
 
      #include <stdint.h>
247
 
   #endif
248
 
#endif
249
 
#ifndef CYTHON_FALLTHROUGH
250
 
  #if defined(__cplusplus) && __cplusplus >= 201103L
251
 
    #if __has_cpp_attribute(fallthrough)
252
 
      #define CYTHON_FALLTHROUGH [[fallthrough]]
253
 
    #elif __has_cpp_attribute(clang::fallthrough)
254
 
      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
255
 
    #elif __has_cpp_attribute(gnu::fallthrough)
256
 
      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
257
 
    #endif
258
 
  #endif
259
 
  #ifndef CYTHON_FALLTHROUGH
260
 
    #if __has_attribute(fallthrough)
261
 
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
262
 
    #else
263
 
      #define CYTHON_FALLTHROUGH
264
 
    #endif
265
 
  #endif
266
 
  #if defined(__clang__ ) && defined(__apple_build_version__)
267
 
    #if __apple_build_version__ < 7000000
268
 
      #undef  CYTHON_FALLTHROUGH
269
 
      #define CYTHON_FALLTHROUGH
270
 
    #endif
271
 
  #endif
272
 
#endif
273
 

	
274
 
#ifndef CYTHON_INLINE
275
 
  #if defined(__clang__)
276
 
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
277
 
  #elif defined(__GNUC__)
278
 
    #define CYTHON_INLINE __inline__
279
 
  #elif defined(_MSC_VER)
280
 
    #define CYTHON_INLINE __inline
281
 
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
282
 
    #define CYTHON_INLINE inline
283
 
  #else
284
 
    #define CYTHON_INLINE
285
 
  #endif
286
 
#endif
287
 

	
156 288
 
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
157 289
 
  #define Py_OptimizeFlag 0
158 290
 
#endif
...
 
@@ -181,19 +313,91 @@
181 313
 
#ifndef Py_TPFLAGS_HAVE_FINALIZE
182 314
 
  #define Py_TPFLAGS_HAVE_FINALIZE 0
183 315
 
#endif
184
 
#ifndef METH_FASTCALL
185
 
  #define METH_FASTCALL 0x80
186
 
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args,
187
 
                                              Py_ssize_t nargs, PyObject *kwnames);
316
 
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
317
 
  #ifndef METH_FASTCALL
318
 
     #define METH_FASTCALL 0x80
319
 
  #endif
320
 
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
321
 
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
322
 
                                                          Py_ssize_t nargs, PyObject *kwnames);
188 323
 
#else
189 324
 
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
325
 
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
190 326
 
#endif
191 327
 
#if CYTHON_FAST_PYCCALL
192 328
 
#define __Pyx_PyFastCFunction_Check(func)\
193
 
    ((PyCFunction_Check(func) && METH_FASTCALL == PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))
329
 
    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)))))
194 330
 
#else
195 331
 
#define __Pyx_PyFastCFunction_Check(func) 0
196 332
 
#endif
333
 
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
334
 
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
335
 
  #define PyObject_Free(p)     PyMem_Free(p)
336
 
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
337
 
#endif
338
 
#if CYTHON_COMPILING_IN_PYSTON
339
 
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
340
 
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
341
 
#else
342
 
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
343
 
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
344
 
#endif
345
 
#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
346
 
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
347
 
#elif PY_VERSION_HEX >= 0x03060000
348
 
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
349
 
#elif PY_VERSION_HEX >= 0x03000000
350
 
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
351
 
#else
352
 
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
353
 
#endif
354
 
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
355
 
#include "pythread.h"
356
 
#define Py_tss_NEEDS_INIT 0
357
 
typedef int Py_tss_t;
358
 
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
359
 
  *key = PyThread_create_key();
360
 
  return 0; // PyThread_create_key reports success always
361
 
}
362
 
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
363
 
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
364
 
  *key = Py_tss_NEEDS_INIT;
365
 
  return key;
366
 
}
367
 
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
368
 
  PyObject_Free(key);
369
 
}
370
 
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
371
 
  return *key != Py_tss_NEEDS_INIT;
372
 
}
373
 
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
374
 
  PyThread_delete_key(*key);
375
 
  *key = Py_tss_NEEDS_INIT;
376
 
}
377
 
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
378
 
  return PyThread_set_key_value(*key, value);
379
 
}
380
 
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
381
 
  return PyThread_get_key_value(*key);
382
 
}
383
 
#endif // TSS (Thread Specific Storage) API
384
 
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
385
 
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
386
 
#else
387
 
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
388
 
#endif
389
 
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
390
 
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
391
 
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
392
 
#else
393
 
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
394
 
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
395
 
#endif
396
 
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
397
 
#define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
398
 
#else
399
 
#define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
400
 
#endif
197 401
 
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
198 402
 
  #define CYTHON_PEP393_ENABLED 1
199 403
 
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
...
 
@@ -238,18 +442,6 @@
238 442
 
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
239 443
 
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
240 444
 
#endif
241
 
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
242
 
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
243
 
  #define PyObject_Free(p)     PyMem_Free(p)
244
 
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
245
 
#endif
246
 
#if CYTHON_COMPILING_IN_PYSTON
247
 
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
248
 
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
249
 
#else
250
 
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
251
 
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
252
 
#endif
253 445
 
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
254 446
 
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
255 447
 
#if PY_MAJOR_VERSION >= 3
...
 
@@ -266,6 +458,7 @@
266 458
 
  #define PyString_Type                PyUnicode_Type
267 459
 
  #define PyString_Check               PyUnicode_Check
268 460
 
  #define PyString_CheckExact          PyUnicode_CheckExact
461
 
  #define PyObject_Unicode             PyObject_Str
269 462
 
#endif
270 463
 
#if PY_MAJOR_VERSION >= 3
271 464
 
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
...
 
@@ -277,8 +470,11 @@
277 470
 
#ifndef PySet_CheckExact
278 471
 
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
279 472
 
#endif
280
 
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
281
 
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
473
 
#if CYTHON_ASSUME_SAFE_MACROS
474
 
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
475
 
#else
476
 
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
477
 
#endif
282 478
 
#if PY_MAJOR_VERSION >= 3
283 479
 
  #define PyIntObject                  PyLongObject
284 480
 
  #define PyInt_Type                   PyLong_Type
...
 
@@ -313,7 +509,7 @@
313 509
 
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
314 510
 
#endif
315 511
 
#if PY_MAJOR_VERSION >= 3
316
 
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
512
 
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
317 513
 
#else
318 514
 
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
319 515
 
#endif
...
 
@@ -322,39 +518,17 @@
322 518
 
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
323 519
 
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
324 520
 
  #else
325
 
    typedef struct {
326
 
        unaryfunc am_await;
327
 
        unaryfunc am_aiter;
328
 
        unaryfunc am_anext;
329
 
    } __Pyx_PyAsyncMethodsStruct;
330 521
 
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
331 522
 
  #endif
332 523
 
#else
333 524
 
  #define __Pyx_PyType_AsAsync(obj) NULL
334 525
 
#endif
335
 
#ifndef CYTHON_RESTRICT
336
 
  #if defined(__GNUC__)
337
 
    #define CYTHON_RESTRICT __restrict__
338
 
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
339
 
    #define CYTHON_RESTRICT __restrict
340
 
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
341
 
    #define CYTHON_RESTRICT restrict
342
 
  #else
343
 
    #define CYTHON_RESTRICT
344
 
  #endif
345
 
#endif
346
 
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
347
 

	
348
 
#ifndef CYTHON_INLINE
349
 
  #if defined(__GNUC__)
350
 
    #define CYTHON_INLINE __inline__
351
 
  #elif defined(_MSC_VER)
352
 
    #define CYTHON_INLINE __inline
353
 
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
354
 
    #define CYTHON_INLINE inline
355
 
  #else
356
 
    #define CYTHON_INLINE
357
 
  #endif
526
 
#ifndef __Pyx_PyAsyncMethodsStruct
527
 
    typedef struct {
528
 
        unaryfunc am_await;
529
 
        unaryfunc am_aiter;
530
 
        unaryfunc am_anext;
531
 
    } __Pyx_PyAsyncMethodsStruct;
358 532
 
#endif
359 533
 

	
360 534
 
#if defined(WIN32) || defined(MS_WINDOWS)
...
 
@@ -382,14 +556,6 @@ static CYTHON_INLINE float __PYX_NAN() {
382 556
 
  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
383 557
 
}
384 558
 

	
385
 
#if PY_MAJOR_VERSION >= 3
386
 
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
387
 
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
388
 
#else
389
 
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
390
 
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
391
 
#endif
392
 

	
393 559
 
#ifndef __PYX_EXTERN_C
394 560
 
  #ifdef __cplusplus
395 561
 
    #define __PYX_EXTERN_C extern "C"
...
 
@@ -400,6 +566,7 @@ static CYTHON_INLINE float __PYX_NAN() {
400 566
 

	
401 567
 
#define __PYX_HAVE__vms__rtl__fdl___vmsfdl
402 568
 
#define __PYX_HAVE_API__vms__rtl__fdl___vmsfdl
569
 
/* Early includes */
403 570
 
#include "../lib/vmslib.h"
404 571
 
#include "vmsfdl.h"
405 572
 
#include <string.h>
...
 
@@ -409,30 +576,10 @@ static CYTHON_INLINE float __PYX_NAN() {
409 576
 
#include <omp.h>
410 577
 
#endif /* _OPENMP */
411 578
 

	
412
 
#ifdef PYREX_WITHOUT_ASSERTIONS
579
 
#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
413 580
 
#define CYTHON_WITHOUT_ASSERTIONS
414 581
 
#endif
415 582
 

	
416
 
#ifndef CYTHON_UNUSED
417
 
# if defined(__GNUC__)
418
 
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
419
 
#     define CYTHON_UNUSED __attribute__ ((__unused__))
420
 
#   else
421
 
#     define CYTHON_UNUSED
422
 
#   endif
423
 
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
424
 
#   define CYTHON_UNUSED __attribute__ ((__unused__))
425
 
# else
426
 
#   define CYTHON_UNUSED
427
 
# endif
428
 
#endif
429
 
#ifndef CYTHON_NCP_UNUSED
430
 
# if CYTHON_COMPILING_IN_CPYTHON
431
 
#  define CYTHON_NCP_UNUSED
432
 
# else
433
 
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
434
 
# endif
435
 
#endif
436 583
 
typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
437 584
 
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
438 585
 

	
...
 
@@ -460,8 +607,8 @@ typedef struct {PyObject **p; const char
460 607
 
    #define __Pyx_sst_abs(value) abs(value)
461 608
 
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
462 609
 
    #define __Pyx_sst_abs(value) labs(value)
463
 
#elif defined (_MSC_VER) && defined (_M_X64)
464
 
    #define __Pyx_sst_abs(value) _abs64(value)
610
 
#elif defined (_MSC_VER)
611
 
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
465 612
 
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
466 613
 
    #define __Pyx_sst_abs(value) llabs(value)
467 614
 
#elif defined (__GNUC__)
...
 
@@ -469,8 +616,8 @@ typedef struct {PyObject **p; const char
469 616
 
#else
470 617
 
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
471 618
 
#endif
472
 
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
473
 
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
619
 
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
620
 
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
474 621
 
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
475 622
 
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
476 623
 
#define __Pyx_PyBytes_FromString        PyBytes_FromString
...
 
@@ -483,31 +630,37 @@ static CYTHON_INLINE PyObject* __Pyx_PyU
483 630
 
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
484 631
 
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
485 632
 
#endif
486
 
#define __Pyx_PyObject_AsSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
487
 
#define __Pyx_PyObject_AsUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
633
 
#define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
634
 
#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
635
 
#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
636
 
#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
637
 
#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
638
 
#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
639
 
#define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
640
 
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
641
 
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
642
 
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
643
 
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
488 644
 
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
489 645
 
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
490 646
 
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
491 647
 
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
492 648
 
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
493
 
#if PY_MAJOR_VERSION < 3
494
 
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
495
 
{
649
 
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
496 650
 
    const Py_UNICODE *u_end = u;
497 651
 
    while (*u_end++) ;
498 652
 
    return (size_t)(u_end - u - 1);
499 653
 
}
500
 
#else
501
 
#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
502
 
#endif
503 654
 
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
504 655
 
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
505 656
 
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
506 657
 
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
507 658
 
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
508
 
#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
659
 
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
509 660
 
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
510 661
 
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
662
 
#define __Pyx_PySequence_Tuple(obj)\
663
 
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
511 664
 
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
512 665
 
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
513 666
 
#if CYTHON_ASSUME_SAFE_MACROS
...
 
@@ -606,10 +759,12 @@ bad:
606 759
 
  #define likely(x)   (x)
607 760
 
  #define unlikely(x) (x)
608 761
 
#endif /* __GNUC__ */
762
 
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
609 763
 

	
610
 
static PyObject *__pyx_m;
764
 
static PyObject *__pyx_m = NULL;
611 765
 
static PyObject *__pyx_d;
612 766
 
static PyObject *__pyx_b;
767
 
static PyObject *__pyx_cython_runtime = NULL;
613 768
 
static PyObject *__pyx_empty_tuple;
614 769
 
static PyObject *__pyx_empty_bytes;
615 770
 
static PyObject *__pyx_empty_unicode;
...
 
@@ -620,7 +775,7 @@ static const char *__pyx_filename;
620 775
 

	
621 776
 

	
622 777
 
static const char *__pyx_f[] = {
623
 
  "vms/rtl/fdl/_vmsfdl.pyx",
778
 
  "_vmsfdl.pyx",
624 779
 
  "type.pxd",
625 780
 
  "bool.pxd",
626 781
 
  "complex.pxd",
...
 
@@ -694,16 +849,7 @@ static const char *__pyx_f[] = {
694 849
 

	
695 850
 
/* PyObjectGetAttrStr.proto */
696 851
 
#if CYTHON_USE_TYPE_SLOTS
697
 
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
698
 
    PyTypeObject* tp = Py_TYPE(obj);
699
 
    if (likely(tp->tp_getattro))
700
 
        return tp->tp_getattro(obj, attr_name);
701
 
#if PY_MAJOR_VERSION < 3
702
 
    if (likely(tp->tp_getattr))
703
 
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
704
 
#endif
705
 
    return PyObject_GetAttr(obj, attr_name);
706
 
}
852
 
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
707 853
 
#else
708 854
 
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
709 855
 
#endif
...
 
@@ -721,23 +867,35 @@ static CYTHON_INLINE PyObject* __Pyx_PyO
721 867
 
/* PyThreadStateGet.proto */
722 868
 
#if CYTHON_FAST_THREAD_STATE
723 869
 
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
724
 
#define __Pyx_PyThreadState_assign  __pyx_tstate = PyThreadState_GET();
870
 
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
871
 
#define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
725 872
 
#else
726 873
 
#define __Pyx_PyThreadState_declare
727 874
 
#define __Pyx_PyThreadState_assign
875
 
#define __Pyx_PyErr_Occurred()  PyErr_Occurred()
728 876
 
#endif
729 877
 

	
730 878
 
/* PyErrFetchRestore.proto */
731 879
 
#if CYTHON_FAST_THREAD_STATE
880
 
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
732 881
 
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
733 882
 
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
734 883
 
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
735 884
 
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
736 885
 
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
737 886
 
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
887
 
#if CYTHON_COMPILING_IN_CPYTHON
888
 
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
738 889
 
#else
890
 
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
891
 
#endif
892
 
#else
893
 
#define __Pyx_PyErr_Clear() PyErr_Clear()
894
 
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
739 895
 
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
740 896
 
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
897
 
#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
898
 
#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
741 899
 
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
742 900
 
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
743 901
 
#endif
...
 
@@ -745,6 +903,32 @@ static CYTHON_INLINE void __Pyx_ErrFetch
745 903
 
/* RaiseException.proto */
746 904
 
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
747 905
 

	
906
 
/* PyCFunctionFastCall.proto */
907
 
#if CYTHON_FAST_PYCCALL
908
 
static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
909
 
#else
910
 
#define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
911
 
#endif
912
 

	
913
 
/* PyFunctionFastCall.proto */
914
 
#if CYTHON_FAST_PYCALL
915
 
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
916
 
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
917
 
#if 1 || PY_VERSION_HEX < 0x030600B1
918
 
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
919
 
#else
920
 
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
921
 
#endif
922
 
#endif
923
 

	
924
 
/* PyObjectCallMethO.proto */
925
 
#if CYTHON_COMPILING_IN_CPYTHON
926
 
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
927
 
#endif
928
 

	
929
 
/* PyObjectCallOneArg.proto */
930
 
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
931
 

	
748 932
 
/* RaiseDoubleKeywords.proto */
749 933
 
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
750 934
 

	
...
 
@@ -757,6 +941,13 @@ static int __Pyx_ParseOptionalKeywords(P
757 941
 
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
758 942
 
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
759 943
 

	
944
 
/* CLineInTraceback.proto */
945
 
#ifdef CYTHON_CLINE_IN_TRACEBACK
946
 
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
947
 
#else
948
 
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
949
 
#endif
950
 

	
760 951
 
/* CodeObjectCache.proto */
761 952
 
typedef struct {
762 953
 
    PyCodeObject* code_object;
...
 
@@ -794,6 +985,19 @@ static CYTHON_INLINE long __Pyx_PyInt_As
794 985
 
/* CIntFromPy.proto */
795 986
 
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
796 987
 

	
988
 
/* FastTypeChecks.proto */
989
 
#if CYTHON_COMPILING_IN_CPYTHON
990
 
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
991
 
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
992
 
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
993
 
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
994
 
#else
995
 
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
996
 
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
997
 
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
998
 
#endif
999
 
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1000
 

	
797 1001
 
/* CheckBinaryVersion.proto */
798 1002
 
static int __Pyx_check_binary_version(void);
799 1003
 

	
...
 
@@ -905,6 +1109,7 @@ static PyObject *__pyx_f_3vms_3rtl_3fdl_
905 1109
 
static PyObject *__pyx_f_3vms_3rtl_3fdl_7_vmsfdl_DESCFROMSTR(struct dsc$descriptor_s *, PyObject *); /*proto*/
906 1110
 
static PyObject *__pyx_f_3vms_3rtl_3fdl_7_vmsfdl_DESCFROMOPTSTR(struct dsc$descriptor_s **, struct dsc$descriptor_s *, PyObject *); /*proto*/
907 1111
 
#define __Pyx_MODULE_NAME "vms.rtl.fdl._vmsfdl"
1112
 
extern int __pyx_module_is_main_vms__rtl__fdl___vmsfdl;
908 1113
 
int __pyx_module_is_main_vms__rtl__fdl___vmsfdl = 0;
909 1114
 

	
910 1115
 
/* Implementation of 'vms.rtl.fdl._vmsfdl' */
...
 
@@ -929,6 +1134,7 @@ static const char __pyx_k_fileNameD[] = 
929 1134
 
static const char __pyx_k_file_name[] = "file_name";
930 1135
 
static const char __pyx_k_ValueError[] = "ValueError";
931 1136
 
static const char __pyx_k_fdl_create[] = "fdl_create";
1137
 
static const char __pyx_k_vmsfdl_pyx[] = "_vmsfdl.pyx";
932 1138
 
static const char __pyx_k_ISO_8859_15[] = "ISO-8859-15";
933 1139
 
static const char __pyx_k_defaultFDLD[] = "defaultFDLD";
934 1140
 
static const char __pyx_k_default_fdl[] = "default_fdl";
...
 
@@ -937,16 +1143,16 @@ static const char __pyx_k_defaultNameD[]
937 1143
 
static const char __pyx_k_default_name[] = "default_name";
938 1144
 
static const char __pyx_k_defaultFDLPtr[] = "defaultFDLPtr";
939 1145
 
static const char __pyx_k_defaultNamePtr[] = "defaultNamePtr";
1146
 
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
940 1147
 
static const char __pyx_k_vms_rtl_fdl__vmsfdl[] = "vms.rtl.fdl._vmsfdl";
941
 
static const char __pyx_k_DISK_REPOS_vmspython_python_loc[] = "/DISK$REPOS/vmspython/python/local/vms/rtl/fdl/_vmsfdl.pyx";
942 1148
 
static const char __pyx_k_expected_string_or_Unicode_objec[] = "expected string or Unicode object, %s found";
943
 
static PyObject *__pyx_kp_s_DISK_REPOS_vmspython_python_loc;
944 1149
 
static PyObject *__pyx_kp_s_iso885915_ISO_8859_15;
945 1150
 
static PyObject *__pyx_n_s_TypeError;
946 1151
 
static PyObject *__pyx_n_s_VMSError;
947 1152
 
static PyObject *__pyx_n_s_ValueError;
948 1153
 
static PyObject *__pyx_n_s_buffer;
949 1154
 
static PyObject *__pyx_n_s_bufferD;
1155
 
static PyObject *__pyx_n_s_cline_in_traceback;
950 1156
 
static PyObject *__pyx_n_s_defaultFDLD;
951 1157
 
static PyObject *__pyx_n_s_defaultFDLPtr;
952 1158
 
static PyObject *__pyx_n_s_defaultNameD;
...
 
@@ -969,10 +1175,12 @@ static PyObject *__pyx_n_s_sts;
969 1175
 
static PyObject *__pyx_n_s_stv;
970 1176
 
static PyObject *__pyx_n_s_test;
971 1177
 
static PyObject *__pyx_n_s_vms_rtl_fdl__vmsfdl;
1178
 
static PyObject *__pyx_kp_s_vmsfdl_pyx;
972 1179
 
static PyObject *__pyx_pf_3vms_3rtl_3fdl_7_vmsfdl_fdl_create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fdl_desc, PyObject *__pyx_v_file_name, PyObject *__pyx_v_default_name, unsigned int __pyx_v_flags, PyObject *__pyx_v_default_fdl); /* proto */
973 1180
 
static PyObject *__pyx_tuple_;
974 1181
 
static PyObject *__pyx_tuple__2;
975 1182
 
static PyObject *__pyx_codeobj__3;
1183
 
/* Late includes */
976 1184
 

	
977 1185
 
/* "vms/rtl/fdl/_vmsfdl.pyx":37
978 1186
 
 * from cpython cimport PY_MAJOR_VERSION
...
 
@@ -1000,7 +1208,7 @@ static PyObject *__pyx_f_3vms_3rtl_3fdl_
1000 1208
 
 *         raise VMSError(s, msg)
1001 1209
 
 */
1002 1210
 
  __pyx_t_1 = (((__pyx_v_s & 1) == 0) != 0);
1003
 
  if (__pyx_t_1) {
1211
 
  if (unlikely(__pyx_t_1)) {
1004 1212
 

	
1005 1213
 
    /* "vms/rtl/fdl/_vmsfdl.pyx":40
1006 1214
 
 *     cdef char msg[256]
...
 
@@ -1095,7 +1303,7 @@ static PyObject *__pyx_f_3vms_3rtl_3fdl_
1095 1303
 
 */
1096 1304
 
  __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_text); 
1097 1305
 
  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
1098
 
  if (__pyx_t_2) {
1306
 
  if (unlikely(__pyx_t_2)) {
1099 1307
 

	
1100 1308
 
    /* "vms/rtl/fdl/_vmsfdl.pyx":45
1101 1309
 
 * cdef checkstr(text):
...
 
@@ -1106,16 +1314,11 @@ static PyObject *__pyx_f_3vms_3rtl_3fdl_
1106 1314
 
 */
1107 1315
 
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_iso885915_expected_string_or_Unicode_objec, ((PyObject *)Py_TYPE(__pyx_v_text))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 45, __pyx_L1_error)
1108 1316
 
    __Pyx_GOTREF(__pyx_t_3);
1109
 
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 45, __pyx_L1_error)
1317
 
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 45, __pyx_L1_error)
1110 1318
 
    __Pyx_GOTREF(__pyx_t_4);
1111
 
    __Pyx_GIVEREF(__pyx_t_3);
1112
 
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
1113
 
    __pyx_t_3 = 0;
1114
 
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 45, __pyx_L1_error)
1115
 
    __Pyx_GOTREF(__pyx_t_3);
1319
 
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
1320
 
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
1116 1321
 
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
1117
 
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
1118
 
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
1119 1322
 
    __PYX_ERR(0, 45, __pyx_L1_error)
1120 1323
 

	
1121 1324
 
    /* "vms/rtl/fdl/_vmsfdl.pyx":44
...
 
@@ -1228,7 +1431,7 @@ static PyObject *__pyx_f_3vms_3rtl_3fdl_
1228 1431
 
  __pyx_t_1 = (__pyx_t_5 != 0);
1229 1432
 
  __pyx_t_2 = __pyx_t_1;
1230 1433
 
  __pyx_L4_bool_binop_done:;
1231
 
  if (__pyx_t_2) {
1434
 
  if (likely(__pyx_t_2)) {
1232 1435
 

	
1233 1436
 
    /* "vms/rtl/fdl/_vmsfdl.pyx":52
1234 1437
 
 *         return text.encode('ISO-8859-15')
...
 
@@ -1277,16 +1480,11 @@ static PyObject *__pyx_f_3vms_3rtl_3fdl_
1277 1480
 
 *                          type(text))
1278 1481
 
 * 
1279 1482
 
 */
1280
 
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 54, __pyx_L1_error)
1483
 
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 54, __pyx_L1_error)
1281 1484
 
    __Pyx_GOTREF(__pyx_t_3);
1282
 
    __Pyx_GIVEREF(__pyx_t_4);
1283
 
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
1284
 
    __pyx_t_4 = 0;
1285
 
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 54, __pyx_L1_error)
1286
 
    __Pyx_GOTREF(__pyx_t_4);
1485
 
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
1486
 
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
1287 1487
 
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
1288
 
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
1289
 
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
1290 1488
 
    __PYX_ERR(0, 54, __pyx_L1_error)
1291 1489
 
  }
1292 1490
 

	
...
 
@@ -1350,7 +1548,7 @@ static PyObject *__pyx_f_3vms_3rtl_3fdl_
1350 1548
 
 *     dsc.dsc_w_length = len(src)
1351 1549
 
 * 
1352 1550
 
 */
1353
 
  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_src); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 60, __pyx_L1_error)
1551
 
  __pyx_t_1 = __Pyx_PyObject_AsWritableString(__pyx_v_src); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 60, __pyx_L1_error)
1354 1552
 
  __pyx_v_dsc->dsc$a_pointer = ((char *)__pyx_t_1);
1355 1553
 

	
1356 1554
 
  /* "vms/rtl/fdl/_vmsfdl.pyx":61
...
 
@@ -1360,7 +1558,7 @@ static PyObject *__pyx_f_3vms_3rtl_3fdl_
1360 1558
 
 * 
1361 1559
 
 * cdef DESCFROMOPTSTR(dsc_descriptor_s** ptr,dsc_descriptor_s* dsc, string):
1362 1560
 
 */
1363
 
  __pyx_t_2 = PyObject_Length(__pyx_v_src); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 61, __pyx_L1_error)
1561
 
  __pyx_t_2 = PyObject_Length(__pyx_v_src); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 61, __pyx_L1_error)
1364 1562
 
  __pyx_v_dsc->dsc$w_length = __pyx_t_2;
1365 1563
 

	
1366 1564
 
  /* "vms/rtl/fdl/_vmsfdl.pyx":57
...
 
@@ -1513,36 +1711,45 @@ static PyObject *__pyx_pw_3vms_3rtl_3fdl
1513 1711
 
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
1514 1712
 
      switch (pos_args) {
1515 1713
 
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
1714
 
        CYTHON_FALLTHROUGH;
1516 1715
 
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
1716
 
        CYTHON_FALLTHROUGH;
1517 1717
 
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
1718
 
        CYTHON_FALLTHROUGH;
1518 1719
 
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
1720
 
        CYTHON_FALLTHROUGH;
1519 1721
 
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1722
 
        CYTHON_FALLTHROUGH;
1520 1723
 
        case  0: break;
1521 1724
 
        default: goto __pyx_L5_argtuple_error;
1522 1725
 
      }
1523 1726
 
      kw_args = PyDict_Size(__pyx_kwds);
1524 1727
 
      switch (pos_args) {
1525 1728
 
        case  0:
1526
 
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fdl_desc)) != 0)) kw_args--;
1729
 
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fdl_desc)) != 0)) kw_args--;
1527 1730
 
        else goto __pyx_L5_argtuple_error;
1731
 
        CYTHON_FALLTHROUGH;
1528 1732
 
        case  1:
1529 1733
 
        if (kw_args > 0) {
1530
 
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_file_name);
1734
 
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_file_name);
1531 1735
 
          if (value) { values[1] = value; kw_args--; }
1532 1736
 
        }
1737
 
        CYTHON_FALLTHROUGH;
1533 1738
 
        case  2:
1534 1739
 
        if (kw_args > 0) {
1535
 
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_default_name);
1740
 
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default_name);
1536 1741
 
          if (value) { values[2] = value; kw_args--; }
1537 1742
 
        }
1743
 
        CYTHON_FALLTHROUGH;
1538 1744
 
        case  3:
1539 1745
 
        if (kw_args > 0) {
1540
 
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flags);
1746
 
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags);
1541 1747
 
          if (value) { values[3] = value; kw_args--; }
1542 1748
 
        }
1749
 
        CYTHON_FALLTHROUGH;
1543 1750
 
        case  4:
1544 1751
 
        if (kw_args > 0) {
1545
 
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_default_fdl);
1752
 
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default_fdl);
1546 1753
 
          if (value) { values[4] = value; kw_args--; }
1547 1754
 
        }
1548 1755
 
      }
...
 
@@ -1552,9 +1759,13 @@ static PyObject *__pyx_pw_3vms_3rtl_3fdl
1552 1759
 
    } else {
1553 1760
 
      switch (PyTuple_GET_SIZE(__pyx_args)) {
1554 1761
 
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
1762
 
        CYTHON_FALLTHROUGH;
1555 1763
 
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
1764
 
        CYTHON_FALLTHROUGH;
1556 1765
 
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
1766
 
        CYTHON_FALLTHROUGH;
1557 1767
 
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
1768
 
        CYTHON_FALLTHROUGH;
1558 1769
 
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1559 1770
 
        break;
1560 1771
 
        default: goto __pyx_L5_argtuple_error;
...
 
@@ -1827,17 +2038,31 @@ static PyMethodDef __pyx_methods[] = {
1827 2038
 
};
1828 2039
 

	
1829 2040
 
#if PY_MAJOR_VERSION >= 3
2041
 
#if CYTHON_PEP489_MULTI_PHASE_INIT
2042
 
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
2043
 
static int __pyx_pymod_exec__vmsfdl(PyObject* module); /*proto*/
2044
 
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
2045
 
  {Py_mod_create, (void*)__pyx_pymod_create},
2046
 
  {Py_mod_exec, (void*)__pyx_pymod_exec__vmsfdl},
2047
 
  {0, NULL}
2048
 
};
2049
 
#endif
2050
 

	
1830 2051
 
static struct PyModuleDef __pyx_moduledef = {
1831
 
  #if PY_VERSION_HEX < 0x03020000
1832
 
    { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
1833
 
  #else
1834 2052
 
    PyModuleDef_HEAD_INIT,
1835
 
  #endif
1836 2053
 
    "_vmsfdl",
1837 2054
 
    0, /* m_doc */
2055
 
  #if CYTHON_PEP489_MULTI_PHASE_INIT
2056
 
    0, /* m_size */
2057
 
  #else
1838 2058
 
    -1, /* m_size */
2059
 
  #endif
1839 2060
 
    __pyx_methods /* m_methods */,
2061
 
  #if CYTHON_PEP489_MULTI_PHASE_INIT
2062
 
    __pyx_moduledef_slots, /* m_slots */
2063
 
  #else
1840 2064
 
    NULL, /* m_reload */
2065
 
  #endif
1841 2066
 
    NULL, /* m_traverse */
1842 2067
 
    NULL, /* m_clear */
1843 2068
 
    NULL /* m_free */
...
 
@@ -1845,13 +2070,13 @@ static struct PyModuleDef __pyx_modulede
1845 2070
 
#endif
1846 2071
 

	
1847 2072
 
static __Pyx_StringTabEntry __pyx_string_tab[] = {
1848
 
  {&__pyx_kp_s_DISK_REPOS_vmspython_python_loc, __pyx_k_DISK_REPOS_vmspython_python_loc, sizeof(__pyx_k_DISK_REPOS_vmspython_python_loc), 0, 0, 1, 0},
1849 2073
 
  {&__pyx_kp_s_iso885915_ISO_8859_15, __pyx_k_ISO_8859_15, sizeof(__pyx_k_ISO_8859_15), "iso-8859-15", 0, 1, 0},
1850 2074
 
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
1851 2075
 
  {&__pyx_n_s_VMSError, __pyx_k_VMSError, sizeof(__pyx_k_VMSError), 0, 0, 1, 1},
1852 2076
 
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
1853 2077
 
  {&__pyx_n_s_buffer, __pyx_k_buffer, sizeof(__pyx_k_buffer), 0, 0, 1, 1},
1854 2078
 
  {&__pyx_n_s_bufferD, __pyx_k_bufferD, sizeof(__pyx_k_bufferD), 0, 0, 1, 1},
2079
 
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
1855 2080
 
  {&__pyx_n_s_defaultFDLD, __pyx_k_defaultFDLD, sizeof(__pyx_k_defaultFDLD), 0, 0, 1, 1},
1856 2081
 
  {&__pyx_n_s_defaultFDLPtr, __pyx_k_defaultFDLPtr, sizeof(__pyx_k_defaultFDLPtr), 0, 0, 1, 1},
1857 2082
 
  {&__pyx_n_s_defaultNameD, __pyx_k_defaultNameD, sizeof(__pyx_k_defaultNameD), 0, 0, 1, 1},
...
 
@@ -1874,6 +2099,7 @@ static __Pyx_StringTabEntry __pyx_string
1874 2099
 
  {&__pyx_n_s_stv, __pyx_k_stv, sizeof(__pyx_k_stv), 0, 0, 1, 1},
1875 2100
 
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
1876 2101
 
  {&__pyx_n_s_vms_rtl_fdl__vmsfdl, __pyx_k_vms_rtl_fdl__vmsfdl, sizeof(__pyx_k_vms_rtl_fdl__vmsfdl), 0, 0, 1, 1},
2102
 
  {&__pyx_kp_s_vmsfdl_pyx, __pyx_k_vmsfdl_pyx, sizeof(__pyx_k_vmsfdl_pyx), 0, 0, 1, 0},
1877 2103
 
  {0, 0, 0, 0, 0, 0, 0}
1878 2104
 
};
1879 2105
 
static int __Pyx_InitCachedBuiltins(void) {
...
 
@@ -1910,7 +2136,7 @@ static int __Pyx_InitCachedConstants(voi
1910 2136
 
  __pyx_tuple__2 = PyTuple_Pack(18, __pyx_n_s_fdl_desc, __pyx_n_s_file_name, __pyx_n_s_default_name, __pyx_n_s_flags, __pyx_n_s_default_fdl, __pyx_n_s_fdlDescD, __pyx_n_s_fileNameD, __pyx_n_s_defaultNameD, __pyx_n_s_defaultFDLD, __pyx_n_s_fileNamePtr, __pyx_n_s_defaultNamePtr, __pyx_n_s_defaultFDLPtr, __pyx_n_s_bufferD, __pyx_n_s_buffer, __pyx_n_s_retlen, __pyx_n_s_sts, __pyx_n_s_stv, __pyx_n_s_s); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 70, __pyx_L1_error)
1911 2137
 
  __Pyx_GOTREF(__pyx_tuple__2);
1912 2138
 
  __Pyx_GIVEREF(__pyx_tuple__2);
1913
 
  __pyx_codeobj__3 = (PyObject*)__Pyx_PyCode_New(5, 0, 18, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__2, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DISK_REPOS_vmspython_python_loc, __pyx_n_s_fdl_create, 70, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__3)) __PYX_ERR(0, 70, __pyx_L1_error)
2139
 
  __pyx_codeobj__3 = (PyObject*)__Pyx_PyCode_New(5, 0, 18, 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_vmsfdl_pyx, __pyx_n_s_fdl_create, 70, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__3)) __PYX_ERR(0, 70, __pyx_L1_error)
1914 2140
 
  __Pyx_RefNannyFinishContext();
1915 2141
 
  return 0;
1916 2142
 
  __pyx_L1_error:;
...
 
@@ -1925,26 +2151,173 @@ static int __Pyx_InitGlobals(void) {
1925 2151
 
  return -1;
1926 2152
 
}
1927 2153
 

	
2154
 
static int __Pyx_modinit_global_init_code(void); /*proto*/
2155
 
static int __Pyx_modinit_variable_export_code(void); /*proto*/
2156
 
static int __Pyx_modinit_function_export_code(void); /*proto*/
2157
 
static int __Pyx_modinit_type_init_code(void); /*proto*/
2158
 
static int __Pyx_modinit_type_import_code(void); /*proto*/
2159
 
static int __Pyx_modinit_variable_import_code(void); /*proto*/
2160
 
static int __Pyx_modinit_function_import_code(void); /*proto*/
2161
 

	
2162
 
static int __Pyx_modinit_global_init_code(void) {
2163
 
  __Pyx_RefNannyDeclarations
2164
 
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
2165
 
  /*--- Global init code ---*/
2166
 
  __Pyx_RefNannyFinishContext();
2167
 
  return 0;
2168
 
}
2169
 

	
2170
 
static int __Pyx_modinit_variable_export_code(void) {
2171
 
  __Pyx_RefNannyDeclarations
2172
 
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
2173
 
  /*--- Variable export code ---*/
2174
 
  __Pyx_RefNannyFinishContext();
2175
 
  return 0;
2176
 
}
2177
 

	
2178
 
static int __Pyx_modinit_function_export_code(void) {
2179
 
  __Pyx_RefNannyDeclarations
2180
 
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
2181
 
  /*--- Function export code ---*/
2182
 
  __Pyx_RefNannyFinishContext();
2183
 
  return 0;
2184
 
}
2185
 

	
2186
 
static int __Pyx_modinit_type_init_code(void) {
2187
 
  __Pyx_RefNannyDeclarations
2188
 
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
2189
 
  /*--- Type init code ---*/
2190
 
  __Pyx_RefNannyFinishContext();
2191
 
  return 0;
2192
 
}
2193
 

	
2194
 
static int __Pyx_modinit_type_import_code(void) {
2195
 
  __Pyx_RefNannyDeclarations
2196
 
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
2197
 
  /*--- Type import code ---*/
2198
 
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", 
2199
 
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
2200
 
  sizeof(PyTypeObject),
2201
 
  #else
2202
 
  sizeof(PyHeapTypeObject),
2203
 
  #endif
2204
 
  0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) __PYX_ERR(1, 9, __pyx_L1_error)
2205
 
  __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) __PYX_ERR(2, 8, __pyx_L1_error)
2206
 
  __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) __PYX_ERR(3, 15, __pyx_L1_error)
2207
 
  __Pyx_RefNannyFinishContext();
2208
 
  return 0;
2209
 
  __pyx_L1_error:;
2210
 
  __Pyx_RefNannyFinishContext();
2211
 
  return -1;
2212
 
}
2213
 

	
2214
 
static int __Pyx_modinit_variable_import_code(void) {
2215
 
  __Pyx_RefNannyDeclarations
2216
 
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
2217
 
  /*--- Variable import code ---*/
2218
 
  __Pyx_RefNannyFinishContext();
2219
 
  return 0;
2220
 
}
2221
 

	
2222
 
static int __Pyx_modinit_function_import_code(void) {
2223
 
  __Pyx_RefNannyDeclarations
2224
 
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
2225
 
  /*--- Function import code ---*/
2226
 
  __Pyx_RefNannyFinishContext();
2227
 
  return 0;
2228
 
}
2229
 

	
2230
 

	
1928 2231
 
#if PY_MAJOR_VERSION < 3
1929
 
PyMODINIT_FUNC init_vmsfdl(void); /*proto*/
1930
 
PyMODINIT_FUNC init_vmsfdl(void)
2232
 
#ifdef CYTHON_NO_PYINIT_EXPORT
2233
 
#define __Pyx_PyMODINIT_FUNC void
2234
 
#else
2235
 
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
2236
 
#endif
2237
 
#else
2238
 
#ifdef CYTHON_NO_PYINIT_EXPORT
2239
 
#define __Pyx_PyMODINIT_FUNC PyObject *
2240
 
#else
2241
 
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
2242
 
#endif
2243
 
#endif
2244
 
#ifndef CYTHON_SMALL_CODE
2245
 
#if defined(__clang__)
2246
 
    #define CYTHON_SMALL_CODE
2247
 
#elif defined(__GNUC__) && (!(defined(__cplusplus)) || (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4)))
2248
 
    #define CYTHON_SMALL_CODE __attribute__((cold))
2249
 
#else
2250
 
    #define CYTHON_SMALL_CODE
2251
 
#endif
2252
 
#endif
2253
 

	
2254
 

	
2255
 
#if PY_MAJOR_VERSION < 3
2256
 
__Pyx_PyMODINIT_FUNC init_vmsfdl(void) CYTHON_SMALL_CODE; /*proto*/
2257
 
__Pyx_PyMODINIT_FUNC init_vmsfdl(void)
1931 2258
 
#else
1932
 
PyMODINIT_FUNC PyInit__vmsfdl(void); /*proto*/
1933
 
PyMODINIT_FUNC PyInit__vmsfdl(void)
2259
 
__Pyx_PyMODINIT_FUNC PyInit__vmsfdl(void) CYTHON_SMALL_CODE; /*proto*/
2260
 
__Pyx_PyMODINIT_FUNC PyInit__vmsfdl(void)
2261
 
#if CYTHON_PEP489_MULTI_PHASE_INIT
2262
 
{
2263
 
  return PyModuleDef_Init(&__pyx_moduledef);
2264
 
}
2265
 
static int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name) {
2266
 
    PyObject *value = PyObject_GetAttrString(spec, from_name);
2267
 
    int result = 0;
2268
 
    if (likely(value)) {
2269
 
        result = PyDict_SetItemString(moddict, to_name, value);
2270
 
        Py_DECREF(value);
2271
 
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
2272
 
        PyErr_Clear();
2273
 
    } else {
2274
 
        result = -1;
2275
 
    }
2276
 
    return result;
2277
 
}
2278
 
static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
2279
 
    PyObject *module = NULL, *moddict, *modname;
2280
 
    if (__pyx_m)
2281
 
        return __Pyx_NewRef(__pyx_m);
2282
 
    modname = PyObject_GetAttrString(spec, "name");
2283
 
    if (unlikely(!modname)) goto bad;
2284
 
    module = PyModule_NewObject(modname);
2285
 
    Py_DECREF(modname);
2286
 
    if (unlikely(!module)) goto bad;
2287
 
    moddict = PyModule_GetDict(module);
2288
 
    if (unlikely(!moddict)) goto bad;
2289
 
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__") < 0)) goto bad;
2290
 
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__") < 0)) goto bad;
2291
 
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__") < 0)) goto bad;
2292
 
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__") < 0)) goto bad;
2293
 
    return module;
2294
 
bad:
2295
 
    Py_XDECREF(module);
2296
 
    return NULL;
2297
 
}
2298
 

	
2299
 

	
2300
 
static int __pyx_pymod_exec__vmsfdl(PyObject *__pyx_pyinit_module)
2301
 
#endif
1934 2302
 
#endif
1935 2303
 
{
1936 2304
 
  PyObject *__pyx_t_1 = NULL;
1937 2305
 
  __Pyx_RefNannyDeclarations
2306
 
  #if CYTHON_PEP489_MULTI_PHASE_INIT
2307
 
  if (__pyx_m && __pyx_m == __pyx_pyinit_module) return 0;
2308
 
  #elif PY_MAJOR_VERSION >= 3
2309
 
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
2310
 
  #endif
1938 2311
 
  #if CYTHON_REFNANNY
1939
 
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
1940
 
  if (!__Pyx_RefNanny) {
1941
 
      PyErr_Clear();
1942
 
      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
1943
 
      if (!__Pyx_RefNanny)
1944
 
          Py_FatalError("failed to import 'refnanny' module");
1945
 
  }
1946
 
  #endif
1947
 
  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit__vmsfdl(void)", 0);
2312
 
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
2313
 
if (!__Pyx_RefNanny) {
2314
 
  PyErr_Clear();
2315
 
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
2316
 
  if (!__Pyx_RefNanny)
2317
 
      Py_FatalError("failed to import 'refnanny' module");
2318
 
}
2319
 
#endif
2320
 
  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit__vmsfdl(void)", 0);
1948 2321
 
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
1949 2322
 
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
1950 2323
 
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
...
 
@@ -1961,6 +2334,9 @@ PyMODINIT_FUNC PyInit__vmsfdl(void)
1961 2334
 
  #ifdef __Pyx_Generator_USED
1962 2335
 
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
1963 2336
 
  #endif
2337
 
  #ifdef __Pyx_AsyncGen_USED
2338
 
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
2339
 
  #endif
1964 2340
 
  #ifdef __Pyx_StopAsyncIteration_USED
1965 2341
 
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
1966 2342
 
  #endif
...
 
@@ -1972,15 +2348,21 @@ PyMODINIT_FUNC PyInit__vmsfdl(void)
1972 2348
 
  #endif
1973 2349
 
  #endif
1974 2350
 
  /*--- Module creation code ---*/
2351
 
  #if CYTHON_PEP489_MULTI_PHASE_INIT
2352
 
  __pyx_m = __pyx_pyinit_module;
2353
 
  Py_INCREF(__pyx_m);
2354
 
  #else
1975 2355
 
  #if PY_MAJOR_VERSION < 3
1976 2356
 
  __pyx_m = Py_InitModule4("_vmsfdl", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
1977 2357
 
  #else
1978 2358
 
  __pyx_m = PyModule_Create(&__pyx_moduledef);
1979 2359
 
  #endif
1980 2360
 
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
2361
 
  #endif
1981 2362
 
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
1982 2363
 
  Py_INCREF(__pyx_d);
1983 2364
 
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
2365
 
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
1984 2366
 
  #if CYTHON_COMPILING_IN_PYPY
1985 2367
 
  Py_INCREF(__pyx_b);
1986 2368
 
  #endif
...
 
@@ -2005,22 +2387,14 @@ PyMODINIT_FUNC PyInit__vmsfdl(void)
2005 2387
 
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
2006 2388
 
  /*--- Constants init code ---*/
2007 2389
 
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
2008
 
  /*--- Global init code ---*/
2009
 
  /*--- Variable export code ---*/
2010
 
  /*--- Function export code ---*/
2011
 
  /*--- Type init code ---*/
2012
 
  /*--- Type import code ---*/
2013
 
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", 
2014
 
  #if CYTHON_COMPILING_IN_PYPY
2015
 
  sizeof(PyTypeObject),
2016
 
  #else
2017
 
  sizeof(PyHeapTypeObject),
2018
 
  #endif
2019
 
  0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) __PYX_ERR(1, 9, __pyx_L1_error)
2020
 
  __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) __PYX_ERR(2, 8, __pyx_L1_error)
2021
 
  __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) __PYX_ERR(3, 15, __pyx_L1_error)
2022
 
  /*--- Variable import code ---*/
2023
 
  /*--- Function import code ---*/
2390
 
  /*--- Global type/function init code ---*/
2391
 
  (void)__Pyx_modinit_global_init_code();
2392
 
  (void)__Pyx_modinit_variable_export_code();
2393
 
  (void)__Pyx_modinit_function_export_code();
2394
 
  (void)__Pyx_modinit_type_init_code();
2395
 
  if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error;
2396
 
  (void)__Pyx_modinit_variable_import_code();
2397
 
  (void)__Pyx_modinit_function_import_code();
2024 2398
 
  /*--- Execution code ---*/
2025 2399
 
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
2026 2400
 
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
...
 
@@ -2043,7 +2417,7 @@ PyMODINIT_FUNC PyInit__vmsfdl(void)
2043 2417
 
 * # file: _vmsfdl.pyx
2044 2418
 
 * # build:
2045 2419
 
 */
2046
 
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
2420
 
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
2047 2421
 
  __Pyx_GOTREF(__pyx_t_1);
2048 2422
 
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
2049 2423
 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
...
 
@@ -2055,7 +2429,7 @@ PyMODINIT_FUNC PyInit__vmsfdl(void)
2055 2429
 
  __Pyx_XDECREF(__pyx_t_1);
2056 2430
 
  if (__pyx_m) {
2057 2431
 
    if (__pyx_d) {
2058
 
      __Pyx_AddTraceback("init vms.rtl.fdl._vmsfdl", __pyx_clineno, __pyx_lineno, __pyx_filename);
2432
 
      __Pyx_AddTraceback("init vms.rtl.fdl._vmsfdl", 0, __pyx_lineno, __pyx_filename);
2059 2433
 
    }
2060 2434
 
    Py_DECREF(__pyx_m); __pyx_m = 0;
2061 2435
 
  } else if (!PyErr_Occurred()) {
...
 
@@ -2063,10 +2437,12 @@ PyMODINIT_FUNC PyInit__vmsfdl(void)
2063 2437
 
  }
2064 2438
 
  __pyx_L0:;
2065 2439
 
  __Pyx_RefNannyFinishContext();
2066
 
  #if PY_MAJOR_VERSION < 3
2440
 
  #if CYTHON_PEP489_MULTI_PHASE_INIT
2441
 
  return (__pyx_m != NULL) ? 0 : -1;
2442
 
  #elif PY_MAJOR_VERSION >= 3
2443
 
  return __pyx_m;
2444
 
  #else
2067 2445
 
  return;
2068
 
  #else
2069
 
  return __pyx_m;
2070 2446
 
  #endif
2071 2447
 
}
2072 2448
 

	
...
 
@@ -2088,6 +2464,20 @@ end:
2088 2464
 
}
2089 2465
 
#endif
2090 2466
 

	
2467
 
/* PyObjectGetAttrStr */
2468
 
#if CYTHON_USE_TYPE_SLOTS
2469
 
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
2470
 
    PyTypeObject* tp = Py_TYPE(obj);
2471
 
    if (likely(tp->tp_getattro))
2472
 
        return tp->tp_getattro(obj, attr_name);
2473
 
#if PY_MAJOR_VERSION < 3
2474
 
    if (likely(tp->tp_getattr))
2475
 
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
2476
 
#endif
2477
 
    return PyObject_GetAttr(obj, attr_name);
2478
 
}
2479
 
#endif
2480
 

	
2091 2481
 
/* GetBuiltinName */
2092 2482
 
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
2093 2483
 
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
...
 
@@ -2262,11 +2652,7 @@ static void __Pyx_Raise(PyObject *type, 
2262 2652
 
            "raise: exception class must be a subclass of BaseException");
2263 2653
 
        goto bad;
2264 2654
 
    }
2265
 
#if PY_VERSION_HEX >= 0x03030000
2266 2655
 
    if (cause) {
2267
 
#else
2268
 
    if (cause && cause != Py_None) {
2269
 
#endif
2270 2656
 
        PyObject *fixed_cause;
2271 2657
 
        if (cause == Py_None) {
2272 2658
 
            fixed_cause = NULL;
...
 
@@ -2294,7 +2680,7 @@ static void __Pyx_Raise(PyObject *type, 
2294 2680
 
        PyErr_Restore(tmp_type, tmp_value, tb);
2295 2681
 
        Py_XDECREF(tmp_tb);
2296 2682
 
#else
2297
 
        PyThreadState *tstate = PyThreadState_GET();
2683
 
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
2298 2684
 
        PyObject* tmp_tb = tstate->curexc_traceback;
2299 2685
 
        if (tb != tmp_tb) {
2300 2686
 
            Py_INCREF(tb);
...
 
@@ -2309,8 +2695,211 @@ bad:
2309 2695
 
}
2310 2696
 
#endif
2311 2697
 

	
2698
 
/* PyCFunctionFastCall */
2699
 
#if CYTHON_FAST_PYCCALL
2700
 
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
2701
 
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
2702
 
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
2703
 
    PyObject *self = PyCFunction_GET_SELF(func);
2704
 
    int flags = PyCFunction_GET_FLAGS(func);
2705
 
    assert(PyCFunction_Check(func));
2706
 
    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)));
2707
 
    assert(nargs >= 0);
2708
 
    assert(nargs == 0 || args != NULL);
2709
 
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
2710
 
       because it may clear it (directly or indirectly) and so the
2711
 
       caller loses its exception */
2712
 
    assert(!PyErr_Occurred());
2713
 
    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
2714
 
        return (*((__Pyx_PyCFunctionFastWithKeywords)meth)) (self, args, nargs, NULL);
2715
 
    } else {
2716
 
        return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs);
2717
 
    }
2718
 
}
2719
 
#endif
2720
 

	
2721
 
/* PyFunctionFastCall */
2722
 
#if CYTHON_FAST_PYCALL
2723
 
#include "frameobject.h"
2724
 
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
2725
 
                                               PyObject *globals) {
2726
 
    PyFrameObject *f;
2727
 
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
2728
 
    PyObject **fastlocals;
2729
 
    Py_ssize_t i;
2730
 
    PyObject *result;
2731
 
    assert(globals != NULL);
2732
 
    /* XXX Perhaps we should create a specialized
2733
 
       PyFrame_New() that doesn't take locals, but does
2734
 
       take builtins without sanity checking them.
2735
 
       */
2736
 
    assert(tstate != NULL);
2737
 
    f = PyFrame_New(tstate, co, globals, NULL);
2738
 
    if (f == NULL) {
2739
 
        return NULL;
2740
 
    }
2741
 
    fastlocals = f->f_localsplus;
2742
 
    for (i = 0; i < na; i++) {
2743
 
        Py_INCREF(*args);
2744
 
        fastlocals[i] = *args++;
2745
 
    }
2746
 
    result = PyEval_EvalFrameEx(f,0);
2747
 
    ++tstate->recursion_depth;
2748
 
    Py_DECREF(f);
2749
 
    --tstate->recursion_depth;
2750
 
    return result;
2751
 
}
2752
 
#if 1 || PY_VERSION_HEX < 0x030600B1
2753
 
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
2754
 
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
2755
 
    PyObject *globals = PyFunction_GET_GLOBALS(func);
2756
 
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
2757
 
    PyObject *closure;
2758
 
#if PY_MAJOR_VERSION >= 3
2759
 
    PyObject *kwdefs;
2760
 
#endif
2761
 
    PyObject *kwtuple, **k;
2762
 
    PyObject **d;
2763
 
    Py_ssize_t nd;
2764
 
    Py_ssize_t nk;
2765
 
    PyObject *result;
2766
 
    assert(kwargs == NULL || PyDict_Check(kwargs));
2767
 
    nk = kwargs ? PyDict_Size(kwargs) : 0;
2768
 
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
2769
 
        return NULL;
2770
 
    }
2771
 
    if (
2772
 
#if PY_MAJOR_VERSION >= 3
2773
 
            co->co_kwonlyargcount == 0 &&
2774
 
#endif
2775
 
            likely(kwargs == NULL || nk == 0) &&
2776
 
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
2777
 
        if (argdefs == NULL && co->co_argcount == nargs) {
2778
 
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
2779
 
            goto done;
2780
 
        }
2781
 
        else if (nargs == 0 && argdefs != NULL
2782
 
                 && co->co_argcount == Py_SIZE(argdefs)) {
2783
 
            /* function called with no arguments, but all parameters have
2784
 
               a default value: use default values as arguments .*/
2785
 
            args = &PyTuple_GET_ITEM(argdefs, 0);
2786
 
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
2787
 
            goto done;
2788
 
        }
2789
 
    }
2790
 
    if (kwargs != NULL) {
2791
 
        Py_ssize_t pos, i;
2792
 
        kwtuple = PyTuple_New(2 * nk);
2793
 
        if (kwtuple == NULL) {
2794
 
            result = NULL;
2795
 
            goto done;
2796
 
        }
2797
 
        k = &PyTuple_GET_ITEM(kwtuple, 0);
2798
 
        pos = i = 0;
2799
 
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
2800
 
            Py_INCREF(k[i]);
2801
 
            Py_INCREF(k[i+1]);
2802
 
            i += 2;
2803
 
        }
2804
 
        nk = i / 2;
2805
 
    }
2806
 
    else {
2807
 
        kwtuple = NULL;
2808
 
        k = NULL;
2809
 
    }
2810
 
    closure = PyFunction_GET_CLOSURE(func);
2811
 
#if PY_MAJOR_VERSION >= 3
2812
 
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
2813
 
#endif
2814
 
    if (argdefs != NULL) {
2815
 
        d = &PyTuple_GET_ITEM(argdefs, 0);
2816
 
        nd = Py_SIZE(argdefs);
2817
 
    }
2818
 
    else {
2819
 
        d = NULL;
2820
 
        nd = 0;
2821
 
    }
2822
 
#if PY_MAJOR_VERSION >= 3
2823
 
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
2824
 
                               args, nargs,
2825
 
                               k, (int)nk,
2826
 
                               d, (int)nd, kwdefs, closure);
2827
 
#else
2828
 
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
2829
 
                               args, nargs,
2830
 
                               k, (int)nk,
2831
 
                               d, (int)nd, closure);
2832
 
#endif
2833
 
    Py_XDECREF(kwtuple);
2834
 
done:
2835
 
    Py_LeaveRecursiveCall();
2836
 
    return result;
2837
 
}
2838
 
#endif
2839
 
#endif
2840
 

	
2841
 
/* PyObjectCallMethO */
2842
 
#if CYTHON_COMPILING_IN_CPYTHON
2843
 
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
2844
 
    PyObject *self, *result;
2845
 
    PyCFunction cfunc;
2846
 
    cfunc = PyCFunction_GET_FUNCTION(func);
2847
 
    self = PyCFunction_GET_SELF(func);
2848
 
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
2849
 
        return NULL;
2850
 
    result = cfunc(self, arg);
2851
 
    Py_LeaveRecursiveCall();
2852
 
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
2853
 
        PyErr_SetString(
2854
 
            PyExc_SystemError,
2855
 
            "NULL result without error in PyObject_Call");
2856
 
    }
2857
 
    return result;
2858
 
}
2859
 
#endif
2860
 

	
2861
 
/* PyObjectCallOneArg */
2862
 
#if CYTHON_COMPILING_IN_CPYTHON
2863
 
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
2864
 
    PyObject *result;
2865
 
    PyObject *args = PyTuple_New(1);
2866
 
    if (unlikely(!args)) return NULL;
2867
 
    Py_INCREF(arg);
2868
 
    PyTuple_SET_ITEM(args, 0, arg);
2869
 
    result = __Pyx_PyObject_Call(func, args, NULL);
2870
 
    Py_DECREF(args);
2871
 
    return result;
2872
 
}
2873
 
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
2874
 
#if CYTHON_FAST_PYCALL
2875
 
    if (PyFunction_Check(func)) {
2876
 
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
2877
 
    }
2878
 
#endif
2879
 
    if (likely(PyCFunction_Check(func))) {
2880
 
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
2881
 
            return __Pyx_PyObject_CallMethO(func, arg);
2882
 
#if CYTHON_FAST_PYCCALL
2883
 
        } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
2884
 
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
2885
 
#endif
2886
 
        }
2887
 
    }
2888
 
    return __Pyx__PyObject_CallOneArg(func, arg);
2889
 
}
2890
 
#else
2891
 
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
2892
 
    PyObject *result;
2893
 
    PyObject *args = PyTuple_Pack(1, arg);
2894
 
    if (unlikely(!args)) return NULL;
2895
 
    result = __Pyx_PyObject_Call(func, args, NULL);
2896
 
    Py_DECREF(args);
2897
 
    return result;
2898
 
}
2899
 
#endif
2900
 

	
2312 2901
 
/* RaiseDoubleKeywords */
2313
 
  static void __Pyx_RaiseDoubleKeywordsError(
2902
 
static void __Pyx_RaiseDoubleKeywordsError(
2314 2903
 
    const char* func_name,
2315 2904
 
    PyObject* kw_name)
2316 2905
 
{
...
 
@@ -2324,7 +2913,7 @@ bad:
2324 2913
 
}
2325 2914
 

	
2326 2915
 
/* ParseKeywords */
2327
 
  static int __Pyx_ParseOptionalKeywords(
2916
 
static int __Pyx_ParseOptionalKeywords(
2328 2917
 
    PyObject *kwds,
2329 2918
 
    PyObject **argnames[],
2330 2919
 
    PyObject *kwds2,
...
 
@@ -2426,7 +3015,7 @@ bad:
2426 3015
 
}
2427 3016
 

	
2428 3017
 
/* RaiseArgTupleInvalid */
2429
 
  static void __Pyx_RaiseArgtupleInvalid(
3018
 
static void __Pyx_RaiseArgtupleInvalid(
2430 3019
 
    const char* func_name,
2431 3020
 
    int exact,
2432 3021
 
    Py_ssize_t num_min,
...
 
@@ -2451,8 +3040,48 @@ bad:
2451 3040
 
                 (num_expected == 1) ? "" : "s", num_found);
2452 3041
 
}
2453 3042
 

	
3043
 
/* CLineInTraceback */
3044
 
#ifndef CYTHON_CLINE_IN_TRACEBACK
3045
 
static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) {
3046
 
    PyObject *use_cline;
3047
 
    PyObject *ptype, *pvalue, *ptraceback;
3048
 
#if CYTHON_COMPILING_IN_CPYTHON
3049
 
    PyObject **cython_runtime_dict;
3050
 
#endif
3051
 
    if (unlikely(!__pyx_cython_runtime)) {
3052
 
        return c_line;
3053
 
    }
3054
 
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
3055
 
#if CYTHON_COMPILING_IN_CPYTHON
3056
 
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
3057
 
    if (likely(cython_runtime_dict)) {
3058
 
      use_cline = __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback);
3059
 
    } else
3060
 
#endif
3061
 
    {
3062
 
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
3063
 
      if (use_cline_obj) {
3064
 
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
3065
 
        Py_DECREF(use_cline_obj);
3066
 
      } else {
3067
 
        PyErr_Clear();
3068
 
        use_cline = NULL;
3069
 
      }
3070
 
    }
3071
 
    if (!use_cline) {
3072
 
        c_line = 0;
3073
 
        PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
3074
 
    }
3075
 
    else if (PyObject_Not(use_cline) != 0) {
3076
 
        c_line = 0;
3077
 
    }
3078
 
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
3079
 
    return c_line;
3080
 
}
3081
 
#endif
3082
 

	
2454 3083
 
/* CodeObjectCache */
2455
 
  static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
3084
 
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
2456 3085
 
    int start = 0, mid = 0, end = count - 1;
2457 3086
 
    if (end >= 0 && code_line > entries[end].code_line) {
2458 3087
 
        return count;
...
 
@@ -2532,7 +3161,7 @@ static void __pyx_insert_code_object(int
2532 3161
 
}
2533 3162
 

	
2534 3163
 
/* AddTraceback */
2535
 
  #include "compile.h"
3164
 
#include "compile.h"
2536 3165
 
#include "frameobject.h"
2537 3166
 
#include "traceback.h"
2538 3167
 
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
...
 
@@ -2591,18 +3220,22 @@ static void __Pyx_AddTraceback(const cha
2591 3220
 
                               int py_line, const char *filename) {
2592 3221
 
    PyCodeObject *py_code = 0;
2593 3222
 
    PyFrameObject *py_frame = 0;
2594
 
    py_code = __pyx_find_code_object(c_line ? c_line : py_line);
3223
 
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
3224
 
    if (c_line) {
3225
 
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
3226
 
    }
3227
 
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
2595 3228
 
    if (!py_code) {
2596 3229
 
        py_code = __Pyx_CreateCodeObjectForTraceback(
2597 3230
 
            funcname, c_line, py_line, filename);
2598 3231
 
        if (!py_code) goto bad;
2599
 
        __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
3232
 
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
2600 3233
 
    }
2601 3234
 
    py_frame = PyFrame_New(
2602
 
        PyThreadState_GET(), /*PyThreadState *tstate,*/
2603
 
        py_code,             /*PyCodeObject *code,*/
2604
 
        __pyx_d,      /*PyObject *globals,*/
2605
 
        0                    /*PyObject *locals*/
3235
 
        tstate,            /*PyThreadState *tstate,*/
3236
 
        py_code,           /*PyCodeObject *code,*/
3237
 
        __pyx_d,    /*PyObject *globals,*/
3238
 
        0                  /*PyObject *locals*/
2606 3239
 
    );
2607 3240
 
    if (!py_frame) goto bad;
2608 3241
 
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
...
 
@@ -2613,7 +3246,7 @@ bad:
2613 3246
 
}
2614 3247
 

	
2615 3248
 
/* CIntFromPyVerify */
2616
 
  #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
3249
 
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
2617 3250
 
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
2618 3251
 
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
2619 3252
 
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
...
 
@@ -2635,7 +3268,7 @@ bad:
2635 3268
 
    }
2636 3269
 

	
2637 3270
 
/* CIntToPy */
2638
 
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) {
3271
 
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) {
2639 3272
 
    const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0;
2640 3273
 
    const int is_unsigned = neg_one > const_zero;
2641 3274
 
    if (is_unsigned) {
...
 
@@ -2666,7 +3299,7 @@ bad:
2666 3299
 
}
2667 3300
 

	
2668 3301
 
/* CIntToPy */
2669
 
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value) {
3302
 
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value) {
2670 3303
 
    const unsigned long neg_one = (unsigned long) -1, const_zero = (unsigned long) 0;
2671 3304
 
    const int is_unsigned = neg_one > const_zero;
2672 3305
 
    if (is_unsigned) {
...
 
@@ -2697,7 +3330,7 @@ bad:
2697 3330
 
}
2698 3331
 

	
2699 3332
 
/* CIntFromPy */
2700
 
  static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *x) {
3333
 
static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *x) {
2701 3334
 
    const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0;
2702 3335
 
    const int is_unsigned = neg_one > const_zero;
2703 3336
 
#if PY_MAJOR_VERSION < 3
...
 
@@ -2886,7 +3519,7 @@ raise_neg_overflow:
2886 3519
 
}
2887 3520
 

	
2888 3521
 
/* CIntToPy */
2889
 
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
3522
 
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
2890 3523
 
    const long neg_one = (long) -1, const_zero = (long) 0;
2891 3524
 
    const int is_unsigned = neg_one > const_zero;
2892 3525
 
    if (is_unsigned) {
...
 
@@ -2917,7 +3550,7 @@ raise_neg_overflow:
2917 3550
 
}
2918 3551
 

	
2919 3552
 
/* CIntFromPy */
2920
 
  static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
3553
 
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
2921 3554
 
    const long neg_one = (long) -1, const_zero = (long) 0;
2922 3555
 
    const int is_unsigned = neg_one > const_zero;
2923 3556
 
#if PY_MAJOR_VERSION < 3
...
 
@@ -3106,7 +3739,7 @@ raise_neg_overflow:
3106 3739
 
}
3107 3740
 

	
3108 3741
 
/* CIntFromPy */
3109
 
  static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
3742
 
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
3110 3743
 
    const int neg_one = (int) -1, const_zero = (int) 0;
3111 3744
 
    const int is_unsigned = neg_one > const_zero;
3112 3745
 
#if PY_MAJOR_VERSION < 3
...
 
@@ -3294,8 +3927,108 @@ raise_neg_overflow:
3294 3927
 
    return (int) -1;
3295 3928
 
}
3296 3929
 

	
3930
 
/* FastTypeChecks */
3931
 
#if CYTHON_COMPILING_IN_CPYTHON
3932
 
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
3933
 
    while (a) {
3934
 
        a = a->tp_base;
3935
 
        if (a == b)
3936
 
            return 1;
3937
 
    }
3938
 
    return b == &PyBaseObject_Type;
3939
 
}
3940
 
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
3941
 
    PyObject *mro;
3942
 
    if (a == b) return 1;
3943
 
    mro = a->tp_mro;
3944
 
    if (likely(mro)) {
3945
 
        Py_ssize_t i, n;
3946
 
        n = PyTuple_GET_SIZE(mro);
3947
 
        for (i = 0; i < n; i++) {
3948
 
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
3949
 
                return 1;
3950
 
        }
3951
 
        return 0;
3952
 
    }
3953
 
    return __Pyx_InBases(a, b);
3954
 
}
3955
 
#if PY_MAJOR_VERSION == 2
3956
 
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
3957
 
    PyObject *exception, *value, *tb;
3958
 
    int res;
3959
 
    __Pyx_PyThreadState_declare
3960
 
    __Pyx_PyThreadState_assign
3961
 
    __Pyx_ErrFetch(&exception, &value, &tb);
3962
 
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
3963
 
    if (unlikely(res == -1)) {
3964
 
        PyErr_WriteUnraisable(err);
3965
 
        res = 0;
3966
 
    }
3967
 
    if (!res) {
3968
 
        res = PyObject_IsSubclass(err, exc_type2);
3969
 
        if (unlikely(res == -1)) {
3970
 
            PyErr_WriteUnraisable(err);
3971
 
            res = 0;
3972
 
        }
3973
 
    }
3974
 
    __Pyx_ErrRestore(exception, value, tb);
3975
 
    return res;
3976
 
}
3977
 
#else
3978
 
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
3979
 
    int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
3980
 
    if (!res) {
3981
 
        res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
3982
 
    }
3983
 
    return res;
3984
 
}
3985
 
#endif
3986
 
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
3987
 
    Py_ssize_t i, n;
3988
 
    assert(PyExceptionClass_Check(exc_type));
3989
 
    n = PyTuple_GET_SIZE(tuple);
3990
 
#if PY_MAJOR_VERSION >= 3
3991
 
    for (i=0; i<n; i++) {
3992
 
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
3993
 
    }
3994
 
#endif
3995
 
    for (i=0; i<n; i++) {
3996
 
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
3997
 
        #if PY_MAJOR_VERSION < 3
3998
 
        if (likely(exc_type == t)) return 1;
3999
 
        #endif
4000
 
        if (likely(PyExceptionClass_Check(t))) {
4001
 
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
4002
 
        } else {
4003
 
        }
4004
 
    }
4005
 
    return 0;
4006
 
}
4007
 
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
4008
 
    if (likely(err == exc_type)) return 1;
4009
 
    if (likely(PyExceptionClass_Check(err))) {
4010
 
        if (likely(PyExceptionClass_Check(exc_type))) {
4011
 
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
4012
 
        } else if (likely(PyTuple_Check(exc_type))) {
4013
 
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
4014
 
        } else {
4015
 
        }
4016
 
    }
4017
 
    return PyErr_GivenExceptionMatches(err, exc_type);
4018
 
}
4019
 
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
4020
 
    assert(PyExceptionClass_Check(exc_type1));
4021
 
    assert(PyExceptionClass_Check(exc_type2));
4022
 
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
4023
 
    if (likely(PyExceptionClass_Check(err))) {
4024
 
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
4025
 
    }
4026
 
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
4027
 
}
4028
 
#endif
4029
 

	
3297 4030
 
/* CheckBinaryVersion */
3298
 
  static int __Pyx_check_binary_version(void) {
4031
 
static int __Pyx_check_binary_version(void) {
3299 4032
 
    char ctversion[4], rtversion[4];
3300 4033
 
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
3301 4034
 
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
...
 
@@ -3311,7 +4044,7 @@ raise_neg_overflow:
3311 4044
 
}
3312 4045
 

	
3313 4046
 
/* ModuleImport */
3314
 
  #ifndef __PYX_HAVE_RT_ImportModule
4047
 
#ifndef __PYX_HAVE_RT_ImportModule
3315 4048
 
#define __PYX_HAVE_RT_ImportModule
3316 4049
 
static PyObject *__Pyx_ImportModule(const char *name) {
3317 4050
 
    PyObject *py_name = 0;
...
 
@@ -3329,7 +4062,7 @@ bad:
3329 4062
 
#endif
3330 4063
 

	
3331 4064
 
/* TypeImport */
3332
 
  #ifndef __PYX_HAVE_RT_ImportType
4065
 
#ifndef __PYX_HAVE_RT_ImportType
3333 4066
 
#define __PYX_HAVE_RT_ImportType
3334 4067
 
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
3335 4068
 
    size_t size, int strict)
...
 
@@ -3394,7 +4127,7 @@ bad:
3394 4127
 
#endif
3395 4128
 

	
3396 4129
 
/* InitStrings */
3397
 
  static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
4130
 
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
3398 4131
 
    while (t->p) {
3399 4132
 
        #if PY_MAJOR_VERSION < 3
3400 4133
 
        if (t->is_unicode) {
...
 
@@ -3419,6 +4152,8 @@ bad:
3419 4152
 
        #endif
3420 4153
 
        if (!*t->p)
3421 4154
 
            return -1;
4155
 
        if (PyObject_Hash(*t->p) == -1)
4156
 
            return -1;
3422 4157
 
        ++t;
3423 4158
 
    }
3424 4159
 
    return 0;
...
 
@@ -3427,50 +4162,57 @@ bad:
3427 4162
 
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
3428 4163
 
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
3429 4164
 
}
3430
 
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
4165
 
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
3431 4166
 
    Py_ssize_t ignore;
3432 4167
 
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
3433 4168
 
}
3434
 
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
3435
 
#if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
4169
 
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
4170
 
#if !CYTHON_PEP393_ENABLED
4171
 
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
4172
 
    char* defenc_c;
4173
 
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
4174
 
    if (!defenc) return NULL;
4175
 
    defenc_c = PyBytes_AS_STRING(defenc);
4176
 
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
4177
 
    {
4178
 
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
4179
 
        char* c;
4180
 
        for (c = defenc_c; c < end; c++) {
4181
 
            if ((unsigned char) (*c) >= 128) {
4182
 
                PyUnicode_AsASCIIString(o);
4183
 
                return NULL;
4184
 
            }
4185
 
        }
4186
 
    }
4187
 
#endif
4188
 
    *length = PyBytes_GET_SIZE(defenc);
4189
 
    return defenc_c;
4190
 
}
4191
 
#else
4192
 
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
4193
 
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
4194
 
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
4195
 
    if (likely(PyUnicode_IS_ASCII(o))) {
4196
 
        *length = PyUnicode_GET_LENGTH(o);
4197
 
        return PyUnicode_AsUTF8(o);
4198
 
    } else {
4199
 
        PyUnicode_AsASCIIString(o);
4200
 
        return NULL;
4201
 
    }
4202
 
#else
4203
 
    return PyUnicode_AsUTF8AndSize(o, length);
4204
 
#endif
4205
 
}
4206
 
#endif
4207
 
#endif
4208
 
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
4209
 
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
3436 4210
 
    if (
3437 4211
 
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
3438 4212
 
            __Pyx_sys_getdefaultencoding_not_ascii &&
3439 4213
 
#endif
3440 4214
 
            PyUnicode_Check(o)) {
3441
 
#if PY_VERSION_HEX < 0x03030000
3442
 
        char* defenc_c;
3443
 
        PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
3444
 
        if (!defenc) return NULL;
3445
 
        defenc_c = PyBytes_AS_STRING(defenc);
3446
 
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
3447
 
        {
3448
 
            char* end = defenc_c + PyBytes_GET_SIZE(defenc);
3449
 
            char* c;
3450
 
            for (c = defenc_c; c < end; c++) {
3451
 
                if ((unsigned char) (*c) >= 128) {
3452
 
                    PyUnicode_AsASCIIString(o);
3453
 
                    return NULL;
3454
 
                }
3455
 
            }
3456
 
        }
3457
 
#endif
3458
 
        *length = PyBytes_GET_SIZE(defenc);
3459
 
        return defenc_c;
3460
 
#else
3461
 
        if (__Pyx_PyUnicode_READY(o) == -1) return NULL;
3462
 
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
3463
 
        if (PyUnicode_IS_ASCII(o)) {
3464
 
            *length = PyUnicode_GET_LENGTH(o);
3465
 
            return PyUnicode_AsUTF8(o);
3466
 
        } else {
3467
 
            PyUnicode_AsASCIIString(o);
3468
 
            return NULL;
3469
 
        }
3470
 
#else
3471
 
        return PyUnicode_AsUTF8AndSize(o, length);
3472
 
#endif
3473
 
#endif
4215
 
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
3474 4216
 
    } else
3475 4217
 
#endif
3476 4218
 
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
...
 
@@ -3494,6 +4236,26 @@ static CYTHON_INLINE int __Pyx_PyObject_
3494 4236
 
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
3495 4237
 
   else return PyObject_IsTrue(x);
3496 4238
 
}
4239
 
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
4240
 
#if PY_MAJOR_VERSION >= 3
4241
 
    if (PyLong_Check(result)) {
4242
 
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
4243
 
                "__int__ returned non-int (type %.200s).  "
4244
 
                "The ability to return an instance of a strict subclass of int "
4245
 
                "is deprecated, and may be removed in a future version of Python.",
4246
 
                Py_TYPE(result)->tp_name)) {
4247
 
            Py_DECREF(result);
4248
 
            return NULL;
4249
 
        }
4250
 
        return result;
4251
 
    }
4252
 
#endif
4253
 
    PyErr_Format(PyExc_TypeError,
4254
 
                 "__%.4s__ returned non-%.4s (type %.200s)",
4255
 
                 type_name, type_name, Py_TYPE(result)->tp_name);
4256
 
    Py_DECREF(result);
4257
 
    return NULL;
4258
 
}
3497 4259
 
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
3498 4260
 
#if CYTHON_USE_TYPE_SLOTS
3499 4261
 
  PyNumberMethods *m;
...
 
@@ -3501,9 +4263,9 @@ static CYTHON_INLINE PyObject* __Pyx_PyN
3501 4263
 
  const char *name = NULL;
3502 4264
 
  PyObject *res = NULL;
3503 4265
 
#if PY_MAJOR_VERSION < 3
3504
 
  if (PyInt_Check(x) || PyLong_Check(x))
4266
 
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
3505 4267
 
#else
3506
 
  if (PyLong_Check(x))
4268
 
  if (likely(PyLong_Check(x)))
3507 4269
 
#endif
3508 4270
 
    return __Pyx_NewRef(x);
3509 4271
 
#if CYTHON_USE_TYPE_SLOTS
...
 
@@ -3511,32 +4273,30 @@ static CYTHON_INLINE PyObject* __Pyx_PyN
3511 4273
 
  #if PY_MAJOR_VERSION < 3
3512 4274
 
  if (m && m->nb_int) {
3513 4275
 
    name = "int";
3514
 
    res = PyNumber_Int(x);
4276
 
    res = m->nb_int(x);
3515 4277
 
  }
3516 4278
 
  else if (m && m->nb_long) {
3517 4279
 
    name = "long";
3518
 
    res = PyNumber_Long(x);
4280
 
    res = m->nb_long(x);
3519 4281
 
  }
3520 4282
 
  #else
3521
 
  if (m && m->nb_int) {
4283
 
  if (likely(m && m->nb_int)) {
3522 4284
 
    name = "int";
3523
 
    res = PyNumber_Long(x);
4285
 
    res = m->nb_int(x);
3524 4286
 
  }
3525 4287
 
  #endif
3526 4288
 
#else
3527
 
  res = PyNumber_Int(x);
4289
 
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
4290
 
    res = PyNumber_Int(x);
4291
 
  }
3528 4292
 
#endif
3529
 
  if (res) {
4293
 
  if (likely(res)) {
3530 4294
 
#if PY_MAJOR_VERSION < 3
3531
 
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
4295
 
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
3532 4296
 
#else
3533
 
    if (!PyLong_Check(res)) {
4297
 
    if (unlikely(!PyLong_CheckExact(res))) {
3534 4298
 
#endif
3535
 
      PyErr_Format(PyExc_TypeError,
3536
 
                   "__%.4s__ returned non-%.4s (type %.200s)",
3537
 
                   name, name, Py_TYPE(res)->tp_name);
3538
 
      Py_DECREF(res);
3539
 
      return NULL;
4299
 
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
3540 4300
 
    }
3541 4301
 
  }
3542 4302
 
  else if (!PyErr_Occurred()) {
...
 
@@ -3607,6 +4367,9 @@ static CYTHON_INLINE Py_ssize_t __Pyx_Py
3607 4367
 
  Py_DECREF(x);
3608 4368
 
  return ival;
3609 4369
 
}
4370
 
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
4371
 
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
4372
 
}
3610 4373
 
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
3611 4374
 
    return PyInt_FromSize_t(ival);
3612 4375
 
}
0 comments (0 inline, 0 general)