PageRenderTime 104ms CodeModel.GetById 31ms app.highlight 64ms RepoModel.GetById 1ms app.codeStats 1ms

/tmp/cython/hello.c

https://bitbucket.org/prologic/circuits/
C | 1309 lines | 1153 code | 120 blank | 36 comment | 261 complexity | 81ebe5220a206a8a58a0d0a07ecdd105 MD5 | raw file
   1/* Generated by Cython 0.14.1 on Sun Apr 24 12:03:13 2011 */
   2
   3#define PY_SSIZE_T_CLEAN
   4#include "Python.h"
   5#ifndef Py_PYTHON_H
   6    #error Python headers needed to compile C extensions, please install development version of Python.
   7#else
   8
   9#include <stddef.h> /* For offsetof */
  10#ifndef offsetof
  11#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
  12#endif
  13
  14#if !defined(WIN32) && !defined(MS_WINDOWS)
  15  #ifndef __stdcall
  16    #define __stdcall
  17  #endif
  18  #ifndef __cdecl
  19    #define __cdecl
  20  #endif
  21  #ifndef __fastcall
  22    #define __fastcall
  23  #endif
  24#endif
  25
  26#ifndef DL_IMPORT
  27  #define DL_IMPORT(t) t
  28#endif
  29#ifndef DL_EXPORT
  30  #define DL_EXPORT(t) t
  31#endif
  32
  33#ifndef PY_LONG_LONG
  34  #define PY_LONG_LONG LONG_LONG
  35#endif
  36
  37#if PY_VERSION_HEX < 0x02040000
  38  #define METH_COEXIST 0
  39  #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
  40  #define PyDict_Contains(d,o)   PySequence_Contains(d,o)
  41#endif
  42
  43#if PY_VERSION_HEX < 0x02050000
  44  typedef int Py_ssize_t;
  45  #define PY_SSIZE_T_MAX INT_MAX
  46  #define PY_SSIZE_T_MIN INT_MIN
  47  #define PY_FORMAT_SIZE_T ""
  48  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
  49  #define PyInt_AsSsize_t(o)   PyInt_AsLong(o)
  50  #define PyNumber_Index(o)    PyNumber_Int(o)
  51  #define PyIndex_Check(o)     PyNumber_Check(o)
  52  #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
  53#endif
  54
  55#if PY_VERSION_HEX < 0x02060000
  56  #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
  57  #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
  58  #define Py_SIZE(ob)   (((PyVarObject*)(ob))->ob_size)
  59  #define PyVarObject_HEAD_INIT(type, size) \
  60          PyObject_HEAD_INIT(type) size,
  61  #define PyType_Modified(t)
  62
  63  typedef struct {
  64     void *buf;
  65     PyObject *obj;
  66     Py_ssize_t len;
  67     Py_ssize_t itemsize;
  68     int readonly;
  69     int ndim;
  70     char *format;
  71     Py_ssize_t *shape;
  72     Py_ssize_t *strides;
  73     Py_ssize_t *suboffsets;
  74     void *internal;
  75  } Py_buffer;
  76
  77  #define PyBUF_SIMPLE 0
  78  #define PyBUF_WRITABLE 0x0001
  79  #define PyBUF_FORMAT 0x0004
  80  #define PyBUF_ND 0x0008
  81  #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
  82  #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
  83  #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
  84  #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
  85  #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
  86
  87#endif
  88
  89#if PY_MAJOR_VERSION < 3
  90  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  91#else
  92  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  93#endif
  94
  95#if PY_MAJOR_VERSION >= 3
  96  #define Py_TPFLAGS_CHECKTYPES 0
  97  #define Py_TPFLAGS_HAVE_INDEX 0
  98#endif
  99
 100#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
 101  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
 102#endif
 103
 104#if PY_MAJOR_VERSION >= 3
 105  #define PyBaseString_Type            PyUnicode_Type
 106  #define PyStringObject               PyUnicodeObject
 107  #define PyString_Type                PyUnicode_Type
 108  #define PyString_Check               PyUnicode_Check
 109  #define PyString_CheckExact          PyUnicode_CheckExact
 110#endif
 111
 112#if PY_VERSION_HEX < 0x02060000
 113  #define PyBytesObject                PyStringObject
 114  #define PyBytes_Type                 PyString_Type
 115  #define PyBytes_Check                PyString_Check
 116  #define PyBytes_CheckExact           PyString_CheckExact
 117  #define PyBytes_FromString           PyString_FromString
 118  #define PyBytes_FromStringAndSize    PyString_FromStringAndSize
 119  #define PyBytes_FromFormat           PyString_FromFormat
 120  #define PyBytes_DecodeEscape         PyString_DecodeEscape
 121  #define PyBytes_AsString             PyString_AsString
 122  #define PyBytes_AsStringAndSize      PyString_AsStringAndSize
 123  #define PyBytes_Size                 PyString_Size
 124  #define PyBytes_AS_STRING            PyString_AS_STRING
 125  #define PyBytes_GET_SIZE             PyString_GET_SIZE
 126  #define PyBytes_Repr                 PyString_Repr
 127  #define PyBytes_Concat               PyString_Concat
 128  #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
 129#endif
 130
 131#if PY_VERSION_HEX < 0x02060000
 132  #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
 133  #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
 134#endif
 135#ifndef PySet_CheckExact
 136  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
 137#endif
 138
 139#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
 140
 141#if PY_MAJOR_VERSION >= 3
 142  #define PyIntObject                  PyLongObject
 143  #define PyInt_Type                   PyLong_Type
 144  #define PyInt_Check(op)              PyLong_Check(op)
 145  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
 146  #define PyInt_FromString             PyLong_FromString
 147  #define PyInt_FromUnicode            PyLong_FromUnicode
 148  #define PyInt_FromLong               PyLong_FromLong
 149  #define PyInt_FromSize_t             PyLong_FromSize_t
 150  #define PyInt_FromSsize_t            PyLong_FromSsize_t
 151  #define PyInt_AsLong                 PyLong_AsLong
 152  #define PyInt_AS_LONG                PyLong_AS_LONG
 153  #define PyInt_AsSsize_t              PyLong_AsSsize_t
 154  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
 155  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
 156#endif
 157
 158#if PY_MAJOR_VERSION >= 3
 159  #define PyBoolObject                 PyLongObject
 160#endif
 161
 162
 163#if PY_MAJOR_VERSION >= 3
 164  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
 165  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
 166#else
 167  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
 168  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
 169#endif
 170
 171#if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300)
 172  #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
 173  #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
 174  #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
 175#else
 176  #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
 177        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
 178        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
 179            (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
 180  #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
 181        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
 182        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
 183            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
 184  #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
 185        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
 186        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
 187            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
 188#endif
 189
 190#if PY_MAJOR_VERSION >= 3
 191  #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
 192#endif
 193
 194#if PY_VERSION_HEX < 0x02050000
 195  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
 196  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
 197  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),((char *)(n)))
 198#else
 199  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),(n))
 200  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
 201  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
 202#endif
 203
 204#if PY_VERSION_HEX < 0x02050000
 205  #define __Pyx_NAMESTR(n) ((char *)(n))
 206  #define __Pyx_DOCSTR(n)  ((char *)(n))
 207#else
 208  #define __Pyx_NAMESTR(n) (n)
 209  #define __Pyx_DOCSTR(n)  (n)
 210#endif
 211
 212#ifdef __cplusplus
 213#define __PYX_EXTERN_C extern "C"
 214#else
 215#define __PYX_EXTERN_C extern
 216#endif
 217
 218#if defined(WIN32) || defined(MS_WINDOWS)
 219#define _USE_MATH_DEFINES
 220#endif
 221#include <math.h>
 222#define __PYX_HAVE_API__hello
 223
 224#ifdef PYREX_WITHOUT_ASSERTIONS
 225#define CYTHON_WITHOUT_ASSERTIONS
 226#endif
 227
 228
 229/* inline attribute */
 230#ifndef CYTHON_INLINE
 231  #if defined(__GNUC__)
 232    #define CYTHON_INLINE __inline__
 233  #elif defined(_MSC_VER)
 234    #define CYTHON_INLINE __inline
 235  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
 236    #define CYTHON_INLINE inline
 237  #else
 238    #define CYTHON_INLINE
 239  #endif
 240#endif
 241
 242/* unused attribute */
 243#ifndef CYTHON_UNUSED
 244# if defined(__GNUC__)
 245#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
 246#     define CYTHON_UNUSED __attribute__ ((__unused__))
 247#   else
 248#     define CYTHON_UNUSED
 249#   endif
 250# elif defined(__ICC) || defined(__INTEL_COMPILER)
 251#   define CYTHON_UNUSED __attribute__ ((__unused__))
 252# else
 253#   define CYTHON_UNUSED
 254# endif
 255#endif
 256
 257typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
 258
 259
 260/* Type Conversion Predeclarations */
 261
 262#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s)
 263#define __Pyx_PyBytes_AsUString(s)   ((unsigned char*) PyBytes_AsString(s))
 264
 265#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
 266static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
 267static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
 268
 269static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
 270static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
 271static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
 272
 273#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
 274
 275
 276#ifdef __GNUC__
 277/* Test for GCC > 2.95 */
 278#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
 279#define likely(x)   __builtin_expect(!!(x), 1)
 280#define unlikely(x) __builtin_expect(!!(x), 0)
 281#else /* __GNUC__ > 2 ... */
 282#define likely(x)   (x)
 283#define unlikely(x) (x)
 284#endif /* __GNUC__ > 2 ... */
 285#else /* __GNUC__ */
 286#define likely(x)   (x)
 287#define unlikely(x) (x)
 288#endif /* __GNUC__ */
 289    
 290static PyObject *__pyx_m;
 291static PyObject *__pyx_b;
 292static PyObject *__pyx_empty_tuple;
 293static PyObject *__pyx_empty_bytes;
 294static int __pyx_lineno;
 295static int __pyx_clineno = 0;
 296static const char * __pyx_cfilenm= __FILE__;
 297static const char *__pyx_filename;
 298
 299
 300static const char *__pyx_f[] = {
 301  "hello.pyx",
 302};
 303
 304/* Type declarations */
 305
 306#ifndef CYTHON_REFNANNY
 307  #define CYTHON_REFNANNY 0
 308#endif
 309
 310#if CYTHON_REFNANNY
 311  typedef struct {
 312    void (*INCREF)(void*, PyObject*, int);
 313    void (*DECREF)(void*, PyObject*, int);
 314    void (*GOTREF)(void*, PyObject*, int);
 315    void (*GIVEREF)(void*, PyObject*, int);
 316    void* (*SetupContext)(const char*, int, const char*);
 317    void (*FinishContext)(void**);
 318  } __Pyx_RefNannyAPIStruct;
 319  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
 320  static __Pyx_RefNannyAPIStruct * __Pyx_RefNannyImportAPI(const char *modname) {
 321    PyObject *m = NULL, *p = NULL;
 322    void *r = NULL;
 323    m = PyImport_ImportModule((char *)modname);
 324    if (!m) goto end;
 325    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
 326    if (!p) goto end;
 327    r = PyLong_AsVoidPtr(p);
 328  end:
 329    Py_XDECREF(p);
 330    Py_XDECREF(m);
 331    return (__Pyx_RefNannyAPIStruct *)r;
 332  }
 333  #define __Pyx_RefNannySetupContext(name)           void *__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
 334  #define __Pyx_RefNannyFinishContext()           __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
 335  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
 336  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
 337  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
 338  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
 339  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r);} } while(0)
 340#else
 341  #define __Pyx_RefNannySetupContext(name)
 342  #define __Pyx_RefNannyFinishContext()
 343  #define __Pyx_INCREF(r) Py_INCREF(r)
 344  #define __Pyx_DECREF(r) Py_DECREF(r)
 345  #define __Pyx_GOTREF(r)
 346  #define __Pyx_GIVEREF(r)
 347  #define __Pyx_XDECREF(r) Py_XDECREF(r)
 348#endif /* CYTHON_REFNANNY */
 349#define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);} } while(0)
 350#define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r);} } while(0)
 351
 352static int __Pyx_Print(PyObject*, PyObject *, int); /*proto*/
 353#if PY_MAJOR_VERSION >= 3
 354static PyObject* __pyx_print = 0;
 355static PyObject* __pyx_print_kwargs = 0;
 356#endif
 357
 358static int __Pyx_PrintOne(PyObject* stream, PyObject *o); /*proto*/
 359
 360static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
 361
 362static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
 363
 364static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
 365
 366static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);
 367
 368static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);
 369
 370static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);
 371
 372static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
 373
 374static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
 375
 376static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
 377
 378static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *);
 379
 380static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
 381
 382static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
 383
 384static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);
 385
 386static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
 387
 388static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
 389
 390static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
 391
 392static void __Pyx_AddTraceback(const char *funcname); /*proto*/
 393
 394static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
 395/* Module declarations from hello */
 396
 397#define __Pyx_MODULE_NAME "hello"
 398static int __pyx_module_is_main_hello = 0;
 399
 400/* Implementation of hello */
 401static char __pyx_k_1[] = "Hello %s!";
 402static char __pyx_k__hello[] = "hello";
 403static char __pyx_k____main__[] = "__main__";
 404static char __pyx_k____test__[] = "__test__";
 405static char __pyx_k__say_hello_to[] = "say_hello_to";
 406static PyObject *__pyx_kp_s_1;
 407static PyObject *__pyx_n_s____main__;
 408static PyObject *__pyx_n_s____test__;
 409static PyObject *__pyx_n_s__hello;
 410static PyObject *__pyx_n_s__say_hello_to;
 411
 412/* "hello.pyx":1
 413 * def say_hello_to(name):             # <<<<<<<<<<<<<<
 414 *     print("Hello %s!" % name)
 415 */
 416
 417static PyObject *__pyx_pf_5hello_say_hello_to(PyObject *__pyx_self, PyObject *__pyx_v_name); /*proto*/
 418static PyMethodDef __pyx_mdef_5hello_say_hello_to = {__Pyx_NAMESTR("say_hello_to"), (PyCFunction)__pyx_pf_5hello_say_hello_to, METH_O, __Pyx_DOCSTR(0)};
 419static PyObject *__pyx_pf_5hello_say_hello_to(PyObject *__pyx_self, PyObject *__pyx_v_name) {
 420  PyObject *__pyx_r = NULL;
 421  PyObject *__pyx_t_1 = NULL;
 422  __Pyx_RefNannySetupContext("say_hello_to");
 423  __pyx_self = __pyx_self;
 424
 425  /* "hello.pyx":2
 426 * def say_hello_to(name):
 427 *     print("Hello %s!" % name)             # <<<<<<<<<<<<<<
 428 */
 429  __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_1), __pyx_v_name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 430  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 431  if (__Pyx_PrintOne(0, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 432  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 433
 434  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 435  goto __pyx_L0;
 436  __pyx_L1_error:;
 437  __Pyx_XDECREF(__pyx_t_1);
 438  __Pyx_AddTraceback("hello.say_hello_to");
 439  __pyx_r = NULL;
 440  __pyx_L0:;
 441  __Pyx_XGIVEREF(__pyx_r);
 442  __Pyx_RefNannyFinishContext();
 443  return __pyx_r;
 444}
 445
 446static PyMethodDef __pyx_methods[] = {
 447  {0, 0, 0, 0}
 448};
 449
 450#if PY_MAJOR_VERSION >= 3
 451static struct PyModuleDef __pyx_moduledef = {
 452    PyModuleDef_HEAD_INIT,
 453    __Pyx_NAMESTR("hello"),
 454    0, /* m_doc */
 455    -1, /* m_size */
 456    __pyx_methods /* m_methods */,
 457    NULL, /* m_reload */
 458    NULL, /* m_traverse */
 459    NULL, /* m_clear */
 460    NULL /* m_free */
 461};
 462#endif
 463
 464static __Pyx_StringTabEntry __pyx_string_tab[] = {
 465  {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
 466  {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
 467  {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
 468  {&__pyx_n_s__hello, __pyx_k__hello, sizeof(__pyx_k__hello), 0, 0, 1, 1},
 469  {&__pyx_n_s__say_hello_to, __pyx_k__say_hello_to, sizeof(__pyx_k__say_hello_to), 0, 0, 1, 1},
 470  {0, 0, 0, 0, 0, 0, 0}
 471};
 472static int __Pyx_InitCachedBuiltins(void) {
 473  return 0;
 474}
 475
 476static int __Pyx_InitCachedConstants(void) {
 477  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants");
 478  __Pyx_RefNannyFinishContext();
 479  return 0;
 480}
 481
 482static int __Pyx_InitGlobals(void) {
 483  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
 484  return 0;
 485  __pyx_L1_error:;
 486  return -1;
 487}
 488
 489#if PY_MAJOR_VERSION < 3
 490PyMODINIT_FUNC inithello(void); /*proto*/
 491PyMODINIT_FUNC inithello(void)
 492#else
 493PyMODINIT_FUNC PyInit_hello(void); /*proto*/
 494PyMODINIT_FUNC PyInit_hello(void)
 495#endif
 496{
 497  PyObject *__pyx_t_1 = NULL;
 498  #if CYTHON_REFNANNY
 499  void* __pyx_refnanny = NULL;
 500  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
 501  if (!__Pyx_RefNanny) {
 502      PyErr_Clear();
 503      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
 504      if (!__Pyx_RefNanny)
 505          Py_FatalError("failed to import 'refnanny' module");
 506  }
 507  __pyx_refnanny = __Pyx_RefNanny->SetupContext("PyMODINIT_FUNC PyInit_hello(void)", __LINE__, __FILE__);
 508  #endif
 509  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 510  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 511  #ifdef __pyx_binding_PyCFunctionType_USED
 512  if (__pyx_binding_PyCFunctionType_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 513  #endif
 514  /*--- Library function declarations ---*/
 515  /*--- Threads initialization code ---*/
 516  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
 517  #ifdef WITH_THREAD /* Python build with threading support? */
 518  PyEval_InitThreads();
 519  #endif
 520  #endif
 521  /*--- Module creation code ---*/
 522  #if PY_MAJOR_VERSION < 3
 523  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("hello"), __pyx_methods, 0, 0, PYTHON_API_VERSION);
 524  #else
 525  __pyx_m = PyModule_Create(&__pyx_moduledef);
 526  #endif
 527  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
 528  #if PY_MAJOR_VERSION < 3
 529  Py_INCREF(__pyx_m);
 530  #endif
 531  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
 532  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
 533  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
 534  /*--- Initialize various global constants etc. ---*/
 535  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 536  if (__pyx_module_is_main_hello) {
 537    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
 538  }
 539  /*--- Builtin init code ---*/
 540  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 541  /*--- Constants init code ---*/
 542  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 543  /*--- Global init code ---*/
 544  /*--- Function export code ---*/
 545  /*--- Type init code ---*/
 546  /*--- Type import code ---*/
 547  /*--- Function import code ---*/
 548  /*--- Execution code ---*/
 549
 550  /* "hello.pyx":1
 551 * def say_hello_to(name):             # <<<<<<<<<<<<<<
 552 *     print("Hello %s!" % name)
 553 */
 554  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5hello_say_hello_to, NULL, __pyx_n_s__hello); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 555  __Pyx_GOTREF(__pyx_t_1);
 556  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__say_hello_to, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 557  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 558  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 559  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 560  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 561  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 562  goto __pyx_L0;
 563  __pyx_L1_error:;
 564  __Pyx_XDECREF(__pyx_t_1);
 565  if (__pyx_m) {
 566    __Pyx_AddTraceback("init hello");
 567    Py_DECREF(__pyx_m); __pyx_m = 0;
 568  } else if (!PyErr_Occurred()) {
 569    PyErr_SetString(PyExc_ImportError, "init hello");
 570  }
 571  __pyx_L0:;
 572  __Pyx_RefNannyFinishContext();
 573  #if PY_MAJOR_VERSION < 3
 574  return;
 575  #else
 576  return __pyx_m;
 577  #endif
 578}
 579
 580/* Runtime support code */
 581
 582#if PY_MAJOR_VERSION < 3
 583static PyObject *__Pyx_GetStdout(void) {
 584    PyObject *f = PySys_GetObject((char *)"stdout");
 585    if (!f) {
 586        PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
 587    }
 588    return f;
 589}
 590
 591static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) {
 592    PyObject* v;
 593    int i;
 594
 595    if (!f) {
 596        if (!(f = __Pyx_GetStdout()))
 597            return -1;
 598    }
 599    for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) {
 600        if (PyFile_SoftSpace(f, 1)) {
 601            if (PyFile_WriteString(" ", f) < 0)
 602                return -1;
 603        }
 604        v = PyTuple_GET_ITEM(arg_tuple, i);
 605        if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)
 606            return -1;
 607        if (PyString_Check(v)) {
 608            char *s = PyString_AsString(v);
 609            Py_ssize_t len = PyString_Size(v);
 610            if (len > 0 &&
 611                isspace(Py_CHARMASK(s[len-1])) &&
 612                s[len-1] != ' ')
 613                    PyFile_SoftSpace(f, 0);
 614        }
 615    }
 616    if (newline) {
 617        if (PyFile_WriteString("\n", f) < 0)
 618            return -1;
 619        PyFile_SoftSpace(f, 0);
 620    }
 621    return 0;
 622}
 623
 624#else /* Python 3 has a print function */
 625
 626static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) {
 627    PyObject* kwargs = 0;
 628    PyObject* result = 0;
 629    PyObject* end_string;
 630    if (unlikely(!__pyx_print)) {
 631        __pyx_print = __Pyx_GetAttrString(__pyx_b, "print");
 632        if (!__pyx_print)
 633            return -1;
 634    }
 635    if (stream) {
 636        kwargs = PyDict_New();
 637        if (unlikely(!kwargs))
 638            return -1;
 639        if (unlikely(PyDict_SetItemString(kwargs, "file", stream) < 0))
 640            goto bad;
 641        if (!newline) {
 642            end_string = PyUnicode_FromStringAndSize(" ", 1);
 643            if (unlikely(!end_string))
 644                goto bad;
 645            if (PyDict_SetItemString(kwargs, "end", end_string) < 0) {
 646                Py_DECREF(end_string);
 647                goto bad;
 648            }
 649            Py_DECREF(end_string);
 650        }
 651    } else if (!newline) {
 652        if (unlikely(!__pyx_print_kwargs)) {
 653            __pyx_print_kwargs = PyDict_New();
 654            if (unlikely(!__pyx_print_kwargs))
 655                return -1;
 656            end_string = PyUnicode_FromStringAndSize(" ", 1);
 657            if (unlikely(!end_string))
 658                return -1;
 659            if (PyDict_SetItemString(__pyx_print_kwargs, "end", end_string) < 0) {
 660                Py_DECREF(end_string);
 661                return -1;
 662            }
 663            Py_DECREF(end_string);
 664        }
 665        kwargs = __pyx_print_kwargs;
 666    }
 667    result = PyObject_Call(__pyx_print, arg_tuple, kwargs);
 668    if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs))
 669        Py_DECREF(kwargs);
 670    if (!result)
 671        return -1;
 672    Py_DECREF(result);
 673    return 0;
 674bad:
 675    if (kwargs != __pyx_print_kwargs)
 676        Py_XDECREF(kwargs);
 677    return -1;
 678}
 679
 680#endif
 681
 682#if PY_MAJOR_VERSION < 3
 683
 684static int __Pyx_PrintOne(PyObject* f, PyObject *o) {
 685    if (!f) {
 686        if (!(f = __Pyx_GetStdout()))
 687            return -1;
 688    }
 689    if (PyFile_SoftSpace(f, 0)) {
 690        if (PyFile_WriteString(" ", f) < 0)
 691            return -1;
 692    }
 693    if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0)
 694        return -1;
 695    if (PyFile_WriteString("\n", f) < 0)
 696        return -1;
 697    return 0;
 698    /* the line below is just to avoid compiler
 699     * compiler warnings about unused functions */
 700    return __Pyx_Print(f, NULL, 0);
 701}
 702
 703#else /* Python 3 has a print function */
 704
 705static int __Pyx_PrintOne(PyObject* stream, PyObject *o) {
 706    int res;
 707    PyObject* arg_tuple = PyTuple_New(1);
 708    if (unlikely(!arg_tuple))
 709        return -1;
 710    Py_INCREF(o);
 711    PyTuple_SET_ITEM(arg_tuple, 0, o);
 712    res = __Pyx_Print(stream, arg_tuple, 1);
 713    Py_DECREF(arg_tuple);
 714    return res;
 715}
 716
 717#endif
 718
 719static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
 720    const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
 721    const int is_unsigned = neg_one > const_zero;
 722    if (sizeof(unsigned char) < sizeof(long)) {
 723        long val = __Pyx_PyInt_AsLong(x);
 724        if (unlikely(val != (long)(unsigned char)val)) {
 725            if (!unlikely(val == -1 && PyErr_Occurred())) {
 726                PyErr_SetString(PyExc_OverflowError,
 727                    (is_unsigned && unlikely(val < 0)) ?
 728                    "can't convert negative value to unsigned char" :
 729                    "value too large to convert to unsigned char");
 730            }
 731            return (unsigned char)-1;
 732        }
 733        return (unsigned char)val;
 734    }
 735    return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
 736}
 737
 738static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
 739    const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
 740    const int is_unsigned = neg_one > const_zero;
 741    if (sizeof(unsigned short) < sizeof(long)) {
 742        long val = __Pyx_PyInt_AsLong(x);
 743        if (unlikely(val != (long)(unsigned short)val)) {
 744            if (!unlikely(val == -1 && PyErr_Occurred())) {
 745                PyErr_SetString(PyExc_OverflowError,
 746                    (is_unsigned && unlikely(val < 0)) ?
 747                    "can't convert negative value to unsigned short" :
 748                    "value too large to convert to unsigned short");
 749            }
 750            return (unsigned short)-1;
 751        }
 752        return (unsigned short)val;
 753    }
 754    return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
 755}
 756
 757static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
 758    const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
 759    const int is_unsigned = neg_one > const_zero;
 760    if (sizeof(unsigned int) < sizeof(long)) {
 761        long val = __Pyx_PyInt_AsLong(x);
 762        if (unlikely(val != (long)(unsigned int)val)) {
 763            if (!unlikely(val == -1 && PyErr_Occurred())) {
 764                PyErr_SetString(PyExc_OverflowError,
 765                    (is_unsigned && unlikely(val < 0)) ?
 766                    "can't convert negative value to unsigned int" :
 767                    "value too large to convert to unsigned int");
 768            }
 769            return (unsigned int)-1;
 770        }
 771        return (unsigned int)val;
 772    }
 773    return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
 774}
 775
 776static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
 777    const char neg_one = (char)-1, const_zero = 0;
 778    const int is_unsigned = neg_one > const_zero;
 779    if (sizeof(char) < sizeof(long)) {
 780        long val = __Pyx_PyInt_AsLong(x);
 781        if (unlikely(val != (long)(char)val)) {
 782            if (!unlikely(val == -1 && PyErr_Occurred())) {
 783                PyErr_SetString(PyExc_OverflowError,
 784                    (is_unsigned && unlikely(val < 0)) ?
 785                    "can't convert negative value to char" :
 786                    "value too large to convert to char");
 787            }
 788            return (char)-1;
 789        }
 790        return (char)val;
 791    }
 792    return (char)__Pyx_PyInt_AsLong(x);
 793}
 794
 795static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
 796    const short neg_one = (short)-1, const_zero = 0;
 797    const int is_unsigned = neg_one > const_zero;
 798    if (sizeof(short) < sizeof(long)) {
 799        long val = __Pyx_PyInt_AsLong(x);
 800        if (unlikely(val != (long)(short)val)) {
 801            if (!unlikely(val == -1 && PyErr_Occurred())) {
 802                PyErr_SetString(PyExc_OverflowError,
 803                    (is_unsigned && unlikely(val < 0)) ?
 804                    "can't convert negative value to short" :
 805                    "value too large to convert to short");
 806            }
 807            return (short)-1;
 808        }
 809        return (short)val;
 810    }
 811    return (short)__Pyx_PyInt_AsLong(x);
 812}
 813
 814static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
 815    const int neg_one = (int)-1, const_zero = 0;
 816    const int is_unsigned = neg_one > const_zero;
 817    if (sizeof(int) < sizeof(long)) {
 818        long val = __Pyx_PyInt_AsLong(x);
 819        if (unlikely(val != (long)(int)val)) {
 820            if (!unlikely(val == -1 && PyErr_Occurred())) {
 821                PyErr_SetString(PyExc_OverflowError,
 822                    (is_unsigned && unlikely(val < 0)) ?
 823                    "can't convert negative value to int" :
 824                    "value too large to convert to int");
 825            }
 826            return (int)-1;
 827        }
 828        return (int)val;
 829    }
 830    return (int)__Pyx_PyInt_AsLong(x);
 831}
 832
 833static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
 834    const signed char neg_one = (signed char)-1, const_zero = 0;
 835    const int is_unsigned = neg_one > const_zero;
 836    if (sizeof(signed char) < sizeof(long)) {
 837        long val = __Pyx_PyInt_AsLong(x);
 838        if (unlikely(val != (long)(signed char)val)) {
 839            if (!unlikely(val == -1 && PyErr_Occurred())) {
 840                PyErr_SetString(PyExc_OverflowError,
 841                    (is_unsigned && unlikely(val < 0)) ?
 842                    "can't convert negative value to signed char" :
 843                    "value too large to convert to signed char");
 844            }
 845            return (signed char)-1;
 846        }
 847        return (signed char)val;
 848    }
 849    return (signed char)__Pyx_PyInt_AsSignedLong(x);
 850}
 851
 852static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
 853    const signed short neg_one = (signed short)-1, const_zero = 0;
 854    const int is_unsigned = neg_one > const_zero;
 855    if (sizeof(signed short) < sizeof(long)) {
 856        long val = __Pyx_PyInt_AsLong(x);
 857        if (unlikely(val != (long)(signed short)val)) {
 858            if (!unlikely(val == -1 && PyErr_Occurred())) {
 859                PyErr_SetString(PyExc_OverflowError,
 860                    (is_unsigned && unlikely(val < 0)) ?
 861                    "can't convert negative value to signed short" :
 862                    "value too large to convert to signed short");
 863            }
 864            return (signed short)-1;
 865        }
 866        return (signed short)val;
 867    }
 868    return (signed short)__Pyx_PyInt_AsSignedLong(x);
 869}
 870
 871static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
 872    const signed int neg_one = (signed int)-1, const_zero = 0;
 873    const int is_unsigned = neg_one > const_zero;
 874    if (sizeof(signed int) < sizeof(long)) {
 875        long val = __Pyx_PyInt_AsLong(x);
 876        if (unlikely(val != (long)(signed int)val)) {
 877            if (!unlikely(val == -1 && PyErr_Occurred())) {
 878                PyErr_SetString(PyExc_OverflowError,
 879                    (is_unsigned && unlikely(val < 0)) ?
 880                    "can't convert negative value to signed int" :
 881                    "value too large to convert to signed int");
 882            }
 883            return (signed int)-1;
 884        }
 885        return (signed int)val;
 886    }
 887    return (signed int)__Pyx_PyInt_AsSignedLong(x);
 888}
 889
 890static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
 891    const int neg_one = (int)-1, const_zero = 0;
 892    const int is_unsigned = neg_one > const_zero;
 893    if (sizeof(int) < sizeof(long)) {
 894        long val = __Pyx_PyInt_AsLong(x);
 895        if (unlikely(val != (long)(int)val)) {
 896            if (!unlikely(val == -1 && PyErr_Occurred())) {
 897                PyErr_SetString(PyExc_OverflowError,
 898                    (is_unsigned && unlikely(val < 0)) ?
 899                    "can't convert negative value to int" :
 900                    "value too large to convert to int");
 901            }
 902            return (int)-1;
 903        }
 904        return (int)val;
 905    }
 906    return (int)__Pyx_PyInt_AsLong(x);
 907}
 908
 909static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
 910    const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
 911    const int is_unsigned = neg_one > const_zero;
 912#if PY_VERSION_HEX < 0x03000000
 913    if (likely(PyInt_Check(x))) {
 914        long val = PyInt_AS_LONG(x);
 915        if (is_unsigned && unlikely(val < 0)) {
 916            PyErr_SetString(PyExc_OverflowError,
 917                            "can't convert negative value to unsigned long");
 918            return (unsigned long)-1;
 919        }
 920        return (unsigned long)val;
 921    } else
 922#endif
 923    if (likely(PyLong_Check(x))) {
 924        if (is_unsigned) {
 925            if (unlikely(Py_SIZE(x) < 0)) {
 926                PyErr_SetString(PyExc_OverflowError,
 927                                "can't convert negative value to unsigned long");
 928                return (unsigned long)-1;
 929            }
 930            return PyLong_AsUnsignedLong(x);
 931        } else {
 932            return PyLong_AsLong(x);
 933        }
 934    } else {
 935        unsigned long val;
 936        PyObject *tmp = __Pyx_PyNumber_Int(x);
 937        if (!tmp) return (unsigned long)-1;
 938        val = __Pyx_PyInt_AsUnsignedLong(tmp);
 939        Py_DECREF(tmp);
 940        return val;
 941    }
 942}
 943
 944static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
 945    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
 946    const int is_unsigned = neg_one > const_zero;
 947#if PY_VERSION_HEX < 0x03000000
 948    if (likely(PyInt_Check(x))) {
 949        long val = PyInt_AS_LONG(x);
 950        if (is_unsigned && unlikely(val < 0)) {
 951            PyErr_SetString(PyExc_OverflowError,
 952                            "can't convert negative value to unsigned PY_LONG_LONG");
 953            return (unsigned PY_LONG_LONG)-1;
 954        }
 955        return (unsigned PY_LONG_LONG)val;
 956    } else
 957#endif
 958    if (likely(PyLong_Check(x))) {
 959        if (is_unsigned) {
 960            if (unlikely(Py_SIZE(x) < 0)) {
 961                PyErr_SetString(PyExc_OverflowError,
 962                                "can't convert negative value to unsigned PY_LONG_LONG");
 963                return (unsigned PY_LONG_LONG)-1;
 964            }
 965            return PyLong_AsUnsignedLongLong(x);
 966        } else {
 967            return PyLong_AsLongLong(x);
 968        }
 969    } else {
 970        unsigned PY_LONG_LONG val;
 971        PyObject *tmp = __Pyx_PyNumber_Int(x);
 972        if (!tmp) return (unsigned PY_LONG_LONG)-1;
 973        val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
 974        Py_DECREF(tmp);
 975        return val;
 976    }
 977}
 978
 979static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
 980    const long neg_one = (long)-1, const_zero = 0;
 981    const int is_unsigned = neg_one > const_zero;
 982#if PY_VERSION_HEX < 0x03000000
 983    if (likely(PyInt_Check(x))) {
 984        long val = PyInt_AS_LONG(x);
 985        if (is_unsigned && unlikely(val < 0)) {
 986            PyErr_SetString(PyExc_OverflowError,
 987                            "can't convert negative value to long");
 988            return (long)-1;
 989        }
 990        return (long)val;
 991    } else
 992#endif
 993    if (likely(PyLong_Check(x))) {
 994        if (is_unsigned) {
 995            if (unlikely(Py_SIZE(x) < 0)) {
 996                PyErr_SetString(PyExc_OverflowError,
 997                                "can't convert negative value to long");
 998                return (long)-1;
 999            }
1000            return PyLong_AsUnsignedLong(x);
1001        } else {
1002            return PyLong_AsLong(x);
1003        }
1004    } else {
1005        long val;
1006        PyObject *tmp = __Pyx_PyNumber_Int(x);
1007        if (!tmp) return (long)-1;
1008        val = __Pyx_PyInt_AsLong(tmp);
1009        Py_DECREF(tmp);
1010        return val;
1011    }
1012}
1013
1014static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
1015    const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
1016    const int is_unsigned = neg_one > const_zero;
1017#if PY_VERSION_HEX < 0x03000000
1018    if (likely(PyInt_Check(x))) {
1019        long val = PyInt_AS_LONG(x);
1020        if (is_unsigned && unlikely(val < 0)) {
1021            PyErr_SetString(PyExc_OverflowError,
1022                            "can't convert negative value to PY_LONG_LONG");
1023            return (PY_LONG_LONG)-1;
1024        }
1025        return (PY_LONG_LONG)val;
1026    } else
1027#endif
1028    if (likely(PyLong_Check(x))) {
1029        if (is_unsigned) {
1030            if (unlikely(Py_SIZE(x) < 0)) {
1031                PyErr_SetString(PyExc_OverflowError,
1032                                "can't convert negative value to PY_LONG_LONG");
1033                return (PY_LONG_LONG)-1;
1034            }
1035            return PyLong_AsUnsignedLongLong(x);
1036        } else {
1037            return PyLong_AsLongLong(x);
1038        }
1039    } else {
1040        PY_LONG_LONG val;
1041        PyObject *tmp = __Pyx_PyNumber_Int(x);
1042        if (!tmp) return (PY_LONG_LONG)-1;
1043        val = __Pyx_PyInt_AsLongLong(tmp);
1044        Py_DECREF(tmp);
1045        return val;
1046    }
1047}
1048
1049static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
1050    const signed long neg_one = (signed long)-1, const_zero = 0;
1051    const int is_unsigned = neg_one > const_zero;
1052#if PY_VERSION_HEX < 0x03000000
1053    if (likely(PyInt_Check(x))) {
1054        long val = PyInt_AS_LONG(x);
1055        if (is_unsigned && unlikely(val < 0)) {
1056            PyErr_SetString(PyExc_OverflowError,
1057                            "can't convert negative value to signed long");
1058            return (signed long)-1;
1059        }
1060        return (signed long)val;
1061    } else
1062#endif
1063    if (likely(PyLong_Check(x))) {
1064        if (is_unsigned) {
1065            if (unlikely(Py_SIZE(x) < 0)) {
1066                PyErr_SetString(PyExc_OverflowError,
1067                                "can't convert negative value to signed long");
1068                return (signed long)-1;
1069            }
1070            return PyLong_AsUnsignedLong(x);
1071        } else {
1072            return PyLong_AsLong(x);
1073        }
1074    } else {
1075        signed long val;
1076        PyObject *tmp = __Pyx_PyNumber_Int(x);
1077        if (!tmp) return (signed long)-1;
1078        val = __Pyx_PyInt_AsSignedLong(tmp);
1079        Py_DECREF(tmp);
1080        return val;
1081    }
1082}
1083
1084static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
1085    const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
1086    const int is_unsigned = neg_one > const_zero;
1087#if PY_VERSION_HEX < 0x03000000
1088    if (likely(PyInt_Check(x))) {
1089        long val = PyInt_AS_LONG(x);
1090        if (is_unsigned && unlikely(val < 0)) {
1091            PyErr_SetString(PyExc_OverflowError,
1092                            "can't convert negative value to signed PY_LONG_LONG");
1093            return (signed PY_LONG_LONG)-1;
1094        }
1095        return (signed PY_LONG_LONG)val;
1096    } else
1097#endif
1098    if (likely(PyLong_Check(x))) {
1099        if (is_unsigned) {
1100            if (unlikely(Py_SIZE(x) < 0)) {
1101                PyErr_SetString(PyExc_OverflowError,
1102                                "can't convert negative value to signed PY_LONG_LONG");
1103                return (signed PY_LONG_LONG)-1;
1104            }
1105            return PyLong_AsUnsignedLongLong(x);
1106        } else {
1107            return PyLong_AsLongLong(x);
1108        }
1109    } else {
1110        signed PY_LONG_LONG val;
1111        PyObject *tmp = __Pyx_PyNumber_Int(x);
1112        if (!tmp) return (signed PY_LONG_LONG)-1;
1113        val = __Pyx_PyInt_AsSignedLongLong(tmp);
1114        Py_DECREF(tmp);
1115        return val;
1116    }
1117}
1118
1119#include "compile.h"
1120#include "frameobject.h"
1121#include "traceback.h"
1122
1123static void __Pyx_AddTraceback(const char *funcname) {
1124    PyObject *py_srcfile = 0;
1125    PyObject *py_funcname = 0;
1126    PyObject *py_globals = 0;
1127    PyCodeObject *py_code = 0;
1128    PyFrameObject *py_frame = 0;
1129
1130    #if PY_MAJOR_VERSION < 3
1131    py_srcfile = PyString_FromString(__pyx_filename);
1132    #else
1133    py_srcfile = PyUnicode_FromString(__pyx_filename);
1134    #endif
1135    if (!py_srcfile) goto bad;
1136    if (__pyx_clineno) {
1137        #if PY_MAJOR_VERSION < 3
1138        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
1139        #else
1140        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
1141        #endif
1142    }
1143    else {
1144        #if PY_MAJOR_VERSION < 3
1145        py_funcname = PyString_FromString(funcname);
1146        #else
1147        py_funcname = PyUnicode_FromString(funcname);
1148        #endif
1149    }
1150    if (!py_funcname) goto bad;
1151    py_globals = PyModule_GetDict(__pyx_m);
1152    if (!py_globals) goto bad;
1153    py_code = PyCode_New(
1154        0,            /*int argcount,*/
1155        #if PY_MAJOR_VERSION >= 3
1156        0,            /*int kwonlyargcount,*/
1157        #endif
1158        0,            /*int nlocals,*/
1159        0,            /*int stacksize,*/
1160        0,            /*int flags,*/
1161        __pyx_empty_bytes, /*PyObject *code,*/
1162        __pyx_empty_tuple,  /*PyObject *consts,*/
1163        __pyx_empty_tuple,  /*PyObject *names,*/
1164        __pyx_empty_tuple,  /*PyObject *varnames,*/
1165        __pyx_empty_tuple,  /*PyObject *freevars,*/
1166        __pyx_empty_tuple,  /*PyObject *cellvars,*/
1167        py_srcfile,   /*PyObject *filename,*/
1168        py_funcname,  /*PyObject *name,*/
1169        __pyx_lineno,   /*int firstlineno,*/
1170        __pyx_empty_bytes  /*PyObject *lnotab*/
1171    );
1172    if (!py_code) goto bad;
1173    py_frame = PyFrame_New(
1174        PyThreadState_GET(), /*PyThreadState *tstate,*/
1175        py_code,             /*PyCodeObject *code,*/
1176        py_globals,          /*PyObject *globals,*/
1177        0                    /*PyObject *locals*/
1178    );
1179    if (!py_frame) goto bad;
1180    py_frame->f_lineno = __pyx_lineno;
1181    PyTraceBack_Here(py_frame);
1182bad:
1183    Py_XDECREF(py_srcfile);
1184    Py_XDECREF(py_funcname);
1185    Py_XDECREF(py_code);
1186    Py_XDECREF(py_frame);
1187}
1188
1189static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
1190    while (t->p) {
1191        #if PY_MAJOR_VERSION < 3
1192        if (t->is_unicode) {
1193            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
1194        } else if (t->intern) {
1195            *t->p = PyString_InternFromString(t->s);
1196        } else {
1197            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
1198        }
1199        #else  /* Python 3+ has unicode identifiers */
1200        if (t->is_unicode | t->is_str) {
1201            if (t->intern) {
1202                *t->p = PyUnicode_InternFromString(t->s);
1203            } else if (t->encoding) {
1204                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
1205            } else {
1206                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
1207            }
1208        } else {
1209            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
1210        }
1211        #endif
1212        if (!*t->p)
1213            return -1;
1214        ++t;
1215    }
1216    return 0;
1217}
1218
1219/* Type Conversion Functions */
1220
1221static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
1222   int is_true = x == Py_True;
1223   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
1224   else return PyObject_IsTrue(x);
1225}
1226
1227static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
1228  PyNumberMethods *m;
1229  const char *name = NULL;
1230  PyObject *res = NULL;
1231#if PY_VERSION_HEX < 0x03000000
1232  if (PyInt_Check(x) || PyLong_Check(x))
1233#else
1234  if (PyLong_Check(x))
1235#endif
1236    return Py_INCREF(x), x;
1237  m = Py_TYPE(x)->tp_as_number;
1238#if PY_VERSION_HEX < 0x03000000
1239  if (m && m->nb_int) {
1240    name = "int";
1241    res = PyNumber_Int(x);
1242  }
1243  else if (m && m->nb_long) {
1244    name = "long";
1245    res = PyNumber_Long(x);
1246  }
1247#else
1248  if (m && m->nb_int) {
1249    name = "int";
1250    res = PyNumber_Long(x);
1251  }
1252#endif
1253  if (res) {
1254#if PY_VERSION_HEX < 0x03000000
1255    if (!PyInt_Check(res) && !PyLong_Check(res)) {
1256#else
1257    if (!PyLong_Check(res)) {
1258#endif
1259      PyErr_Format(PyExc_TypeError,
1260                   "__%s__ returned non-%s (type %.200s)",
1261                   name, name, Py_TYPE(res)->tp_name);
1262      Py_DECREF(res);
1263      return NULL;
1264    }
1265  }
1266  else if (!PyErr_Occurred()) {
1267    PyErr_SetString(PyExc_TypeError,
1268                    "an integer is required");
1269  }
1270  return res;
1271}
1272
1273static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
1274  Py_ssize_t ival;
1275  PyObject* x = PyNumber_Index(b);
1276  if (!x) return -1;
1277  ival = PyInt_AsSsize_t(x);
1278  Py_DECREF(x);
1279  return ival;
1280}
1281
1282static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
1283#if PY_VERSION_HEX < 0x02050000
1284   if (ival <= LONG_MAX)
1285       return PyInt_FromLong((long)ival);
1286   else {
1287       unsigned char *bytes = (unsigned char *) &ival;
1288       int one = 1; int little = (int)*(unsigned char*)&one;
1289       return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
1290   }
1291#else
1292   return PyInt_FromSize_t(ival);
1293#endif
1294}
1295
1296static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
1297   unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
1298   if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
1299       return (size_t)-1;
1300   } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
1301       PyErr_SetString(PyExc_OverflowError,
1302                       "value too large to convert to size_t");
1303       return (size_t)-1;
1304   }
1305   return (size_t)val;
1306}
1307
1308
1309#endif /* Py_PYTHON_H */