Guest User

exit_menu.c

a guest
Jan 31st, 2019
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 189.53 KB | None | 0 0
  1. /* Generated by Cython 0.29.3 */
  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. #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. #else
  10. #define CYTHON_ABI "0_29_3"
  11. #define CYTHON_HEX_VERSION 0x001D03F0
  12. #define CYTHON_FUTURE_DIVISION 0
  13. #include <stddef.h>
  14. #ifndef offsetof
  15.   #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
  16. #endif
  17. #if !defined(WIN32) && !defined(MS_WINDOWS)
  18.   #ifndef __stdcall
  19.     #define __stdcall
  20.   #endif
  21.   #ifndef __cdecl
  22.     #define __cdecl
  23.   #endif
  24.   #ifndef __fastcall
  25.     #define __fastcall
  26.   #endif
  27. #endif
  28. #ifndef DL_IMPORT
  29.   #define DL_IMPORT(t) t
  30. #endif
  31. #ifndef DL_EXPORT
  32.   #define DL_EXPORT(t) t
  33. #endif
  34. #define __PYX_COMMA ,
  35. #ifndef HAVE_LONG_LONG
  36.   #if PY_VERSION_HEX >= 0x02070000
  37.     #define HAVE_LONG_LONG
  38.   #endif
  39. #endif
  40. #ifndef PY_LONG_LONG
  41.   #define PY_LONG_LONG LONG_LONG
  42. #endif
  43. #ifndef Py_HUGE_VAL
  44.   #define Py_HUGE_VAL HUGE_VAL
  45. #endif
  46. #ifdef PYPY_VERSION
  47.   #define CYTHON_COMPILING_IN_PYPY 1
  48.   #define CYTHON_COMPILING_IN_PYSTON 0
  49.   #define CYTHON_COMPILING_IN_CPYTHON 0
  50.   #undef CYTHON_USE_TYPE_SLOTS
  51.   #define CYTHON_USE_TYPE_SLOTS 0
  52.   #undef CYTHON_USE_PYTYPE_LOOKUP
  53.   #define CYTHON_USE_PYTYPE_LOOKUP 0
  54.   #if PY_VERSION_HEX < 0x03050000
  55.     #undef CYTHON_USE_ASYNC_SLOTS
  56.     #define CYTHON_USE_ASYNC_SLOTS 0
  57.   #elif !defined(CYTHON_USE_ASYNC_SLOTS)
  58.     #define CYTHON_USE_ASYNC_SLOTS 1
  59.   #endif
  60.   #undef CYTHON_USE_PYLIST_INTERNALS
  61.   #define CYTHON_USE_PYLIST_INTERNALS 0
  62.   #undef CYTHON_USE_UNICODE_INTERNALS
  63.   #define CYTHON_USE_UNICODE_INTERNALS 0
  64.   #undef CYTHON_USE_UNICODE_WRITER
  65.   #define CYTHON_USE_UNICODE_WRITER 0
  66.   #undef CYTHON_USE_PYLONG_INTERNALS
  67.   #define CYTHON_USE_PYLONG_INTERNALS 0
  68.   #undef CYTHON_AVOID_BORROWED_REFS
  69.   #define CYTHON_AVOID_BORROWED_REFS 1
  70.   #undef CYTHON_ASSUME_SAFE_MACROS
  71.   #define CYTHON_ASSUME_SAFE_MACROS 0
  72.   #undef CYTHON_UNPACK_METHODS
  73.   #define CYTHON_UNPACK_METHODS 0
  74.   #undef CYTHON_FAST_THREAD_STATE
  75.   #define CYTHON_FAST_THREAD_STATE 0
  76.   #undef CYTHON_FAST_PYCALL
  77.   #define CYTHON_FAST_PYCALL 0
  78.   #undef CYTHON_PEP489_MULTI_PHASE_INIT
  79.   #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  80.   #undef CYTHON_USE_TP_FINALIZE
  81.   #define CYTHON_USE_TP_FINALIZE 0
  82.   #undef CYTHON_USE_DICT_VERSIONS
  83.   #define CYTHON_USE_DICT_VERSIONS 0
  84.   #undef CYTHON_USE_EXC_INFO_STACK
  85.   #define CYTHON_USE_EXC_INFO_STACK 0
  86. #elif defined(PYSTON_VERSION)
  87.   #define CYTHON_COMPILING_IN_PYPY 0
  88.   #define CYTHON_COMPILING_IN_PYSTON 1
  89.   #define CYTHON_COMPILING_IN_CPYTHON 0
  90.   #ifndef CYTHON_USE_TYPE_SLOTS
  91.     #define CYTHON_USE_TYPE_SLOTS 1
  92.   #endif
  93.   #undef CYTHON_USE_PYTYPE_LOOKUP
  94.   #define CYTHON_USE_PYTYPE_LOOKUP 0
  95.   #undef CYTHON_USE_ASYNC_SLOTS
  96.   #define CYTHON_USE_ASYNC_SLOTS 0
  97.   #undef CYTHON_USE_PYLIST_INTERNALS
  98.   #define CYTHON_USE_PYLIST_INTERNALS 0
  99.   #ifndef CYTHON_USE_UNICODE_INTERNALS
  100.     #define CYTHON_USE_UNICODE_INTERNALS 1
  101.   #endif
  102.   #undef CYTHON_USE_UNICODE_WRITER
  103.   #define CYTHON_USE_UNICODE_WRITER 0
  104.   #undef CYTHON_USE_PYLONG_INTERNALS
  105.   #define CYTHON_USE_PYLONG_INTERNALS 0
  106.   #ifndef CYTHON_AVOID_BORROWED_REFS
  107.     #define CYTHON_AVOID_BORROWED_REFS 0
  108.   #endif
  109.   #ifndef CYTHON_ASSUME_SAFE_MACROS
  110.     #define CYTHON_ASSUME_SAFE_MACROS 1
  111.   #endif
  112.   #ifndef CYTHON_UNPACK_METHODS
  113.     #define CYTHON_UNPACK_METHODS 1
  114.   #endif
  115.   #undef CYTHON_FAST_THREAD_STATE
  116.   #define CYTHON_FAST_THREAD_STATE 0
  117.   #undef CYTHON_FAST_PYCALL
  118.   #define CYTHON_FAST_PYCALL 0
  119.   #undef CYTHON_PEP489_MULTI_PHASE_INIT
  120.   #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  121.   #undef CYTHON_USE_TP_FINALIZE
  122.   #define CYTHON_USE_TP_FINALIZE 0
  123.   #undef CYTHON_USE_DICT_VERSIONS
  124.   #define CYTHON_USE_DICT_VERSIONS 0
  125.   #undef CYTHON_USE_EXC_INFO_STACK
  126.   #define CYTHON_USE_EXC_INFO_STACK 0
  127. #else
  128.   #define CYTHON_COMPILING_IN_PYPY 0
  129.   #define CYTHON_COMPILING_IN_PYSTON 0
  130.   #define CYTHON_COMPILING_IN_CPYTHON 1
  131.   #ifndef CYTHON_USE_TYPE_SLOTS
  132.     #define CYTHON_USE_TYPE_SLOTS 1
  133.   #endif
  134.   #if PY_VERSION_HEX < 0x02070000
  135.     #undef CYTHON_USE_PYTYPE_LOOKUP
  136.     #define CYTHON_USE_PYTYPE_LOOKUP 0
  137.   #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
  138.     #define CYTHON_USE_PYTYPE_LOOKUP 1
  139.   #endif
  140.   #if PY_MAJOR_VERSION < 3
  141.     #undef CYTHON_USE_ASYNC_SLOTS
  142.     #define CYTHON_USE_ASYNC_SLOTS 0
  143.   #elif !defined(CYTHON_USE_ASYNC_SLOTS)
  144.     #define CYTHON_USE_ASYNC_SLOTS 1
  145.   #endif
  146.   #if PY_VERSION_HEX < 0x02070000
  147.     #undef CYTHON_USE_PYLONG_INTERNALS
  148.     #define CYTHON_USE_PYLONG_INTERNALS 0
  149.   #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
  150.     #define CYTHON_USE_PYLONG_INTERNALS 1
  151.   #endif
  152.   #ifndef CYTHON_USE_PYLIST_INTERNALS
  153.     #define CYTHON_USE_PYLIST_INTERNALS 1
  154.   #endif
  155.   #ifndef CYTHON_USE_UNICODE_INTERNALS
  156.     #define CYTHON_USE_UNICODE_INTERNALS 1
  157.   #endif
  158.   #if PY_VERSION_HEX < 0x030300F0
  159.     #undef CYTHON_USE_UNICODE_WRITER
  160.     #define CYTHON_USE_UNICODE_WRITER 0
  161.   #elif !defined(CYTHON_USE_UNICODE_WRITER)
  162.     #define CYTHON_USE_UNICODE_WRITER 1
  163.   #endif
  164.   #ifndef CYTHON_AVOID_BORROWED_REFS
  165.     #define CYTHON_AVOID_BORROWED_REFS 0
  166.   #endif
  167.   #ifndef CYTHON_ASSUME_SAFE_MACROS
  168.     #define CYTHON_ASSUME_SAFE_MACROS 1
  169.   #endif
  170.   #ifndef CYTHON_UNPACK_METHODS
  171.     #define CYTHON_UNPACK_METHODS 1
  172.   #endif
  173.   #ifndef CYTHON_FAST_THREAD_STATE
  174.     #define CYTHON_FAST_THREAD_STATE 1
  175.   #endif
  176.   #ifndef CYTHON_FAST_PYCALL
  177.     #define CYTHON_FAST_PYCALL 1
  178.   #endif
  179.   #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
  180.     #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
  181.   #endif
  182.   #ifndef CYTHON_USE_TP_FINALIZE
  183.     #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  184.   #endif
  185.   #ifndef CYTHON_USE_DICT_VERSIONS
  186.     #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
  187.   #endif
  188.   #ifndef CYTHON_USE_EXC_INFO_STACK
  189.     #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
  190.   #endif
  191. #endif
  192. #if !defined(CYTHON_FAST_PYCCALL)
  193. #define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
  194. #endif
  195. #if CYTHON_USE_PYLONG_INTERNALS
  196.   #include "longintrepr.h"
  197.   #undef SHIFT
  198.   #undef BASE
  199.   #undef MASK
  200.   #ifdef SIZEOF_VOID_P
  201.     enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  202.   #endif
  203. #endif
  204. #ifndef __has_attribute
  205.   #define __has_attribute(x) 0
  206. #endif
  207. #ifndef __has_cpp_attribute
  208.   #define __has_cpp_attribute(x) 0
  209. #endif
  210. #ifndef CYTHON_RESTRICT
  211.   #if defined(__GNUC__)
  212.     #define CYTHON_RESTRICT __restrict__
  213.   #elif defined(_MSC_VER) && _MSC_VER >= 1400
  214.     #define CYTHON_RESTRICT __restrict
  215.   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  216.     #define CYTHON_RESTRICT restrict
  217.   #else
  218.     #define CYTHON_RESTRICT
  219.   #endif
  220. #endif
  221. #ifndef CYTHON_UNUSED
  222. # if defined(__GNUC__)
  223. #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
  224. #     define CYTHON_UNUSED __attribute__ ((__unused__))
  225. #   else
  226. #     define CYTHON_UNUSED
  227. #   endif
  228. # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
  229. #   define CYTHON_UNUSED __attribute__ ((__unused__))
  230. # else
  231. #   define CYTHON_UNUSED
  232. # endif
  233. #endif
  234. #ifndef CYTHON_MAYBE_UNUSED_VAR
  235. #  if defined(__cplusplus)
  236.      template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
  237. #  else
  238. #    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
  239. #  endif
  240. #endif
  241. #ifndef CYTHON_NCP_UNUSED
  242. # if CYTHON_COMPILING_IN_CPYTHON
  243. #  define CYTHON_NCP_UNUSED
  244. # else
  245. #  define CYTHON_NCP_UNUSED CYTHON_UNUSED
  246. # endif
  247. #endif
  248. #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
  249. #ifdef _MSC_VER
  250.     #ifndef _MSC_STDINT_H_
  251.         #if _MSC_VER < 1300
  252.            typedef unsigned char     uint8_t;
  253.            typedef unsigned int      uint32_t;
  254.         #else
  255.            typedef unsigned __int8   uint8_t;
  256.            typedef unsigned __int32  uint32_t;
  257.         #endif
  258.     #endif
  259. #else
  260.    #include <stdint.h>
  261. #endif
  262. #ifndef CYTHON_FALLTHROUGH
  263.   #if defined(__cplusplus) && __cplusplus >= 201103L
  264.     #if __has_cpp_attribute(fallthrough)
  265.       #define CYTHON_FALLTHROUGH [[fallthrough]]
  266.     #elif __has_cpp_attribute(clang::fallthrough)
  267.       #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
  268.     #elif __has_cpp_attribute(gnu::fallthrough)
  269.       #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
  270.     #endif
  271.   #endif
  272.   #ifndef CYTHON_FALLTHROUGH
  273.     #if __has_attribute(fallthrough)
  274.       #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
  275.     #else
  276.       #define CYTHON_FALLTHROUGH
  277.     #endif
  278.   #endif
  279.   #if defined(__clang__ ) && defined(__apple_build_version__)
  280.     #if __apple_build_version__ < 7000000
  281.       #undef  CYTHON_FALLTHROUGH
  282.       #define CYTHON_FALLTHROUGH
  283.     #endif
  284.   #endif
  285. #endif
  286.  
  287. #ifndef CYTHON_INLINE
  288.   #if defined(__clang__)
  289.     #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  290.   #elif defined(__GNUC__)
  291.     #define CYTHON_INLINE __inline__
  292.   #elif defined(_MSC_VER)
  293.     #define CYTHON_INLINE __inline
  294.   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  295.     #define CYTHON_INLINE inline
  296.   #else
  297.     #define CYTHON_INLINE
  298.   #endif
  299. #endif
  300.  
  301. #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  302.   #define Py_OptimizeFlag 0
  303. #endif
  304. #define __PYX_BUILD_PY_SSIZE_T "n"
  305. #define CYTHON_FORMAT_SSIZE_T "z"
  306. #if PY_MAJOR_VERSION < 3
  307.   #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  308.   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
  309.           PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  310.   #define __Pyx_DefaultClassType PyClass_Type
  311. #else
  312.   #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  313.   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
  314.           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  315.   #define __Pyx_DefaultClassType PyType_Type
  316. #endif
  317. #ifndef Py_TPFLAGS_CHECKTYPES
  318.   #define Py_TPFLAGS_CHECKTYPES 0
  319. #endif
  320. #ifndef Py_TPFLAGS_HAVE_INDEX
  321.   #define Py_TPFLAGS_HAVE_INDEX 0
  322. #endif
  323. #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  324.   #define Py_TPFLAGS_HAVE_NEWBUFFER 0
  325. #endif
  326. #ifndef Py_TPFLAGS_HAVE_FINALIZE
  327.   #define Py_TPFLAGS_HAVE_FINALIZE 0
  328. #endif
  329. #ifndef METH_STACKLESS
  330.   #define METH_STACKLESS 0
  331. #endif
  332. #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  333.   #ifndef METH_FASTCALL
  334.      #define METH_FASTCALL 0x80
  335.   #endif
  336.   typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  337.   typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
  338.                                                           Py_ssize_t nargs, PyObject *kwnames);
  339. #else
  340.   #define __Pyx_PyCFunctionFast _PyCFunctionFast
  341.   #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
  342. #endif
  343. #if CYTHON_FAST_PYCCALL
  344. #define __Pyx_PyFastCFunction_Check(func)\
  345.     ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
  346. #else
  347. #define __Pyx_PyFastCFunction_Check(func) 0
  348. #endif
  349. #if CYTHON_USE_DICT_VERSIONS
  350. #define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
  351. #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
  352.     (version_var) = __PYX_GET_DICT_VERSION(dict);\
  353.     (cache_var) = (value);
  354. #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
  355.         static PY_UINT64_T __pyx_dict_version = 0;\
  356.         static PyObject *__pyx_dict_cached_value = NULL;\
  357.         if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
  358.             (VAR) = __pyx_dict_cached_value;\
  359.         } else {\
  360.             (VAR) = __pyx_dict_cached_value = (LOOKUP);\
  361.             __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
  362.         }\
  363.     }
  364. #else
  365. #define __PYX_GET_DICT_VERSION(dict)  (0)
  366. #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
  367. #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
  368. #endif
  369. #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  370.   #define PyObject_Malloc(s)   PyMem_Malloc(s)
  371.   #define PyObject_Free(p)     PyMem_Free(p)
  372.   #define PyObject_Realloc(p)  PyMem_Realloc(p)
  373. #endif
  374. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
  375.   #define PyMem_RawMalloc(n)           PyMem_Malloc(n)
  376.   #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)
  377.   #define PyMem_RawFree(p)             PyMem_Free(p)
  378. #endif
  379. #if CYTHON_COMPILING_IN_PYSTON
  380.   #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  381.   #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
  382. #else
  383.   #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  384.   #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
  385. #endif
  386. #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
  387.   #define __Pyx_PyThreadState_Current PyThreadState_GET()
  388. #elif PY_VERSION_HEX >= 0x03060000
  389.   #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
  390. #elif PY_VERSION_HEX >= 0x03000000
  391.   #define __Pyx_PyThreadState_Current PyThreadState_GET()
  392. #else
  393.   #define __Pyx_PyThreadState_Current _PyThreadState_Current
  394. #endif
  395. #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
  396. #include "pythread.h"
  397. #define Py_tss_NEEDS_INIT 0
  398. typedef int Py_tss_t;
  399. static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  400.   *key = PyThread_create_key();
  401.   return 0;
  402. }
  403. static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  404.   Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  405.   *key = Py_tss_NEEDS_INIT;
  406.   return key;
  407. }
  408. static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  409.   PyObject_Free(key);
  410. }
  411. static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  412.   return *key != Py_tss_NEEDS_INIT;
  413. }
  414. static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  415.   PyThread_delete_key(*key);
  416.   *key = Py_tss_NEEDS_INIT;
  417. }
  418. static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  419.   return PyThread_set_key_value(*key, value);
  420. }
  421. static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  422.   return PyThread_get_key_value(*key);
  423. }
  424. #endif
  425. #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
  426. #define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
  427. #else
  428. #define __Pyx_PyDict_NewPresized(n)  PyDict_New()
  429. #endif
  430. #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  431.   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  432.   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
  433. #else
  434.   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  435.   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
  436. #endif
  437. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
  438. #define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
  439. #else
  440. #define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
  441. #endif
  442. #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  443.   #define CYTHON_PEP393_ENABLED 1
  444.   #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
  445.                                               0 : _PyUnicode_Ready((PyObject *)(op)))
  446.   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  447.   #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  448.   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  449.   #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  450.   #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  451.   #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  452.   #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  453.   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
  454. #else
  455.   #define CYTHON_PEP393_ENABLED 0
  456.   #define PyUnicode_1BYTE_KIND  1
  457.   #define PyUnicode_2BYTE_KIND  2
  458.   #define PyUnicode_4BYTE_KIND  4
  459.   #define __Pyx_PyUnicode_READY(op)       (0)
  460.   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  461.   #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  462.   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  463.   #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  464.   #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  465.   #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  466.   #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  467.   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
  468. #endif
  469. #if CYTHON_COMPILING_IN_PYPY
  470.   #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  471.   #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
  472. #else
  473.   #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  474.   #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
  475.       PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
  476. #endif
  477. #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  478.   #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
  479. #endif
  480. #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  481.   #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
  482. #endif
  483. #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  484.   #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
  485. #endif
  486. #define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
  487. #define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
  488. #if PY_MAJOR_VERSION >= 3
  489.   #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
  490. #else
  491.   #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
  492. #endif
  493. #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  494.   #define PyObject_ASCII(o)            PyObject_Repr(o)
  495. #endif
  496. #if PY_MAJOR_VERSION >= 3
  497.   #define PyBaseString_Type            PyUnicode_Type
  498.   #define PyStringObject               PyUnicodeObject
  499.   #define PyString_Type                PyUnicode_Type
  500.   #define PyString_Check               PyUnicode_Check
  501.   #define PyString_CheckExact          PyUnicode_CheckExact
  502.   #define PyObject_Unicode             PyObject_Str
  503. #endif
  504. #if PY_MAJOR_VERSION >= 3
  505.   #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  506.   #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
  507. #else
  508.   #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  509.   #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
  510. #endif
  511. #ifndef PySet_CheckExact
  512.   #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
  513. #endif
  514. #if CYTHON_ASSUME_SAFE_MACROS
  515.   #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
  516. #else
  517.   #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
  518. #endif
  519. #if PY_MAJOR_VERSION >= 3
  520.   #define PyIntObject                  PyLongObject
  521.   #define PyInt_Type                   PyLong_Type
  522.   #define PyInt_Check(op)              PyLong_Check(op)
  523.   #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  524.   #define PyInt_FromString             PyLong_FromString
  525.   #define PyInt_FromUnicode            PyLong_FromUnicode
  526.   #define PyInt_FromLong               PyLong_FromLong
  527.   #define PyInt_FromSize_t             PyLong_FromSize_t
  528.   #define PyInt_FromSsize_t            PyLong_FromSsize_t
  529.   #define PyInt_AsLong                 PyLong_AsLong
  530.   #define PyInt_AS_LONG                PyLong_AS_LONG
  531.   #define PyInt_AsSsize_t              PyLong_AsSsize_t
  532.   #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  533.   #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  534.   #define PyNumber_Int                 PyNumber_Long
  535. #endif
  536. #if PY_MAJOR_VERSION >= 3
  537.   #define PyBoolObject                 PyLongObject
  538. #endif
  539. #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  540.   #ifndef PyUnicode_InternFromString
  541.     #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  542.   #endif
  543. #endif
  544. #if PY_VERSION_HEX < 0x030200A4
  545.   typedef long Py_hash_t;
  546.   #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  547.   #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
  548. #else
  549.   #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  550.   #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
  551. #endif
  552. #if PY_MAJOR_VERSION >= 3
  553.   #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
  554. #else
  555.   #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
  556. #endif
  557. #if CYTHON_USE_ASYNC_SLOTS
  558.   #if PY_VERSION_HEX >= 0x030500B1
  559.     #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
  560.     #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  561.   #else
  562.     #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  563.   #endif
  564. #else
  565.   #define __Pyx_PyType_AsAsync(obj) NULL
  566. #endif
  567. #ifndef __Pyx_PyAsyncMethodsStruct
  568.     typedef struct {
  569.         unaryfunc am_await;
  570.         unaryfunc am_aiter;
  571.         unaryfunc am_anext;
  572.     } __Pyx_PyAsyncMethodsStruct;
  573. #endif
  574.  
  575. #if defined(WIN32) || defined(MS_WINDOWS)
  576.   #define _USE_MATH_DEFINES
  577. #endif
  578. #include <math.h>
  579. #ifdef NAN
  580. #define __PYX_NAN() ((float) NAN)
  581. #else
  582. static CYTHON_INLINE float __PYX_NAN() {
  583.   float value;
  584.   memset(&value, 0xFF, sizeof(value));
  585.   return value;
  586. }
  587. #endif
  588. #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
  589. #define __Pyx_truncl trunc
  590. #else
  591. #define __Pyx_truncl truncl
  592. #endif
  593.  
  594.  
  595. #define __PYX_ERR(f_index, lineno, Ln_error) \
  596. { \
  597.   __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
  598. }
  599.  
  600. #ifndef __PYX_EXTERN_C
  601.   #ifdef __cplusplus
  602.     #define __PYX_EXTERN_C extern "C"
  603.   #else
  604.     #define __PYX_EXTERN_C extern
  605.   #endif
  606. #endif
  607.  
  608. #define __PYX_HAVE__exit_menu
  609. #define __PYX_HAVE_API__exit_menu
  610. /* Early includes */
  611. #ifdef _OPENMP
  612. #include <omp.h>
  613. #endif /* _OPENMP */
  614.  
  615. #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
  616. #define CYTHON_WITHOUT_ASSERTIONS
  617. #endif
  618.  
  619. typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
  620.                 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
  621.  
  622. #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
  623. #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
  624. #define __PYX_DEFAULT_STRING_ENCODING ""
  625. #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
  626. #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
  627. #define __Pyx_uchar_cast(c) ((unsigned char)c)
  628. #define __Pyx_long_cast(x) ((long)x)
  629. #define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
  630.     (sizeof(type) < sizeof(Py_ssize_t))  ||\
  631.     (sizeof(type) > sizeof(Py_ssize_t) &&\
  632.           likely(v < (type)PY_SSIZE_T_MAX ||\
  633.                  v == (type)PY_SSIZE_T_MAX)  &&\
  634.           (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
  635.                                 v == (type)PY_SSIZE_T_MIN)))  ||\
  636.     (sizeof(type) == sizeof(Py_ssize_t) &&\
  637.           (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
  638.                                v == (type)PY_SSIZE_T_MAX)))  )
  639. static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
  640.     return (size_t) i < (size_t) limit;
  641. }
  642. #if defined (__cplusplus) && __cplusplus >= 201103L
  643.     #include <cstdlib>
  644.     #define __Pyx_sst_abs(value) std::abs(value)
  645. #elif SIZEOF_INT >= SIZEOF_SIZE_T
  646.     #define __Pyx_sst_abs(value) abs(value)
  647. #elif SIZEOF_LONG >= SIZEOF_SIZE_T
  648.     #define __Pyx_sst_abs(value) labs(value)
  649. #elif defined (_MSC_VER)
  650.     #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
  651. #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  652.     #define __Pyx_sst_abs(value) llabs(value)
  653. #elif defined (__GNUC__)
  654.     #define __Pyx_sst_abs(value) __builtin_llabs(value)
  655. #else
  656.     #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
  657. #endif
  658. static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
  659. static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
  660. #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
  661. #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
  662. #define __Pyx_PyBytes_FromString        PyBytes_FromString
  663. #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
  664. static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
  665. #if PY_MAJOR_VERSION < 3
  666.     #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
  667.     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
  668. #else
  669.     #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
  670.     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
  671. #endif
  672. #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
  673. #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
  674. #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
  675. #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
  676. #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
  677. #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
  678. #define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
  679. #define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
  680. #define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
  681. #define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
  682. #define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
  683. #define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
  684. #define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
  685. #define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
  686. #define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
  687. #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
  688. static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
  689.     const Py_UNICODE *u_end = u;
  690.     while (*u_end++) ;
  691.     return (size_t)(u_end - u - 1);
  692. }
  693. #define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
  694. #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
  695. #define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
  696. #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
  697. #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
  698. static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
  699. static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
  700. static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
  701. static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
  702. #define __Pyx_PySequence_Tuple(obj)\
  703.     (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
  704. static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
  705. static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
  706. #if CYTHON_ASSUME_SAFE_MACROS
  707. #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
  708. #else
  709. #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
  710. #endif
  711. #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
  712. #if PY_MAJOR_VERSION >= 3
  713. #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
  714. #else
  715. #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
  716. #endif
  717. #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
  718. #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  719. static int __Pyx_sys_getdefaultencoding_not_ascii;
  720. static int __Pyx_init_sys_getdefaultencoding_params(void) {
  721.     PyObject* sys;
  722.     PyObject* default_encoding = NULL;
  723.     PyObject* ascii_chars_u = NULL;
  724.     PyObject* ascii_chars_b = NULL;
  725.     const char* default_encoding_c;
  726.     sys = PyImport_ImportModule("sys");
  727.     if (!sys) goto bad;
  728.     default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
  729.     Py_DECREF(sys);
  730.     if (!default_encoding) goto bad;
  731.     default_encoding_c = PyBytes_AsString(default_encoding);
  732.     if (!default_encoding_c) goto bad;
  733.     if (strcmp(default_encoding_c, "ascii") == 0) {
  734.         __Pyx_sys_getdefaultencoding_not_ascii = 0;
  735.     } else {
  736.         char ascii_chars[128];
  737.         int c;
  738.         for (c = 0; c < 128; c++) {
  739.             ascii_chars[c] = c;
  740.         }
  741.         __Pyx_sys_getdefaultencoding_not_ascii = 1;
  742.         ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
  743.         if (!ascii_chars_u) goto bad;
  744.         ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
  745.         if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
  746.             PyErr_Format(
  747.                 PyExc_ValueError,
  748.                 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
  749.                 default_encoding_c);
  750.             goto bad;
  751.         }
  752.         Py_DECREF(ascii_chars_u);
  753.         Py_DECREF(ascii_chars_b);
  754.     }
  755.     Py_DECREF(default_encoding);
  756.     return 0;
  757. bad:
  758.     Py_XDECREF(default_encoding);
  759.     Py_XDECREF(ascii_chars_u);
  760.     Py_XDECREF(ascii_chars_b);
  761.     return -1;
  762. }
  763. #endif
  764. #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
  765. #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
  766. #else
  767. #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
  768. #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
  769. static char* __PYX_DEFAULT_STRING_ENCODING;
  770. static int __Pyx_init_sys_getdefaultencoding_params(void) {
  771.     PyObject* sys;
  772.     PyObject* default_encoding = NULL;
  773.     char* default_encoding_c;
  774.     sys = PyImport_ImportModule("sys");
  775.     if (!sys) goto bad;
  776.     default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
  777.     Py_DECREF(sys);
  778.     if (!default_encoding) goto bad;
  779.     default_encoding_c = PyBytes_AsString(default_encoding);
  780.     if (!default_encoding_c) goto bad;
  781.     __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
  782.     if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
  783.     strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
  784.     Py_DECREF(default_encoding);
  785.     return 0;
  786. bad:
  787.     Py_XDECREF(default_encoding);
  788.     return -1;
  789. }
  790. #endif
  791. #endif
  792.  
  793.  
  794. /* Test for GCC > 2.95 */
  795. #if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  796.   #define likely(x)   __builtin_expect(!!(x), 1)
  797.   #define unlikely(x) __builtin_expect(!!(x), 0)
  798. #else /* !__GNUC__ or GCC < 2.95 */
  799.   #define likely(x)   (x)
  800.   #define unlikely(x) (x)
  801. #endif /* __GNUC__ */
  802. static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
  803.  
  804. static PyObject *__pyx_m = NULL;
  805. static PyObject *__pyx_d;
  806. static PyObject *__pyx_b;
  807. static PyObject *__pyx_cython_runtime = NULL;
  808. static PyObject *__pyx_empty_tuple;
  809. static PyObject *__pyx_empty_bytes;
  810. static PyObject *__pyx_empty_unicode;
  811. static int __pyx_lineno;
  812. static int __pyx_clineno = 0;
  813. static const char * __pyx_cfilenm= __FILE__;
  814. static const char *__pyx_filename;
  815.  
  816.  
  817. static const char *__pyx_f[] = {
  818.   "Documents/Coded/Tutorials/Python/tkinter/exit_menu.py",
  819. };
  820.  
  821. /*--- Type declarations ---*/
  822.  
  823. /* --- Runtime support code (head) --- */
  824. /* Refnanny.proto */
  825. #ifndef CYTHON_REFNANNY
  826.   #define CYTHON_REFNANNY 0
  827. #endif
  828. #if CYTHON_REFNANNY
  829.   typedef struct {
  830.     void (*INCREF)(void*, PyObject*, int);
  831.     void (*DECREF)(void*, PyObject*, int);
  832.     void (*GOTREF)(void*, PyObject*, int);
  833.     void (*GIVEREF)(void*, PyObject*, int);
  834.     void* (*SetupContext)(const char*, int, const char*);
  835.     void (*FinishContext)(void**);
  836.   } __Pyx_RefNannyAPIStruct;
  837.   static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  838.   static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  839.   #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
  840. #ifdef WITH_THREAD
  841.   #define __Pyx_RefNannySetupContext(name, acquire_gil)\
  842.           if (acquire_gil) {\
  843.               PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
  844.               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
  845.               PyGILState_Release(__pyx_gilstate_save);\
  846.           } else {\
  847.               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
  848.           }
  849. #else
  850.   #define __Pyx_RefNannySetupContext(name, acquire_gil)\
  851.           __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
  852. #endif
  853.   #define __Pyx_RefNannyFinishContext()\
  854.           __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  855.   #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  856.   #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  857.   #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  858.   #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  859.   #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  860.   #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  861.   #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  862.   #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
  863. #else
  864.   #define __Pyx_RefNannyDeclarations
  865.   #define __Pyx_RefNannySetupContext(name, acquire_gil)
  866.   #define __Pyx_RefNannyFinishContext()
  867.   #define __Pyx_INCREF(r) Py_INCREF(r)
  868.   #define __Pyx_DECREF(r) Py_DECREF(r)
  869.   #define __Pyx_GOTREF(r)
  870.   #define __Pyx_GIVEREF(r)
  871.   #define __Pyx_XINCREF(r) Py_XINCREF(r)
  872.   #define __Pyx_XDECREF(r) Py_XDECREF(r)
  873.   #define __Pyx_XGOTREF(r)
  874.   #define __Pyx_XGIVEREF(r)
  875. #endif
  876. #define __Pyx_XDECREF_SET(r, v) do {\
  877.         PyObject *tmp = (PyObject *) r;\
  878.         r = v; __Pyx_XDECREF(tmp);\
  879.     } while (0)
  880. #define __Pyx_DECREF_SET(r, v) do {\
  881.         PyObject *tmp = (PyObject *) r;\
  882.         r = v; __Pyx_DECREF(tmp);\
  883.     } while (0)
  884. #define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
  885. #define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
  886.  
  887. /* PyObjectGetAttrStr.proto */
  888. #if CYTHON_USE_TYPE_SLOTS
  889. static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
  890. #else
  891. #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
  892. #endif
  893.  
  894. /* GetBuiltinName.proto */
  895. static PyObject *__Pyx_GetBuiltinName(PyObject *name);
  896.  
  897. /* GetModuleGlobalName.proto */
  898. #if CYTHON_USE_DICT_VERSIONS
  899. #define __Pyx_GetModuleGlobalName(var, name)  {\
  900.     static PY_UINT64_T __pyx_dict_version = 0;\
  901.     static PyObject *__pyx_dict_cached_value = NULL;\
  902.     (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
  903.         (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
  904.         __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
  905. }
  906. #define __Pyx_GetModuleGlobalNameUncached(var, name)  {\
  907.     PY_UINT64_T __pyx_dict_version;\
  908.     PyObject *__pyx_dict_cached_value;\
  909.     (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
  910. }
  911. static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
  912. #else
  913. #define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
  914. #define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
  915. static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
  916. #endif
  917.  
  918. /* PyCFunctionFastCall.proto */
  919. #if CYTHON_FAST_PYCCALL
  920. static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
  921. #else
  922. #define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
  923. #endif
  924.  
  925. /* PyFunctionFastCall.proto */
  926. #if CYTHON_FAST_PYCALL
  927. #define __Pyx_PyFunction_FastCall(func, args, nargs)\
  928.     __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
  929. #if 1 || PY_VERSION_HEX < 0x030600B1
  930. static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
  931. #else
  932. #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
  933. #endif
  934. #define __Pyx_BUILD_ASSERT_EXPR(cond)\
  935.     (sizeof(char [1 - 2*!(cond)]) - 1)
  936. #ifndef Py_MEMBER_SIZE
  937. #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
  938. #endif
  939.   static size_t __pyx_pyframe_localsplus_offset = 0;
  940.   #include "frameobject.h"
  941.   #define __Pxy_PyFrame_Initialize_Offsets()\
  942.     ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
  943.      (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
  944.   #define __Pyx_PyFrame_GetLocalsplus(frame)\
  945.     (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
  946. #endif
  947.  
  948. /* PyObjectCall.proto */
  949. #if CYTHON_COMPILING_IN_CPYTHON
  950. static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
  951. #else
  952. #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
  953. #endif
  954.  
  955. /* PyObjectCall2Args.proto */
  956. static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
  957.  
  958. /* PyObjectCallMethO.proto */
  959. #if CYTHON_COMPILING_IN_CPYTHON
  960. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
  961. #endif
  962.  
  963. /* PyObjectCallOneArg.proto */
  964. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
  965.  
  966. /* Import.proto */
  967. static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
  968.  
  969. /* FetchCommonType.proto */
  970. static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
  971.  
  972. /* CythonFunction.proto */
  973. #define __Pyx_CyFunction_USED 1
  974. #define __Pyx_CYFUNCTION_STATICMETHOD  0x01
  975. #define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
  976. #define __Pyx_CYFUNCTION_CCLASS        0x04
  977. #define __Pyx_CyFunction_GetClosure(f)\
  978.     (((__pyx_CyFunctionObject *) (f))->func_closure)
  979. #define __Pyx_CyFunction_GetClassObj(f)\
  980.     (((__pyx_CyFunctionObject *) (f))->func_classobj)
  981. #define __Pyx_CyFunction_Defaults(type, f)\
  982.     ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
  983. #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
  984.     ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
  985. typedef struct {
  986.     PyCFunctionObject func;
  987. #if PY_VERSION_HEX < 0x030500A0
  988.     PyObject *func_weakreflist;
  989. #endif
  990.     PyObject *func_dict;
  991.     PyObject *func_name;
  992.     PyObject *func_qualname;
  993.     PyObject *func_doc;
  994.     PyObject *func_globals;
  995.     PyObject *func_code;
  996.     PyObject *func_closure;
  997.     PyObject *func_classobj;
  998.     void *defaults;
  999.     int defaults_pyobjects;
  1000.     int flags;
  1001.     PyObject *defaults_tuple;
  1002.     PyObject *defaults_kwdict;
  1003.     PyObject *(*defaults_getter)(PyObject *);
  1004.     PyObject *func_annotations;
  1005. } __pyx_CyFunctionObject;
  1006. static PyTypeObject *__pyx_CyFunctionType = 0;
  1007. #define __Pyx_CyFunction_Check(obj)  (__Pyx_TypeCheck(obj, __pyx_CyFunctionType))
  1008. #define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\
  1009.     __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
  1010. static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
  1011.                                       int flags, PyObject* qualname,
  1012.                                       PyObject *self,
  1013.                                       PyObject *module, PyObject *globals,
  1014.                                       PyObject* code);
  1015. static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
  1016.                                                          size_t size,
  1017.                                                          int pyobjects);
  1018. static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
  1019.                                                             PyObject *tuple);
  1020. static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
  1021.                                                              PyObject *dict);
  1022. static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
  1023.                                                               PyObject *dict);
  1024. static int __pyx_CyFunction_init(void);
  1025.  
  1026. /* PyObjectCallNoArg.proto */
  1027. #if CYTHON_COMPILING_IN_CPYTHON
  1028. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
  1029. #else
  1030. #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
  1031. #endif
  1032.  
  1033. /* PyThreadStateGet.proto */
  1034. #if CYTHON_FAST_THREAD_STATE
  1035. #define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
  1036. #define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
  1037. #define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
  1038. #else
  1039. #define __Pyx_PyThreadState_declare
  1040. #define __Pyx_PyThreadState_assign
  1041. #define __Pyx_PyErr_Occurred()  PyErr_Occurred()
  1042. #endif
  1043.  
  1044. /* PyErrFetchRestore.proto */
  1045. #if CYTHON_FAST_THREAD_STATE
  1046. #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
  1047. #define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
  1048. #define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
  1049. #define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
  1050. #define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
  1051. static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
  1052. static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
  1053. #if CYTHON_COMPILING_IN_CPYTHON
  1054. #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
  1055. #else
  1056. #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
  1057. #endif
  1058. #else
  1059. #define __Pyx_PyErr_Clear() PyErr_Clear()
  1060. #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
  1061. #define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
  1062. #define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
  1063. #define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
  1064. #define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
  1065. #define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
  1066. #define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
  1067. #endif
  1068.  
  1069. /* CLineInTraceback.proto */
  1070. #ifdef CYTHON_CLINE_IN_TRACEBACK
  1071. #define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
  1072. #else
  1073. static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
  1074. #endif
  1075.  
  1076. /* CodeObjectCache.proto */
  1077. typedef struct {
  1078.     PyCodeObject* code_object;
  1079.     int code_line;
  1080. } __Pyx_CodeObjectCacheEntry;
  1081. struct __Pyx_CodeObjectCache {
  1082.     int count;
  1083.     int max_count;
  1084.     __Pyx_CodeObjectCacheEntry* entries;
  1085. };
  1086. static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
  1087. static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
  1088. static PyCodeObject *__pyx_find_code_object(int code_line);
  1089. static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
  1090.  
  1091. /* AddTraceback.proto */
  1092. static void __Pyx_AddTraceback(const char *funcname, int c_line,
  1093.                                int py_line, const char *filename);
  1094.  
  1095. /* CIntToPy.proto */
  1096. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
  1097.  
  1098. /* CIntFromPy.proto */
  1099. static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
  1100.  
  1101. /* CIntFromPy.proto */
  1102. static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
  1103.  
  1104. /* FastTypeChecks.proto */
  1105. #if CYTHON_COMPILING_IN_CPYTHON
  1106. #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
  1107. static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
  1108. static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
  1109. static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
  1110. #else
  1111. #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
  1112. #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
  1113. #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
  1114. #endif
  1115. #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
  1116.  
  1117. /* CStringEquals.proto */
  1118. static CYTHON_INLINE int __Pyx_StrEq(const char *, const char *);
  1119.  
  1120. /* CheckBinaryVersion.proto */
  1121. static int __Pyx_check_binary_version(void);
  1122.  
  1123. /* InitStrings.proto */
  1124. static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
  1125.  
  1126.  
  1127. /* Module declarations from 'exit_menu' */
  1128. #define __Pyx_MODULE_NAME "exit_menu"
  1129. extern int __pyx_module_is_main_exit_menu;
  1130. int __pyx_module_is_main_exit_menu = 0;
  1131.  
  1132. /* Implementation of 'exit_menu' */
  1133. static const char __pyx_k_[] = "*";
  1134. static const char __pyx_k_X[] = "X";
  1135. static const char __pyx_k_w[] = "_w";
  1136. static const char __pyx_k_Tk[] = "Tk";
  1137. static const char __pyx_k__5[] = "";
  1138. static const char __pyx_k_os[] = "os";
  1139. static const char __pyx_k_wm[] = "wm";
  1140. static const char __pyx_k_img[] = "img";
  1141. static const char __pyx_k_sys[] = "sys";
  1142. static const char __pyx_k_call[] = "call";
  1143. static const char __pyx_k_file[] = "file";
  1144. static const char __pyx_k_fill[] = "fill";
  1145. static const char __pyx_k_mGui[] = "mGui";
  1146. static const char __pyx_k_main[] = "__main__";
  1147. static const char __pyx_k_name[] = "__name__";
  1148. static const char __pyx_k_pack[] = "pack";
  1149. static const char __pyx_k_padx[] = "padx";
  1150. static const char __pyx_k_pady[] = "pady";
  1151. static const char __pyx_k_test[] = "__test__";
  1152. static const char __pyx_k_text[] = "text";
  1153. static const char __pyx_k_mIcon[] = "mIcon";
  1154. static const char __pyx_k_title[] = "title";
  1155. static const char __pyx_k_urxvt[] = "urxvt";
  1156. static const char __pyx_k_Button[] = "Button";
  1157. static const char __pyx_k_Logout[] = "Logout";
  1158. static const char __pyx_k_import[] = "__import__";
  1159. static const char __pyx_k_mbexit[] = "mbexit";
  1160. static const char __pyx_k_system[] = "system";
  1161. static const char __pyx_k_Restart[] = "Restart";
  1162. static const char __pyx_k_command[] = "command";
  1163. static const char __pyx_k_mbutton[] = "mbutton";
  1164. static const char __pyx_k_tkinter[] = "tkinter";
  1165. static const char __pyx_k_Shutdown[] = "Shutdown";
  1166. static const char __pyx_k_geometry[] = "geometry";
  1167. static const char __pyx_k_mainloop[] = "mainloop";
  1168. static const char __pyx_k_exit_menu[] = "exit_menu";
  1169. static const char __pyx_k_iconphoto[] = "iconphoto";
  1170. static const char __pyx_k_mbrestart[] = "mbrestart";
  1171. static const char __pyx_k_sleep_0_5[] = "sleep 0.5";
  1172. static const char __pyx_k_PhotoImage[] = "PhotoImage";
  1173. static const char __pyx_k_ZDM_Logout[] = "ZDM Logout";
  1174. static const char __pyx_k_mbshutdown[] = "mbshutdown";
  1175. static const char __pyx_k_450x450_600_200[] = "450x450+600+200";
  1176. static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
  1177. static const char __pyx_k_notify_send_Restarting[] = "notify-send 'Restarting'";
  1178. static const char __pyx_k_notify_send_Logging_Out[] = "notify-send 'Logging Out'";
  1179. static const char __pyx_k_notify_send_Shutting_Down[] = "notify-send 'Shutting Down'";
  1180. static const char __pyx_k_home_chris_Pictures_letter_z_gi[] = "/home/chris/Pictures/letter-z.gif";
  1181. static const char __pyx_k_Documents_Coded_Tutorials_Python[] = "Documents/Coded/Tutorials/Python/tkinter/exit_menu.py";
  1182. static PyObject *__pyx_n_s_;
  1183. static PyObject *__pyx_kp_s_450x450_600_200;
  1184. static PyObject *__pyx_n_s_Button;
  1185. static PyObject *__pyx_kp_s_Documents_Coded_Tutorials_Python;
  1186. static PyObject *__pyx_n_s_Logout;
  1187. static PyObject *__pyx_n_s_PhotoImage;
  1188. static PyObject *__pyx_n_s_Restart;
  1189. static PyObject *__pyx_n_s_Shutdown;
  1190. static PyObject *__pyx_n_s_Tk;
  1191. static PyObject *__pyx_n_s_X;
  1192. static PyObject *__pyx_kp_s_ZDM_Logout;
  1193. static PyObject *__pyx_kp_s__5;
  1194. static PyObject *__pyx_n_s_call;
  1195. static PyObject *__pyx_n_s_cline_in_traceback;
  1196. static PyObject *__pyx_n_s_command;
  1197. static PyObject *__pyx_n_s_exit_menu;
  1198. static PyObject *__pyx_n_s_file;
  1199. static PyObject *__pyx_n_s_fill;
  1200. static PyObject *__pyx_n_s_geometry;
  1201. static PyObject *__pyx_kp_s_home_chris_Pictures_letter_z_gi;
  1202. static PyObject *__pyx_n_s_iconphoto;
  1203. static PyObject *__pyx_n_s_img;
  1204. static PyObject *__pyx_n_s_import;
  1205. static PyObject *__pyx_n_s_mGui;
  1206. static PyObject *__pyx_n_s_mIcon;
  1207. static PyObject *__pyx_n_s_main;
  1208. static PyObject *__pyx_n_s_mainloop;
  1209. static PyObject *__pyx_n_s_mbexit;
  1210. static PyObject *__pyx_n_s_mbrestart;
  1211. static PyObject *__pyx_n_s_mbshutdown;
  1212. static PyObject *__pyx_n_s_mbutton;
  1213. static PyObject *__pyx_n_s_name;
  1214. static PyObject *__pyx_kp_s_notify_send_Logging_Out;
  1215. static PyObject *__pyx_kp_s_notify_send_Restarting;
  1216. static PyObject *__pyx_kp_s_notify_send_Shutting_Down;
  1217. static PyObject *__pyx_n_s_os;
  1218. static PyObject *__pyx_n_s_pack;
  1219. static PyObject *__pyx_n_s_padx;
  1220. static PyObject *__pyx_n_s_pady;
  1221. static PyObject *__pyx_kp_s_sleep_0_5;
  1222. static PyObject *__pyx_n_s_sys;
  1223. static PyObject *__pyx_n_s_system;
  1224. static PyObject *__pyx_n_s_test;
  1225. static PyObject *__pyx_n_s_text;
  1226. static PyObject *__pyx_n_s_title;
  1227. static PyObject *__pyx_n_s_tkinter;
  1228. static PyObject *__pyx_n_s_urxvt;
  1229. static PyObject *__pyx_n_s_w;
  1230. static PyObject *__pyx_n_s_wm;
  1231. static PyObject *__pyx_pf_9exit_menu_mbexit(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
  1232. static PyObject *__pyx_pf_9exit_menu_2mbrestart(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
  1233. static PyObject *__pyx_pf_9exit_menu_4mbshutdown(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
  1234. static PyObject *__pyx_int_10;
  1235. static PyObject *__pyx_int_60;
  1236. static PyObject *__pyx_int_85;
  1237. static PyObject *__pyx_tuple__6;
  1238. static PyObject *__pyx_tuple__7;
  1239. static PyObject *__pyx_codeobj__2;
  1240. static PyObject *__pyx_codeobj__3;
  1241. static PyObject *__pyx_codeobj__4;
  1242. /* Late includes */
  1243.  
  1244. /* "exit_menu.py":6
  1245.  * import os
  1246.  * from tkinter import *
  1247.  * def mbexit():             # <<<<<<<<<<<<<<
  1248.  *     os.system("notify-send 'Logging Out'")
  1249.  *     os.system('sleep 0.5')
  1250.  */
  1251.  
  1252. /* Python wrapper */
  1253. static PyObject *__pyx_pw_9exit_menu_1mbexit(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  1254. static PyMethodDef __pyx_mdef_9exit_menu_1mbexit = {"mbexit", (PyCFunction)__pyx_pw_9exit_menu_1mbexit, METH_NOARGS, 0};
  1255. static PyObject *__pyx_pw_9exit_menu_1mbexit(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  1256.   PyObject *__pyx_r = 0;
  1257.   __Pyx_RefNannyDeclarations
  1258.   __Pyx_RefNannySetupContext("mbexit (wrapper)", 0);
  1259.   __pyx_r = __pyx_pf_9exit_menu_mbexit(__pyx_self);
  1260.  
  1261.   /* function exit code */
  1262.   __Pyx_RefNannyFinishContext();
  1263.   return __pyx_r;
  1264. }
  1265.  
  1266. static PyObject *__pyx_pf_9exit_menu_mbexit(CYTHON_UNUSED PyObject *__pyx_self) {
  1267.   PyObject *__pyx_r = NULL;
  1268.   __Pyx_RefNannyDeclarations
  1269.   PyObject *__pyx_t_1 = NULL;
  1270.   PyObject *__pyx_t_2 = NULL;
  1271.   PyObject *__pyx_t_3 = NULL;
  1272.   __Pyx_RefNannySetupContext("mbexit", 0);
  1273.  
  1274.   /* "exit_menu.py":7
  1275.  * from tkinter import *
  1276.  * def mbexit():
  1277.  *     os.system("notify-send 'Logging Out'")             # <<<<<<<<<<<<<<
  1278.  *     os.system('sleep 0.5')
  1279.  *     os.system('urxvt')
  1280.  */
  1281.   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error)
  1282.   __Pyx_GOTREF(__pyx_t_2);
  1283.   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_system); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7, __pyx_L1_error)
  1284.   __Pyx_GOTREF(__pyx_t_3);
  1285.   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  1286.   __pyx_t_2 = NULL;
  1287.   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  1288.     __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
  1289.     if (likely(__pyx_t_2)) {
  1290.       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  1291.       __Pyx_INCREF(__pyx_t_2);
  1292.       __Pyx_INCREF(function);
  1293.       __Pyx_DECREF_SET(__pyx_t_3, function);
  1294.     }
  1295.   }
  1296.   __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_s_notify_send_Logging_Out) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_notify_send_Logging_Out);
  1297.   __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  1298.   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7, __pyx_L1_error)
  1299.   __Pyx_GOTREF(__pyx_t_1);
  1300.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  1301.   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  1302.  
  1303.   /* "exit_menu.py":8
  1304.  * def mbexit():
  1305.  *     os.system("notify-send 'Logging Out'")
  1306.  *     os.system('sleep 0.5')             # <<<<<<<<<<<<<<
  1307.  *     os.system('urxvt')
  1308.  * def mbrestart():
  1309.  */
  1310.   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8, __pyx_L1_error)
  1311.   __Pyx_GOTREF(__pyx_t_3);
  1312.   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_system); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error)
  1313.   __Pyx_GOTREF(__pyx_t_2);
  1314.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  1315.   __pyx_t_3 = NULL;
  1316.   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
  1317.     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  1318.     if (likely(__pyx_t_3)) {
  1319.       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  1320.       __Pyx_INCREF(__pyx_t_3);
  1321.       __Pyx_INCREF(function);
  1322.       __Pyx_DECREF_SET(__pyx_t_2, function);
  1323.     }
  1324.   }
  1325.   __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_sleep_0_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_sleep_0_5);
  1326.   __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  1327.   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error)
  1328.   __Pyx_GOTREF(__pyx_t_1);
  1329.   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  1330.   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  1331.  
  1332.   /* "exit_menu.py":9
  1333.  *     os.system("notify-send 'Logging Out'")
  1334.  *     os.system('sleep 0.5')
  1335.  *     os.system('urxvt')             # <<<<<<<<<<<<<<
  1336.  * def mbrestart():
  1337.  *     os.system("notify-send 'Restarting'")
  1338.  */
  1339.   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error)
  1340.   __Pyx_GOTREF(__pyx_t_2);
  1341.   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_system); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9, __pyx_L1_error)
  1342.   __Pyx_GOTREF(__pyx_t_3);
  1343.   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  1344.   __pyx_t_2 = NULL;
  1345.   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  1346.     __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
  1347.     if (likely(__pyx_t_2)) {
  1348.       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  1349.       __Pyx_INCREF(__pyx_t_2);
  1350.       __Pyx_INCREF(function);
  1351.       __Pyx_DECREF_SET(__pyx_t_3, function);
  1352.     }
  1353.   }
  1354.   __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_n_s_urxvt) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s_urxvt);
  1355.   __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  1356.   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error)
  1357.   __Pyx_GOTREF(__pyx_t_1);
  1358.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  1359.   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  1360.  
  1361.   /* "exit_menu.py":6
  1362.  * import os
  1363.  * from tkinter import *
  1364.  * def mbexit():             # <<<<<<<<<<<<<<
  1365.  *     os.system("notify-send 'Logging Out'")
  1366.  *     os.system('sleep 0.5')
  1367.  */
  1368.  
  1369.   /* function exit code */
  1370.   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  1371.   goto __pyx_L0;
  1372.   __pyx_L1_error:;
  1373.   __Pyx_XDECREF(__pyx_t_1);
  1374.   __Pyx_XDECREF(__pyx_t_2);
  1375.   __Pyx_XDECREF(__pyx_t_3);
  1376.   __Pyx_AddTraceback("exit_menu.mbexit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  1377.   __pyx_r = NULL;
  1378.   __pyx_L0:;
  1379.   __Pyx_XGIVEREF(__pyx_r);
  1380.   __Pyx_RefNannyFinishContext();
  1381.   return __pyx_r;
  1382. }
  1383.  
  1384. /* "exit_menu.py":10
  1385.  *     os.system('sleep 0.5')
  1386.  *     os.system('urxvt')
  1387.  * def mbrestart():             # <<<<<<<<<<<<<<
  1388.  *     os.system("notify-send 'Restarting'")
  1389.  *     os.system('sleep 0.5')
  1390.  */
  1391.  
  1392. /* Python wrapper */
  1393. static PyObject *__pyx_pw_9exit_menu_3mbrestart(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  1394. static PyMethodDef __pyx_mdef_9exit_menu_3mbrestart = {"mbrestart", (PyCFunction)__pyx_pw_9exit_menu_3mbrestart, METH_NOARGS, 0};
  1395. static PyObject *__pyx_pw_9exit_menu_3mbrestart(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  1396.   PyObject *__pyx_r = 0;
  1397.   __Pyx_RefNannyDeclarations
  1398.   __Pyx_RefNannySetupContext("mbrestart (wrapper)", 0);
  1399.   __pyx_r = __pyx_pf_9exit_menu_2mbrestart(__pyx_self);
  1400.  
  1401.   /* function exit code */
  1402.   __Pyx_RefNannyFinishContext();
  1403.   return __pyx_r;
  1404. }
  1405.  
  1406. static PyObject *__pyx_pf_9exit_menu_2mbrestart(CYTHON_UNUSED PyObject *__pyx_self) {
  1407.   PyObject *__pyx_r = NULL;
  1408.   __Pyx_RefNannyDeclarations
  1409.   PyObject *__pyx_t_1 = NULL;
  1410.   PyObject *__pyx_t_2 = NULL;
  1411.   PyObject *__pyx_t_3 = NULL;
  1412.   __Pyx_RefNannySetupContext("mbrestart", 0);
  1413.  
  1414.   /* "exit_menu.py":11
  1415.  *     os.system('urxvt')
  1416.  * def mbrestart():
  1417.  *     os.system("notify-send 'Restarting'")             # <<<<<<<<<<<<<<
  1418.  *     os.system('sleep 0.5')
  1419.  *     os.system('urxvt')
  1420.  */
  1421.   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error)
  1422.   __Pyx_GOTREF(__pyx_t_2);
  1423.   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_system); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11, __pyx_L1_error)
  1424.   __Pyx_GOTREF(__pyx_t_3);
  1425.   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  1426.   __pyx_t_2 = NULL;
  1427.   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  1428.     __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
  1429.     if (likely(__pyx_t_2)) {
  1430.       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  1431.       __Pyx_INCREF(__pyx_t_2);
  1432.       __Pyx_INCREF(function);
  1433.       __Pyx_DECREF_SET(__pyx_t_3, function);
  1434.     }
  1435.   }
  1436.   __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_s_notify_send_Restarting) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_notify_send_Restarting);
  1437.   __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  1438.   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error)
  1439.   __Pyx_GOTREF(__pyx_t_1);
  1440.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  1441.   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  1442.  
  1443.   /* "exit_menu.py":12
  1444.  * def mbrestart():
  1445.  *     os.system("notify-send 'Restarting'")
  1446.  *     os.system('sleep 0.5')             # <<<<<<<<<<<<<<
  1447.  *     os.system('urxvt')
  1448.  * def mbshutdown():
  1449.  */
  1450.   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12, __pyx_L1_error)
  1451.   __Pyx_GOTREF(__pyx_t_3);
  1452.   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_system); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)
  1453.   __Pyx_GOTREF(__pyx_t_2);
  1454.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  1455.   __pyx_t_3 = NULL;
  1456.   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
  1457.     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  1458.     if (likely(__pyx_t_3)) {
  1459.       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  1460.       __Pyx_INCREF(__pyx_t_3);
  1461.       __Pyx_INCREF(function);
  1462.       __Pyx_DECREF_SET(__pyx_t_2, function);
  1463.     }
  1464.   }
  1465.   __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_sleep_0_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_sleep_0_5);
  1466.   __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  1467.   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)
  1468.   __Pyx_GOTREF(__pyx_t_1);
  1469.   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  1470.   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  1471.  
  1472.   /* "exit_menu.py":13
  1473.  *     os.system("notify-send 'Restarting'")
  1474.  *     os.system('sleep 0.5')
  1475.  *     os.system('urxvt')             # <<<<<<<<<<<<<<
  1476.  * def mbshutdown():
  1477.  *     os.system("notify-send 'Shutting Down'")
  1478.  */
  1479.   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)
  1480.   __Pyx_GOTREF(__pyx_t_2);
  1481.   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_system); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13, __pyx_L1_error)
  1482.   __Pyx_GOTREF(__pyx_t_3);
  1483.   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  1484.   __pyx_t_2 = NULL;
  1485.   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  1486.     __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
  1487.     if (likely(__pyx_t_2)) {
  1488.       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  1489.       __Pyx_INCREF(__pyx_t_2);
  1490.       __Pyx_INCREF(function);
  1491.       __Pyx_DECREF_SET(__pyx_t_3, function);
  1492.     }
  1493.   }
  1494.   __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_n_s_urxvt) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s_urxvt);
  1495.   __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  1496.   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)
  1497.   __Pyx_GOTREF(__pyx_t_1);
  1498.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  1499.   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  1500.  
  1501.   /* "exit_menu.py":10
  1502.  *     os.system('sleep 0.5')
  1503.  *     os.system('urxvt')
  1504.  * def mbrestart():             # <<<<<<<<<<<<<<
  1505.  *     os.system("notify-send 'Restarting'")
  1506.  *     os.system('sleep 0.5')
  1507.  */
  1508.  
  1509.   /* function exit code */
  1510.   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  1511.   goto __pyx_L0;
  1512.   __pyx_L1_error:;
  1513.   __Pyx_XDECREF(__pyx_t_1);
  1514.   __Pyx_XDECREF(__pyx_t_2);
  1515.   __Pyx_XDECREF(__pyx_t_3);
  1516.   __Pyx_AddTraceback("exit_menu.mbrestart", __pyx_clineno, __pyx_lineno, __pyx_filename);
  1517.   __pyx_r = NULL;
  1518.   __pyx_L0:;
  1519.   __Pyx_XGIVEREF(__pyx_r);
  1520.   __Pyx_RefNannyFinishContext();
  1521.   return __pyx_r;
  1522. }
  1523.  
  1524. /* "exit_menu.py":14
  1525.  *     os.system('sleep 0.5')
  1526.  *     os.system('urxvt')
  1527.  * def mbshutdown():             # <<<<<<<<<<<<<<
  1528.  *     os.system("notify-send 'Shutting Down'")
  1529.  *     os.system('sleep 0.5')
  1530.  */
  1531.  
  1532. /* Python wrapper */
  1533. static PyObject *__pyx_pw_9exit_menu_5mbshutdown(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  1534. static PyMethodDef __pyx_mdef_9exit_menu_5mbshutdown = {"mbshutdown", (PyCFunction)__pyx_pw_9exit_menu_5mbshutdown, METH_NOARGS, 0};
  1535. static PyObject *__pyx_pw_9exit_menu_5mbshutdown(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  1536.   PyObject *__pyx_r = 0;
  1537.   __Pyx_RefNannyDeclarations
  1538.   __Pyx_RefNannySetupContext("mbshutdown (wrapper)", 0);
  1539.   __pyx_r = __pyx_pf_9exit_menu_4mbshutdown(__pyx_self);
  1540.  
  1541.   /* function exit code */
  1542.   __Pyx_RefNannyFinishContext();
  1543.   return __pyx_r;
  1544. }
  1545.  
  1546. static PyObject *__pyx_pf_9exit_menu_4mbshutdown(CYTHON_UNUSED PyObject *__pyx_self) {
  1547.   PyObject *__pyx_r = NULL;
  1548.   __Pyx_RefNannyDeclarations
  1549.   PyObject *__pyx_t_1 = NULL;
  1550.   PyObject *__pyx_t_2 = NULL;
  1551.   PyObject *__pyx_t_3 = NULL;
  1552.   __Pyx_RefNannySetupContext("mbshutdown", 0);
  1553.  
  1554.   /* "exit_menu.py":15
  1555.  *     os.system('urxvt')
  1556.  * def mbshutdown():
  1557.  *     os.system("notify-send 'Shutting Down'")             # <<<<<<<<<<<<<<
  1558.  *     os.system('sleep 0.5')
  1559.  *     os.system('urxvt')
  1560.  */
  1561.   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)
  1562.   __Pyx_GOTREF(__pyx_t_2);
  1563.   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_system); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15, __pyx_L1_error)
  1564.   __Pyx_GOTREF(__pyx_t_3);
  1565.   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  1566.   __pyx_t_2 = NULL;
  1567.   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  1568.     __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
  1569.     if (likely(__pyx_t_2)) {
  1570.       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  1571.       __Pyx_INCREF(__pyx_t_2);
  1572.       __Pyx_INCREF(function);
  1573.       __Pyx_DECREF_SET(__pyx_t_3, function);
  1574.     }
  1575.   }
  1576.   __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_s_notify_send_Shutting_Down) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_notify_send_Shutting_Down);
  1577.   __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  1578.   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
  1579.   __Pyx_GOTREF(__pyx_t_1);
  1580.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  1581.   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  1582.  
  1583.   /* "exit_menu.py":16
  1584.  * def mbshutdown():
  1585.  *     os.system("notify-send 'Shutting Down'")
  1586.  *     os.system('sleep 0.5')             # <<<<<<<<<<<<<<
  1587.  *     os.system('urxvt')
  1588.  *
  1589.  */
  1590.   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16, __pyx_L1_error)
  1591.   __Pyx_GOTREF(__pyx_t_3);
  1592.   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_system); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)
  1593.   __Pyx_GOTREF(__pyx_t_2);
  1594.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  1595.   __pyx_t_3 = NULL;
  1596.   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
  1597.     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  1598.     if (likely(__pyx_t_3)) {
  1599.       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  1600.       __Pyx_INCREF(__pyx_t_3);
  1601.       __Pyx_INCREF(function);
  1602.       __Pyx_DECREF_SET(__pyx_t_2, function);
  1603.     }
  1604.   }
  1605.   __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_sleep_0_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_sleep_0_5);
  1606.   __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  1607.   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error)
  1608.   __Pyx_GOTREF(__pyx_t_1);
  1609.   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  1610.   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  1611.  
  1612.   /* "exit_menu.py":17
  1613.  *     os.system("notify-send 'Shutting Down'")
  1614.  *     os.system('sleep 0.5')
  1615.  *     os.system('urxvt')             # <<<<<<<<<<<<<<
  1616.  *
  1617.  * mIcon = ''
  1618.  */
  1619.   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
  1620.   __Pyx_GOTREF(__pyx_t_2);
  1621.   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_system); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17, __pyx_L1_error)
  1622.   __Pyx_GOTREF(__pyx_t_3);
  1623.   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  1624.   __pyx_t_2 = NULL;
  1625.   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  1626.     __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
  1627.     if (likely(__pyx_t_2)) {
  1628.       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  1629.       __Pyx_INCREF(__pyx_t_2);
  1630.       __Pyx_INCREF(function);
  1631.       __Pyx_DECREF_SET(__pyx_t_3, function);
  1632.     }
  1633.   }
  1634.   __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_n_s_urxvt) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s_urxvt);
  1635.   __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  1636.   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
  1637.   __Pyx_GOTREF(__pyx_t_1);
  1638.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  1639.   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  1640.  
  1641.   /* "exit_menu.py":14
  1642.  *     os.system('sleep 0.5')
  1643.  *     os.system('urxvt')
  1644.  * def mbshutdown():             # <<<<<<<<<<<<<<
  1645.  *     os.system("notify-send 'Shutting Down'")
  1646.  *     os.system('sleep 0.5')
  1647.  */
  1648.  
  1649.   /* function exit code */
  1650.   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  1651.   goto __pyx_L0;
  1652.   __pyx_L1_error:;
  1653.   __Pyx_XDECREF(__pyx_t_1);
  1654.   __Pyx_XDECREF(__pyx_t_2);
  1655.   __Pyx_XDECREF(__pyx_t_3);
  1656.   __Pyx_AddTraceback("exit_menu.mbshutdown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  1657.   __pyx_r = NULL;
  1658.   __pyx_L0:;
  1659.   __Pyx_XGIVEREF(__pyx_r);
  1660.   __Pyx_RefNannyFinishContext();
  1661.   return __pyx_r;
  1662. }
  1663.  
  1664. static PyMethodDef __pyx_methods[] = {
  1665.   {0, 0, 0, 0}
  1666. };
  1667.  
  1668. static int __pyx_import_star_set(PyObject *o, PyObject* py_name, char *name) {
  1669.   static const char* internal_type_names[] = {
  1670.     0
  1671.   };
  1672.   const char** type_name = internal_type_names;
  1673.   while (*type_name) {
  1674.     if (__Pyx_StrEq(name, *type_name)) {
  1675.       PyErr_Format(PyExc_TypeError, "Cannot overwrite C type %s", name);
  1676.       goto bad;
  1677.     }
  1678.     type_name++;
  1679.   }
  1680.   if (0);
  1681.   else {
  1682.     if (PyObject_SetAttr(__pyx_m, py_name, o) < 0) goto bad;
  1683.   }
  1684.   return 0;
  1685.   bad:
  1686.   return -1;
  1687. }
  1688.  
  1689. static int
  1690. __Pyx_import_all_from(PyObject *locals, PyObject *v)
  1691. {
  1692.     PyObject *all = PyObject_GetAttrString(v, "__all__");
  1693.     PyObject *dict, *name, *value;
  1694.     int skip_leading_underscores = 0;
  1695.     int pos, err;
  1696.     if (all == NULL) {
  1697.         if (!PyErr_ExceptionMatches(PyExc_AttributeError))
  1698.             return -1;
  1699.         PyErr_Clear();
  1700.         dict = PyObject_GetAttrString(v, "__dict__");
  1701.         if (dict == NULL) {
  1702.             if (!PyErr_ExceptionMatches(PyExc_AttributeError))
  1703.                 return -1;
  1704.             PyErr_SetString(PyExc_ImportError,
  1705.             "from-import-* object has no __dict__ and no __all__");
  1706.             return -1;
  1707.         }
  1708. #if PY_MAJOR_VERSION < 3
  1709.         all = PyObject_CallMethod(dict, (char *)"keys", NULL);
  1710. #else
  1711.         all = PyMapping_Keys(dict);
  1712. #endif
  1713.         Py_DECREF(dict);
  1714.         if (all == NULL)
  1715.             return -1;
  1716.         skip_leading_underscores = 1;
  1717.     }
  1718.     for (pos = 0, err = 0; ; pos++) {
  1719.         name = PySequence_GetItem(all, pos);
  1720.         if (name == NULL) {
  1721.             if (!PyErr_ExceptionMatches(PyExc_IndexError))
  1722.                 err = -1;
  1723.             else
  1724.                 PyErr_Clear();
  1725.             break;
  1726.         }
  1727.         if (skip_leading_underscores &&
  1728. #if PY_MAJOR_VERSION < 3
  1729.             PyString_Check(name) &&
  1730.             PyString_AS_STRING(name)[0] == '_')
  1731. #else
  1732.             PyUnicode_Check(name) &&
  1733.             PyUnicode_AS_UNICODE(name)[0] == '_')
  1734. #endif
  1735.         {
  1736.             Py_DECREF(name);
  1737.             continue;
  1738.         }
  1739.         value = PyObject_GetAttr(v, name);
  1740.         if (value == NULL)
  1741.             err = -1;
  1742.         else if (PyDict_CheckExact(locals))
  1743.             err = PyDict_SetItem(locals, name, value);
  1744.         else
  1745.             err = PyObject_SetItem(locals, name, value);
  1746.         Py_DECREF(name);
  1747.         Py_XDECREF(value);
  1748.         if (err != 0)
  1749.             break;
  1750.     }
  1751.     Py_DECREF(all);
  1752.     return err;
  1753. }
  1754. static int __pyx_import_star(PyObject* m) {
  1755.     int i;
  1756.     int ret = -1;
  1757.     char* s;
  1758.     PyObject *locals = 0;
  1759.     PyObject *list = 0;
  1760. #if PY_MAJOR_VERSION >= 3
  1761.     PyObject *utf8_name = 0;
  1762. #endif
  1763.     PyObject *name;
  1764.     PyObject *item;
  1765.     locals = PyDict_New();              if (!locals) goto bad;
  1766.     if (__Pyx_import_all_from(locals, m) < 0) goto bad;
  1767.     list = PyDict_Items(locals);        if (!list) goto bad;
  1768.     for(i=0; i<PyList_GET_SIZE(list); i++) {
  1769.         name = PyTuple_GET_ITEM(PyList_GET_ITEM(list, i), 0);
  1770.         item = PyTuple_GET_ITEM(PyList_GET_ITEM(list, i), 1);
  1771. #if PY_MAJOR_VERSION >= 3
  1772.         utf8_name = PyUnicode_AsUTF8String(name);
  1773.         if (!utf8_name) goto bad;
  1774.         s = PyBytes_AS_STRING(utf8_name);
  1775.         if (__pyx_import_star_set(item, name, s) < 0) goto bad;
  1776.         Py_DECREF(utf8_name); utf8_name = 0;
  1777. #else
  1778.         s = PyString_AsString(name);
  1779.         if (!s) goto bad;
  1780.         if (__pyx_import_star_set(item, name, s) < 0) goto bad;
  1781. #endif
  1782.     }
  1783.     ret = 0;
  1784. bad:
  1785.     Py_XDECREF(locals);
  1786.     Py_XDECREF(list);
  1787. #if PY_MAJOR_VERSION >= 3
  1788.     Py_XDECREF(utf8_name);
  1789. #endif
  1790.     return ret;
  1791. }
  1792.  
  1793.  
  1794.  
  1795. #if PY_MAJOR_VERSION >= 3
  1796. #if CYTHON_PEP489_MULTI_PHASE_INIT
  1797. static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
  1798. static int __pyx_pymod_exec_exit_menu(PyObject* module); /*proto*/
  1799. static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  1800.   {Py_mod_create, (void*)__pyx_pymod_create},
  1801.   {Py_mod_exec, (void*)__pyx_pymod_exec_exit_menu},
  1802.   {0, NULL}
  1803. };
  1804. #endif
  1805.  
  1806. static struct PyModuleDef __pyx_moduledef = {
  1807.     PyModuleDef_HEAD_INIT,
  1808.     "exit_menu",
  1809.     0, /* m_doc */
  1810.   #if CYTHON_PEP489_MULTI_PHASE_INIT
  1811.     0, /* m_size */
  1812.   #else
  1813.     -1, /* m_size */
  1814.   #endif
  1815.     __pyx_methods /* m_methods */,
  1816.   #if CYTHON_PEP489_MULTI_PHASE_INIT
  1817.     __pyx_moduledef_slots, /* m_slots */
  1818.   #else
  1819.     NULL, /* m_reload */
  1820.   #endif
  1821.     NULL, /* m_traverse */
  1822.     NULL, /* m_clear */
  1823.     NULL /* m_free */
  1824. };
  1825. #endif
  1826. #ifndef CYTHON_SMALL_CODE
  1827. #if defined(__clang__)
  1828.     #define CYTHON_SMALL_CODE
  1829. #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
  1830.     #define CYTHON_SMALL_CODE __attribute__((cold))
  1831. #else
  1832.     #define CYTHON_SMALL_CODE
  1833. #endif
  1834. #endif
  1835.  
  1836. static __Pyx_StringTabEntry __pyx_string_tab[] = {
  1837.   {&__pyx_n_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 1},
  1838.   {&__pyx_kp_s_450x450_600_200, __pyx_k_450x450_600_200, sizeof(__pyx_k_450x450_600_200), 0, 0, 1, 0},
  1839.   {&__pyx_n_s_Button, __pyx_k_Button, sizeof(__pyx_k_Button), 0, 0, 1, 1},
  1840.   {&__pyx_kp_s_Documents_Coded_Tutorials_Python, __pyx_k_Documents_Coded_Tutorials_Python, sizeof(__pyx_k_Documents_Coded_Tutorials_Python), 0, 0, 1, 0},
  1841.   {&__pyx_n_s_Logout, __pyx_k_Logout, sizeof(__pyx_k_Logout), 0, 0, 1, 1},
  1842.   {&__pyx_n_s_PhotoImage, __pyx_k_PhotoImage, sizeof(__pyx_k_PhotoImage), 0, 0, 1, 1},
  1843.   {&__pyx_n_s_Restart, __pyx_k_Restart, sizeof(__pyx_k_Restart), 0, 0, 1, 1},
  1844.   {&__pyx_n_s_Shutdown, __pyx_k_Shutdown, sizeof(__pyx_k_Shutdown), 0, 0, 1, 1},
  1845.   {&__pyx_n_s_Tk, __pyx_k_Tk, sizeof(__pyx_k_Tk), 0, 0, 1, 1},
  1846.   {&__pyx_n_s_X, __pyx_k_X, sizeof(__pyx_k_X), 0, 0, 1, 1},
  1847.   {&__pyx_kp_s_ZDM_Logout, __pyx_k_ZDM_Logout, sizeof(__pyx_k_ZDM_Logout), 0, 0, 1, 0},
  1848.   {&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0},
  1849.   {&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1},
  1850.   {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  1851.   {&__pyx_n_s_command, __pyx_k_command, sizeof(__pyx_k_command), 0, 0, 1, 1},
  1852.   {&__pyx_n_s_exit_menu, __pyx_k_exit_menu, sizeof(__pyx_k_exit_menu), 0, 0, 1, 1},
  1853.   {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1},
  1854.   {&__pyx_n_s_fill, __pyx_k_fill, sizeof(__pyx_k_fill), 0, 0, 1, 1},
  1855.   {&__pyx_n_s_geometry, __pyx_k_geometry, sizeof(__pyx_k_geometry), 0, 0, 1, 1},
  1856.   {&__pyx_kp_s_home_chris_Pictures_letter_z_gi, __pyx_k_home_chris_Pictures_letter_z_gi, sizeof(__pyx_k_home_chris_Pictures_letter_z_gi), 0, 0, 1, 0},
  1857.   {&__pyx_n_s_iconphoto, __pyx_k_iconphoto, sizeof(__pyx_k_iconphoto), 0, 0, 1, 1},
  1858.   {&__pyx_n_s_img, __pyx_k_img, sizeof(__pyx_k_img), 0, 0, 1, 1},
  1859.   {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  1860.   {&__pyx_n_s_mGui, __pyx_k_mGui, sizeof(__pyx_k_mGui), 0, 0, 1, 1},
  1861.   {&__pyx_n_s_mIcon, __pyx_k_mIcon, sizeof(__pyx_k_mIcon), 0, 0, 1, 1},
  1862.   {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  1863.   {&__pyx_n_s_mainloop, __pyx_k_mainloop, sizeof(__pyx_k_mainloop), 0, 0, 1, 1},
  1864.   {&__pyx_n_s_mbexit, __pyx_k_mbexit, sizeof(__pyx_k_mbexit), 0, 0, 1, 1},
  1865.   {&__pyx_n_s_mbrestart, __pyx_k_mbrestart, sizeof(__pyx_k_mbrestart), 0, 0, 1, 1},
  1866.   {&__pyx_n_s_mbshutdown, __pyx_k_mbshutdown, sizeof(__pyx_k_mbshutdown), 0, 0, 1, 1},
  1867.   {&__pyx_n_s_mbutton, __pyx_k_mbutton, sizeof(__pyx_k_mbutton), 0, 0, 1, 1},
  1868.   {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  1869.   {&__pyx_kp_s_notify_send_Logging_Out, __pyx_k_notify_send_Logging_Out, sizeof(__pyx_k_notify_send_Logging_Out), 0, 0, 1, 0},
  1870.   {&__pyx_kp_s_notify_send_Restarting, __pyx_k_notify_send_Restarting, sizeof(__pyx_k_notify_send_Restarting), 0, 0, 1, 0},
  1871.   {&__pyx_kp_s_notify_send_Shutting_Down, __pyx_k_notify_send_Shutting_Down, sizeof(__pyx_k_notify_send_Shutting_Down), 0, 0, 1, 0},
  1872.   {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
  1873.   {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1},
  1874.   {&__pyx_n_s_padx, __pyx_k_padx, sizeof(__pyx_k_padx), 0, 0, 1, 1},
  1875.   {&__pyx_n_s_pady, __pyx_k_pady, sizeof(__pyx_k_pady), 0, 0, 1, 1},
  1876.   {&__pyx_kp_s_sleep_0_5, __pyx_k_sleep_0_5, sizeof(__pyx_k_sleep_0_5), 0, 0, 1, 0},
  1877.   {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
  1878.   {&__pyx_n_s_system, __pyx_k_system, sizeof(__pyx_k_system), 0, 0, 1, 1},
  1879.   {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  1880.   {&__pyx_n_s_text, __pyx_k_text, sizeof(__pyx_k_text), 0, 0, 1, 1},
  1881.   {&__pyx_n_s_title, __pyx_k_title, sizeof(__pyx_k_title), 0, 0, 1, 1},
  1882.   {&__pyx_n_s_tkinter, __pyx_k_tkinter, sizeof(__pyx_k_tkinter), 0, 0, 1, 1},
  1883.   {&__pyx_n_s_urxvt, __pyx_k_urxvt, sizeof(__pyx_k_urxvt), 0, 0, 1, 1},
  1884.   {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
  1885.   {&__pyx_n_s_wm, __pyx_k_wm, sizeof(__pyx_k_wm), 0, 0, 1, 1},
  1886.   {0, 0, 0, 0, 0, 0, 0}
  1887. };
  1888. static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  1889.   return 0;
  1890. }
  1891.  
  1892. static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  1893.   __Pyx_RefNannyDeclarations
  1894.   __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
  1895.  
  1896.   /* "exit_menu.py":6
  1897.  * import os
  1898.  * from tkinter import *
  1899.  * def mbexit():             # <<<<<<<<<<<<<<
  1900.  *     os.system("notify-send 'Logging Out'")
  1901.  *     os.system('sleep 0.5')
  1902.  */
  1903.   __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Documents_Coded_Tutorials_Python, __pyx_n_s_mbexit, 6, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 6, __pyx_L1_error)
  1904.  
  1905.   /* "exit_menu.py":10
  1906.  *     os.system('sleep 0.5')
  1907.  *     os.system('urxvt')
  1908.  * def mbrestart():             # <<<<<<<<<<<<<<
  1909.  *     os.system("notify-send 'Restarting'")
  1910.  *     os.system('sleep 0.5')
  1911.  */
  1912.   __pyx_codeobj__3 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Documents_Coded_Tutorials_Python, __pyx_n_s_mbrestart, 10, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__3)) __PYX_ERR(0, 10, __pyx_L1_error)
  1913.  
  1914.   /* "exit_menu.py":14
  1915.  *     os.system('sleep 0.5')
  1916.  *     os.system('urxvt')
  1917.  * def mbshutdown():             # <<<<<<<<<<<<<<
  1918.  *     os.system("notify-send 'Shutting Down'")
  1919.  *     os.system('sleep 0.5')
  1920.  */
  1921.   __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Documents_Coded_Tutorials_Python, __pyx_n_s_mbshutdown, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 14, __pyx_L1_error)
  1922.  
  1923.   /* "exit_menu.py":23
  1924.  * img = PhotoImage(file = r'/home/chris/Pictures/letter-z.gif')
  1925.  *
  1926.  * mGui.geometry('450x450+600+200')             # <<<<<<<<<<<<<<
  1927.  * mGui.title('ZDM Logout')
  1928.  * mGui.call('wm', 'iconphoto', mGui._w, img)
  1929.  */
  1930.   __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_450x450_600_200); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 23, __pyx_L1_error)
  1931.   __Pyx_GOTREF(__pyx_tuple__6);
  1932.   __Pyx_GIVEREF(__pyx_tuple__6);
  1933.  
  1934.   /* "exit_menu.py":24
  1935.  *
  1936.  * mGui.geometry('450x450+600+200')
  1937.  * mGui.title('ZDM Logout')             # <<<<<<<<<<<<<<
  1938.  * mGui.call('wm', 'iconphoto', mGui._w, img)
  1939.  *
  1940.  */
  1941.   __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_ZDM_Logout); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 24, __pyx_L1_error)
  1942.   __Pyx_GOTREF(__pyx_tuple__7);
  1943.   __Pyx_GIVEREF(__pyx_tuple__7);
  1944.   __Pyx_RefNannyFinishContext();
  1945.   return 0;
  1946.   __pyx_L1_error:;
  1947.   __Pyx_RefNannyFinishContext();
  1948.   return -1;
  1949. }
  1950.  
  1951. static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  1952.   if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  1953.   __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) __PYX_ERR(0, 1, __pyx_L1_error)
  1954.   __pyx_int_60 = PyInt_FromLong(60); if (unlikely(!__pyx_int_60)) __PYX_ERR(0, 1, __pyx_L1_error)
  1955.   __pyx_int_85 = PyInt_FromLong(85); if (unlikely(!__pyx_int_85)) __PYX_ERR(0, 1, __pyx_L1_error)
  1956.   return 0;
  1957.   __pyx_L1_error:;
  1958.   return -1;
  1959. }
  1960.  
  1961. static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
  1962. static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
  1963. static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
  1964. static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
  1965. static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
  1966. static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
  1967. static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
  1968.  
  1969. static int __Pyx_modinit_global_init_code(void) {
  1970.   __Pyx_RefNannyDeclarations
  1971.   __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  1972.   /*--- Global init code ---*/
  1973.   __Pyx_RefNannyFinishContext();
  1974.   return 0;
  1975. }
  1976.  
  1977. static int __Pyx_modinit_variable_export_code(void) {
  1978.   __Pyx_RefNannyDeclarations
  1979.   __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  1980.   /*--- Variable export code ---*/
  1981.   __Pyx_RefNannyFinishContext();
  1982.   return 0;
  1983. }
  1984.  
  1985. static int __Pyx_modinit_function_export_code(void) {
  1986.   __Pyx_RefNannyDeclarations
  1987.   __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  1988.   /*--- Function export code ---*/
  1989.   __Pyx_RefNannyFinishContext();
  1990.   return 0;
  1991. }
  1992.  
  1993. static int __Pyx_modinit_type_init_code(void) {
  1994.   __Pyx_RefNannyDeclarations
  1995.   __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  1996.   /*--- Type init code ---*/
  1997.   __Pyx_RefNannyFinishContext();
  1998.   return 0;
  1999. }
  2000.  
  2001. static int __Pyx_modinit_type_import_code(void) {
  2002.   __Pyx_RefNannyDeclarations
  2003.   __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  2004.   /*--- Type import code ---*/
  2005.   __Pyx_RefNannyFinishContext();
  2006.   return 0;
  2007. }
  2008.  
  2009. static int __Pyx_modinit_variable_import_code(void) {
  2010.   __Pyx_RefNannyDeclarations
  2011.   __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  2012.   /*--- Variable import code ---*/
  2013.   __Pyx_RefNannyFinishContext();
  2014.   return 0;
  2015. }
  2016.  
  2017. static int __Pyx_modinit_function_import_code(void) {
  2018.   __Pyx_RefNannyDeclarations
  2019.   __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  2020.   /*--- Function import code ---*/
  2021.   __Pyx_RefNannyFinishContext();
  2022.   return 0;
  2023. }
  2024.  
  2025.  
  2026. #if PY_MAJOR_VERSION < 3
  2027. #ifdef CYTHON_NO_PYINIT_EXPORT
  2028. #define __Pyx_PyMODINIT_FUNC void
  2029. #else
  2030. #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
  2031. #endif
  2032. #else
  2033. #ifdef CYTHON_NO_PYINIT_EXPORT
  2034. #define __Pyx_PyMODINIT_FUNC PyObject *
  2035. #else
  2036. #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
  2037. #endif
  2038. #endif
  2039.  
  2040.  
  2041. #if PY_MAJOR_VERSION < 3
  2042. __Pyx_PyMODINIT_FUNC initexit_menu(void) CYTHON_SMALL_CODE; /*proto*/
  2043. __Pyx_PyMODINIT_FUNC initexit_menu(void)
  2044. #else
  2045. __Pyx_PyMODINIT_FUNC PyInit_exit_menu(void) CYTHON_SMALL_CODE; /*proto*/
  2046. __Pyx_PyMODINIT_FUNC PyInit_exit_menu(void)
  2047. #if CYTHON_PEP489_MULTI_PHASE_INIT
  2048. {
  2049.   return PyModuleDef_Init(&__pyx_moduledef);
  2050. }
  2051. static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
  2052.     #if PY_VERSION_HEX >= 0x030700A1
  2053.     static PY_INT64_T main_interpreter_id = -1;
  2054.     PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
  2055.     if (main_interpreter_id == -1) {
  2056.         main_interpreter_id = current_id;
  2057.         return (unlikely(current_id == -1)) ? -1 : 0;
  2058.     } else if (unlikely(main_interpreter_id != current_id))
  2059.     #else
  2060.     static PyInterpreterState *main_interpreter = NULL;
  2061.     PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
  2062.     if (!main_interpreter) {
  2063.         main_interpreter = current_interpreter;
  2064.     } else if (unlikely(main_interpreter != current_interpreter))
  2065.     #endif
  2066.     {
  2067.         PyErr_SetString(
  2068.             PyExc_ImportError,
  2069.             "Interpreter change detected - this module can only be loaded into one interpreter per process.");
  2070.         return -1;
  2071.     }
  2072.     return 0;
  2073. }
  2074. static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
  2075.     PyObject *value = PyObject_GetAttrString(spec, from_name);
  2076.     int result = 0;
  2077.     if (likely(value)) {
  2078.         if (allow_none || value != Py_None) {
  2079.             result = PyDict_SetItemString(moddict, to_name, value);
  2080.         }
  2081.         Py_DECREF(value);
  2082.     } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
  2083.         PyErr_Clear();
  2084.     } else {
  2085.         result = -1;
  2086.     }
  2087.     return result;
  2088. }
  2089. static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
  2090.     PyObject *module = NULL, *moddict, *modname;
  2091.     if (__Pyx_check_single_interpreter())
  2092.         return NULL;
  2093.     if (__pyx_m)
  2094.         return __Pyx_NewRef(__pyx_m);
  2095.     modname = PyObject_GetAttrString(spec, "name");
  2096.     if (unlikely(!modname)) goto bad;
  2097.     module = PyModule_NewObject(modname);
  2098.     Py_DECREF(modname);
  2099.     if (unlikely(!module)) goto bad;
  2100.     moddict = PyModule_GetDict(module);
  2101.     if (unlikely(!moddict)) goto bad;
  2102.     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
  2103.     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
  2104.     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
  2105.     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
  2106.     return module;
  2107. bad:
  2108.     Py_XDECREF(module);
  2109.     return NULL;
  2110. }
  2111.  
  2112.  
  2113. static CYTHON_SMALL_CODE int __pyx_pymod_exec_exit_menu(PyObject *__pyx_pyinit_module)
  2114. #endif
  2115. #endif
  2116. {
  2117.   PyObject *__pyx_t_1 = NULL;
  2118.   PyObject *__pyx_t_2 = NULL;
  2119.   PyObject *__pyx_t_3 = NULL;
  2120.   PyObject *__pyx_t_4 = NULL;
  2121.   __Pyx_RefNannyDeclarations
  2122.   #if CYTHON_PEP489_MULTI_PHASE_INIT
  2123.   if (__pyx_m) {
  2124.     if (__pyx_m == __pyx_pyinit_module) return 0;
  2125.     PyErr_SetString(PyExc_RuntimeError, "Module 'exit_menu' has already been imported. Re-initialisation is not supported.");
  2126.     return -1;
  2127.   }
  2128.   #elif PY_MAJOR_VERSION >= 3
  2129.   if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  2130.   #endif
  2131.   #if CYTHON_REFNANNY
  2132. __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  2133. if (!__Pyx_RefNanny) {
  2134.   PyErr_Clear();
  2135.   __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  2136.   if (!__Pyx_RefNanny)
  2137.       Py_FatalError("failed to import 'refnanny' module");
  2138. }
  2139. #endif
  2140.   __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_exit_menu(void)", 0);
  2141.   if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  2142.   #ifdef __Pxy_PyFrame_Initialize_Offsets
  2143.   __Pxy_PyFrame_Initialize_Offsets();
  2144.   #endif
  2145.   __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  2146.   __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  2147.   __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  2148.   #ifdef __Pyx_CyFunction_USED
  2149.   if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  2150.   #endif
  2151.   #ifdef __Pyx_FusedFunction_USED
  2152.   if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  2153.   #endif
  2154.   #ifdef __Pyx_Coroutine_USED
  2155.   if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  2156.   #endif
  2157.   #ifdef __Pyx_Generator_USED
  2158.   if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  2159.   #endif
  2160.   #ifdef __Pyx_AsyncGen_USED
  2161.   if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  2162.   #endif
  2163.   #ifdef __Pyx_StopAsyncIteration_USED
  2164.   if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  2165.   #endif
  2166.   /*--- Library function declarations ---*/
  2167.   /*--- Threads initialization code ---*/
  2168.   #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  2169.   #ifdef WITH_THREAD /* Python build with threading support? */
  2170.   PyEval_InitThreads();
  2171.   #endif
  2172.   #endif
  2173.   /*--- Module creation code ---*/
  2174.   #if CYTHON_PEP489_MULTI_PHASE_INIT
  2175.   __pyx_m = __pyx_pyinit_module;
  2176.   Py_INCREF(__pyx_m);
  2177.   #else
  2178.   #if PY_MAJOR_VERSION < 3
  2179.   __pyx_m = Py_InitModule4("exit_menu", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  2180.   #else
  2181.   __pyx_m = PyModule_Create(&__pyx_moduledef);
  2182.   #endif
  2183.   if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  2184.   #endif
  2185.   __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  2186.   Py_INCREF(__pyx_d);
  2187.   __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  2188.   __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  2189.   #if CYTHON_COMPILING_IN_PYPY
  2190.   Py_INCREF(__pyx_b);
  2191.   #endif
  2192.   if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  2193.   /*--- Initialize various global constants etc. ---*/
  2194.   if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  2195.   #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  2196.   if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  2197.   #endif
  2198.   if (__pyx_module_is_main_exit_menu) {
  2199.     if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  2200.   }
  2201.   #if PY_MAJOR_VERSION >= 3
  2202.   {
  2203.     PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
  2204.     if (!PyDict_GetItemString(modules, "exit_menu")) {
  2205.       if (unlikely(PyDict_SetItemString(modules, "exit_menu", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  2206.     }
  2207.   }
  2208.   #endif
  2209.   /*--- Builtin init code ---*/
  2210.   if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  2211.   /*--- Constants init code ---*/
  2212.   if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  2213.   /*--- Global type/function init code ---*/
  2214.   (void)__Pyx_modinit_global_init_code();
  2215.   (void)__Pyx_modinit_variable_export_code();
  2216.   (void)__Pyx_modinit_function_export_code();
  2217.   (void)__Pyx_modinit_type_init_code();
  2218.   (void)__Pyx_modinit_type_import_code();
  2219.   (void)__Pyx_modinit_variable_import_code();
  2220.   (void)__Pyx_modinit_function_import_code();
  2221.   /*--- Execution code ---*/
  2222.   #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  2223.   if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  2224.   #endif
  2225.  
  2226.   /* "exit_menu.py":3
  2227.  * #!/usr/bin/env python
  2228.  *
  2229.  * import sys             # <<<<<<<<<<<<<<
  2230.  * import os
  2231.  * from tkinter import *
  2232.  */
  2233.   __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error)
  2234.   __Pyx_GOTREF(__pyx_t_1);
  2235.   if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
  2236.   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2237.  
  2238.   /* "exit_menu.py":4
  2239.  *
  2240.  * import sys
  2241.  * import os             # <<<<<<<<<<<<<<
  2242.  * from tkinter import *
  2243.  * def mbexit():
  2244.  */
  2245.   __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  2246.   __Pyx_GOTREF(__pyx_t_1);
  2247.   if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(0, 4, __pyx_L1_error)
  2248.   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2249.  
  2250.   /* "exit_menu.py":5
  2251.  * import sys
  2252.  * import os
  2253.  * from tkinter import *             # <<<<<<<<<<<<<<
  2254.  * def mbexit():
  2255.  *     os.system("notify-send 'Logging Out'")
  2256.  */
  2257.   __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error)
  2258.   __Pyx_GOTREF(__pyx_t_1);
  2259.   __Pyx_INCREF(__pyx_n_s_);
  2260.   __Pyx_GIVEREF(__pyx_n_s_);
  2261.   PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_);
  2262.   __pyx_t_2 = __Pyx_Import(__pyx_n_s_tkinter, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error)
  2263.   __Pyx_GOTREF(__pyx_t_2);
  2264.   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2265.   if (__pyx_import_star(__pyx_t_2) < 0) __PYX_ERR(0, 5, __pyx_L1_error);
  2266.   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  2267.  
  2268.   /* "exit_menu.py":6
  2269.  * import os
  2270.  * from tkinter import *
  2271.  * def mbexit():             # <<<<<<<<<<<<<<
  2272.  *     os.system("notify-send 'Logging Out'")
  2273.  *     os.system('sleep 0.5')
  2274.  */
  2275.   __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9exit_menu_1mbexit, 0, __pyx_n_s_mbexit, NULL, __pyx_n_s_exit_menu, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error)
  2276.   __Pyx_GOTREF(__pyx_t_2);
  2277.   if (PyDict_SetItem(__pyx_d, __pyx_n_s_mbexit, __pyx_t_2) < 0) __PYX_ERR(0, 6, __pyx_L1_error)
  2278.   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  2279.  
  2280.   /* "exit_menu.py":10
  2281.  *     os.system('sleep 0.5')
  2282.  *     os.system('urxvt')
  2283.  * def mbrestart():             # <<<<<<<<<<<<<<
  2284.  *     os.system("notify-send 'Restarting'")
  2285.  *     os.system('sleep 0.5')
  2286.  */
  2287.   __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9exit_menu_3mbrestart, 0, __pyx_n_s_mbrestart, NULL, __pyx_n_s_exit_menu, __pyx_d, ((PyObject *)__pyx_codeobj__3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error)
  2288.   __Pyx_GOTREF(__pyx_t_2);
  2289.   if (PyDict_SetItem(__pyx_d, __pyx_n_s_mbrestart, __pyx_t_2) < 0) __PYX_ERR(0, 10, __pyx_L1_error)
  2290.   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  2291.  
  2292.   /* "exit_menu.py":14
  2293.  *     os.system('sleep 0.5')
  2294.  *     os.system('urxvt')
  2295.  * def mbshutdown():             # <<<<<<<<<<<<<<
  2296.  *     os.system("notify-send 'Shutting Down'")
  2297.  *     os.system('sleep 0.5')
  2298.  */
  2299.   __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9exit_menu_5mbshutdown, 0, __pyx_n_s_mbshutdown, NULL, __pyx_n_s_exit_menu, __pyx_d, ((PyObject *)__pyx_codeobj__4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error)
  2300.   __Pyx_GOTREF(__pyx_t_2);
  2301.   if (PyDict_SetItem(__pyx_d, __pyx_n_s_mbshutdown, __pyx_t_2) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
  2302.   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  2303.  
  2304.   /* "exit_menu.py":19
  2305.  *     os.system('urxvt')
  2306.  *
  2307.  * mIcon = ''             # <<<<<<<<<<<<<<
  2308.  * mGui = Tk()
  2309.  * img = PhotoImage(file = r'/home/chris/Pictures/letter-z.gif')
  2310.  */
  2311.   if (PyDict_SetItem(__pyx_d, __pyx_n_s_mIcon, __pyx_kp_s__5) < 0) __PYX_ERR(0, 19, __pyx_L1_error)
  2312.  
  2313.   /* "exit_menu.py":20
  2314.  *
  2315.  * mIcon = ''
  2316.  * mGui = Tk()             # <<<<<<<<<<<<<<
  2317.  * img = PhotoImage(file = r'/home/chris/Pictures/letter-z.gif')
  2318.  *
  2319.  */
  2320.   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Tk); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)
  2321.   __Pyx_GOTREF(__pyx_t_2);
  2322.   __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error)
  2323.   __Pyx_GOTREF(__pyx_t_1);
  2324.   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  2325.   if (PyDict_SetItem(__pyx_d, __pyx_n_s_mGui, __pyx_t_1) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
  2326.   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2327.  
  2328.   /* "exit_menu.py":21
  2329.  * mIcon = ''
  2330.  * mGui = Tk()
  2331.  * img = PhotoImage(file = r'/home/chris/Pictures/letter-z.gif')             # <<<<<<<<<<<<<<
  2332.  *
  2333.  * mGui.geometry('450x450+600+200')
  2334.  */
  2335.   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PhotoImage); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error)
  2336.   __Pyx_GOTREF(__pyx_t_1);
  2337.   __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error)
  2338.   __Pyx_GOTREF(__pyx_t_2);
  2339.   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_file, __pyx_kp_s_home_chris_Pictures_letter_z_gi) < 0) __PYX_ERR(0, 21, __pyx_L1_error)
  2340.   __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21, __pyx_L1_error)
  2341.   __Pyx_GOTREF(__pyx_t_3);
  2342.   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2343.   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  2344.   if (PyDict_SetItem(__pyx_d, __pyx_n_s_img, __pyx_t_3) < 0) __PYX_ERR(0, 21, __pyx_L1_error)
  2345.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2346.  
  2347.   /* "exit_menu.py":23
  2348.  * img = PhotoImage(file = r'/home/chris/Pictures/letter-z.gif')
  2349.  *
  2350.  * mGui.geometry('450x450+600+200')             # <<<<<<<<<<<<<<
  2351.  * mGui.title('ZDM Logout')
  2352.  * mGui.call('wm', 'iconphoto', mGui._w, img)
  2353.  */
  2354.   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_mGui); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23, __pyx_L1_error)
  2355.   __Pyx_GOTREF(__pyx_t_3);
  2356.   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_geometry); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error)
  2357.   __Pyx_GOTREF(__pyx_t_2);
  2358.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2359.   __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23, __pyx_L1_error)
  2360.   __Pyx_GOTREF(__pyx_t_3);
  2361.   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  2362.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2363.  
  2364.   /* "exit_menu.py":24
  2365.  *
  2366.  * mGui.geometry('450x450+600+200')
  2367.  * mGui.title('ZDM Logout')             # <<<<<<<<<<<<<<
  2368.  * mGui.call('wm', 'iconphoto', mGui._w, img)
  2369.  *
  2370.  */
  2371.   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_mGui); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24, __pyx_L1_error)
  2372.   __Pyx_GOTREF(__pyx_t_3);
  2373.   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_title); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24, __pyx_L1_error)
  2374.   __Pyx_GOTREF(__pyx_t_2);
  2375.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2376.   __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24, __pyx_L1_error)
  2377.   __Pyx_GOTREF(__pyx_t_3);
  2378.   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  2379.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2380.  
  2381.   /* "exit_menu.py":25
  2382.  * mGui.geometry('450x450+600+200')
  2383.  * mGui.title('ZDM Logout')
  2384.  * mGui.call('wm', 'iconphoto', mGui._w, img)             # <<<<<<<<<<<<<<
  2385.  *
  2386.  * mbutton = Button(text='Restart', command = mbrestart).pack(fill=X, pady=85, padx=60)
  2387.  */
  2388.   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_mGui); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25, __pyx_L1_error)
  2389.   __Pyx_GOTREF(__pyx_t_3);
  2390.   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_call); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error)
  2391.   __Pyx_GOTREF(__pyx_t_2);
  2392.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2393.   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_mGui); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25, __pyx_L1_error)
  2394.   __Pyx_GOTREF(__pyx_t_3);
  2395.   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error)
  2396.   __Pyx_GOTREF(__pyx_t_1);
  2397.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2398.   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_img); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25, __pyx_L1_error)
  2399.   __Pyx_GOTREF(__pyx_t_3);
  2400.   __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 25, __pyx_L1_error)
  2401.   __Pyx_GOTREF(__pyx_t_4);
  2402.   __Pyx_INCREF(__pyx_n_s_wm);
  2403.   __Pyx_GIVEREF(__pyx_n_s_wm);
  2404.   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_wm);
  2405.   __Pyx_INCREF(__pyx_n_s_iconphoto);
  2406.   __Pyx_GIVEREF(__pyx_n_s_iconphoto);
  2407.   PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_iconphoto);
  2408.   __Pyx_GIVEREF(__pyx_t_1);
  2409.   PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_1);
  2410.   __Pyx_GIVEREF(__pyx_t_3);
  2411.   PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_3);
  2412.   __pyx_t_1 = 0;
  2413.   __pyx_t_3 = 0;
  2414.   __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25, __pyx_L1_error)
  2415.   __Pyx_GOTREF(__pyx_t_3);
  2416.   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  2417.   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  2418.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2419.  
  2420.   /* "exit_menu.py":27
  2421.  * mGui.call('wm', 'iconphoto', mGui._w, img)
  2422.  *
  2423.  * mbutton = Button(text='Restart', command = mbrestart).pack(fill=X, pady=85, padx=60)             # <<<<<<<<<<<<<<
  2424.  * mbutton = Button(text='Shutdown', command = mbshutdown).pack(fill=X, pady=10, padx=60)
  2425.  * mbutton = Button(text='Logout', command = mbexit).pack(fill=X, pady=85, padx=60)
  2426.  */
  2427.   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Button); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27, __pyx_L1_error)
  2428.   __Pyx_GOTREF(__pyx_t_3);
  2429.   __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 27, __pyx_L1_error)
  2430.   __Pyx_GOTREF(__pyx_t_4);
  2431.   if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_text, __pyx_n_s_Restart) < 0) __PYX_ERR(0, 27, __pyx_L1_error)
  2432.   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_mbrestart); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error)
  2433.   __Pyx_GOTREF(__pyx_t_2);
  2434.   if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_command, __pyx_t_2) < 0) __PYX_ERR(0, 27, __pyx_L1_error)
  2435.   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  2436.   __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error)
  2437.   __Pyx_GOTREF(__pyx_t_2);
  2438.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2439.   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  2440.   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_pack); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 27, __pyx_L1_error)
  2441.   __Pyx_GOTREF(__pyx_t_4);
  2442.   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  2443.   __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error)
  2444.   __Pyx_GOTREF(__pyx_t_2);
  2445.   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_X); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27, __pyx_L1_error)
  2446.   __Pyx_GOTREF(__pyx_t_3);
  2447.   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fill, __pyx_t_3) < 0) __PYX_ERR(0, 27, __pyx_L1_error)
  2448.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2449.   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_pady, __pyx_int_85) < 0) __PYX_ERR(0, 27, __pyx_L1_error)
  2450.   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_padx, __pyx_int_60) < 0) __PYX_ERR(0, 27, __pyx_L1_error)
  2451.   __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27, __pyx_L1_error)
  2452.   __Pyx_GOTREF(__pyx_t_3);
  2453.   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  2454.   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  2455.   if (PyDict_SetItem(__pyx_d, __pyx_n_s_mbutton, __pyx_t_3) < 0) __PYX_ERR(0, 27, __pyx_L1_error)
  2456.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2457.  
  2458.   /* "exit_menu.py":28
  2459.  *
  2460.  * mbutton = Button(text='Restart', command = mbrestart).pack(fill=X, pady=85, padx=60)
  2461.  * mbutton = Button(text='Shutdown', command = mbshutdown).pack(fill=X, pady=10, padx=60)             # <<<<<<<<<<<<<<
  2462.  * mbutton = Button(text='Logout', command = mbexit).pack(fill=X, pady=85, padx=60)
  2463.  * mGui.mainloop()
  2464.  */
  2465.   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Button); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28, __pyx_L1_error)
  2466.   __Pyx_GOTREF(__pyx_t_3);
  2467.   __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error)
  2468.   __Pyx_GOTREF(__pyx_t_2);
  2469.   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_text, __pyx_n_s_Shutdown) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
  2470.   __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_mbshutdown); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 28, __pyx_L1_error)
  2471.   __Pyx_GOTREF(__pyx_t_4);
  2472.   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_command, __pyx_t_4) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
  2473.   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  2474.   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 28, __pyx_L1_error)
  2475.   __Pyx_GOTREF(__pyx_t_4);
  2476.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2477.   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  2478.   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_pack); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error)
  2479.   __Pyx_GOTREF(__pyx_t_2);
  2480.   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  2481.   __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 28, __pyx_L1_error)
  2482.   __Pyx_GOTREF(__pyx_t_4);
  2483.   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_X); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28, __pyx_L1_error)
  2484.   __Pyx_GOTREF(__pyx_t_3);
  2485.   if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_fill, __pyx_t_3) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
  2486.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2487.   if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_pady, __pyx_int_10) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
  2488.   if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_padx, __pyx_int_60) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
  2489.   __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28, __pyx_L1_error)
  2490.   __Pyx_GOTREF(__pyx_t_3);
  2491.   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  2492.   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  2493.   if (PyDict_SetItem(__pyx_d, __pyx_n_s_mbutton, __pyx_t_3) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
  2494.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2495.  
  2496.   /* "exit_menu.py":29
  2497.  * mbutton = Button(text='Restart', command = mbrestart).pack(fill=X, pady=85, padx=60)
  2498.  * mbutton = Button(text='Shutdown', command = mbshutdown).pack(fill=X, pady=10, padx=60)
  2499.  * mbutton = Button(text='Logout', command = mbexit).pack(fill=X, pady=85, padx=60)             # <<<<<<<<<<<<<<
  2500.  * mGui.mainloop()
  2501.  */
  2502.   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Button); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error)
  2503.   __Pyx_GOTREF(__pyx_t_3);
  2504.   __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 29, __pyx_L1_error)
  2505.   __Pyx_GOTREF(__pyx_t_4);
  2506.   if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_text, __pyx_n_s_Logout) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
  2507.   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_mbexit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)
  2508.   __Pyx_GOTREF(__pyx_t_2);
  2509.   if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_command, __pyx_t_2) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
  2510.   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  2511.   __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)
  2512.   __Pyx_GOTREF(__pyx_t_2);
  2513.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2514.   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  2515.   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_pack); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 29, __pyx_L1_error)
  2516.   __Pyx_GOTREF(__pyx_t_4);
  2517.   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  2518.   __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)
  2519.   __Pyx_GOTREF(__pyx_t_2);
  2520.   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_X); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error)
  2521.   __Pyx_GOTREF(__pyx_t_3);
  2522.   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fill, __pyx_t_3) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
  2523.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2524.   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_pady, __pyx_int_85) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
  2525.   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_padx, __pyx_int_60) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
  2526.   __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error)
  2527.   __Pyx_GOTREF(__pyx_t_3);
  2528.   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  2529.   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  2530.   if (PyDict_SetItem(__pyx_d, __pyx_n_s_mbutton, __pyx_t_3) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
  2531.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2532.  
  2533.   /* "exit_menu.py":30
  2534.  * mbutton = Button(text='Shutdown', command = mbshutdown).pack(fill=X, pady=10, padx=60)
  2535.  * mbutton = Button(text='Logout', command = mbexit).pack(fill=X, pady=85, padx=60)
  2536.  * mGui.mainloop()             # <<<<<<<<<<<<<<
  2537.  */
  2538.   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_mGui); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30, __pyx_L1_error)
  2539.   __Pyx_GOTREF(__pyx_t_3);
  2540.   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_mainloop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error)
  2541.   __Pyx_GOTREF(__pyx_t_2);
  2542.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2543.   __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30, __pyx_L1_error)
  2544.   __Pyx_GOTREF(__pyx_t_3);
  2545.   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  2546.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2547.  
  2548.   /* "exit_menu.py":1
  2549.  * #!/usr/bin/env python             # <<<<<<<<<<<<<<
  2550.  *
  2551.  * import sys
  2552.  */
  2553.   __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  2554.   __Pyx_GOTREF(__pyx_t_3);
  2555.   if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_3) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  2556.   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2557.  
  2558.   /*--- Wrapped vars code ---*/
  2559.  
  2560.   goto __pyx_L0;
  2561.   __pyx_L1_error:;
  2562.   __Pyx_XDECREF(__pyx_t_1);
  2563.   __Pyx_XDECREF(__pyx_t_2);
  2564.   __Pyx_XDECREF(__pyx_t_3);
  2565.   __Pyx_XDECREF(__pyx_t_4);
  2566.   if (__pyx_m) {
  2567.     if (__pyx_d) {
  2568.       __Pyx_AddTraceback("init exit_menu", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2569.     }
  2570.     Py_CLEAR(__pyx_m);
  2571.   } else if (!PyErr_Occurred()) {
  2572.     PyErr_SetString(PyExc_ImportError, "init exit_menu");
  2573.   }
  2574.   __pyx_L0:;
  2575.   __Pyx_RefNannyFinishContext();
  2576.   #if CYTHON_PEP489_MULTI_PHASE_INIT
  2577.   return (__pyx_m != NULL) ? 0 : -1;
  2578.   #elif PY_MAJOR_VERSION >= 3
  2579.   return __pyx_m;
  2580.   #else
  2581.   return;
  2582.   #endif
  2583. }
  2584.  
  2585. /* --- Runtime support code --- */
  2586. /* Refnanny */
  2587. #if CYTHON_REFNANNY
  2588. static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
  2589.     PyObject *m = NULL, *p = NULL;
  2590.     void *r = NULL;
  2591.     m = PyImport_ImportModule(modname);
  2592.     if (!m) goto end;
  2593.     p = PyObject_GetAttrString(m, "RefNannyAPI");
  2594.     if (!p) goto end;
  2595.     r = PyLong_AsVoidPtr(p);
  2596. end:
  2597.     Py_XDECREF(p);
  2598.     Py_XDECREF(m);
  2599.     return (__Pyx_RefNannyAPIStruct *)r;
  2600. }
  2601. #endif
  2602.  
  2603. /* PyObjectGetAttrStr */
  2604. #if CYTHON_USE_TYPE_SLOTS
  2605. static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
  2606.     PyTypeObject* tp = Py_TYPE(obj);
  2607.     if (likely(tp->tp_getattro))
  2608.         return tp->tp_getattro(obj, attr_name);
  2609. #if PY_MAJOR_VERSION < 3
  2610.     if (likely(tp->tp_getattr))
  2611.         return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
  2612. #endif
  2613.     return PyObject_GetAttr(obj, attr_name);
  2614. }
  2615. #endif
  2616.  
  2617. /* GetBuiltinName */
  2618. static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
  2619.     PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
  2620.     if (unlikely(!result)) {
  2621.         PyErr_Format(PyExc_NameError,
  2622. #if PY_MAJOR_VERSION >= 3
  2623.             "name '%U' is not defined", name);
  2624. #else
  2625.             "name '%.200s' is not defined", PyString_AS_STRING(name));
  2626. #endif
  2627.     }
  2628.     return result;
  2629. }
  2630.  
  2631. /* GetModuleGlobalName */
  2632. #if CYTHON_USE_DICT_VERSIONS
  2633. static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
  2634. #else
  2635. static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
  2636. #endif
  2637. {
  2638.     PyObject *result;
  2639. #if !CYTHON_AVOID_BORROWED_REFS
  2640. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
  2641.     result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
  2642.     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
  2643.     if (likely(result)) {
  2644.         return __Pyx_NewRef(result);
  2645.     } else if (unlikely(PyErr_Occurred())) {
  2646.         return NULL;
  2647.     }
  2648. #else
  2649.     result = PyDict_GetItem(__pyx_d, name);
  2650.     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
  2651.     if (likely(result)) {
  2652.         return __Pyx_NewRef(result);
  2653.     }
  2654. #endif
  2655. #else
  2656.     result = PyObject_GetItem(__pyx_d, name);
  2657.     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
  2658.     if (likely(result)) {
  2659.         return __Pyx_NewRef(result);
  2660.     }
  2661.     PyErr_Clear();
  2662. #endif
  2663.     return __Pyx_GetBuiltinName(name);
  2664. }
  2665.  
  2666. /* PyCFunctionFastCall */
  2667. #if CYTHON_FAST_PYCCALL
  2668. static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
  2669.     PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
  2670.     PyCFunction meth = PyCFunction_GET_FUNCTION(func);
  2671.     PyObject *self = PyCFunction_GET_SELF(func);
  2672.     int flags = PyCFunction_GET_FLAGS(func);
  2673.     assert(PyCFunction_Check(func));
  2674.     assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
  2675.     assert(nargs >= 0);
  2676.     assert(nargs == 0 || args != NULL);
  2677.     /* _PyCFunction_FastCallDict() must not be called with an exception set,
  2678.        because it may clear it (directly or indirectly) and so the
  2679.        caller loses its exception */
  2680.     assert(!PyErr_Occurred());
  2681.     if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
  2682.         return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
  2683.     } else {
  2684.         return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
  2685.     }
  2686. }
  2687. #endif
  2688.  
  2689. /* PyFunctionFastCall */
  2690. #if CYTHON_FAST_PYCALL
  2691. static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
  2692.                                                PyObject *globals) {
  2693.     PyFrameObject *f;
  2694.     PyThreadState *tstate = __Pyx_PyThreadState_Current;
  2695.     PyObject **fastlocals;
  2696.     Py_ssize_t i;
  2697.     PyObject *result;
  2698.     assert(globals != NULL);
  2699.     /* XXX Perhaps we should create a specialized
  2700.        PyFrame_New() that doesn't take locals, but does
  2701.        take builtins without sanity checking them.
  2702.        */
  2703.     assert(tstate != NULL);
  2704.     f = PyFrame_New(tstate, co, globals, NULL);
  2705.     if (f == NULL) {
  2706.         return NULL;
  2707.     }
  2708.     fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
  2709.     for (i = 0; i < na; i++) {
  2710.         Py_INCREF(*args);
  2711.         fastlocals[i] = *args++;
  2712.     }
  2713.     result = PyEval_EvalFrameEx(f,0);
  2714.     ++tstate->recursion_depth;
  2715.     Py_DECREF(f);
  2716.     --tstate->recursion_depth;
  2717.     return result;
  2718. }
  2719. #if 1 || PY_VERSION_HEX < 0x030600B1
  2720. static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
  2721.     PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
  2722.     PyObject *globals = PyFunction_GET_GLOBALS(func);
  2723.     PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
  2724.     PyObject *closure;
  2725. #if PY_MAJOR_VERSION >= 3
  2726.     PyObject *kwdefs;
  2727. #endif
  2728.     PyObject *kwtuple, **k;
  2729.     PyObject **d;
  2730.     Py_ssize_t nd;
  2731.     Py_ssize_t nk;
  2732.     PyObject *result;
  2733.     assert(kwargs == NULL || PyDict_Check(kwargs));
  2734.     nk = kwargs ? PyDict_Size(kwargs) : 0;
  2735.     if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
  2736.         return NULL;
  2737.     }
  2738.     if (
  2739. #if PY_MAJOR_VERSION >= 3
  2740.             co->co_kwonlyargcount == 0 &&
  2741. #endif
  2742.             likely(kwargs == NULL || nk == 0) &&
  2743.             co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
  2744.         if (argdefs == NULL && co->co_argcount == nargs) {
  2745.             result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
  2746.             goto done;
  2747.         }
  2748.         else if (nargs == 0 && argdefs != NULL
  2749.                  && co->co_argcount == Py_SIZE(argdefs)) {
  2750.             /* function called with no arguments, but all parameters have
  2751.                a default value: use default values as arguments .*/
  2752.             args = &PyTuple_GET_ITEM(argdefs, 0);
  2753.             result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
  2754.             goto done;
  2755.         }
  2756.     }
  2757.     if (kwargs != NULL) {
  2758.         Py_ssize_t pos, i;
  2759.         kwtuple = PyTuple_New(2 * nk);
  2760.         if (kwtuple == NULL) {
  2761.             result = NULL;
  2762.             goto done;
  2763.         }
  2764.         k = &PyTuple_GET_ITEM(kwtuple, 0);
  2765.         pos = i = 0;
  2766.         while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
  2767.             Py_INCREF(k[i]);
  2768.             Py_INCREF(k[i+1]);
  2769.             i += 2;
  2770.         }
  2771.         nk = i / 2;
  2772.     }
  2773.     else {
  2774.         kwtuple = NULL;
  2775.         k = NULL;
  2776.     }
  2777.     closure = PyFunction_GET_CLOSURE(func);
  2778. #if PY_MAJOR_VERSION >= 3
  2779.     kwdefs = PyFunction_GET_KW_DEFAULTS(func);
  2780. #endif
  2781.     if (argdefs != NULL) {
  2782.         d = &PyTuple_GET_ITEM(argdefs, 0);
  2783.         nd = Py_SIZE(argdefs);
  2784.     }
  2785.     else {
  2786.         d = NULL;
  2787.         nd = 0;
  2788.     }
  2789. #if PY_MAJOR_VERSION >= 3
  2790.     result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
  2791.                                args, nargs,
  2792.                                k, (int)nk,
  2793.                                d, (int)nd, kwdefs, closure);
  2794. #else
  2795.     result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
  2796.                                args, nargs,
  2797.                                k, (int)nk,
  2798.                                d, (int)nd, closure);
  2799. #endif
  2800.     Py_XDECREF(kwtuple);
  2801. done:
  2802.     Py_LeaveRecursiveCall();
  2803.     return result;
  2804. }
  2805. #endif
  2806. #endif
  2807.  
  2808. /* PyObjectCall */
  2809. #if CYTHON_COMPILING_IN_CPYTHON
  2810. static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
  2811.     PyObject *result;
  2812.     ternaryfunc call = func->ob_type->tp_call;
  2813.     if (unlikely(!call))
  2814.         return PyObject_Call(func, arg, kw);
  2815.     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
  2816.         return NULL;
  2817.     result = (*call)(func, arg, kw);
  2818.     Py_LeaveRecursiveCall();
  2819.     if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
  2820.         PyErr_SetString(
  2821.             PyExc_SystemError,
  2822.             "NULL result without error in PyObject_Call");
  2823.     }
  2824.     return result;
  2825. }
  2826. #endif
  2827.  
  2828. /* PyObjectCall2Args */
  2829. static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
  2830.     PyObject *args, *result = NULL;
  2831.     #if CYTHON_FAST_PYCALL
  2832.     if (PyFunction_Check(function)) {
  2833.         PyObject *args[2] = {arg1, arg2};
  2834.         return __Pyx_PyFunction_FastCall(function, args, 2);
  2835.     }
  2836.     #endif
  2837.     #if CYTHON_FAST_PYCCALL
  2838.     if (__Pyx_PyFastCFunction_Check(function)) {
  2839.         PyObject *args[2] = {arg1, arg2};
  2840.         return __Pyx_PyCFunction_FastCall(function, args, 2);
  2841.     }
  2842.     #endif
  2843.     args = PyTuple_New(2);
  2844.     if (unlikely(!args)) goto done;
  2845.     Py_INCREF(arg1);
  2846.     PyTuple_SET_ITEM(args, 0, arg1);
  2847.     Py_INCREF(arg2);
  2848.     PyTuple_SET_ITEM(args, 1, arg2);
  2849.     Py_INCREF(function);
  2850.     result = __Pyx_PyObject_Call(function, args, NULL);
  2851.     Py_DECREF(args);
  2852.     Py_DECREF(function);
  2853. done:
  2854.     return result;
  2855. }
  2856.  
  2857. /* PyObjectCallMethO */
  2858. #if CYTHON_COMPILING_IN_CPYTHON
  2859. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
  2860.     PyObject *self, *result;
  2861.     PyCFunction cfunc;
  2862.     cfunc = PyCFunction_GET_FUNCTION(func);
  2863.     self = PyCFunction_GET_SELF(func);
  2864.     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
  2865.         return NULL;
  2866.     result = cfunc(self, arg);
  2867.     Py_LeaveRecursiveCall();
  2868.     if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
  2869.         PyErr_SetString(
  2870.             PyExc_SystemError,
  2871.             "NULL result without error in PyObject_Call");
  2872.     }
  2873.     return result;
  2874. }
  2875. #endif
  2876.  
  2877. /* PyObjectCallOneArg */
  2878. #if CYTHON_COMPILING_IN_CPYTHON
  2879. static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
  2880.     PyObject *result;
  2881.     PyObject *args = PyTuple_New(1);
  2882.     if (unlikely(!args)) return NULL;
  2883.     Py_INCREF(arg);
  2884.     PyTuple_SET_ITEM(args, 0, arg);
  2885.     result = __Pyx_PyObject_Call(func, args, NULL);
  2886.     Py_DECREF(args);
  2887.     return result;
  2888. }
  2889. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
  2890. #if CYTHON_FAST_PYCALL
  2891.     if (PyFunction_Check(func)) {
  2892.         return __Pyx_PyFunction_FastCall(func, &arg, 1);
  2893.     }
  2894. #endif
  2895.     if (likely(PyCFunction_Check(func))) {
  2896.         if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
  2897.             return __Pyx_PyObject_CallMethO(func, arg);
  2898. #if CYTHON_FAST_PYCCALL
  2899.         } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
  2900.             return __Pyx_PyCFunction_FastCall(func, &arg, 1);
  2901. #endif
  2902.         }
  2903.     }
  2904.     return __Pyx__PyObject_CallOneArg(func, arg);
  2905. }
  2906. #else
  2907. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
  2908.     PyObject *result;
  2909.     PyObject *args = PyTuple_Pack(1, arg);
  2910.     if (unlikely(!args)) return NULL;
  2911.     result = __Pyx_PyObject_Call(func, args, NULL);
  2912.     Py_DECREF(args);
  2913.     return result;
  2914. }
  2915. #endif
  2916.  
  2917. /* Import */
  2918. static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
  2919.     PyObject *empty_list = 0;
  2920.     PyObject *module = 0;
  2921.     PyObject *global_dict = 0;
  2922.     PyObject *empty_dict = 0;
  2923.     PyObject *list;
  2924.     #if PY_MAJOR_VERSION < 3
  2925.     PyObject *py_import;
  2926.     py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
  2927.     if (!py_import)
  2928.         goto bad;
  2929.     #endif
  2930.     if (from_list)
  2931.         list = from_list;
  2932.     else {
  2933.         empty_list = PyList_New(0);
  2934.         if (!empty_list)
  2935.             goto bad;
  2936.         list = empty_list;
  2937.     }
  2938.     global_dict = PyModule_GetDict(__pyx_m);
  2939.     if (!global_dict)
  2940.         goto bad;
  2941.     empty_dict = PyDict_New();
  2942.     if (!empty_dict)
  2943.         goto bad;
  2944.     {
  2945.         #if PY_MAJOR_VERSION >= 3
  2946.         if (level == -1) {
  2947.             if (strchr(__Pyx_MODULE_NAME, '.')) {
  2948.                 module = PyImport_ImportModuleLevelObject(
  2949.                     name, global_dict, empty_dict, list, 1);
  2950.                 if (!module) {
  2951.                     if (!PyErr_ExceptionMatches(PyExc_ImportError))
  2952.                         goto bad;
  2953.                     PyErr_Clear();
  2954.                 }
  2955.             }
  2956.             level = 0;
  2957.         }
  2958.         #endif
  2959.         if (!module) {
  2960.             #if PY_MAJOR_VERSION < 3
  2961.             PyObject *py_level = PyInt_FromLong(level);
  2962.             if (!py_level)
  2963.                 goto bad;
  2964.             module = PyObject_CallFunctionObjArgs(py_import,
  2965.                 name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
  2966.             Py_DECREF(py_level);
  2967.             #else
  2968.             module = PyImport_ImportModuleLevelObject(
  2969.                 name, global_dict, empty_dict, list, level);
  2970.             #endif
  2971.         }
  2972.     }
  2973. bad:
  2974.     #if PY_MAJOR_VERSION < 3
  2975.     Py_XDECREF(py_import);
  2976.     #endif
  2977.     Py_XDECREF(empty_list);
  2978.     Py_XDECREF(empty_dict);
  2979.     return module;
  2980. }
  2981.  
  2982. /* FetchCommonType */
  2983. static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
  2984.     PyObject* fake_module;
  2985.     PyTypeObject* cached_type = NULL;
  2986.     fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
  2987.     if (!fake_module) return NULL;
  2988.     Py_INCREF(fake_module);
  2989.     cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
  2990.     if (cached_type) {
  2991.         if (!PyType_Check((PyObject*)cached_type)) {
  2992.             PyErr_Format(PyExc_TypeError,
  2993.                 "Shared Cython type %.200s is not a type object",
  2994.                 type->tp_name);
  2995.             goto bad;
  2996.         }
  2997.         if (cached_type->tp_basicsize != type->tp_basicsize) {
  2998.             PyErr_Format(PyExc_TypeError,
  2999.                 "Shared Cython type %.200s has the wrong size, try recompiling",
  3000.                 type->tp_name);
  3001.             goto bad;
  3002.         }
  3003.     } else {
  3004.         if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
  3005.         PyErr_Clear();
  3006.         if (PyType_Ready(type) < 0) goto bad;
  3007.         if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
  3008.             goto bad;
  3009.         Py_INCREF(type);
  3010.         cached_type = type;
  3011.     }
  3012. done:
  3013.     Py_DECREF(fake_module);
  3014.     return cached_type;
  3015. bad:
  3016.     Py_XDECREF(cached_type);
  3017.     cached_type = NULL;
  3018.     goto done;
  3019. }
  3020.  
  3021. /* CythonFunction */
  3022. #include <structmember.h>
  3023. static PyObject *
  3024. __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
  3025. {
  3026.     if (unlikely(op->func_doc == NULL)) {
  3027.         if (op->func.m_ml->ml_doc) {
  3028. #if PY_MAJOR_VERSION >= 3
  3029.             op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
  3030. #else
  3031.             op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
  3032. #endif
  3033.             if (unlikely(op->func_doc == NULL))
  3034.                 return NULL;
  3035.         } else {
  3036.             Py_INCREF(Py_None);
  3037.             return Py_None;
  3038.         }
  3039.     }
  3040.     Py_INCREF(op->func_doc);
  3041.     return op->func_doc;
  3042. }
  3043. static int
  3044. __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
  3045. {
  3046.     PyObject *tmp = op->func_doc;
  3047.     if (value == NULL) {
  3048.         value = Py_None;
  3049.     }
  3050.     Py_INCREF(value);
  3051.     op->func_doc = value;
  3052.     Py_XDECREF(tmp);
  3053.     return 0;
  3054. }
  3055. static PyObject *
  3056. __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
  3057. {
  3058.     if (unlikely(op->func_name == NULL)) {
  3059. #if PY_MAJOR_VERSION >= 3
  3060.         op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
  3061. #else
  3062.         op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
  3063. #endif
  3064.         if (unlikely(op->func_name == NULL))
  3065.             return NULL;
  3066.     }
  3067.     Py_INCREF(op->func_name);
  3068.     return op->func_name;
  3069. }
  3070. static int
  3071. __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
  3072. {
  3073.     PyObject *tmp;
  3074. #if PY_MAJOR_VERSION >= 3
  3075.     if (unlikely(value == NULL || !PyUnicode_Check(value)))
  3076. #else
  3077.     if (unlikely(value == NULL || !PyString_Check(value)))
  3078. #endif
  3079.     {
  3080.         PyErr_SetString(PyExc_TypeError,
  3081.                         "__name__ must be set to a string object");
  3082.         return -1;
  3083.     }
  3084.     tmp = op->func_name;
  3085.     Py_INCREF(value);
  3086.     op->func_name = value;
  3087.     Py_XDECREF(tmp);
  3088.     return 0;
  3089. }
  3090. static PyObject *
  3091. __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
  3092. {
  3093.     Py_INCREF(op->func_qualname);
  3094.     return op->func_qualname;
  3095. }
  3096. static int
  3097. __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
  3098. {
  3099.     PyObject *tmp;
  3100. #if PY_MAJOR_VERSION >= 3
  3101.     if (unlikely(value == NULL || !PyUnicode_Check(value)))
  3102. #else
  3103.     if (unlikely(value == NULL || !PyString_Check(value)))
  3104. #endif
  3105.     {
  3106.         PyErr_SetString(PyExc_TypeError,
  3107.                         "__qualname__ must be set to a string object");
  3108.         return -1;
  3109.     }
  3110.     tmp = op->func_qualname;
  3111.     Py_INCREF(value);
  3112.     op->func_qualname = value;
  3113.     Py_XDECREF(tmp);
  3114.     return 0;
  3115. }
  3116. static PyObject *
  3117. __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
  3118. {
  3119.     PyObject *self;
  3120.     self = m->func_closure;
  3121.     if (self == NULL)
  3122.         self = Py_None;
  3123.     Py_INCREF(self);
  3124.     return self;
  3125. }
  3126. static PyObject *
  3127. __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
  3128. {
  3129.     if (unlikely(op->func_dict == NULL)) {
  3130.         op->func_dict = PyDict_New();
  3131.         if (unlikely(op->func_dict == NULL))
  3132.             return NULL;
  3133.     }
  3134.     Py_INCREF(op->func_dict);
  3135.     return op->func_dict;
  3136. }
  3137. static int
  3138. __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
  3139. {
  3140.     PyObject *tmp;
  3141.     if (unlikely(value == NULL)) {
  3142.         PyErr_SetString(PyExc_TypeError,
  3143.                "function's dictionary may not be deleted");
  3144.         return -1;
  3145.     }
  3146.     if (unlikely(!PyDict_Check(value))) {
  3147.         PyErr_SetString(PyExc_TypeError,
  3148.                "setting function's dictionary to a non-dict");
  3149.         return -1;
  3150.     }
  3151.     tmp = op->func_dict;
  3152.     Py_INCREF(value);
  3153.     op->func_dict = value;
  3154.     Py_XDECREF(tmp);
  3155.     return 0;
  3156. }
  3157. static PyObject *
  3158. __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
  3159. {
  3160.     Py_INCREF(op->func_globals);
  3161.     return op->func_globals;
  3162. }
  3163. static PyObject *
  3164. __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
  3165. {
  3166.     Py_INCREF(Py_None);
  3167.     return Py_None;
  3168. }
  3169. static PyObject *
  3170. __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
  3171. {
  3172.     PyObject* result = (op->func_code) ? op->func_code : Py_None;
  3173.     Py_INCREF(result);
  3174.     return result;
  3175. }
  3176. static int
  3177. __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
  3178.     int result = 0;
  3179.     PyObject *res = op->defaults_getter((PyObject *) op);
  3180.     if (unlikely(!res))
  3181.         return -1;
  3182.     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  3183.     op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
  3184.     Py_INCREF(op->defaults_tuple);
  3185.     op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
  3186.     Py_INCREF(op->defaults_kwdict);
  3187.     #else
  3188.     op->defaults_tuple = PySequence_ITEM(res, 0);
  3189.     if (unlikely(!op->defaults_tuple)) result = -1;
  3190.     else {
  3191.         op->defaults_kwdict = PySequence_ITEM(res, 1);
  3192.         if (unlikely(!op->defaults_kwdict)) result = -1;
  3193.     }
  3194.     #endif
  3195.     Py_DECREF(res);
  3196.     return result;
  3197. }
  3198. static int
  3199. __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
  3200.     PyObject* tmp;
  3201.     if (!value) {
  3202.         value = Py_None;
  3203.     } else if (value != Py_None && !PyTuple_Check(value)) {
  3204.         PyErr_SetString(PyExc_TypeError,
  3205.                         "__defaults__ must be set to a tuple object");
  3206.         return -1;
  3207.     }
  3208.     Py_INCREF(value);
  3209.     tmp = op->defaults_tuple;
  3210.     op->defaults_tuple = value;
  3211.     Py_XDECREF(tmp);
  3212.     return 0;
  3213. }
  3214. static PyObject *
  3215. __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
  3216.     PyObject* result = op->defaults_tuple;
  3217.     if (unlikely(!result)) {
  3218.         if (op->defaults_getter) {
  3219.             if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
  3220.             result = op->defaults_tuple;
  3221.         } else {
  3222.             result = Py_None;
  3223.         }
  3224.     }
  3225.     Py_INCREF(result);
  3226.     return result;
  3227. }
  3228. static int
  3229. __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
  3230.     PyObject* tmp;
  3231.     if (!value) {
  3232.         value = Py_None;
  3233.     } else if (value != Py_None && !PyDict_Check(value)) {
  3234.         PyErr_SetString(PyExc_TypeError,
  3235.                         "__kwdefaults__ must be set to a dict object");
  3236.         return -1;
  3237.     }
  3238.     Py_INCREF(value);
  3239.     tmp = op->defaults_kwdict;
  3240.     op->defaults_kwdict = value;
  3241.     Py_XDECREF(tmp);
  3242.     return 0;
  3243. }
  3244. static PyObject *
  3245. __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
  3246.     PyObject* result = op->defaults_kwdict;
  3247.     if (unlikely(!result)) {
  3248.         if (op->defaults_getter) {
  3249.             if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
  3250.             result = op->defaults_kwdict;
  3251.         } else {
  3252.             result = Py_None;
  3253.         }
  3254.     }
  3255.     Py_INCREF(result);
  3256.     return result;
  3257. }
  3258. static int
  3259. __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
  3260.     PyObject* tmp;
  3261.     if (!value || value == Py_None) {
  3262.         value = NULL;
  3263.     } else if (!PyDict_Check(value)) {
  3264.         PyErr_SetString(PyExc_TypeError,
  3265.                         "__annotations__ must be set to a dict object");
  3266.         return -1;
  3267.     }
  3268.     Py_XINCREF(value);
  3269.     tmp = op->func_annotations;
  3270.     op->func_annotations = value;
  3271.     Py_XDECREF(tmp);
  3272.     return 0;
  3273. }
  3274. static PyObject *
  3275. __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
  3276.     PyObject* result = op->func_annotations;
  3277.     if (unlikely(!result)) {
  3278.         result = PyDict_New();
  3279.         if (unlikely(!result)) return NULL;
  3280.         op->func_annotations = result;
  3281.     }
  3282.     Py_INCREF(result);
  3283.     return result;
  3284. }
  3285. static PyGetSetDef __pyx_CyFunction_getsets[] = {
  3286.     {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
  3287.     {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
  3288.     {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
  3289.     {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
  3290.     {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
  3291.     {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
  3292.     {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
  3293.     {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
  3294.     {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
  3295.     {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
  3296.     {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
  3297.     {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
  3298.     {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
  3299.     {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
  3300.     {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
  3301.     {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
  3302.     {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
  3303.     {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
  3304.     {0, 0, 0, 0, 0}
  3305. };
  3306. static PyMemberDef __pyx_CyFunction_members[] = {
  3307.     {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
  3308.     {0, 0, 0,  0, 0}
  3309. };
  3310. static PyObject *
  3311. __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
  3312. {
  3313. #if PY_MAJOR_VERSION >= 3
  3314.     return PyUnicode_FromString(m->func.m_ml->ml_name);
  3315. #else
  3316.     return PyString_FromString(m->func.m_ml->ml_name);
  3317. #endif
  3318. }
  3319. static PyMethodDef __pyx_CyFunction_methods[] = {
  3320.     {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
  3321.     {0, 0, 0, 0}
  3322. };
  3323. #if PY_VERSION_HEX < 0x030500A0
  3324. #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
  3325. #else
  3326. #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
  3327. #endif
  3328. static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
  3329.                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
  3330.     __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
  3331.     if (op == NULL)
  3332.         return NULL;
  3333.     op->flags = flags;
  3334.     __Pyx_CyFunction_weakreflist(op) = NULL;
  3335.     op->func.m_ml = ml;
  3336.     op->func.m_self = (PyObject *) op;
  3337.     Py_XINCREF(closure);
  3338.     op->func_closure = closure;
  3339.     Py_XINCREF(module);
  3340.     op->func.m_module = module;
  3341.     op->func_dict = NULL;
  3342.     op->func_name = NULL;
  3343.     Py_INCREF(qualname);
  3344.     op->func_qualname = qualname;
  3345.     op->func_doc = NULL;
  3346.     op->func_classobj = NULL;
  3347.     op->func_globals = globals;
  3348.     Py_INCREF(op->func_globals);
  3349.     Py_XINCREF(code);
  3350.     op->func_code = code;
  3351.     op->defaults_pyobjects = 0;
  3352.     op->defaults = NULL;
  3353.     op->defaults_tuple = NULL;
  3354.     op->defaults_kwdict = NULL;
  3355.     op->defaults_getter = NULL;
  3356.     op->func_annotations = NULL;
  3357.     PyObject_GC_Track(op);
  3358.     return (PyObject *) op;
  3359. }
  3360. static int
  3361. __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
  3362. {
  3363.     Py_CLEAR(m->func_closure);
  3364.     Py_CLEAR(m->func.m_module);
  3365.     Py_CLEAR(m->func_dict);
  3366.     Py_CLEAR(m->func_name);
  3367.     Py_CLEAR(m->func_qualname);
  3368.     Py_CLEAR(m->func_doc);
  3369.     Py_CLEAR(m->func_globals);
  3370.     Py_CLEAR(m->func_code);
  3371.     Py_CLEAR(m->func_classobj);
  3372.     Py_CLEAR(m->defaults_tuple);
  3373.     Py_CLEAR(m->defaults_kwdict);
  3374.     Py_CLEAR(m->func_annotations);
  3375.     if (m->defaults) {
  3376.         PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
  3377.         int i;
  3378.         for (i = 0; i < m->defaults_pyobjects; i++)
  3379.             Py_XDECREF(pydefaults[i]);
  3380.         PyObject_Free(m->defaults);
  3381.         m->defaults = NULL;
  3382.     }
  3383.     return 0;
  3384. }
  3385. static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
  3386. {
  3387.     if (__Pyx_CyFunction_weakreflist(m) != NULL)
  3388.         PyObject_ClearWeakRefs((PyObject *) m);
  3389.     __Pyx_CyFunction_clear(m);
  3390.     PyObject_GC_Del(m);
  3391. }
  3392. static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
  3393. {
  3394.     PyObject_GC_UnTrack(m);
  3395.     __Pyx__CyFunction_dealloc(m);
  3396. }
  3397. static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
  3398. {
  3399.     Py_VISIT(m->func_closure);
  3400.     Py_VISIT(m->func.m_module);
  3401.     Py_VISIT(m->func_dict);
  3402.     Py_VISIT(m->func_name);
  3403.     Py_VISIT(m->func_qualname);
  3404.     Py_VISIT(m->func_doc);
  3405.     Py_VISIT(m->func_globals);
  3406.     Py_VISIT(m->func_code);
  3407.     Py_VISIT(m->func_classobj);
  3408.     Py_VISIT(m->defaults_tuple);
  3409.     Py_VISIT(m->defaults_kwdict);
  3410.     if (m->defaults) {
  3411.         PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
  3412.         int i;
  3413.         for (i = 0; i < m->defaults_pyobjects; i++)
  3414.             Py_VISIT(pydefaults[i]);
  3415.     }
  3416.     return 0;
  3417. }
  3418. static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
  3419. {
  3420.     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
  3421.     if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
  3422.         Py_INCREF(func);
  3423.         return func;
  3424.     }
  3425.     if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
  3426.         if (type == NULL)
  3427.             type = (PyObject *)(Py_TYPE(obj));
  3428.         return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
  3429.     }
  3430.     if (obj == Py_None)
  3431.         obj = NULL;
  3432.     return __Pyx_PyMethod_New(func, obj, type);
  3433. }
  3434. static PyObject*
  3435. __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
  3436. {
  3437. #if PY_MAJOR_VERSION >= 3
  3438.     return PyUnicode_FromFormat("<cyfunction %U at %p>",
  3439.                                 op->func_qualname, (void *)op);
  3440. #else
  3441.     return PyString_FromFormat("<cyfunction %s at %p>",
  3442.                                PyString_AsString(op->func_qualname), (void *)op);
  3443. #endif
  3444. }
  3445. static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
  3446.     PyCFunctionObject* f = (PyCFunctionObject*)func;
  3447.     PyCFunction meth = f->m_ml->ml_meth;
  3448.     Py_ssize_t size;
  3449.     switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
  3450.     case METH_VARARGS:
  3451.         if (likely(kw == NULL || PyDict_Size(kw) == 0))
  3452.             return (*meth)(self, arg);
  3453.         break;
  3454.     case METH_VARARGS | METH_KEYWORDS:
  3455.         return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
  3456.     case METH_NOARGS:
  3457.         if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
  3458.             size = PyTuple_GET_SIZE(arg);
  3459.             if (likely(size == 0))
  3460.                 return (*meth)(self, NULL);
  3461.             PyErr_Format(PyExc_TypeError,
  3462.                 "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
  3463.                 f->m_ml->ml_name, size);
  3464.             return NULL;
  3465.         }
  3466.         break;
  3467.     case METH_O:
  3468.         if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
  3469.             size = PyTuple_GET_SIZE(arg);
  3470.             if (likely(size == 1)) {
  3471.                 PyObject *result, *arg0;
  3472.                 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  3473.                 arg0 = PyTuple_GET_ITEM(arg, 0);
  3474.                 #else
  3475.                 arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
  3476.                 #endif
  3477.                 result = (*meth)(self, arg0);
  3478.                 #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
  3479.                 Py_DECREF(arg0);
  3480.                 #endif
  3481.                 return result;
  3482.             }
  3483.             PyErr_Format(PyExc_TypeError,
  3484.                 "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
  3485.                 f->m_ml->ml_name, size);
  3486.             return NULL;
  3487.         }
  3488.         break;
  3489.     default:
  3490.         PyErr_SetString(PyExc_SystemError, "Bad call flags in "
  3491.                         "__Pyx_CyFunction_Call. METH_OLDARGS is no "
  3492.                         "longer supported!");
  3493.         return NULL;
  3494.     }
  3495.     PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
  3496.                  f->m_ml->ml_name);
  3497.     return NULL;
  3498. }
  3499. static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
  3500.     return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
  3501. }
  3502. static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
  3503.     PyObject *result;
  3504.     __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
  3505.     if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
  3506.         Py_ssize_t argc;
  3507.         PyObject *new_args;
  3508.         PyObject *self;
  3509.         argc = PyTuple_GET_SIZE(args);
  3510.         new_args = PyTuple_GetSlice(args, 1, argc);
  3511.         if (unlikely(!new_args))
  3512.             return NULL;
  3513.         self = PyTuple_GetItem(args, 0);
  3514.         if (unlikely(!self)) {
  3515.             Py_DECREF(new_args);
  3516.             return NULL;
  3517.         }
  3518.         result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
  3519.         Py_DECREF(new_args);
  3520.     } else {
  3521.         result = __Pyx_CyFunction_Call(func, args, kw);
  3522.     }
  3523.     return result;
  3524. }
  3525. static PyTypeObject __pyx_CyFunctionType_type = {
  3526.     PyVarObject_HEAD_INIT(0, 0)
  3527.     "cython_function_or_method",
  3528.     sizeof(__pyx_CyFunctionObject),
  3529.     0,
  3530.     (destructor) __Pyx_CyFunction_dealloc,
  3531.     0,
  3532.     0,
  3533.     0,
  3534. #if PY_MAJOR_VERSION < 3
  3535.     0,
  3536. #else
  3537.     0,
  3538. #endif
  3539.     (reprfunc) __Pyx_CyFunction_repr,
  3540.     0,
  3541.     0,
  3542.     0,
  3543.     0,
  3544.     __Pyx_CyFunction_CallAsMethod,
  3545.     0,
  3546.     0,
  3547.     0,
  3548.     0,
  3549.     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
  3550.     0,
  3551.     (traverseproc) __Pyx_CyFunction_traverse,
  3552.     (inquiry) __Pyx_CyFunction_clear,
  3553.     0,
  3554. #if PY_VERSION_HEX < 0x030500A0
  3555.     offsetof(__pyx_CyFunctionObject, func_weakreflist),
  3556. #else
  3557.     offsetof(PyCFunctionObject, m_weakreflist),
  3558. #endif
  3559.     0,
  3560.     0,
  3561.     __pyx_CyFunction_methods,
  3562.     __pyx_CyFunction_members,
  3563.     __pyx_CyFunction_getsets,
  3564.     0,
  3565.     0,
  3566.     __Pyx_CyFunction_descr_get,
  3567.     0,
  3568.     offsetof(__pyx_CyFunctionObject, func_dict),
  3569.     0,
  3570.     0,
  3571.     0,
  3572.     0,
  3573.     0,
  3574.     0,
  3575.     0,
  3576.     0,
  3577.     0,
  3578.     0,
  3579.     0,
  3580.     0,
  3581. #if PY_VERSION_HEX >= 0x030400a1
  3582.     0,
  3583. #endif
  3584. };
  3585. static int __pyx_CyFunction_init(void) {
  3586.     __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
  3587.     if (unlikely(__pyx_CyFunctionType == NULL)) {
  3588.         return -1;
  3589.     }
  3590.     return 0;
  3591. }
  3592. static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
  3593.     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
  3594.     m->defaults = PyObject_Malloc(size);
  3595.     if (unlikely(!m->defaults))
  3596.         return PyErr_NoMemory();
  3597.     memset(m->defaults, 0, size);
  3598.     m->defaults_pyobjects = pyobjects;
  3599.     return m->defaults;
  3600. }
  3601. static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
  3602.     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
  3603.     m->defaults_tuple = tuple;
  3604.     Py_INCREF(tuple);
  3605. }
  3606. static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
  3607.     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
  3608.     m->defaults_kwdict = dict;
  3609.     Py_INCREF(dict);
  3610. }
  3611. static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
  3612.     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
  3613.     m->func_annotations = dict;
  3614.     Py_INCREF(dict);
  3615. }
  3616.  
  3617. /* PyObjectCallNoArg */
  3618. #if CYTHON_COMPILING_IN_CPYTHON
  3619. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
  3620. #if CYTHON_FAST_PYCALL
  3621.     if (PyFunction_Check(func)) {
  3622.         return __Pyx_PyFunction_FastCall(func, NULL, 0);
  3623.     }
  3624. #endif
  3625. #ifdef __Pyx_CyFunction_USED
  3626.     if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
  3627. #else
  3628.     if (likely(PyCFunction_Check(func)))
  3629. #endif
  3630.     {
  3631.         if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
  3632.             return __Pyx_PyObject_CallMethO(func, NULL);
  3633.         }
  3634.     }
  3635.     return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
  3636. }
  3637. #endif
  3638.  
  3639. /* PyErrFetchRestore */
  3640. #if CYTHON_FAST_THREAD_STATE
  3641. static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
  3642.     PyObject *tmp_type, *tmp_value, *tmp_tb;
  3643.     tmp_type = tstate->curexc_type;
  3644.     tmp_value = tstate->curexc_value;
  3645.     tmp_tb = tstate->curexc_traceback;
  3646.     tstate->curexc_type = type;
  3647.     tstate->curexc_value = value;
  3648.     tstate->curexc_traceback = tb;
  3649.     Py_XDECREF(tmp_type);
  3650.     Py_XDECREF(tmp_value);
  3651.     Py_XDECREF(tmp_tb);
  3652. }
  3653. static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  3654.     *type = tstate->curexc_type;
  3655.     *value = tstate->curexc_value;
  3656.     *tb = tstate->curexc_traceback;
  3657.     tstate->curexc_type = 0;
  3658.     tstate->curexc_value = 0;
  3659.     tstate->curexc_traceback = 0;
  3660. }
  3661. #endif
  3662.  
  3663. /* CLineInTraceback */
  3664. #ifndef CYTHON_CLINE_IN_TRACEBACK
  3665. static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
  3666.     PyObject *use_cline;
  3667.     PyObject *ptype, *pvalue, *ptraceback;
  3668. #if CYTHON_COMPILING_IN_CPYTHON
  3669.     PyObject **cython_runtime_dict;
  3670. #endif
  3671.     if (unlikely(!__pyx_cython_runtime)) {
  3672.         return c_line;
  3673.     }
  3674.     __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
  3675. #if CYTHON_COMPILING_IN_CPYTHON
  3676.     cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
  3677.     if (likely(cython_runtime_dict)) {
  3678.         __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
  3679.             use_cline, *cython_runtime_dict,
  3680.             __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
  3681.     } else
  3682. #endif
  3683.     {
  3684.       PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
  3685.       if (use_cline_obj) {
  3686.         use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
  3687.         Py_DECREF(use_cline_obj);
  3688.       } else {
  3689.         PyErr_Clear();
  3690.         use_cline = NULL;
  3691.       }
  3692.     }
  3693.     if (!use_cline) {
  3694.         c_line = 0;
  3695.         PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
  3696.     }
  3697.     else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
  3698.         c_line = 0;
  3699.     }
  3700.     __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
  3701.     return c_line;
  3702. }
  3703. #endif
  3704.  
  3705. /* CodeObjectCache */
  3706. static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
  3707.     int start = 0, mid = 0, end = count - 1;
  3708.     if (end >= 0 && code_line > entries[end].code_line) {
  3709.         return count;
  3710.     }
  3711.     while (start < end) {
  3712.         mid = start + (end - start) / 2;
  3713.         if (code_line < entries[mid].code_line) {
  3714.             end = mid;
  3715.         } else if (code_line > entries[mid].code_line) {
  3716.              start = mid + 1;
  3717.         } else {
  3718.             return mid;
  3719.         }
  3720.     }
  3721.     if (code_line <= entries[mid].code_line) {
  3722.         return mid;
  3723.     } else {
  3724.         return mid + 1;
  3725.     }
  3726. }
  3727. static PyCodeObject *__pyx_find_code_object(int code_line) {
  3728.     PyCodeObject* code_object;
  3729.     int pos;
  3730.     if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
  3731.         return NULL;
  3732.     }
  3733.     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
  3734.     if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
  3735.         return NULL;
  3736.     }
  3737.     code_object = __pyx_code_cache.entries[pos].code_object;
  3738.     Py_INCREF(code_object);
  3739.     return code_object;
  3740. }
  3741. static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
  3742.     int pos, i;
  3743.     __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
  3744.     if (unlikely(!code_line)) {
  3745.         return;
  3746.     }
  3747.     if (unlikely(!entries)) {
  3748.         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
  3749.         if (likely(entries)) {
  3750.             __pyx_code_cache.entries = entries;
  3751.             __pyx_code_cache.max_count = 64;
  3752.             __pyx_code_cache.count = 1;
  3753.             entries[0].code_line = code_line;
  3754.             entries[0].code_object = code_object;
  3755.             Py_INCREF(code_object);
  3756.         }
  3757.         return;
  3758.     }
  3759.     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
  3760.     if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
  3761.         PyCodeObject* tmp = entries[pos].code_object;
  3762.         entries[pos].code_object = code_object;
  3763.         Py_DECREF(tmp);
  3764.         return;
  3765.     }
  3766.     if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
  3767.         int new_max = __pyx_code_cache.max_count + 64;
  3768.         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
  3769.             __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
  3770.         if (unlikely(!entries)) {
  3771.             return;
  3772.         }
  3773.         __pyx_code_cache.entries = entries;
  3774.         __pyx_code_cache.max_count = new_max;
  3775.     }
  3776.     for (i=__pyx_code_cache.count; i>pos; i--) {
  3777.         entries[i] = entries[i-1];
  3778.     }
  3779.     entries[pos].code_line = code_line;
  3780.     entries[pos].code_object = code_object;
  3781.     __pyx_code_cache.count++;
  3782.     Py_INCREF(code_object);
  3783. }
  3784.  
  3785. /* AddTraceback */
  3786. #include "compile.h"
  3787. #include "frameobject.h"
  3788. #include "traceback.h"
  3789. static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
  3790.             const char *funcname, int c_line,
  3791.             int py_line, const char *filename) {
  3792.     PyCodeObject *py_code = 0;
  3793.     PyObject *py_srcfile = 0;
  3794.     PyObject *py_funcname = 0;
  3795.     #if PY_MAJOR_VERSION < 3
  3796.     py_srcfile = PyString_FromString(filename);
  3797.     #else
  3798.     py_srcfile = PyUnicode_FromString(filename);
  3799.     #endif
  3800.     if (!py_srcfile) goto bad;
  3801.     if (c_line) {
  3802.         #if PY_MAJOR_VERSION < 3
  3803.         py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
  3804.         #else
  3805.         py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
  3806.         #endif
  3807.     }
  3808.     else {
  3809.         #if PY_MAJOR_VERSION < 3
  3810.         py_funcname = PyString_FromString(funcname);
  3811.         #else
  3812.         py_funcname = PyUnicode_FromString(funcname);
  3813.         #endif
  3814.     }
  3815.     if (!py_funcname) goto bad;
  3816.     py_code = __Pyx_PyCode_New(
  3817.         0,
  3818.         0,
  3819.         0,
  3820.         0,
  3821.         0,
  3822.         __pyx_empty_bytes, /*PyObject *code,*/
  3823.         __pyx_empty_tuple, /*PyObject *consts,*/
  3824.         __pyx_empty_tuple, /*PyObject *names,*/
  3825.         __pyx_empty_tuple, /*PyObject *varnames,*/
  3826.         __pyx_empty_tuple, /*PyObject *freevars,*/
  3827.         __pyx_empty_tuple, /*PyObject *cellvars,*/
  3828.         py_srcfile,   /*PyObject *filename,*/
  3829.         py_funcname,  /*PyObject *name,*/
  3830.         py_line,
  3831.         __pyx_empty_bytes  /*PyObject *lnotab*/
  3832.     );
  3833.     Py_DECREF(py_srcfile);
  3834.     Py_DECREF(py_funcname);
  3835.     return py_code;
  3836. bad:
  3837.     Py_XDECREF(py_srcfile);
  3838.     Py_XDECREF(py_funcname);
  3839.     return NULL;
  3840. }
  3841. static void __Pyx_AddTraceback(const char *funcname, int c_line,
  3842.                                int py_line, const char *filename) {
  3843.     PyCodeObject *py_code = 0;
  3844.     PyFrameObject *py_frame = 0;
  3845.     PyThreadState *tstate = __Pyx_PyThreadState_Current;
  3846.     if (c_line) {
  3847.         c_line = __Pyx_CLineForTraceback(tstate, c_line);
  3848.     }
  3849.     py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
  3850.     if (!py_code) {
  3851.         py_code = __Pyx_CreateCodeObjectForTraceback(
  3852.             funcname, c_line, py_line, filename);
  3853.         if (!py_code) goto bad;
  3854.         __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
  3855.     }
  3856.     py_frame = PyFrame_New(
  3857.         tstate,            /*PyThreadState *tstate,*/
  3858.         py_code,           /*PyCodeObject *code,*/
  3859.         __pyx_d,    /*PyObject *globals,*/
  3860.         0                  /*PyObject *locals*/
  3861.     );
  3862.     if (!py_frame) goto bad;
  3863.     __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
  3864.     PyTraceBack_Here(py_frame);
  3865. bad:
  3866.     Py_XDECREF(py_code);
  3867.     Py_XDECREF(py_frame);
  3868. }
  3869.  
  3870. /* None */
  3871. #ifdef __FreeBSD__
  3872. #include <floatingpoint.h>
  3873. #endif
  3874. #if PY_MAJOR_VERSION < 3
  3875. int main(int argc, char** argv) {
  3876. #elif defined(WIN32) || defined(MS_WINDOWS)
  3877. int wmain(int argc, wchar_t **argv) {
  3878. #else
  3879. static int __Pyx_main(int argc, wchar_t **argv) {
  3880. #endif
  3881.     /* 754 requires that FP exceptions run in "no stop" mode by default,
  3882.      * and until C vendors implement C99's ways to control FP exceptions,
  3883.      * Python requires non-stop mode.  Alas, some platforms enable FP
  3884.      * exceptions by default.  Here we disable them.
  3885.      */
  3886. #ifdef __FreeBSD__
  3887.     fp_except_t m;
  3888.     m = fpgetmask();
  3889.     fpsetmask(m & ~FP_X_OFL);
  3890. #endif
  3891.     if (argc && argv)
  3892.         Py_SetProgramName(argv[0]);
  3893.     Py_Initialize();
  3894.     if (argc && argv)
  3895.         PySys_SetArgv(argc, argv);
  3896.     {
  3897.       PyObject* m = NULL;
  3898.       __pyx_module_is_main_exit_menu = 1;
  3899.       #if PY_MAJOR_VERSION < 3
  3900.           initexit_menu();
  3901.       #elif CYTHON_PEP489_MULTI_PHASE_INIT
  3902.           m = PyInit_exit_menu();
  3903.           if (!PyModule_Check(m)) {
  3904.               PyModuleDef *mdef = (PyModuleDef *) m;
  3905.               PyObject *modname = PyUnicode_FromString("__main__");
  3906.               m = NULL;
  3907.               if (modname) {
  3908.                   m = PyModule_NewObject(modname);
  3909.                   Py_DECREF(modname);
  3910.                   if (m) PyModule_ExecDef(m, mdef);
  3911.               }
  3912.           }
  3913.       #else
  3914.           m = PyInit_exit_menu();
  3915.       #endif
  3916.       if (PyErr_Occurred()) {
  3917.           PyErr_Print();
  3918.           #if PY_MAJOR_VERSION < 3
  3919.           if (Py_FlushLine()) PyErr_Clear();
  3920.           #endif
  3921.           return 1;
  3922.       }
  3923.       Py_XDECREF(m);
  3924.     }
  3925.     Py_Finalize();
  3926.     return 0;
  3927. }
  3928. #if PY_MAJOR_VERSION >= 3 && !defined(WIN32) && !defined(MS_WINDOWS)
  3929. #include <locale.h>
  3930. static wchar_t*
  3931. __Pyx_char2wchar(char* arg)
  3932. {
  3933.     wchar_t *res;
  3934. #ifdef HAVE_BROKEN_MBSTOWCS
  3935.     /* Some platforms have a broken implementation of
  3936.      * mbstowcs which does not count the characters that
  3937.      * would result from conversion.  Use an upper bound.
  3938.      */
  3939.     size_t argsize = strlen(arg);
  3940. #else
  3941.     size_t argsize = mbstowcs(NULL, arg, 0);
  3942. #endif
  3943.     size_t count;
  3944.     unsigned char *in;
  3945.     wchar_t *out;
  3946. #ifdef HAVE_MBRTOWC
  3947.     mbstate_t mbs;
  3948. #endif
  3949.     if (argsize != (size_t)-1) {
  3950.         res = (wchar_t *)malloc((argsize+1)*sizeof(wchar_t));
  3951.         if (!res)
  3952.             goto oom;
  3953.         count = mbstowcs(res, arg, argsize+1);
  3954.         if (count != (size_t)-1) {
  3955.             wchar_t *tmp;
  3956.             /* Only use the result if it contains no
  3957.                surrogate characters. */
  3958.             for (tmp = res; *tmp != 0 &&
  3959.                      (*tmp < 0xd800 || *tmp > 0xdfff); tmp++)
  3960.                 ;
  3961.             if (*tmp == 0)
  3962.                 return res;
  3963.         }
  3964.         free(res);
  3965.     }
  3966. #ifdef HAVE_MBRTOWC
  3967.     /* Overallocate; as multi-byte characters are in the argument, the
  3968.        actual output could use less memory. */
  3969.     argsize = strlen(arg) + 1;
  3970.     res = (wchar_t *)malloc(argsize*sizeof(wchar_t));
  3971.     if (!res) goto oom;
  3972.     in = (unsigned char*)arg;
  3973.     out = res;
  3974.     memset(&mbs, 0, sizeof mbs);
  3975.     while (argsize) {
  3976.         size_t converted = mbrtowc(out, (char*)in, argsize, &mbs);
  3977.         if (converted == 0)
  3978.             break;
  3979.         if (converted == (size_t)-2) {
  3980.             /* Incomplete character. This should never happen,
  3981.                since we provide everything that we have -
  3982.                unless there is a bug in the C library, or I
  3983.                misunderstood how mbrtowc works. */
  3984.             fprintf(stderr, "unexpected mbrtowc result -2\\n");
  3985.             free(res);
  3986.             return NULL;
  3987.         }
  3988.         if (converted == (size_t)-1) {
  3989.             /* Conversion error. Escape as UTF-8b, and start over
  3990.                in the initial shift state. */
  3991.             *out++ = 0xdc00 + *in++;
  3992.             argsize--;
  3993.             memset(&mbs, 0, sizeof mbs);
  3994.             continue;
  3995.         }
  3996.         if (*out >= 0xd800 && *out <= 0xdfff) {
  3997.             /* Surrogate character.  Escape the original
  3998.                byte sequence with surrogateescape. */
  3999.             argsize -= converted;
  4000.             while (converted--)
  4001.                 *out++ = 0xdc00 + *in++;
  4002.             continue;
  4003.         }
  4004.         in += converted;
  4005.         argsize -= converted;
  4006.         out++;
  4007.     }
  4008. #else
  4009.     /* Cannot use C locale for escaping; manually escape as if charset
  4010.        is ASCII (i.e. escape all bytes > 128. This will still roundtrip
  4011.        correctly in the locale's charset, which must be an ASCII superset. */
  4012.     res = (wchar_t *)malloc((strlen(arg)+1)*sizeof(wchar_t));
  4013.     if (!res) goto oom;
  4014.     in = (unsigned char*)arg;
  4015.     out = res;
  4016.     while(*in)
  4017.         if(*in < 128)
  4018.             *out++ = *in++;
  4019.         else
  4020.             *out++ = 0xdc00 + *in++;
  4021.     *out = 0;
  4022. #endif
  4023.     return res;
  4024. oom:
  4025.     fprintf(stderr, "out of memory\\n");
  4026.     return NULL;
  4027. }
  4028. int
  4029. main(int argc, char **argv)
  4030. {
  4031.     if (!argc) {
  4032.         return __Pyx_main(0, NULL);
  4033.     }
  4034.     else {
  4035.         int i, res;
  4036.         wchar_t **argv_copy = (wchar_t **)malloc(sizeof(wchar_t*)*argc);
  4037.         wchar_t **argv_copy2 = (wchar_t **)malloc(sizeof(wchar_t*)*argc);
  4038.         char *oldloc = strdup(setlocale(LC_ALL, NULL));
  4039.         if (!argv_copy || !argv_copy2 || !oldloc) {
  4040.             fprintf(stderr, "out of memory\\n");
  4041.             free(argv_copy);
  4042.             free(argv_copy2);
  4043.             free(oldloc);
  4044.             return 1;
  4045.         }
  4046.         res = 0;
  4047.         setlocale(LC_ALL, "");
  4048.         for (i = 0; i < argc; i++) {
  4049.             argv_copy2[i] = argv_copy[i] = __Pyx_char2wchar(argv[i]);
  4050.             if (!argv_copy[i]) res = 1;
  4051.         }
  4052.         setlocale(LC_ALL, oldloc);
  4053.         free(oldloc);
  4054.         if (res == 0)
  4055.             res = __Pyx_main(argc, argv_copy);
  4056.         for (i = 0; i < argc; i++) {
  4057.             free(argv_copy2[i]);
  4058.         }
  4059.         free(argv_copy);
  4060.         free(argv_copy2);
  4061.         return res;
  4062.     }
  4063. }
  4064. #endif
  4065.  
  4066. /* CIntToPy */
  4067.     static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
  4068.     const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
  4069.     const int is_unsigned = neg_one > const_zero;
  4070.     if (is_unsigned) {
  4071.         if (sizeof(long) < sizeof(long)) {
  4072.             return PyInt_FromLong((long) value);
  4073.         } else if (sizeof(long) <= sizeof(unsigned long)) {
  4074.             return PyLong_FromUnsignedLong((unsigned long) value);
  4075. #ifdef HAVE_LONG_LONG
  4076.         } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
  4077.             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  4078. #endif
  4079.         }
  4080.     } else {
  4081.         if (sizeof(long) <= sizeof(long)) {
  4082.             return PyInt_FromLong((long) value);
  4083. #ifdef HAVE_LONG_LONG
  4084.         } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
  4085.             return PyLong_FromLongLong((PY_LONG_LONG) value);
  4086. #endif
  4087.         }
  4088.     }
  4089.     {
  4090.         int one = 1; int little = (int)*(unsigned char *)&one;
  4091.         unsigned char *bytes = (unsigned char *)&value;
  4092.         return _PyLong_FromByteArray(bytes, sizeof(long),
  4093.                                      little, !is_unsigned);
  4094.     }
  4095. }
  4096.  
  4097. /* CIntFromPyVerify */
  4098.     #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
  4099.     __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
  4100. #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
  4101.     __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
  4102. #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
  4103.     {\
  4104.         func_type value = func_value;\
  4105.         if (sizeof(target_type) < sizeof(func_type)) {\
  4106.             if (unlikely(value != (func_type) (target_type) value)) {\
  4107.                 func_type zero = 0;\
  4108.                 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
  4109.                     return (target_type) -1;\
  4110.                 if (is_unsigned && unlikely(value < zero))\
  4111.                     goto raise_neg_overflow;\
  4112.                 else\
  4113.                     goto raise_overflow;\
  4114.             }\
  4115.         }\
  4116.         return (target_type) value;\
  4117.     }
  4118.  
  4119. /* CIntFromPy */
  4120.     static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
  4121.     const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
  4122.     const int is_unsigned = neg_one > const_zero;
  4123. #if PY_MAJOR_VERSION < 3
  4124.     if (likely(PyInt_Check(x))) {
  4125.         if (sizeof(long) < sizeof(long)) {
  4126.             __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
  4127.         } else {
  4128.             long val = PyInt_AS_LONG(x);
  4129.             if (is_unsigned && unlikely(val < 0)) {
  4130.                 goto raise_neg_overflow;
  4131.             }
  4132.             return (long) val;
  4133.         }
  4134.     } else
  4135. #endif
  4136.     if (likely(PyLong_Check(x))) {
  4137.         if (is_unsigned) {
  4138. #if CYTHON_USE_PYLONG_INTERNALS
  4139.             const digit* digits = ((PyLongObject*)x)->ob_digit;
  4140.             switch (Py_SIZE(x)) {
  4141.                 case  0: return (long) 0;
  4142.                 case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
  4143.                 case 2:
  4144.                     if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
  4145.                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  4146.                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  4147.                         } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
  4148.                             return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
  4149.                         }
  4150.                     }
  4151.                     break;
  4152.                 case 3:
  4153.                     if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
  4154.                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  4155.                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  4156.                         } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
  4157.                             return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
  4158.                         }
  4159.                     }
  4160.                     break;
  4161.                 case 4:
  4162.                     if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
  4163.                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  4164.                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  4165.                         } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
  4166.                             return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
  4167.                         }
  4168.                     }
  4169.                     break;
  4170.             }
  4171. #endif
  4172. #if CYTHON_COMPILING_IN_CPYTHON
  4173.             if (unlikely(Py_SIZE(x) < 0)) {
  4174.                 goto raise_neg_overflow;
  4175.             }
  4176. #else
  4177.             {
  4178.                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
  4179.                 if (unlikely(result < 0))
  4180.                     return (long) -1;
  4181.                 if (unlikely(result == 1))
  4182.                     goto raise_neg_overflow;
  4183.             }
  4184. #endif
  4185.             if (sizeof(long) <= sizeof(unsigned long)) {
  4186.                 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
  4187. #ifdef HAVE_LONG_LONG
  4188.             } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
  4189.                 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
  4190. #endif
  4191.             }
  4192.         } else {
  4193. #if CYTHON_USE_PYLONG_INTERNALS
  4194.             const digit* digits = ((PyLongObject*)x)->ob_digit;
  4195.             switch (Py_SIZE(x)) {
  4196.                 case  0: return (long) 0;
  4197.                 case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
  4198.                 case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
  4199.                 case -2:
  4200.                     if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
  4201.                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  4202.                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  4203.                         } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
  4204.                             return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  4205.                         }
  4206.                     }
  4207.                     break;
  4208.                 case 2:
  4209.                     if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
  4210.                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  4211.                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  4212.                         } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
  4213.                             return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  4214.                         }
  4215.                     }
  4216.                     break;
  4217.                 case -3:
  4218.                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
  4219.                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  4220.                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  4221.                         } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
  4222.                             return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  4223.                         }
  4224.                     }
  4225.                     break;
  4226.                 case 3:
  4227.                     if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
  4228.                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  4229.                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  4230.                         } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
  4231.                             return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  4232.                         }
  4233.                     }
  4234.                     break;
  4235.                 case -4:
  4236.                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
  4237.                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  4238.                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  4239.                         } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
  4240.                             return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  4241.                         }
  4242.                     }
  4243.                     break;
  4244.                 case 4:
  4245.                     if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
  4246.                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  4247.                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  4248.                         } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
  4249.                             return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  4250.                         }
  4251.                     }
  4252.                     break;
  4253.             }
  4254. #endif
  4255.             if (sizeof(long) <= sizeof(long)) {
  4256.                 __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
  4257. #ifdef HAVE_LONG_LONG
  4258.             } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
  4259.                 __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
  4260. #endif
  4261.             }
  4262.         }
  4263.         {
  4264. #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
  4265.             PyErr_SetString(PyExc_RuntimeError,
  4266.                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
  4267. #else
  4268.             long val;
  4269.             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
  4270.  #if PY_MAJOR_VERSION < 3
  4271.             if (likely(v) && !PyLong_Check(v)) {
  4272.                 PyObject *tmp = v;
  4273.                 v = PyNumber_Long(tmp);
  4274.                 Py_DECREF(tmp);
  4275.             }
  4276.  #endif
  4277.             if (likely(v)) {
  4278.                 int one = 1; int is_little = (int)*(unsigned char *)&one;
  4279.                 unsigned char *bytes = (unsigned char *)&val;
  4280.                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
  4281.                                               bytes, sizeof(val),
  4282.                                               is_little, !is_unsigned);
  4283.                 Py_DECREF(v);
  4284.                 if (likely(!ret))
  4285.                     return val;
  4286.             }
  4287. #endif
  4288.             return (long) -1;
  4289.         }
  4290.     } else {
  4291.         long val;
  4292.         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
  4293.         if (!tmp) return (long) -1;
  4294.         val = __Pyx_PyInt_As_long(tmp);
  4295.         Py_DECREF(tmp);
  4296.         return val;
  4297.     }
  4298. raise_overflow:
  4299.     PyErr_SetString(PyExc_OverflowError,
  4300.         "value too large to convert to long");
  4301.     return (long) -1;
  4302. raise_neg_overflow:
  4303.     PyErr_SetString(PyExc_OverflowError,
  4304.         "can't convert negative value to long");
  4305.     return (long) -1;
  4306. }
  4307.  
  4308. /* CIntFromPy */
  4309.     static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
  4310.     const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
  4311.     const int is_unsigned = neg_one > const_zero;
  4312. #if PY_MAJOR_VERSION < 3
  4313.     if (likely(PyInt_Check(x))) {
  4314.         if (sizeof(int) < sizeof(long)) {
  4315.             __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
  4316.         } else {
  4317.             long val = PyInt_AS_LONG(x);
  4318.             if (is_unsigned && unlikely(val < 0)) {
  4319.                 goto raise_neg_overflow;
  4320.             }
  4321.             return (int) val;
  4322.         }
  4323.     } else
  4324. #endif
  4325.     if (likely(PyLong_Check(x))) {
  4326.         if (is_unsigned) {
  4327. #if CYTHON_USE_PYLONG_INTERNALS
  4328.             const digit* digits = ((PyLongObject*)x)->ob_digit;
  4329.             switch (Py_SIZE(x)) {
  4330.                 case  0: return (int) 0;
  4331.                 case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
  4332.                 case 2:
  4333.                     if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
  4334.                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  4335.                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  4336.                         } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
  4337.                             return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
  4338.                         }
  4339.                     }
  4340.                     break;
  4341.                 case 3:
  4342.                     if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
  4343.                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  4344.                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  4345.                         } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
  4346.                             return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
  4347.                         }
  4348.                     }
  4349.                     break;
  4350.                 case 4:
  4351.                     if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
  4352.                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  4353.                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  4354.                         } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
  4355.                             return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
  4356.                         }
  4357.                     }
  4358.                     break;
  4359.             }
  4360. #endif
  4361. #if CYTHON_COMPILING_IN_CPYTHON
  4362.             if (unlikely(Py_SIZE(x) < 0)) {
  4363.                 goto raise_neg_overflow;
  4364.             }
  4365. #else
  4366.             {
  4367.                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
  4368.                 if (unlikely(result < 0))
  4369.                     return (int) -1;
  4370.                 if (unlikely(result == 1))
  4371.                     goto raise_neg_overflow;
  4372.             }
  4373. #endif
  4374.             if (sizeof(int) <= sizeof(unsigned long)) {
  4375.                 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
  4376. #ifdef HAVE_LONG_LONG
  4377.             } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
  4378.                 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
  4379. #endif
  4380.             }
  4381.         } else {
  4382. #if CYTHON_USE_PYLONG_INTERNALS
  4383.             const digit* digits = ((PyLongObject*)x)->ob_digit;
  4384.             switch (Py_SIZE(x)) {
  4385.                 case  0: return (int) 0;
  4386.                 case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
  4387.                 case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
  4388.                 case -2:
  4389.                     if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
  4390.                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  4391.                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  4392.                         } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
  4393.                             return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  4394.                         }
  4395.                     }
  4396.                     break;
  4397.                 case 2:
  4398.                     if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
  4399.                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  4400.                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  4401.                         } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
  4402.                             return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  4403.                         }
  4404.                     }
  4405.                     break;
  4406.                 case -3:
  4407.                     if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
  4408.                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  4409.                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  4410.                         } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
  4411.                             return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  4412.                         }
  4413.                     }
  4414.                     break;
  4415.                 case 3:
  4416.                     if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
  4417.                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  4418.                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  4419.                         } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
  4420.                             return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  4421.                         }
  4422.                     }
  4423.                     break;
  4424.                 case -4:
  4425.                     if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
  4426.                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  4427.                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  4428.                         } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
  4429.                             return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  4430.                         }
  4431.                     }
  4432.                     break;
  4433.                 case 4:
  4434.                     if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
  4435.                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  4436.                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  4437.                         } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
  4438.                             return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  4439.                         }
  4440.                     }
  4441.                     break;
  4442.             }
  4443. #endif
  4444.             if (sizeof(int) <= sizeof(long)) {
  4445.                 __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
  4446. #ifdef HAVE_LONG_LONG
  4447.             } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
  4448.                 __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
  4449. #endif
  4450.             }
  4451.         }
  4452.         {
  4453. #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
  4454.             PyErr_SetString(PyExc_RuntimeError,
  4455.                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
  4456. #else
  4457.             int val;
  4458.             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
  4459.  #if PY_MAJOR_VERSION < 3
  4460.             if (likely(v) && !PyLong_Check(v)) {
  4461.                 PyObject *tmp = v;
  4462.                 v = PyNumber_Long(tmp);
  4463.                 Py_DECREF(tmp);
  4464.             }
  4465.  #endif
  4466.             if (likely(v)) {
  4467.                 int one = 1; int is_little = (int)*(unsigned char *)&one;
  4468.                 unsigned char *bytes = (unsigned char *)&val;
  4469.                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
  4470.                                               bytes, sizeof(val),
  4471.                                               is_little, !is_unsigned);
  4472.                 Py_DECREF(v);
  4473.                 if (likely(!ret))
  4474.                     return val;
  4475.             }
  4476. #endif
  4477.             return (int) -1;
  4478.         }
  4479.     } else {
  4480.         int val;
  4481.         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
  4482.         if (!tmp) return (int) -1;
  4483.         val = __Pyx_PyInt_As_int(tmp);
  4484.         Py_DECREF(tmp);
  4485.         return val;
  4486.     }
  4487. raise_overflow:
  4488.     PyErr_SetString(PyExc_OverflowError,
  4489.         "value too large to convert to int");
  4490.     return (int) -1;
  4491. raise_neg_overflow:
  4492.     PyErr_SetString(PyExc_OverflowError,
  4493.         "can't convert negative value to int");
  4494.     return (int) -1;
  4495. }
  4496.  
  4497. /* FastTypeChecks */
  4498.     #if CYTHON_COMPILING_IN_CPYTHON
  4499. static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
  4500.     while (a) {
  4501.         a = a->tp_base;
  4502.         if (a == b)
  4503.             return 1;
  4504.     }
  4505.     return b == &PyBaseObject_Type;
  4506. }
  4507. static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
  4508.     PyObject *mro;
  4509.     if (a == b) return 1;
  4510.     mro = a->tp_mro;
  4511.     if (likely(mro)) {
  4512.         Py_ssize_t i, n;
  4513.         n = PyTuple_GET_SIZE(mro);
  4514.         for (i = 0; i < n; i++) {
  4515.             if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
  4516.                 return 1;
  4517.         }
  4518.         return 0;
  4519.     }
  4520.     return __Pyx_InBases(a, b);
  4521. }
  4522. #if PY_MAJOR_VERSION == 2
  4523. static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
  4524.     PyObject *exception, *value, *tb;
  4525.     int res;
  4526.     __Pyx_PyThreadState_declare
  4527.     __Pyx_PyThreadState_assign
  4528.     __Pyx_ErrFetch(&exception, &value, &tb);
  4529.     res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
  4530.     if (unlikely(res == -1)) {
  4531.         PyErr_WriteUnraisable(err);
  4532.         res = 0;
  4533.     }
  4534.     if (!res) {
  4535.         res = PyObject_IsSubclass(err, exc_type2);
  4536.         if (unlikely(res == -1)) {
  4537.             PyErr_WriteUnraisable(err);
  4538.             res = 0;
  4539.         }
  4540.     }
  4541.     __Pyx_ErrRestore(exception, value, tb);
  4542.     return res;
  4543. }
  4544. #else
  4545. static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
  4546.     int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
  4547.     if (!res) {
  4548.         res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
  4549.     }
  4550.     return res;
  4551. }
  4552. #endif
  4553. static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
  4554.     Py_ssize_t i, n;
  4555.     assert(PyExceptionClass_Check(exc_type));
  4556.     n = PyTuple_GET_SIZE(tuple);
  4557. #if PY_MAJOR_VERSION >= 3
  4558.     for (i=0; i<n; i++) {
  4559.         if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
  4560.     }
  4561. #endif
  4562.     for (i=0; i<n; i++) {
  4563.         PyObject *t = PyTuple_GET_ITEM(tuple, i);
  4564.         #if PY_MAJOR_VERSION < 3
  4565.         if (likely(exc_type == t)) return 1;
  4566.         #endif
  4567.         if (likely(PyExceptionClass_Check(t))) {
  4568.             if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
  4569.         } else {
  4570.         }
  4571.     }
  4572.     return 0;
  4573. }
  4574. static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
  4575.     if (likely(err == exc_type)) return 1;
  4576.     if (likely(PyExceptionClass_Check(err))) {
  4577.         if (likely(PyExceptionClass_Check(exc_type))) {
  4578.             return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
  4579.         } else if (likely(PyTuple_Check(exc_type))) {
  4580.             return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
  4581.         } else {
  4582.         }
  4583.     }
  4584.     return PyErr_GivenExceptionMatches(err, exc_type);
  4585. }
  4586. static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
  4587.     assert(PyExceptionClass_Check(exc_type1));
  4588.     assert(PyExceptionClass_Check(exc_type2));
  4589.     if (likely(err == exc_type1 || err == exc_type2)) return 1;
  4590.     if (likely(PyExceptionClass_Check(err))) {
  4591.         return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
  4592.     }
  4593.     return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
  4594. }
  4595. #endif
  4596.  
  4597. /* CStringEquals */
  4598.     static CYTHON_INLINE int __Pyx_StrEq(const char *s1, const char *s2) {
  4599.     while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
  4600.     return *s1 == *s2;
  4601. }
  4602.  
  4603. /* CheckBinaryVersion */
  4604.     static int __Pyx_check_binary_version(void) {
  4605.     char ctversion[4], rtversion[4];
  4606.     PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
  4607.     PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
  4608.     if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
  4609.         char message[200];
  4610.         PyOS_snprintf(message, sizeof(message),
  4611.                       "compiletime version %s of module '%.100s' "
  4612.                       "does not match runtime version %s",
  4613.                       ctversion, __Pyx_MODULE_NAME, rtversion);
  4614.         return PyErr_WarnEx(NULL, message, 1);
  4615.     }
  4616.     return 0;
  4617. }
  4618.  
  4619. /* InitStrings */
  4620.     static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
  4621.     while (t->p) {
  4622.         #if PY_MAJOR_VERSION < 3
  4623.         if (t->is_unicode) {
  4624.             *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
  4625.         } else if (t->intern) {
  4626.             *t->p = PyString_InternFromString(t->s);
  4627.         } else {
  4628.             *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
  4629.         }
  4630.         #else
  4631.         if (t->is_unicode | t->is_str) {
  4632.             if (t->intern) {
  4633.                 *t->p = PyUnicode_InternFromString(t->s);
  4634.             } else if (t->encoding) {
  4635.                 *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
  4636.             } else {
  4637.                 *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
  4638.             }
  4639.         } else {
  4640.             *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
  4641.         }
  4642.         #endif
  4643.         if (!*t->p)
  4644.             return -1;
  4645.         if (PyObject_Hash(*t->p) == -1)
  4646.             return -1;
  4647.         ++t;
  4648.     }
  4649.     return 0;
  4650. }
  4651.  
  4652. static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
  4653.     return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
  4654. }
  4655. static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
  4656.     Py_ssize_t ignore;
  4657.     return __Pyx_PyObject_AsStringAndSize(o, &ignore);
  4658. }
  4659. #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
  4660. #if !CYTHON_PEP393_ENABLED
  4661. static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
  4662.     char* defenc_c;
  4663.     PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
  4664.     if (!defenc) return NULL;
  4665.     defenc_c = PyBytes_AS_STRING(defenc);
  4666. #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  4667.     {
  4668.         char* end = defenc_c + PyBytes_GET_SIZE(defenc);
  4669.         char* c;
  4670.         for (c = defenc_c; c < end; c++) {
  4671.             if ((unsigned char) (*c) >= 128) {
  4672.                 PyUnicode_AsASCIIString(o);
  4673.                 return NULL;
  4674.             }
  4675.         }
  4676.     }
  4677. #endif
  4678.     *length = PyBytes_GET_SIZE(defenc);
  4679.     return defenc_c;
  4680. }
  4681. #else
  4682. static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
  4683.     if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
  4684. #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  4685.     if (likely(PyUnicode_IS_ASCII(o))) {
  4686.         *length = PyUnicode_GET_LENGTH(o);
  4687.         return PyUnicode_AsUTF8(o);
  4688.     } else {
  4689.         PyUnicode_AsASCIIString(o);
  4690.         return NULL;
  4691.     }
  4692. #else
  4693.     return PyUnicode_AsUTF8AndSize(o, length);
  4694. #endif
  4695. }
  4696. #endif
  4697. #endif
  4698. static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
  4699. #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
  4700.     if (
  4701. #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  4702.             __Pyx_sys_getdefaultencoding_not_ascii &&
  4703. #endif
  4704.             PyUnicode_Check(o)) {
  4705.         return __Pyx_PyUnicode_AsStringAndSize(o, length);
  4706.     } else
  4707. #endif
  4708. #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
  4709.     if (PyByteArray_Check(o)) {
  4710.         *length = PyByteArray_GET_SIZE(o);
  4711.         return PyByteArray_AS_STRING(o);
  4712.     } else
  4713. #endif
  4714.     {
  4715.         char* result;
  4716.         int r = PyBytes_AsStringAndSize(o, &result, length);
  4717.         if (unlikely(r < 0)) {
  4718.             return NULL;
  4719.         } else {
  4720.             return result;
  4721.         }
  4722.     }
  4723. }
  4724. static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
  4725.    int is_true = x == Py_True;
  4726.    if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
  4727.    else return PyObject_IsTrue(x);
  4728. }
  4729. static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
  4730.     int retval;
  4731.     if (unlikely(!x)) return -1;
  4732.     retval = __Pyx_PyObject_IsTrue(x);
  4733.     Py_DECREF(x);
  4734.     return retval;
  4735. }
  4736. static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
  4737. #if PY_MAJOR_VERSION >= 3
  4738.     if (PyLong_Check(result)) {
  4739.         if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
  4740.                 "__int__ returned non-int (type %.200s).  "
  4741.                 "The ability to return an instance of a strict subclass of int "
  4742.                 "is deprecated, and may be removed in a future version of Python.",
  4743.                 Py_TYPE(result)->tp_name)) {
  4744.             Py_DECREF(result);
  4745.             return NULL;
  4746.         }
  4747.         return result;
  4748.     }
  4749. #endif
  4750.     PyErr_Format(PyExc_TypeError,
  4751.                  "__%.4s__ returned non-%.4s (type %.200s)",
  4752.                  type_name, type_name, Py_TYPE(result)->tp_name);
  4753.     Py_DECREF(result);
  4754.     return NULL;
  4755. }
  4756. static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
  4757. #if CYTHON_USE_TYPE_SLOTS
  4758.   PyNumberMethods *m;
  4759. #endif
  4760.   const char *name = NULL;
  4761.   PyObject *res = NULL;
  4762. #if PY_MAJOR_VERSION < 3
  4763.   if (likely(PyInt_Check(x) || PyLong_Check(x)))
  4764. #else
  4765.   if (likely(PyLong_Check(x)))
  4766. #endif
  4767.     return __Pyx_NewRef(x);
  4768. #if CYTHON_USE_TYPE_SLOTS
  4769.   m = Py_TYPE(x)->tp_as_number;
  4770.   #if PY_MAJOR_VERSION < 3
  4771.   if (m && m->nb_int) {
  4772.     name = "int";
  4773.     res = m->nb_int(x);
  4774.   }
  4775.   else if (m && m->nb_long) {
  4776.     name = "long";
  4777.     res = m->nb_long(x);
  4778.   }
  4779.   #else
  4780.   if (likely(m && m->nb_int)) {
  4781.     name = "int";
  4782.     res = m->nb_int(x);
  4783.   }
  4784.   #endif
  4785. #else
  4786.   if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
  4787.     res = PyNumber_Int(x);
  4788.   }
  4789. #endif
  4790.   if (likely(res)) {
  4791. #if PY_MAJOR_VERSION < 3
  4792.     if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
  4793. #else
  4794.     if (unlikely(!PyLong_CheckExact(res))) {
  4795. #endif
  4796.         return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
  4797.     }
  4798.   }
  4799.   else if (!PyErr_Occurred()) {
  4800.     PyErr_SetString(PyExc_TypeError,
  4801.                     "an integer is required");
  4802.   }
  4803.   return res;
  4804. }
  4805. static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  4806.   Py_ssize_t ival;
  4807.   PyObject *x;
  4808. #if PY_MAJOR_VERSION < 3
  4809.   if (likely(PyInt_CheckExact(b))) {
  4810.     if (sizeof(Py_ssize_t) >= sizeof(long))
  4811.         return PyInt_AS_LONG(b);
  4812.     else
  4813.         return PyInt_AsSsize_t(b);
  4814.   }
  4815. #endif
  4816.   if (likely(PyLong_CheckExact(b))) {
  4817.     #if CYTHON_USE_PYLONG_INTERNALS
  4818.     const digit* digits = ((PyLongObject*)b)->ob_digit;
  4819.     const Py_ssize_t size = Py_SIZE(b);
  4820.     if (likely(__Pyx_sst_abs(size) <= 1)) {
  4821.         ival = likely(size) ? digits[0] : 0;
  4822.         if (size == -1) ival = -ival;
  4823.         return ival;
  4824.     } else {
  4825.       switch (size) {
  4826.          case 2:
  4827.            if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
  4828.              return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  4829.            }
  4830.            break;
  4831.          case -2:
  4832.            if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
  4833.              return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  4834.            }
  4835.            break;
  4836.          case 3:
  4837.            if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
  4838.              return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  4839.            }
  4840.            break;
  4841.          case -3:
  4842.            if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
  4843.              return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  4844.            }
  4845.            break;
  4846.          case 4:
  4847.            if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
  4848.              return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  4849.            }
  4850.            break;
  4851.          case -4:
  4852.            if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
  4853.              return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  4854.            }
  4855.            break;
  4856.       }
  4857.     }
  4858.     #endif
  4859.     return PyLong_AsSsize_t(b);
  4860.   }
  4861.   x = PyNumber_Index(b);
  4862.   if (!x) return -1;
  4863.   ival = PyInt_AsSsize_t(x);
  4864.   Py_DECREF(x);
  4865.   return ival;
  4866. }
  4867. static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  4868.   return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
  4869. }
  4870. static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
  4871.     return PyInt_FromSize_t(ival);
  4872. }
  4873.  
  4874.  
  4875. #endif /* Py_PYTHON_H */
Advertisement
Add Comment
Please, Sign In to add comment