/* Generated by Cython 0.17.3 on Tue Jul 15 07:52:48 2014 */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02040000
    #error Cython requires Python 2.4+.
#else
#include <stddef.h> /* For offsetof */
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
#define CYTHON_COMPILING_IN_PYPY 1
#define CYTHON_COMPILING_IN_CPYTHON 0
#else
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_CPYTHON 1
#endif
#if PY_VERSION_HEX < 0x02050000
  typedef int Py_ssize_t;
  #define PY_SSIZE_T_MAX INT_MAX
  #define PY_SSIZE_T_MIN INT_MIN
  #define PY_FORMAT_SIZE_T ""
  #define CYTHON_FORMAT_SSIZE_T ""
  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
  #define PyInt_AsSsize_t(o)   __Pyx_PyInt_AsInt(o)
  #define PyNumber_Index(o)    ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \
                                (PyErr_Format(PyExc_TypeError, \
                                              "expected index value, got %.200s", Py_TYPE(o)->tp_name), \
                                 (PyObject*)0))
  #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \
                                  !PyComplex_Check(o))
  #define PyIndex_Check __Pyx_PyIndex_Check
  #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
  #define __PYX_BUILD_PY_SSIZE_T "i"
#else
  #define __PYX_BUILD_PY_SSIZE_T "n"
  #define CYTHON_FORMAT_SSIZE_T "z"
  #define __Pyx_PyIndex_Check PyIndex_Check
#endif
#if PY_VERSION_HEX < 0x02060000
  #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
  #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
  #define Py_SIZE(ob)   (((PyVarObject*)(ob))->ob_size)
  #define PyVarObject_HEAD_INIT(type, size) \
          PyObject_HEAD_INIT(type) size,
  #define PyType_Modified(t)
  typedef struct {
     void *buf;
     PyObject *obj;
     Py_ssize_t len;
     Py_ssize_t itemsize;
     int readonly;
     int ndim;
     char *format;
     Py_ssize_t *shape;
     Py_ssize_t *strides;
     Py_ssize_t *suboffsets;
     void *internal;
  } Py_buffer;
  #define PyBUF_SIMPLE 0
  #define PyBUF_WRITABLE 0x0001
  #define PyBUF_FORMAT 0x0004
  #define PyBUF_ND 0x0008
  #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
  #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
  #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
  #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
  #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
  #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE)
  #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE)
  typedef int (*getbufferproc)(PyObject *, Py_buffer *, int);
  typedef void (*releasebufferproc)(PyObject *, Py_buffer *);
#endif
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
          PyCode_New(a, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
#if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6
  #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict")
#endif
#if PY_MAJOR_VERSION >= 3
  #define Py_TPFLAGS_CHECKTYPES 0
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ? \
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
#else
  #define CYTHON_PEP393_ENABLED 0
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#endif
#if PY_VERSION_HEX < 0x02060000
  #define PyBytesObject                PyStringObject
  #define PyBytes_Type                 PyString_Type
  #define PyBytes_Check                PyString_Check
  #define PyBytes_CheckExact           PyString_CheckExact
  #define PyBytes_FromString           PyString_FromString
  #define PyBytes_FromStringAndSize    PyString_FromStringAndSize
  #define PyBytes_FromFormat           PyString_FromFormat
  #define PyBytes_DecodeEscape         PyString_DecodeEscape
  #define PyBytes_AsString             PyString_AsString
  #define PyBytes_AsStringAndSize      PyString_AsStringAndSize
  #define PyBytes_Size                 PyString_Size
  #define PyBytes_AS_STRING            PyString_AS_STRING
  #define PyBytes_GET_SIZE             PyString_GET_SIZE
  #define PyBytes_Repr                 PyString_Repr
  #define PyBytes_Concat               PyString_Concat
  #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
#endif
#if PY_VERSION_HEX < 0x02060000
  #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
  #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_VERSION_HEX < 0x03020000
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300)
  #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
  #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
#else
  #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
  #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#endif
#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),((char *)(n)))
#else
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),(n))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
#endif
#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_NAMESTR(n) ((char *)(n))
  #define __Pyx_DOCSTR(n)  ((char *)(n))
#else
  #define __Pyx_NAMESTR(n) (n)
  #define __Pyx_DOCSTR(n)  (n)
#endif


#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#if defined(WIN32) || defined(MS_WINDOWS)
#define _USE_MATH_DEFINES
#endif
#include <math.h>
#define __PYX_HAVE__cymysql__converters
#define __PYX_HAVE_API__cymysql__converters
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#ifdef PYREX_WITHOUT_ASSERTIONS
#define CYTHON_WITHOUT_ASSERTIONS
#endif


/* inline attribute */
#ifndef CYTHON_INLINE
  #if defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif

/* unused attribute */
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif

typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/


/* Type Conversion Predeclarations */

#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s)
#define __Pyx_PyBytes_AsUString(s)   ((unsigned char*) PyBytes_AsString(s))

#define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);

static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);

#if CYTHON_COMPILING_IN_CPYTHON
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))

#ifdef __GNUC__
  /* Test for GCC > 2.95 */
  #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
    #define likely(x)   __builtin_expect(!!(x), 1)
    #define unlikely(x) __builtin_expect(!!(x), 0)
  #else /* __GNUC__ > 2 ... */
    #define likely(x)   (x)
    #define unlikely(x) (x)
  #endif /* __GNUC__ > 2 ... */
#else /* __GNUC__ */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
    
static PyObject *__pyx_m;
static PyObject *__pyx_b;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;


static const char *__pyx_f[] = {
  "converters.py",
};

/*--- Type declarations ---*/
struct __pyx_obj_7cymysql_10converters___pyx_scope_struct__escape_set;
struct __pyx_defaults;
typedef struct __pyx_defaults __pyx_defaults;
struct __pyx_defaults {
  PyObject *__pyx_arg_encoders;
};

/* "cymysql/converters.py":33
 *     return "(" + ",".join(n) + ")"
 * 
 * def escape_set(val, charset):             # <<<<<<<<<<<<<<
 *     val = map(lambda x: escape_item(x, charset), val)
 *     return ','.join(val)
 */
struct __pyx_obj_7cymysql_10converters___pyx_scope_struct__escape_set {
  PyObject_HEAD
  PyObject *__pyx_v_charset;
};

#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); /*proto*/
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
          if (acquire_gil) { \
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
              PyGILState_Release(__pyx_gilstate_save); \
          } else { \
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #define __Pyx_RefNannyFinishContext() \
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif /* CYTHON_REFNANNY */
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/

static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/

static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/

static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
    const char* function_name); /*proto*/

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/

static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/

static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) {
    int result = PySequence_Contains(seq, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/

static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
#define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_List_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
        PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_Tuple_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
        PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
#define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (PyList_CheckExact(o)) {
        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if (likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {  /* inlined PySequence_GetItem() */
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (unlikely(l < 0)) return NULL;
                i += l;
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

#if PY_VERSION_HEX < 0x02050000
#ifndef PyAnySet_CheckExact
#define PyAnySet_CheckExact(ob) \
    ((ob)->ob_type == &PySet_Type || \
     (ob)->ob_type == &PyFrozenSet_Type)
#define PySet_New(iterable) \
    PyObject_CallFunctionObjArgs((PyObject *)&PySet_Type, (iterable), NULL)
#define Pyx_PyFrozenSet_New(iterable) \
    PyObject_CallFunctionObjArgs((PyObject *)&PyFrozenSet_Type, (iterable), NULL)
#define PySet_Size(anyset) \
    PyObject_Size((anyset))
#define PySet_Contains(anyset, key) \
    PySequence_Contains((anyset), (key))
#define PySet_Pop(set) \
    PyObject_CallMethod(set, (char *)"pop", NULL)
static CYTHON_INLINE int PySet_Clear(PyObject *set) {
    PyObject *ret = PyObject_CallMethod(set, (char *)"clear", NULL);
    if (!ret) return -1;
    Py_DECREF(ret); return 0;
}
static CYTHON_INLINE int PySet_Discard(PyObject *set, PyObject *key) {
    PyObject *ret = PyObject_CallMethod(set, (char *)"discard", (char *)"O", key);
    if (!ret) return -1;
    Py_DECREF(ret); return 0;
}
static CYTHON_INLINE int PySet_Add(PyObject *set, PyObject *key) {
    PyObject *ret = PyObject_CallMethod(set, (char *)"add", (char *)"O", key);
    if (!ret) return -1;
    Py_DECREF(ret); return 0;
}
#endif /* PyAnySet_CheckExact (<= Py2.4) */
#endif /* < Py2.5  */

static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */
#if CYTHON_COMPILING_IN_PYPY
#define __Pyx_PyObject_AsDouble(obj) \
(likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) : \
 likely(PyInt_CheckExact(obj)) ? \
 PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj))
#else
#define __Pyx_PyObject_AsDouble(obj) \
((likely(PyFloat_CheckExact(obj))) ? \
 PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj))
#endif

static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level); /*proto*/

static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name);

#define __Pyx_CyFunction_USED 1
#include <structmember.h>
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CyFunction_GetClosure(f) \
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#define __Pyx_CyFunction_GetClassObj(f) \
    (((__pyx_CyFunctionObject *) (f))->func_classobj)
#define __Pyx_CyFunction_Defaults(type, f) \
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g) \
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
    PyCFunctionObject func;
    int flags;
    PyObject *func_dict;
    PyObject *func_weakreflist;
    PyObject *func_name;
    PyObject *func_doc;
    PyObject *func_code;
    PyObject *func_closure;
    PyObject *func_classobj; /* No-args super() class cell */
    void *defaults;
    int defaults_pyobjects;
    PyObject *defaults_tuple; /* Const defaults tuple */
    PyObject *(*defaults_getter)(PyObject *);
} __pyx_CyFunctionObject;
static PyTypeObject *__pyx_CyFunctionType = 0;
#define __Pyx_CyFunction_NewEx(ml, flags, self, module, code) \
    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, self, module, code)
static PyObject *__Pyx_CyFunction_New(PyTypeObject *,
                                      PyMethodDef *ml, int flags,
                                      PyObject *self, PyObject *module,
                                      PyObject* code);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static int __Pyx_CyFunction_init(void);

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *);

static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);

static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);

static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);

static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);

static int __Pyx_check_binary_version(void);

typedef struct {
    int code_line;
    PyCodeObject* code_object;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);

static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename); /*proto*/

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/


/* Module declarations from 'cymysql.converters' */
static PyTypeObject *__pyx_ptype_7cymysql_10converters___pyx_scope_struct__escape_set = 0;
#define __Pyx_MODULE_NAME "cymysql.converters"
int __pyx_module_is_main_cymysql__converters = 0;

/* Implementation of 'cymysql.converters' */
static PyObject *__pyx_builtin_ImportError;
static PyObject *__pyx_builtin_map;
static PyObject *__pyx_builtin_hex;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_pf_7cymysql_10converters_escape_dict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_charset); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_2escape_sequence(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_charset); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_4escape_set(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_charset); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_6escape_bool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_8escape_object(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_10escape_float(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_match); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_12escape_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_14escape_bytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_16escape_unicode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_18escape_None(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_20escape_timedelta(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_22escape_time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_24escape_datetime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_26escape_date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_28escape_struct_time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_30escape_decimal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_32convert_datetime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_charset, PyObject *__pyx_v_field, PyObject *__pyx_v_use_unicode); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_34convert_timedelta(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_charset, CYTHON_UNUSED PyObject *__pyx_v_field, CYTHON_UNUSED PyObject *__pyx_v_use_unicode); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_36convert_time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_charset, CYTHON_UNUSED PyObject *__pyx_v_field, CYTHON_UNUSED PyObject *__pyx_v_use_unicode); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_38convert_date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_charset, CYTHON_UNUSED PyObject *__pyx_v_field, CYTHON_UNUSED PyObject *__pyx_v_use_unicode); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_40convert_mysql_timestamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_timestamp, PyObject *__pyx_v_charset, PyObject *__pyx_v_field, PyObject *__pyx_v_use_unicode); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_42convert_set(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_44convert_bit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_b, CYTHON_UNUSED PyObject *__pyx_v_charset, CYTHON_UNUSED PyObject *__pyx_v_field, CYTHON_UNUSED PyObject *__pyx_v_use_unicode); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_46convert_blob(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_charset, PyObject *__pyx_v_field, PyObject *__pyx_v_use_unicode); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_48convert_characters(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_charset, PyObject *__pyx_v_field, PyObject *__pyx_v_use_unicode); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_50convert_int(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_charset, CYTHON_UNUSED PyObject *__pyx_v_field, CYTHON_UNUSED PyObject *__pyx_v_use_unicode); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_52convert_long(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_charset, CYTHON_UNUSED PyObject *__pyx_v_field, CYTHON_UNUSED PyObject *__pyx_v_use_unicode); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_54convert_float(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_charset, CYTHON_UNUSED PyObject *__pyx_v_field, CYTHON_UNUSED PyObject *__pyx_v_use_unicode); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_56convert_decimal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_charset, CYTHON_UNUSED PyObject *__pyx_v_field, CYTHON_UNUSED PyObject *__pyx_v_use_unicode); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_60__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cymysql_10converters_58escape_item(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_charset, PyObject *__pyx_v_encoders); /* proto */
static char __pyx_k_1[] = "(";
static char __pyx_k_2[] = ",";
static char __pyx_k_3[] = ")";
static char __pyx_k_4[] = "cymysql.converters";
static char __pyx_k_5[] = "%.15g";
static char __pyx_k_7[] = "'%s'";
static char __pyx_k_8[] = "''";
static char __pyx_k_9[] = "";
static char __pyx_k_10[] = "%02d:%02d:%02d";
static char __pyx_k_11[] = ".%f";
static char __pyx_k_12[] = "%04d-%02d-%02d %02d:%02d:%02d";
static char __pyx_k_13[] = "%04d-%02d-%02d";
static char __pyx_k_14[] = " ";
static char __pyx_k_15[] = "-";
static char __pyx_k_17[] = ":";
static char __pyx_k_19[] = ".";
static char __pyx_k_26[] = "cymysql.constants";
static char __pyx_k_27[] = "cymysql.charsetx";
static char __pyx_k_28[] = "cymysql.charset";
static char __pyx_k_29[] = "[\\0\\n\\r\\032\\'\\\"\\\\]";
static char __pyx_k_31[] = "\000";
static char __pyx_k_32[] = "\\0";
static char __pyx_k_33[] = "\n";
static char __pyx_k_34[] = "\\n";
static char __pyx_k_35[] = "\r";
static char __pyx_k_36[] = "\\r";
static char __pyx_k_37[] = "\032";
static char __pyx_k_38[] = "\\Z";
static char __pyx_k_39[] = "'";
static char __pyx_k_40[] = "\\'";
static char __pyx_k_41[] = "\"";
static char __pyx_k_42[] = "\\\"";
static char __pyx_k_43[] = "\\";
static char __pyx_k_44[] = "\\\\";
static char __pyx_k_47[] = "/Users/nakagami/CyMySQL/cymysql/converters.py";
static char __pyx_k_92[] = "convert_mysql_timestamp";
static char __pyx_k__0[] = "0";
static char __pyx_k__T[] = "T";
static char __pyx_k__b[] = "b";
static char __pyx_k__c[] = "c";
static char __pyx_k__k[] = "k";
static char __pyx_k__n[] = "n";
static char __pyx_k__s[] = "s";
static char __pyx_k__v[] = "v";
static char __pyx_k__x[] = "x";
static char __pyx_k_119[] = "convert_datetime (line 90)";
static char __pyx_k_120[] = "Returns a DATETIME or TIMESTAMP column value as a datetime object:\n\n      >>> datetime_or_None('2007-02-25 23:06:20')\n      datetime.datetime(2007, 2, 25, 23, 6, 20)\n      >>> datetime_or_None('2007-02-25T23:06:20')\n      datetime.datetime(2007, 2, 25, 23, 6, 20)\n\n    Illegal values are returned as None:\n\n      >>> datetime_or_None('2007-02-31T23:06:20') is None\n      True\n      >>> datetime_or_None('0000-00-00 00:00:00') is None\n      True\n\n    ";
static char __pyx_k_121[] = "convert_timedelta (line 122)";
static char __pyx_k_122[] = "Returns a TIME column as a timedelta object:\n\n      >>> timedelta_or_None('25:06:17')\n      datetime.timedelta(1, 3977)\n      >>> timedelta_or_None('-25:06:17')\n      datetime.timedelta(-2, 83177)\n\n    Illegal values are returned as None:\n\n      >>> timedelta_or_None('random crap') is None\n      True\n\n    Note that MySQL always returns TIME columns as (+|-)HH:MM:SS, but\n    can accept values as (+|-)DD HH:MM:SS. The latter format will not\n    be parsed correctly by this function.\n    ";
static char __pyx_k_123[] = "convert_time (line 158)";
static char __pyx_k_124[] = "Returns a TIME column as a time object:\n\n      >>> time_or_None('15:06:17')\n      datetime.time(15, 6, 17)\n\n    Illegal values are returned as None:\n\n      >>> time_or_None('-25:06:17') is None\n      True\n      >>> time_or_None('random crap') is None\n      True\n\n    Note that MySQL always returns TIME columns as (+|-)HH:MM:SS, but\n    can accept values as (+|-)DD HH:MM:SS. The latter format will not\n    be parsed correctly by this function.\n\n    Also note that MySQL's TIME column corresponds more closely to\n    Python's timedelta and not time. However if you want TIME columns\n    to be treated as time-of-day and not a time offset, then you can\n    use set this function as the converter for FIELD_TYPE.TIME.\n    ";
static char __pyx_k_125[] = "convert_date (line 191)";
static char __pyx_k_126[] = "Returns a DATE column as a date object:\n\n      >>> date_or_None('2007-02-26')\n      datetime.date(2007, 2, 26)\n\n    Illegal values are returned as None:\n\n      >>> date_or_None('2007-02-31') is None\n      True\n      >>> date_or_None('0000-00-00') is None\n      True\n\n    ";
static char __pyx_k_127[] = "convert_mysql_timestamp (line 213)";
static char __pyx_k_128[] = "Convert a MySQL TIMESTAMP to a Timestamp object.\n\n    MySQL >= 4.1 returns TIMESTAMP in the same format as DATETIME:\n\n      >>> mysql_timestamp_converter('2007-02-25 22:32:17')\n      datetime.datetime(2007, 2, 25, 22, 32, 17)\n\n    MySQL < 4.1 uses a big string of numbers:\n\n      >>> mysql_timestamp_converter('20070225223217')\n      datetime.datetime(2007, 2, 25, 22, 32, 17)\n\n    Illegal values are returned as None:\n\n      >>> mysql_timestamp_converter('2007-02-31 22:32:17') is None\n      True\n      >>> mysql_timestamp_converter('00000000000000') is None\n      True\n\n    ";
static char __pyx_k__0x[] = "0x";
static char __pyx_k__re[] = "re";
static char __pyx_k__BIT[] = "BIT";
static char __pyx_k__SET[] = "SET";
static char __pyx_k__day[] = "day";
static char __pyx_k__get[] = "get";
static char __pyx_k__hex[] = "hex";
static char __pyx_k__hms[] = "hms";
static char __pyx_k__map[] = "map";
static char __pyx_k__obj[] = "obj";
static char __pyx_k__sep[] = "sep";
static char __pyx_k__sub[] = "sub";
static char __pyx_k__sys[] = "sys";
static char __pyx_k__val[] = "val";
static char __pyx_k__ymd[] = "ymd";
static char __pyx_k__BLOB[] = "BLOB";
static char __pyx_k__DATE[] = "DATE";
static char __pyx_k__FLAG[] = "FLAG";
static char __pyx_k__LONG[] = "LONG";
static char __pyx_k__NULL[] = "NULL";
static char __pyx_k__TIME[] = "TIME";
static char __pyx_k__TINY[] = "TINY";
static char __pyx_k__YEAR[] = "YEAR";
static char __pyx_k__data[] = "data";
static char __pyx_k__date[] = "date";
static char __pyx_k__days[] = "days";
static char __pyx_k__hour[] = "hour";
static char __pyx_k__item[] = "item";
static char __pyx_k__join[] = "join";
static char __pyx_k__name[] = "name";
static char __pyx_k__tail[] = "tail";
static char __pyx_k__time[] = "time";
static char __pyx_k__year[] = "year";
static char __pyx_k__FLOAT[] = "FLOAT";
static char __pyx_k__INT24[] = "INT24";
static char __pyx_k__SHORT[] = "SHORT";
static char __pyx_k__ascii[] = "ascii";
static char __pyx_k__field[] = "field";
static char __pyx_k__flags[] = "flags";
static char __pyx_k__group[] = "group";
static char __pyx_k__hours[] = "hours";
static char __pyx_k__items[] = "items";
static char __pyx_k__month[] = "month";
static char __pyx_k__split[] = "split";
static char __pyx_k__value[] = "value";
static char __pyx_k__BINARY[] = "BINARY";
static char __pyx_k__DOUBLE[] = "DOUBLE";
static char __pyx_k__STRING[] = "STRING";
static char __pyx_k__binary[] = "binary";
static char __pyx_k__decode[] = "decode";
static char __pyx_k__encode[] = "encode";
static char __pyx_k__minute[] = "minute";
static char __pyx_k__quoted[] = "quoted";
static char __pyx_k__second[] = "second";
static char __pyx_k__tdelta[] = "tdelta";
static char __pyx_k__DECIMAL[] = "DECIMAL";
static char __pyx_k__Decimal[] = "Decimal";
static char __pyx_k__PYTHON3[] = "PYTHON3";
static char __pyx_k__VARCHAR[] = "VARCHAR";
static char __pyx_k__charset[] = "charset";
static char __pyx_k__compile[] = "compile";
static char __pyx_k__decimal[] = "decimal";
static char __pyx_k__encoder[] = "encoder";
static char __pyx_k__minutes[] = "minutes";
static char __pyx_k__seconds[] = "seconds";
static char __pyx_k__DATETIME[] = "DATETIME";
static char __pyx_k__LONGLONG[] = "LONGLONG";
static char __pyx_k____main__[] = "__main__";
static char __pyx_k____test__[] = "__test__";
static char __pyx_k__datetime[] = "datetime";
static char __pyx_k__decoders[] = "decoders";
static char __pyx_k__encoders[] = "encoders";
static char __pyx_k__LONG_BLOB[] = "LONG_BLOB";
static char __pyx_k__TIMESTAMP[] = "TIMESTAMP";
static char __pyx_k__TINY_BLOB[] = "TINY_BLOB";
static char __pyx_k__charsetnr[] = "charsetnr";
static char __pyx_k__timedelta[] = "timedelta";
static char __pyx_k__timestamp[] = "timestamp";
static char __pyx_k__ESCAPE_MAP[] = "ESCAPE_MAP";
static char __pyx_k__FIELD_TYPE[] = "FIELD_TYPE";
static char __pyx_k__NEWDECIMAL[] = "NEWDECIMAL";
static char __pyx_k__VAR_STRING[] = "VAR_STRING";
static char __pyx_k__ValueError[] = "ValueError";
static char __pyx_k__escape_int[] = "escape_int";
static char __pyx_k__escape_set[] = "escape_set";
static char __pyx_k__ImportError[] = "ImportError";
static char __pyx_k__MEDIUM_BLOB[] = "MEDIUM_BLOB";
static char __pyx_k__convert_bit[] = "convert_bit";
static char __pyx_k__convert_int[] = "convert_int";
static char __pyx_k__convert_set[] = "convert_set";
static char __pyx_k__escape_None[] = "escape_None";
static char __pyx_k__escape_bool[] = "escape_bool";
static char __pyx_k__escape_date[] = "escape_date";
static char __pyx_k__escape_dict[] = "escape_dict";
static char __pyx_k__escape_item[] = "escape_item";
static char __pyx_k__escape_long[] = "escape_long";
static char __pyx_k__escape_time[] = "escape_time";
static char __pyx_k__microsecond[] = "microsecond";
static char __pyx_k__struct_time[] = "struct_time";
static char __pyx_k__use_unicode[] = "use_unicode";
static char __pyx_k__ESCAPE_REGEX[] = "ESCAPE_REGEX";
static char __pyx_k__convert_blob[] = "convert_blob";
static char __pyx_k__convert_date[] = "convert_date";
static char __pyx_k__convert_long[] = "convert_long";
static char __pyx_k__convert_time[] = "convert_time";
static char __pyx_k__escape_bytes[] = "escape_bytes";
static char __pyx_k__escape_float[] = "escape_float";
static char __pyx_k__microseconds[] = "microseconds";
static char __pyx_k__version_info[] = "version_info";
static char __pyx_k__charset_by_id[] = "charset_by_id";
static char __pyx_k__convert_float[] = "convert_float";
static char __pyx_k__escape_object[] = "escape_object";
static char __pyx_k__escape_string[] = "escape_string";
static char __pyx_k__field_charset[] = "field_charset";
static char __pyx_k__escape_decimal[] = "escape_decimal";
static char __pyx_k__escape_unicode[] = "escape_unicode";
static char __pyx_k__convert_decimal[] = "convert_decimal";
static char __pyx_k__escape_datetime[] = "escape_datetime";
static char __pyx_k__escape_sequence[] = "escape_sequence";
static char __pyx_k__convert_datetime[] = "convert_datetime";
static char __pyx_k__escape_timedelta[] = "escape_timedelta";
static char __pyx_k__convert_timedelta[] = "convert_timedelta";
static char __pyx_k__convert_characters[] = "convert_characters";
static char __pyx_k__escape_struct_time[] = "escape_struct_time";
static PyObject *__pyx_kp_s_1;
static PyObject *__pyx_kp_s_10;
static PyObject *__pyx_kp_s_11;
static PyObject *__pyx_kp_u_119;
static PyObject *__pyx_kp_s_12;
static PyObject *__pyx_kp_u_120;
static PyObject *__pyx_kp_u_121;
static PyObject *__pyx_kp_u_122;
static PyObject *__pyx_kp_u_123;
static PyObject *__pyx_kp_u_124;
static PyObject *__pyx_kp_u_125;
static PyObject *__pyx_kp_u_126;
static PyObject *__pyx_kp_u_127;
static PyObject *__pyx_kp_u_128;
static PyObject *__pyx_kp_s_13;
static PyObject *__pyx_kp_s_14;
static PyObject *__pyx_kp_s_15;
static PyObject *__pyx_kp_s_17;
static PyObject *__pyx_kp_s_19;
static PyObject *__pyx_kp_s_2;
static PyObject *__pyx_n_s_26;
static PyObject *__pyx_n_s_27;
static PyObject *__pyx_n_s_28;
static PyObject *__pyx_kp_s_29;
static PyObject *__pyx_kp_s_3;
static PyObject *__pyx_kp_s_31;
static PyObject *__pyx_kp_s_32;
static PyObject *__pyx_kp_s_33;
static PyObject *__pyx_kp_s_34;
static PyObject *__pyx_kp_s_35;
static PyObject *__pyx_kp_s_36;
static PyObject *__pyx_kp_s_37;
static PyObject *__pyx_kp_s_38;
static PyObject *__pyx_kp_s_39;
static PyObject *__pyx_n_s_4;
static PyObject *__pyx_kp_s_40;
static PyObject *__pyx_kp_s_41;
static PyObject *__pyx_kp_s_42;
static PyObject *__pyx_kp_s_43;
static PyObject *__pyx_kp_s_44;
static PyObject *__pyx_kp_s_47;
static PyObject *__pyx_kp_s_5;
static PyObject *__pyx_kp_s_7;
static PyObject *__pyx_kp_s_8;
static PyObject *__pyx_kp_s_9;
static PyObject *__pyx_n_s_92;
static PyObject *__pyx_kp_s__0;
static PyObject *__pyx_kp_s__0x;
static PyObject *__pyx_n_s__BINARY;
static PyObject *__pyx_n_s__BIT;
static PyObject *__pyx_n_s__BLOB;
static PyObject *__pyx_n_s__DATE;
static PyObject *__pyx_n_s__DATETIME;
static PyObject *__pyx_n_s__DECIMAL;
static PyObject *__pyx_n_s__DOUBLE;
static PyObject *__pyx_n_s__Decimal;
static PyObject *__pyx_n_s__ESCAPE_MAP;
static PyObject *__pyx_n_s__ESCAPE_REGEX;
static PyObject *__pyx_n_s__FIELD_TYPE;
static PyObject *__pyx_n_s__FLAG;
static PyObject *__pyx_n_s__FLOAT;
static PyObject *__pyx_n_s__INT24;
static PyObject *__pyx_n_s__ImportError;
static PyObject *__pyx_n_s__LONG;
static PyObject *__pyx_n_s__LONGLONG;
static PyObject *__pyx_n_s__LONG_BLOB;
static PyObject *__pyx_n_s__MEDIUM_BLOB;
static PyObject *__pyx_n_s__NEWDECIMAL;
static PyObject *__pyx_n_s__NULL;
static PyObject *__pyx_n_s__PYTHON3;
static PyObject *__pyx_n_s__SET;
static PyObject *__pyx_n_s__SHORT;
static PyObject *__pyx_n_s__STRING;
static PyObject *__pyx_n_s__T;
static PyObject *__pyx_n_s__TIME;
static PyObject *__pyx_n_s__TIMESTAMP;
static PyObject *__pyx_n_s__TINY;
static PyObject *__pyx_n_s__TINY_BLOB;
static PyObject *__pyx_n_s__VARCHAR;
static PyObject *__pyx_n_s__VAR_STRING;
static PyObject *__pyx_n_s__ValueError;
static PyObject *__pyx_n_s__YEAR;
static PyObject *__pyx_n_s____main__;
static PyObject *__pyx_n_s____test__;
static PyObject *__pyx_n_s__ascii;
static PyObject *__pyx_n_s__b;
static PyObject *__pyx_n_s__binary;
static PyObject *__pyx_n_s__c;
static PyObject *__pyx_n_s__charset;
static PyObject *__pyx_n_s__charset_by_id;
static PyObject *__pyx_n_s__charsetnr;
static PyObject *__pyx_n_s__compile;
static PyObject *__pyx_n_s__convert_bit;
static PyObject *__pyx_n_s__convert_blob;
static PyObject *__pyx_n_s__convert_characters;
static PyObject *__pyx_n_s__convert_date;
static PyObject *__pyx_n_s__convert_datetime;
static PyObject *__pyx_n_s__convert_decimal;
static PyObject *__pyx_n_s__convert_float;
static PyObject *__pyx_n_s__convert_int;
static PyObject *__pyx_n_s__convert_long;
static PyObject *__pyx_n_s__convert_set;
static PyObject *__pyx_n_s__convert_time;
static PyObject *__pyx_n_s__convert_timedelta;
static PyObject *__pyx_n_s__data;
static PyObject *__pyx_n_s__date;
static PyObject *__pyx_n_s__datetime;
static PyObject *__pyx_n_s__day;
static PyObject *__pyx_n_s__days;
static PyObject *__pyx_n_s__decimal;
static PyObject *__pyx_n_s__decode;
static PyObject *__pyx_n_s__decoders;
static PyObject *__pyx_n_s__encode;
static PyObject *__pyx_n_s__encoder;
static PyObject *__pyx_n_s__encoders;
static PyObject *__pyx_n_s__escape_None;
static PyObject *__pyx_n_s__escape_bool;
static PyObject *__pyx_n_s__escape_bytes;
static PyObject *__pyx_n_s__escape_date;
static PyObject *__pyx_n_s__escape_datetime;
static PyObject *__pyx_n_s__escape_decimal;
static PyObject *__pyx_n_s__escape_dict;
static PyObject *__pyx_n_s__escape_float;
static PyObject *__pyx_n_s__escape_int;
static PyObject *__pyx_n_s__escape_item;
static PyObject *__pyx_n_s__escape_long;
static PyObject *__pyx_n_s__escape_object;
static PyObject *__pyx_n_s__escape_sequence;
static PyObject *__pyx_n_s__escape_set;
static PyObject *__pyx_n_s__escape_string;
static PyObject *__pyx_n_s__escape_struct_time;
static PyObject *__pyx_n_s__escape_time;
static PyObject *__pyx_n_s__escape_timedelta;
static PyObject *__pyx_n_s__escape_unicode;
static PyObject *__pyx_n_s__field;
static PyObject *__pyx_n_s__field_charset;
static PyObject *__pyx_n_s__flags;
static PyObject *__pyx_n_s__get;
static PyObject *__pyx_n_s__group;
static PyObject *__pyx_n_s__hex;
static PyObject *__pyx_n_s__hms;
static PyObject *__pyx_n_s__hour;
static PyObject *__pyx_n_s__hours;
static PyObject *__pyx_n_s__item;
static PyObject *__pyx_n_s__items;
static PyObject *__pyx_n_s__join;
static PyObject *__pyx_n_s__k;
static PyObject *__pyx_n_s__map;
static PyObject *__pyx_n_s__microsecond;
static PyObject *__pyx_n_s__microseconds;
static PyObject *__pyx_n_s__minute;
static PyObject *__pyx_n_s__minutes;
static PyObject *__pyx_n_s__month;
static PyObject *__pyx_n_s__n;
static PyObject *__pyx_n_s__name;
static PyObject *__pyx_n_s__obj;
static PyObject *__pyx_n_s__quoted;
static PyObject *__pyx_n_s__re;
static PyObject *__pyx_n_s__s;
static PyObject *__pyx_n_s__second;
static PyObject *__pyx_n_s__seconds;
static PyObject *__pyx_n_s__sep;
static PyObject *__pyx_n_s__split;
static PyObject *__pyx_n_s__struct_time;
static PyObject *__pyx_n_s__sub;
static PyObject *__pyx_n_s__sys;
static PyObject *__pyx_n_s__tail;
static PyObject *__pyx_n_s__tdelta;
static PyObject *__pyx_n_s__time;
static PyObject *__pyx_n_s__timedelta;
static PyObject *__pyx_n_s__timestamp;
static PyObject *__pyx_n_s__use_unicode;
static PyObject *__pyx_n_s__v;
static PyObject *__pyx_n_s__val;
static PyObject *__pyx_n_s__value;
static PyObject *__pyx_n_s__version_info;
static PyObject *__pyx_n_s__x;
static PyObject *__pyx_n_s__year;
static PyObject *__pyx_n_s__ymd;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_24;
static PyObject *__pyx_int_60;
static PyObject *__pyx_int_3600;
static PyObject *__pyx_k_tuple_6;
static PyObject *__pyx_k_tuple_16;
static PyObject *__pyx_k_tuple_18;
static PyObject *__pyx_k_tuple_20;
static PyObject *__pyx_k_tuple_21;
static PyObject *__pyx_k_tuple_22;
static PyObject *__pyx_k_tuple_23;
static PyObject *__pyx_k_tuple_24;
static PyObject *__pyx_k_tuple_25;
static PyObject *__pyx_k_tuple_30;
static PyObject *__pyx_k_tuple_45;
static PyObject *__pyx_k_tuple_48;
static PyObject *__pyx_k_tuple_50;
static PyObject *__pyx_k_tuple_52;
static PyObject *__pyx_k_tuple_54;
static PyObject *__pyx_k_tuple_56;
static PyObject *__pyx_k_tuple_58;
static PyObject *__pyx_k_tuple_60;
static PyObject *__pyx_k_tuple_62;
static PyObject *__pyx_k_tuple_64;
static PyObject *__pyx_k_tuple_66;
static PyObject *__pyx_k_tuple_68;
static PyObject *__pyx_k_tuple_70;
static PyObject *__pyx_k_tuple_72;
static PyObject *__pyx_k_tuple_74;
static PyObject *__pyx_k_tuple_76;
static PyObject *__pyx_k_tuple_78;
static PyObject *__pyx_k_tuple_80;
static PyObject *__pyx_k_tuple_81;
static PyObject *__pyx_k_tuple_83;
static PyObject *__pyx_k_tuple_84;
static PyObject *__pyx_k_tuple_86;
static PyObject *__pyx_k_tuple_87;
static PyObject *__pyx_k_tuple_89;
static PyObject *__pyx_k_tuple_90;
static PyObject *__pyx_k_tuple_93;
static PyObject *__pyx_k_tuple_94;
static PyObject *__pyx_k_tuple_96;
static PyObject *__pyx_k_tuple_98;
static PyObject *__pyx_k_tuple_99;
static PyObject *__pyx_k_tuple_101;
static PyObject *__pyx_k_tuple_102;
static PyObject *__pyx_k_tuple_104;
static PyObject *__pyx_k_tuple_105;
static PyObject *__pyx_k_tuple_107;
static PyObject *__pyx_k_tuple_108;
static PyObject *__pyx_k_tuple_110;
static PyObject *__pyx_k_tuple_111;
static PyObject *__pyx_k_tuple_113;
static PyObject *__pyx_k_tuple_114;
static PyObject *__pyx_k_tuple_116;
static PyObject *__pyx_k_tuple_117;
static PyObject *__pyx_k_codeobj_46;
static PyObject *__pyx_k_codeobj_49;
static PyObject *__pyx_k_codeobj_51;
static PyObject *__pyx_k_codeobj_53;
static PyObject *__pyx_k_codeobj_55;
static PyObject *__pyx_k_codeobj_57;
static PyObject *__pyx_k_codeobj_59;
static PyObject *__pyx_k_codeobj_61;
static PyObject *__pyx_k_codeobj_63;
static PyObject *__pyx_k_codeobj_65;
static PyObject *__pyx_k_codeobj_67;
static PyObject *__pyx_k_codeobj_69;
static PyObject *__pyx_k_codeobj_71;
static PyObject *__pyx_k_codeobj_73;
static PyObject *__pyx_k_codeobj_75;
static PyObject *__pyx_k_codeobj_77;
static PyObject *__pyx_k_codeobj_79;
static PyObject *__pyx_k_codeobj_82;
static PyObject *__pyx_k_codeobj_85;
static PyObject *__pyx_k_codeobj_88;
static PyObject *__pyx_k_codeobj_91;
static PyObject *__pyx_k_codeobj_95;
static PyObject *__pyx_k_codeobj_97;
static PyObject *__pyx_k_codeobj_100;
static PyObject *__pyx_k_codeobj_103;
static PyObject *__pyx_k_codeobj_106;
static PyObject *__pyx_k_codeobj_109;
static PyObject *__pyx_k_codeobj_112;
static PyObject *__pyx_k_codeobj_115;
static PyObject *__pyx_k_codeobj_118;

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_1escape_dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7cymysql_10converters_1escape_dict = {__Pyx_NAMESTR("escape_dict"), (PyCFunction)__pyx_pw_7cymysql_10converters_1escape_dict, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7cymysql_10converters_1escape_dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_v_charset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("escape_dict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__val,&__pyx_n_s__charset,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__val)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__charset)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("escape_dict", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "escape_dict") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_val = values[0];
    __pyx_v_charset = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("escape_dict", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cymysql.converters.escape_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cymysql_10converters_escape_dict(__pyx_self, __pyx_v_val, __pyx_v_charset);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cymysql/converters.py":19
 *               '\'': '\\\'', '"': '\\"', '\\': '\\\\'}
 * 
 * def escape_dict(val, charset):             # <<<<<<<<<<<<<<
 *     n = {}
 *     for k, v in val.items():
 */

static PyObject *__pyx_pf_7cymysql_10converters_escape_dict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_charset) {
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_v_quoted = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("escape_dict", 0);

  /* "cymysql/converters.py":20
 * 
 * def escape_dict(val, charset):
 *     n = {}             # <<<<<<<<<<<<<<
 *     for k, v in val.items():
 *         quoted = escape_item(v, charset)
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_n = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cymysql/converters.py":21
 * def escape_dict(val, charset):
 *     n = {}
 *     for k, v in val.items():             # <<<<<<<<<<<<<<
 *         quoted = escape_item(v, charset)
 *         n[k] = quoted
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__items); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF(__pyx_v_k);
    __pyx_v_k = __pyx_t_5;
    __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_v_v);
    __pyx_v_v = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "cymysql/converters.py":22
 *     n = {}
 *     for k, v in val.items():
 *         quoted = escape_item(v, charset)             # <<<<<<<<<<<<<<
 *         n[k] = quoted
 *     return n
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_item); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_v);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_v);
    __Pyx_GIVEREF(__pyx_v_v);
    __Pyx_INCREF(__pyx_v_charset);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_charset);
    __Pyx_GIVEREF(__pyx_v_charset);
    __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_v_quoted);
    __pyx_v_quoted = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cymysql/converters.py":23
 *     for k, v in val.items():
 *         quoted = escape_item(v, charset)
 *         n[k] = quoted             # <<<<<<<<<<<<<<
 *     return n
 * 
 */
    if (PyDict_SetItem(((PyObject *)__pyx_v_n), __pyx_v_k, __pyx_v_quoted) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":24
 *         quoted = escape_item(v, charset)
 *         n[k] = quoted
 *     return n             # <<<<<<<<<<<<<<
 * 
 * def escape_sequence(val, charset):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_n));
  __pyx_r = ((PyObject *)__pyx_v_n);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cymysql.converters.escape_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XDECREF(__pyx_v_quoted);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_3escape_sequence(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7cymysql_10converters_3escape_sequence = {__Pyx_NAMESTR("escape_sequence"), (PyCFunction)__pyx_pw_7cymysql_10converters_3escape_sequence, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7cymysql_10converters_3escape_sequence(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_v_charset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("escape_sequence (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__val,&__pyx_n_s__charset,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__val)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__charset)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("escape_sequence", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "escape_sequence") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_val = values[0];
    __pyx_v_charset = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("escape_sequence", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cymysql.converters.escape_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cymysql_10converters_2escape_sequence(__pyx_self, __pyx_v_val, __pyx_v_charset);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cymysql/converters.py":26
 *     return n
 * 
 * def escape_sequence(val, charset):             # <<<<<<<<<<<<<<
 *     n = []
 *     for item in val:
 */

static PyObject *__pyx_pf_7cymysql_10converters_2escape_sequence(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_charset) {
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_item = NULL;
  PyObject *__pyx_v_quoted = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("escape_sequence", 0);

  /* "cymysql/converters.py":27
 * 
 * def escape_sequence(val, charset):
 *     n = []             # <<<<<<<<<<<<<<
 *     for item in val:
 *         quoted = escape_item(item, charset)
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_n = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cymysql/converters.py":28
 * def escape_sequence(val, charset):
 *     n = []
 *     for item in val:             # <<<<<<<<<<<<<<
 *         quoted = escape_item(item, charset)
 *         n.append(quoted)
 */
  if (PyList_CheckExact(__pyx_v_val) || PyTuple_CheckExact(__pyx_v_val)) {
    __pyx_t_1 = __pyx_v_val; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF(__pyx_v_item);
    __pyx_v_item = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "cymysql/converters.py":29
 *     n = []
 *     for item in val:
 *         quoted = escape_item(item, charset)             # <<<<<<<<<<<<<<
 *         n.append(quoted)
 *     return "(" + ",".join(n) + ")"
 */
    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_item); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_item);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_item);
    __Pyx_GIVEREF(__pyx_v_item);
    __Pyx_INCREF(__pyx_v_charset);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_charset);
    __Pyx_GIVEREF(__pyx_v_charset);
    __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_v_quoted);
    __pyx_v_quoted = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "cymysql/converters.py":30
 *     for item in val:
 *         quoted = escape_item(item, charset)
 *         n.append(quoted)             # <<<<<<<<<<<<<<
 *     return "(" + ",".join(n) + ")"
 * 
 */
    __pyx_t_7 = PyList_Append(__pyx_v_n, __pyx_v_quoted); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":31
 *         quoted = escape_item(item, charset)
 *         n.append(quoted)
 *     return "(" + ",".join(n) + ")"             # <<<<<<<<<<<<<<
 * 
 * def escape_set(val, charset):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_2), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(((PyObject *)__pyx_v_n));
  PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_n));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_n));
  __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  __pyx_t_6 = PyNumber_Add(((PyObject *)__pyx_kp_s_1), __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(__pyx_t_6, ((PyObject *)__pyx_kp_s_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cymysql.converters.escape_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XDECREF(__pyx_v_quoted);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_5escape_set(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7cymysql_10converters_5escape_set = {__Pyx_NAMESTR("escape_set"), (PyCFunction)__pyx_pw_7cymysql_10converters_5escape_set, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7cymysql_10converters_5escape_set(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_v_charset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("escape_set (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__val,&__pyx_n_s__charset,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__val)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__charset)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("escape_set", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "escape_set") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_val = values[0];
    __pyx_v_charset = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("escape_set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cymysql.converters.escape_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cymysql_10converters_4escape_set(__pyx_self, __pyx_v_val, __pyx_v_charset);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_10escape_set_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/
static PyMethodDef __pyx_mdef_7cymysql_10converters_10escape_set_lambda1 = {__Pyx_NAMESTR("lambda1"), (PyCFunction)__pyx_pw_7cymysql_10converters_10escape_set_lambda1, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7cymysql_10converters_10escape_set_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self, ((PyObject *)__pyx_v_x));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cymysql/converters.py":34
 * 
 * def escape_set(val, charset):
 *     val = map(lambda x: escape_item(x, charset), val)             # <<<<<<<<<<<<<<
 *     return ','.join(val)
 * 
 */

static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_x) {
  struct __pyx_obj_7cymysql_10converters___pyx_scope_struct__escape_set *__pyx_cur_scope;
  struct __pyx_obj_7cymysql_10converters___pyx_scope_struct__escape_set *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda1", 0);
  __pyx_outer_scope = (struct __pyx_obj_7cymysql_10converters___pyx_scope_struct__escape_set *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_charset)) { __Pyx_RaiseClosureNameError("charset"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_x);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_x);
  __Pyx_GIVEREF(__pyx_v_x);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_charset);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_cur_scope->__pyx_v_charset);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_charset);
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cymysql.converters.escape_set.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cymysql/converters.py":33
 *     return "(" + ",".join(n) + ")"
 * 
 * def escape_set(val, charset):             # <<<<<<<<<<<<<<
 *     val = map(lambda x: escape_item(x, charset), val)
 *     return ','.join(val)
 */

static PyObject *__pyx_pf_7cymysql_10converters_4escape_set(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_charset) {
  struct __pyx_obj_7cymysql_10converters___pyx_scope_struct__escape_set *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("escape_set", 0);
  __pyx_cur_scope = (struct __pyx_obj_7cymysql_10converters___pyx_scope_struct__escape_set *)__pyx_ptype_7cymysql_10converters___pyx_scope_struct__escape_set->tp_new(__pyx_ptype_7cymysql_10converters___pyx_scope_struct__escape_set, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_charset = __pyx_v_charset;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_charset);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_charset);
  __Pyx_INCREF(__pyx_v_val);

  /* "cymysql/converters.py":34
 * 
 * def escape_set(val, charset):
 *     val = map(lambda x: escape_item(x, charset), val)             # <<<<<<<<<<<<<<
 *     return ','.join(val)
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_10escape_set_lambda1, 0, ((PyObject*)__pyx_cur_scope), __pyx_n_s_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_val);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_val);
  __Pyx_GIVEREF(__pyx_v_val);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_v_val);
  __pyx_v_val = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cymysql/converters.py":35
 * def escape_set(val, charset):
 *     val = map(lambda x: escape_item(x, charset), val)
 *     return ','.join(val)             # <<<<<<<<<<<<<<
 * 
 * def escape_bool(value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_2), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_val);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val);
  __Pyx_GIVEREF(__pyx_v_val);
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cymysql.converters.escape_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_7escape_bool(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_7cymysql_10converters_7escape_bool = {__Pyx_NAMESTR("escape_bool"), (PyCFunction)__pyx_pw_7cymysql_10converters_7escape_bool, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7cymysql_10converters_7escape_bool(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("escape_bool (wrapper)", 0);
  __pyx_r = __pyx_pf_7cymysql_10converters_6escape_bool(__pyx_self, ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cymysql/converters.py":37
 *     return ','.join(val)
 * 
 * def escape_bool(value):             # <<<<<<<<<<<<<<
 *     return str(int(value))
 * 
 */

static PyObject *__pyx_pf_7cymysql_10converters_6escape_bool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("escape_bool", 0);

  /* "cymysql/converters.py":38
 * 
 * def escape_bool(value):
 *     return str(int(value))             # <<<<<<<<<<<<<<
 * 
 * def escape_object(value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cymysql.converters.escape_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_9escape_object(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_7cymysql_10converters_9escape_object = {__Pyx_NAMESTR("escape_object"), (PyCFunction)__pyx_pw_7cymysql_10converters_9escape_object, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7cymysql_10converters_9escape_object(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("escape_object (wrapper)", 0);
  __pyx_r = __pyx_pf_7cymysql_10converters_8escape_object(__pyx_self, ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cymysql/converters.py":40
 *     return str(int(value))
 * 
 * def escape_object(value):             # <<<<<<<<<<<<<<
 *     return str(value)
 * 
 */

static PyObject *__pyx_pf_7cymysql_10converters_8escape_object(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("escape_object", 0);

  /* "cymysql/converters.py":41
 * 
 * def escape_object(value):
 *     return str(value)             # <<<<<<<<<<<<<<
 * 
 * escape_int = escape_long = escape_object
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cymysql.converters.escape_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_11escape_float(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_7cymysql_10converters_11escape_float = {__Pyx_NAMESTR("escape_float"), (PyCFunction)__pyx_pw_7cymysql_10converters_11escape_float, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7cymysql_10converters_11escape_float(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("escape_float (wrapper)", 0);
  __pyx_r = __pyx_pf_7cymysql_10converters_10escape_float(__pyx_self, ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cymysql/converters.py":45
 * escape_int = escape_long = escape_object
 * 
 * def escape_float(value):             # <<<<<<<<<<<<<<
 *     return ('%.15g' % value)
 * 
 */

static PyObject *__pyx_pf_7cymysql_10converters_10escape_float(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("escape_float", 0);

  /* "cymysql/converters.py":46
 * 
 * def escape_float(value):
 *     return ('%.15g' % value)             # <<<<<<<<<<<<<<
 * 
 * def escape_string(value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_5), __pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cymysql.converters.escape_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_13escape_string(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_7cymysql_10converters_13escape_string = {__Pyx_NAMESTR("escape_string"), (PyCFunction)__pyx_pw_7cymysql_10converters_13escape_string, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7cymysql_10converters_13escape_string(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("escape_string (wrapper)", 0);
  __pyx_r = __pyx_pf_7cymysql_10converters_12escape_string(__pyx_self, ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_13escape_string_lambda2(PyObject *__pyx_self, PyObject *__pyx_v_match); /*proto*/
static PyMethodDef __pyx_mdef_7cymysql_10converters_13escape_string_lambda2 = {__Pyx_NAMESTR("lambda2"), (PyCFunction)__pyx_pw_7cymysql_10converters_13escape_string_lambda2, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7cymysql_10converters_13escape_string_lambda2(PyObject *__pyx_self, PyObject *__pyx_v_match) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda2(__pyx_self, ((PyObject *)__pyx_v_match));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cymysql/converters.py":50
 * def escape_string(value):
 *     return ("'%s'" % ESCAPE_REGEX.sub(
 *             lambda match: ESCAPE_MAP.get(match.group(0)), value))             # <<<<<<<<<<<<<<
 * 
 * def escape_bytes(value):
 */

static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_match) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda2", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__ESCAPE_MAP); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__get); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_match, __pyx_n_s__group); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cymysql.converters.escape_string.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cymysql/converters.py":48
 *     return ('%.15g' % value)
 * 
 * def escape_string(value):             # <<<<<<<<<<<<<<
 *     return ("'%s'" % ESCAPE_REGEX.sub(
 *             lambda match: ESCAPE_MAP.get(match.group(0)), value))
 */

static PyObject *__pyx_pf_7cymysql_10converters_12escape_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("escape_string", 0);

  /* "cymysql/converters.py":49
 * 
 * def escape_string(value):
 *     return ("'%s'" % ESCAPE_REGEX.sub(             # <<<<<<<<<<<<<<
 *             lambda match: ESCAPE_MAP.get(match.group(0)), value))
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__ESCAPE_REGEX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__sub); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":50
 * def escape_string(value):
 *     return ("'%s'" % ESCAPE_REGEX.sub(
 *             lambda match: ESCAPE_MAP.get(match.group(0)), value))             # <<<<<<<<<<<<<<
 * 
 * def escape_bytes(value):
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_13escape_string_lambda2, 0, NULL, __pyx_n_s_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_7), __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cymysql.converters.escape_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_15escape_bytes(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_7cymysql_10converters_15escape_bytes = {__Pyx_NAMESTR("escape_bytes"), (PyCFunction)__pyx_pw_7cymysql_10converters_15escape_bytes, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7cymysql_10converters_15escape_bytes(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("escape_bytes (wrapper)", 0);
  __pyx_r = __pyx_pf_7cymysql_10converters_14escape_bytes(__pyx_self, ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cymysql/converters.py":52
 *             lambda match: ESCAPE_MAP.get(match.group(0)), value))
 * 
 * def escape_bytes(value):             # <<<<<<<<<<<<<<
 *     if len(value)==0:
 *         return "''"
 */

static PyObject *__pyx_pf_7cymysql_10converters_14escape_bytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("escape_bytes", 0);

  /* "cymysql/converters.py":53
 * 
 * def escape_bytes(value):
 *     if len(value)==0:             # <<<<<<<<<<<<<<
 *         return "''"
 *     return '0x' + ''.join([('0'+hex(c)[2:])[-2:] for c in value])
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = (__pyx_t_1 == 0);
  if (__pyx_t_2) {

    /* "cymysql/converters.py":54
 * def escape_bytes(value):
 *     if len(value)==0:
 *         return "''"             # <<<<<<<<<<<<<<
 *     return '0x' + ''.join([('0'+hex(c)[2:])[-2:] for c in value])
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_8));
    __pyx_r = ((PyObject *)__pyx_kp_s_8);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cymysql/converters.py":55
 *     if len(value)==0:
 *         return "''"
 *     return '0x' + ''.join([('0'+hex(c)[2:])[-2:] for c in value])             # <<<<<<<<<<<<<<
 * 
 * def escape_unicode(value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_9), __pyx_n_s__join); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyList_CheckExact(__pyx_v_value) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_5 = __pyx_v_value; __Pyx_INCREF(__pyx_t_5); __pyx_t_1 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_1 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_5)) {
      if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_7 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_1); __Pyx_INCREF(__pyx_t_7); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_5, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_5)) {
      if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_1); __Pyx_INCREF(__pyx_t_7); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_5, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_7 = __pyx_t_6(__pyx_t_5);
      if (unlikely(!__pyx_t_7)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_XDECREF(__pyx_v_c);
    __pyx_v_c = __pyx_t_7;
    __pyx_t_7 = 0;
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_c);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_c);
    __Pyx_GIVEREF(__pyx_v_c);
    __pyx_t_8 = PyObject_Call(__pyx_builtin_hex, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PySequence_GetSlice(__pyx_t_8, 2, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyNumber_Add(((PyObject *)__pyx_kp_s__0), __pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PySequence_GetSlice(__pyx_t_8, -2, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(__Pyx_PyList_Append(__pyx_t_4, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_t_4));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(((PyObject *)__pyx_kp_s__0x), __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cymysql.converters.escape_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_17escape_unicode(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_7cymysql_10converters_17escape_unicode = {__Pyx_NAMESTR("escape_unicode"), (PyCFunction)__pyx_pw_7cymysql_10converters_17escape_unicode, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7cymysql_10converters_17escape_unicode(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("escape_unicode (wrapper)", 0);
  __pyx_r = __pyx_pf_7cymysql_10converters_16escape_unicode(__pyx_self, ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cymysql/converters.py":57
 *     return '0x' + ''.join([('0'+hex(c)[2:])[-2:] for c in value])
 * 
 * def escape_unicode(value):             # <<<<<<<<<<<<<<
 *     return escape_string(value)
 * 
 */

static PyObject *__pyx_pf_7cymysql_10converters_16escape_unicode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("escape_unicode", 0);

  /* "cymysql/converters.py":58
 * 
 * def escape_unicode(value):
 *     return escape_string(value)             # <<<<<<<<<<<<<<
 * 
 * def escape_None(value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_string); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cymysql.converters.escape_unicode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_19escape_None(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_7cymysql_10converters_19escape_None = {__Pyx_NAMESTR("escape_None"), (PyCFunction)__pyx_pw_7cymysql_10converters_19escape_None, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7cymysql_10converters_19escape_None(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("escape_None (wrapper)", 0);
  __pyx_r = __pyx_pf_7cymysql_10converters_18escape_None(__pyx_self, ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cymysql/converters.py":60
 *     return escape_string(value)
 * 
 * def escape_None(value):             # <<<<<<<<<<<<<<
 *     return 'NULL'
 * 
 */

static PyObject *__pyx_pf_7cymysql_10converters_18escape_None(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("escape_None", 0);

  /* "cymysql/converters.py":61
 * 
 * def escape_None(value):
 *     return 'NULL'             # <<<<<<<<<<<<<<
 * 
 * def escape_timedelta(obj):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__NULL));
  __pyx_r = ((PyObject *)__pyx_n_s__NULL);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_21escape_timedelta(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
static PyMethodDef __pyx_mdef_7cymysql_10converters_21escape_timedelta = {__Pyx_NAMESTR("escape_timedelta"), (PyCFunction)__pyx_pw_7cymysql_10converters_21escape_timedelta, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7cymysql_10converters_21escape_timedelta(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("escape_timedelta (wrapper)", 0);
  __pyx_r = __pyx_pf_7cymysql_10converters_20escape_timedelta(__pyx_self, ((PyObject *)__pyx_v_obj));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cymysql/converters.py":63
 *     return 'NULL'
 * 
 * def escape_timedelta(obj):             # <<<<<<<<<<<<<<
 *     seconds = int(obj.seconds) % 60
 *     minutes = int(obj.seconds // 60) % 60
 */

static PyObject *__pyx_pf_7cymysql_10converters_20escape_timedelta(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_v_seconds = NULL;
  PyObject *__pyx_v_minutes = NULL;
  PyObject *__pyx_v_hours = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("escape_timedelta", 0);

  /* "cymysql/converters.py":64
 * 
 * def escape_timedelta(obj):
 *     seconds = int(obj.seconds) % 60             # <<<<<<<<<<<<<<
 *     minutes = int(obj.seconds // 60) % 60
 *     hours = int(obj.seconds // 3600) % 24 + int(obj.days) * 24
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__seconds); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Remainder(__pyx_t_1, __pyx_int_60); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_seconds = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cymysql/converters.py":65
 * def escape_timedelta(obj):
 *     seconds = int(obj.seconds) % 60
 *     minutes = int(obj.seconds // 60) % 60             # <<<<<<<<<<<<<<
 *     hours = int(obj.seconds // 3600) % 24 + int(obj.days) * 24
 *     return escape_string('%02d:%02d:%02d' % (hours, minutes, seconds))
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__seconds); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyNumber_FloorDivide(__pyx_t_2, __pyx_int_60); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Remainder(__pyx_t_1, __pyx_int_60); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_minutes = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cymysql/converters.py":66
 *     seconds = int(obj.seconds) % 60
 *     minutes = int(obj.seconds // 60) % 60
 *     hours = int(obj.seconds // 3600) % 24 + int(obj.days) * 24             # <<<<<<<<<<<<<<
 *     return escape_string('%02d:%02d:%02d' % (hours, minutes, seconds))
 * 
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__seconds); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyNumber_FloorDivide(__pyx_t_2, __pyx_int_3600); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Remainder(__pyx_t_1, __pyx_int_24); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__days); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_int_24); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_hours = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cymysql/converters.py":67
 *     minutes = int(obj.seconds // 60) % 60
 *     hours = int(obj.seconds // 3600) % 24 + int(obj.days) * 24
 *     return escape_string('%02d:%02d:%02d' % (hours, minutes, seconds))             # <<<<<<<<<<<<<<
 * 
 * def escape_time(obj):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_string); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_hours);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_hours);
  __Pyx_GIVEREF(__pyx_v_hours);
  __Pyx_INCREF(__pyx_v_minutes);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_minutes);
  __Pyx_GIVEREF(__pyx_v_minutes);
  __Pyx_INCREF(__pyx_v_seconds);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_seconds);
  __Pyx_GIVEREF(__pyx_v_seconds);
  __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_10), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cymysql.converters.escape_timedelta", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_seconds);
  __Pyx_XDECREF(__pyx_v_minutes);
  __Pyx_XDECREF(__pyx_v_hours);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_23escape_time(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
static PyMethodDef __pyx_mdef_7cymysql_10converters_23escape_time = {__Pyx_NAMESTR("escape_time"), (PyCFunction)__pyx_pw_7cymysql_10converters_23escape_time, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7cymysql_10converters_23escape_time(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("escape_time (wrapper)", 0);
  __pyx_r = __pyx_pf_7cymysql_10converters_22escape_time(__pyx_self, ((PyObject *)__pyx_v_obj));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cymysql/converters.py":69
 *     return escape_string('%02d:%02d:%02d' % (hours, minutes, seconds))
 * 
 * def escape_time(obj):             # <<<<<<<<<<<<<<
 *     s = "%02d:%02d:%02d" % (int(obj.hour), int(obj.minute),
 *                             int(obj.second))
 */

static PyObject *__pyx_pf_7cymysql_10converters_22escape_time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("escape_time", 0);

  /* "cymysql/converters.py":70
 * 
 * def escape_time(obj):
 *     s = "%02d:%02d:%02d" % (int(obj.hour), int(obj.minute),             # <<<<<<<<<<<<<<
 *                             int(obj.second))
 *     if obj.microsecond:
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__hour); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__minute); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;

  /* "cymysql/converters.py":71
 * def escape_time(obj):
 *     s = "%02d:%02d:%02d" % (int(obj.hour), int(obj.minute),
 *                             int(obj.second))             # <<<<<<<<<<<<<<
 *     if obj.microsecond:
 *         s += ".%f" % obj.microsecond
 */
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__second); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_10), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_v_s = ((PyObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cymysql/converters.py":72
 *     s = "%02d:%02d:%02d" % (int(obj.hour), int(obj.minute),
 *                             int(obj.second))
 *     if obj.microsecond:             # <<<<<<<<<<<<<<
 *         s += ".%f" % obj.microsecond
 * 
 */
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__microsecond); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {

    /* "cymysql/converters.py":73
 *                             int(obj.second))
 *     if obj.microsecond:
 *         s += ".%f" % obj.microsecond             # <<<<<<<<<<<<<<
 * 
 *     return escape_string(s)
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__microsecond); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_11), __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_s, ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_v_s);
    __pyx_v_s = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cymysql/converters.py":75
 *         s += ".%f" % obj.microsecond
 * 
 *     return escape_string(s)             # <<<<<<<<<<<<<<
 * 
 * def escape_datetime(obj):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_string); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_s);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_s);
  __Pyx_GIVEREF(__pyx_v_s);
  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cymysql.converters.escape_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_25escape_datetime(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
static PyMethodDef __pyx_mdef_7cymysql_10converters_25escape_datetime = {__Pyx_NAMESTR("escape_datetime"), (PyCFunction)__pyx_pw_7cymysql_10converters_25escape_datetime, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7cymysql_10converters_25escape_datetime(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("escape_datetime (wrapper)", 0);
  __pyx_r = __pyx_pf_7cymysql_10converters_24escape_datetime(__pyx_self, ((PyObject *)__pyx_v_obj));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cymysql/converters.py":77
 *     return escape_string(s)
 * 
 * def escape_datetime(obj):             # <<<<<<<<<<<<<<
 *     return escape_string("%04d-%02d-%02d %02d:%02d:%02d" % (
 *             obj.year, obj.month, obj.day, obj.hour, obj.minute, obj.second))
 */

static PyObject *__pyx_pf_7cymysql_10converters_24escape_datetime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("escape_datetime", 0);

  /* "cymysql/converters.py":78
 * 
 * def escape_datetime(obj):
 *     return escape_string("%04d-%02d-%02d %02d:%02d:%02d" % (             # <<<<<<<<<<<<<<
 *             obj.year, obj.month, obj.day, obj.hour, obj.minute, obj.second))
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_string); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "cymysql/converters.py":79
 * def escape_datetime(obj):
 *     return escape_string("%04d-%02d-%02d %02d:%02d:%02d" % (
 *             obj.year, obj.month, obj.day, obj.hour, obj.minute, obj.second))             # <<<<<<<<<<<<<<
 * 
 * def escape_date(obj):
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__year); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__month); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__day); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__hour); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__minute); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__second); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = PyTuple_New(6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_8, 5, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_7 = 0;
  __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_12), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_7));
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_7));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cymysql.converters.escape_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_27escape_date(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
static PyMethodDef __pyx_mdef_7cymysql_10converters_27escape_date = {__Pyx_NAMESTR("escape_date"), (PyCFunction)__pyx_pw_7cymysql_10converters_27escape_date, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7cymysql_10converters_27escape_date(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("escape_date (wrapper)", 0);
  __pyx_r = __pyx_pf_7cymysql_10converters_26escape_date(__pyx_self, ((PyObject *)__pyx_v_obj));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cymysql/converters.py":81
 *             obj.year, obj.month, obj.day, obj.hour, obj.minute, obj.second))
 * 
 * def escape_date(obj):             # <<<<<<<<<<<<<<
 *     return escape_string("%04d-%02d-%02d" % (obj.year, obj.month, obj.day))
 * 
 */

static PyObject *__pyx_pf_7cymysql_10converters_26escape_date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("escape_date", 0);

  /* "cymysql/converters.py":82
 * 
 * def escape_date(obj):
 *     return escape_string("%04d-%02d-%02d" % (obj.year, obj.month, obj.day))             # <<<<<<<<<<<<<<
 * 
 * def escape_struct_time(obj):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_string); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__year); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__month); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__day); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_13), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cymysql.converters.escape_date", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_29escape_struct_time(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
static PyMethodDef __pyx_mdef_7cymysql_10converters_29escape_struct_time = {__Pyx_NAMESTR("escape_struct_time"), (PyCFunction)__pyx_pw_7cymysql_10converters_29escape_struct_time, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7cymysql_10converters_29escape_struct_time(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("escape_struct_time (wrapper)", 0);
  __pyx_r = __pyx_pf_7cymysql_10converters_28escape_struct_time(__pyx_self, ((PyObject *)__pyx_v_obj));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cymysql/converters.py":84
 *     return escape_string("%04d-%02d-%02d" % (obj.year, obj.month, obj.day))
 * 
 * def escape_struct_time(obj):             # <<<<<<<<<<<<<<
 *     return escape_datetime(datetime.datetime(*obj[:6]))
 * 
 */

static PyObject *__pyx_pf_7cymysql_10converters_28escape_struct_time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("escape_struct_time", 0);

  /* "cymysql/converters.py":85
 * 
 * def escape_struct_time(obj):
 *     return escape_datetime(datetime.datetime(*obj[:6]))             # <<<<<<<<<<<<<<
 * 
 * def escape_decimal(obj):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__datetime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_obj, 0, 6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cymysql.converters.escape_struct_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_31escape_decimal(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
static PyMethodDef __pyx_mdef_7cymysql_10converters_31escape_decimal = {__Pyx_NAMESTR("escape_decimal"), (PyCFunction)__pyx_pw_7cymysql_10converters_31escape_decimal, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7cymysql_10converters_31escape_decimal(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("escape_decimal (wrapper)", 0);
  __pyx_r = __pyx_pf_7cymysql_10converters_30escape_decimal(__pyx_self, ((PyObject *)__pyx_v_obj));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cymysql/converters.py":87
 *     return escape_datetime(datetime.datetime(*obj[:6]))
 * 
 * def escape_decimal(obj):             # <<<<<<<<<<<<<<
 *     return str(obj)
 * 
 */

static PyObject *__pyx_pf_7cymysql_10converters_30escape_decimal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("escape_decimal", 0);

  /* "cymysql/converters.py":88
 * 
 * def escape_decimal(obj):
 *     return str(obj)             # <<<<<<<<<<<<<<
 * 
 * def convert_datetime(obj, charset='ascii', field=None, use_unicode=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_obj);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
  __Pyx_GIVEREF(__pyx_v_obj);
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cymysql.converters.escape_decimal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_33convert_datetime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7cymysql_10converters_32convert_datetime[] = "Returns a DATETIME or TIMESTAMP column value as a datetime object:\n\n      >>> datetime_or_None('2007-02-25 23:06:20')\n      datetime.datetime(2007, 2, 25, 23, 6, 20)\n      >>> datetime_or_None('2007-02-25T23:06:20')\n      datetime.datetime(2007, 2, 25, 23, 6, 20)\n\n    Illegal values are returned as None:\n\n      >>> datetime_or_None('2007-02-31T23:06:20') is None\n      True\n      >>> datetime_or_None('0000-00-00 00:00:00') is None\n      True\n\n    ";
static PyMethodDef __pyx_mdef_7cymysql_10converters_33convert_datetime = {__Pyx_NAMESTR("convert_datetime"), (PyCFunction)__pyx_pw_7cymysql_10converters_33convert_datetime, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7cymysql_10converters_32convert_datetime)};
static PyObject *__pyx_pw_7cymysql_10converters_33convert_datetime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_charset = 0;
  PyObject *__pyx_v_field = 0;
  PyObject *__pyx_v_use_unicode = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("convert_datetime (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__charset,&__pyx_n_s__field,&__pyx_n_s__use_unicode,0};
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s__ascii));

    /* "cymysql/converters.py":90
 *     return str(obj)
 * 
 * def convert_datetime(obj, charset='ascii', field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     """Returns a DATETIME or TIMESTAMP column value as a datetime object:
 * 
 */
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__charset);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__field);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__use_unicode);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convert_datetime") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_obj = values[0];
    __pyx_v_charset = values[1];
    __pyx_v_field = values[2];
    __pyx_v_use_unicode = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("convert_datetime", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cymysql.converters.convert_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cymysql_10converters_32convert_datetime(__pyx_self, __pyx_v_obj, __pyx_v_charset, __pyx_v_field, __pyx_v_use_unicode);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cymysql_10converters_32convert_datetime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_charset, PyObject *__pyx_v_field, PyObject *__pyx_v_use_unicode) {
  PyObject *__pyx_v_sep = NULL;
  PyObject *__pyx_v_ymd = NULL;
  PyObject *__pyx_v_hms = NULL;
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *(*__pyx_t_12)(PyObject *);
  PyObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  PyObject *(*__pyx_t_15)(PyObject *);
  int __pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_datetime", 0);
  __Pyx_INCREF(__pyx_v_obj);

  /* "cymysql/converters.py":106
 * 
 *     """
 *     if ((PYTHON3 and not isinstance(obj, str)) or             # <<<<<<<<<<<<<<
 *         (not PYTHON3 and not isinstance(obj, unicode))):
 *         obj = obj.decode(charset)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__PYTHON3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {
    __pyx_t_1 = ((PyObject *)((PyObject*)(&PyString_Type)));
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_t_1); 
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = (!__pyx_t_3);
    __pyx_t_3 = __pyx_t_4;
  } else {
    __pyx_t_3 = __pyx_t_2;
  }
  if (!__pyx_t_3) {

    /* "cymysql/converters.py":107
 *     """
 *     if ((PYTHON3 and not isinstance(obj, str)) or
 *         (not PYTHON3 and not isinstance(obj, unicode))):             # <<<<<<<<<<<<<<
 *         obj = obj.decode(charset)
 *     if ' ' in obj:
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__PYTHON3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = (!__pyx_t_2);
    if (__pyx_t_4) {
      __pyx_t_1 = ((PyObject *)((PyObject*)(&PyUnicode_Type)));
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_t_1); 
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_5 = (!__pyx_t_2);
      __pyx_t_2 = __pyx_t_5;
    } else {
      __pyx_t_2 = __pyx_t_4;
    }
    __pyx_t_4 = __pyx_t_2;
  } else {
    __pyx_t_4 = __pyx_t_3;
  }
  if (__pyx_t_4) {

    /* "cymysql/converters.py":108
 *     if ((PYTHON3 and not isinstance(obj, str)) or
 *         (not PYTHON3 and not isinstance(obj, unicode))):
 *         obj = obj.decode(charset)             # <<<<<<<<<<<<<<
 *     if ' ' in obj:
 *         sep = ' '
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__decode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_charset);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_charset);
    __Pyx_GIVEREF(__pyx_v_charset);
    __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_v_obj);
    __pyx_v_obj = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cymysql/converters.py":109
 *         (not PYTHON3 and not isinstance(obj, unicode))):
 *         obj = obj.decode(charset)
 *     if ' ' in obj:             # <<<<<<<<<<<<<<
 *         sep = ' '
 *     elif 'T' in obj:
 */
  __pyx_t_4 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_kp_s_14), __pyx_v_obj, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_4) {

    /* "cymysql/converters.py":110
 *         obj = obj.decode(charset)
 *     if ' ' in obj:
 *         sep = ' '             # <<<<<<<<<<<<<<
 *     elif 'T' in obj:
 *         sep = 'T'
 */
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_14));
    __pyx_v_sep = ((PyObject *)__pyx_kp_s_14);
    goto __pyx_L4;
  }

  /* "cymysql/converters.py":111
 *     if ' ' in obj:
 *         sep = ' '
 *     elif 'T' in obj:             # <<<<<<<<<<<<<<
 *         sep = 'T'
 *     else:
 */
  __pyx_t_4 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_n_s__T), __pyx_v_obj, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_4) {

    /* "cymysql/converters.py":112
 *         sep = ' '
 *     elif 'T' in obj:
 *         sep = 'T'             # <<<<<<<<<<<<<<
 *     else:
 *         return convert_date(obj, charset, field, use_unicode)
 */
    __Pyx_INCREF(((PyObject *)__pyx_n_s__T));
    __pyx_v_sep = ((PyObject *)__pyx_n_s__T);
    goto __pyx_L4;
  }
  /*else*/ {

    /* "cymysql/converters.py":114
 *         sep = 'T'
 *     else:
 *         return convert_date(obj, charset, field, use_unicode)             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_date); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_obj);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_obj);
    __Pyx_GIVEREF(__pyx_v_obj);
    __Pyx_INCREF(__pyx_v_charset);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_charset);
    __Pyx_GIVEREF(__pyx_v_charset);
    __Pyx_INCREF(__pyx_v_field);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_field);
    __Pyx_GIVEREF(__pyx_v_field);
    __Pyx_INCREF(__pyx_v_use_unicode);
    PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_use_unicode);
    __Pyx_GIVEREF(__pyx_v_use_unicode);
    __pyx_t_1 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __pyx_L4:;

  /* "cymysql/converters.py":116
 *         return convert_date(obj, charset, field, use_unicode)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         ymd, hms = obj.split(sep, 1)
 *         return datetime.datetime(*[ int(x) for x in ymd.split('-')+hms.split(':') ])
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_10);
    /*try:*/ {

      /* "cymysql/converters.py":117
 * 
 *     try:
 *         ymd, hms = obj.split(sep, 1)             # <<<<<<<<<<<<<<
 *         return datetime.datetime(*[ int(x) for x in ymd.split('-')+hms.split(':') ])
 *     except ValueError:
 */
      __pyx_t_1 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_v_sep);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_sep);
      __Pyx_GIVEREF(__pyx_v_sep);
      __Pyx_INCREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
        PyObject* sequence = __pyx_t_7;
        #if CYTHON_COMPILING_IN_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_1);
        #else
        __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        #endif
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      {
        Py_ssize_t index = -1;
        __pyx_t_11 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext;
        index = 0; __pyx_t_6 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_6)) goto __pyx_L13_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 1; __pyx_t_1 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_1)) goto __pyx_L13_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_1);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __pyx_t_12 = NULL;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L14_unpacking_done;
        __pyx_L13_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_12 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __pyx_L14_unpacking_done:;
      }
      __pyx_v_ymd = __pyx_t_6;
      __pyx_t_6 = 0;
      __pyx_v_hms = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "cymysql/converters.py":118
 *     try:
 *         ymd, hms = obj.split(sep, 1)
 *         return datetime.datetime(*[ int(x) for x in ymd.split('-')+hms.split(':') ])             # <<<<<<<<<<<<<<
 *     except ValueError:
 *         return convert_date(obj, charset, field, use_unicode)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_1 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = PyObject_GetAttr(__pyx_v_ymd, __pyx_n_s__split); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_11 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_16), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyObject_GetAttr(__pyx_v_hms, __pyx_n_s__split); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_13 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_18), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyNumber_Add(__pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (PyList_CheckExact(__pyx_t_6) || PyTuple_CheckExact(__pyx_t_6)) {
        __pyx_t_13 = __pyx_t_6; __Pyx_INCREF(__pyx_t_13); __pyx_t_14 = 0;
        __pyx_t_15 = NULL;
      } else {
        __pyx_t_14 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_15 = Py_TYPE(__pyx_t_13)->tp_iternext;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      for (;;) {
        if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_13)) {
          if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_13)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_6); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
          #endif
        } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_13)) {
          if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_13)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_6); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
          #endif
        } else {
          __pyx_t_6 = __pyx_t_15(__pyx_t_13);
          if (unlikely(!__pyx_t_6)) {
            if (PyErr_Occurred()) {
              if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_6);
        }
        __Pyx_XDECREF(__pyx_v_x);
        __pyx_v_x = __pyx_t_6;
        __pyx_t_6 = 0;
        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_v_x);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_x);
        __Pyx_GIVEREF(__pyx_v_x);
        __pyx_t_11 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
        if (unlikely(__Pyx_PyList_Append(__pyx_t_7, (PyObject*)__pyx_t_11))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_13 = PySequence_Tuple(((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_13));
      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
      __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
      __pyx_r = __pyx_t_7;
      __pyx_t_7 = 0;
      goto __pyx_L9_try_return;
    }
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    goto __pyx_L12_try_end;
    __pyx_L9_try_return:;
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
    goto __pyx_L0;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "cymysql/converters.py":119
 *         ymd, hms = obj.split(sep, 1)
 *         return datetime.datetime(*[ int(x) for x in ymd.split('-')+hms.split(':') ])
 *     except ValueError:             # <<<<<<<<<<<<<<
 *         return convert_date(obj, charset, field, use_unicode)
 * 
 */
    __pyx_t_16 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_16) {
      __Pyx_AddTraceback("cymysql.converters.convert_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_13, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_GOTREF(__pyx_t_1);

      /* "cymysql/converters.py":120
 *         return datetime.datetime(*[ int(x) for x in ymd.split('-')+hms.split(':') ])
 *     except ValueError:
 *         return convert_date(obj, charset, field, use_unicode)             # <<<<<<<<<<<<<<
 * 
 * def convert_timedelta(obj, charset=None, field=None, use_unicode=None):
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_date); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_v_obj);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_obj);
      __Pyx_GIVEREF(__pyx_v_obj);
      __Pyx_INCREF(__pyx_v_charset);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_charset);
      __Pyx_GIVEREF(__pyx_v_charset);
      __Pyx_INCREF(__pyx_v_field);
      PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_field);
      __Pyx_GIVEREF(__pyx_v_field);
      __Pyx_INCREF(__pyx_v_use_unicode);
      PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_use_unicode);
      __Pyx_GIVEREF(__pyx_v_use_unicode);
      __pyx_t_17 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
      __pyx_r = __pyx_t_17;
      __pyx_t_17 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      goto __pyx_L8_except_return;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L6_exception_handled;
    }
    __pyx_L7_except_error:;
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
    goto __pyx_L1_error;
    __pyx_L8_except_return:;
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
    goto __pyx_L0;
    __pyx_L6_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
    __pyx_L12_try_end:;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_AddTraceback("cymysql.converters.convert_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sep);
  __Pyx_XDECREF(__pyx_v_ymd);
  __Pyx_XDECREF(__pyx_v_hms);
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_35convert_timedelta(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7cymysql_10converters_34convert_timedelta[] = "Returns a TIME column as a timedelta object:\n\n      >>> timedelta_or_None('25:06:17')\n      datetime.timedelta(1, 3977)\n      >>> timedelta_or_None('-25:06:17')\n      datetime.timedelta(-2, 83177)\n\n    Illegal values are returned as None:\n\n      >>> timedelta_or_None('random crap') is None\n      True\n\n    Note that MySQL always returns TIME columns as (+|-)HH:MM:SS, but\n    can accept values as (+|-)DD HH:MM:SS. The latter format will not\n    be parsed correctly by this function.\n    ";
static PyMethodDef __pyx_mdef_7cymysql_10converters_35convert_timedelta = {__Pyx_NAMESTR("convert_timedelta"), (PyCFunction)__pyx_pw_7cymysql_10converters_35convert_timedelta, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7cymysql_10converters_34convert_timedelta)};
static PyObject *__pyx_pw_7cymysql_10converters_35convert_timedelta(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_charset = 0;
  CYTHON_UNUSED PyObject *__pyx_v_field = 0;
  CYTHON_UNUSED PyObject *__pyx_v_use_unicode = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("convert_timedelta (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__charset,&__pyx_n_s__field,&__pyx_n_s__use_unicode,0};
    PyObject* values[4] = {0,0,0,0};

    /* "cymysql/converters.py":122
 *         return convert_date(obj, charset, field, use_unicode)
 * 
 * def convert_timedelta(obj, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     """Returns a TIME column as a timedelta object:
 * 
 */
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__charset);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__field);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__use_unicode);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convert_timedelta") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_obj = values[0];
    __pyx_v_charset = values[1];
    __pyx_v_field = values[2];
    __pyx_v_use_unicode = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("convert_timedelta", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cymysql.converters.convert_timedelta", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cymysql_10converters_34convert_timedelta(__pyx_self, __pyx_v_obj, __pyx_v_charset, __pyx_v_field, __pyx_v_use_unicode);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cymysql_10converters_34convert_timedelta(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_charset, CYTHON_UNUSED PyObject *__pyx_v_field, CYTHON_UNUSED PyObject *__pyx_v_use_unicode) {
  PyObject *__pyx_v_microseconds = NULL;
  PyObject *__pyx_v_tail = NULL;
  PyObject *__pyx_v_hours = NULL;
  PyObject *__pyx_v_minutes = NULL;
  PyObject *__pyx_v_seconds = NULL;
  PyObject *__pyx_v_tdelta = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *(*__pyx_t_12)(PyObject *);
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_timedelta", 0);
  __Pyx_INCREF(__pyx_v_obj);

  /* "cymysql/converters.py":139
 *     be parsed correctly by this function.
 *     """
 *     try:             # <<<<<<<<<<<<<<
 *         microseconds = 0
 *         if ((PYTHON3 and not isinstance(obj, str)) or
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "cymysql/converters.py":140
 *     """
 *     try:
 *         microseconds = 0             # <<<<<<<<<<<<<<
 *         if ((PYTHON3 and not isinstance(obj, str)) or
 *             (not PYTHON3 and not isinstance(obj, unicode))):
 */
      __Pyx_INCREF(__pyx_int_0);
      __pyx_v_microseconds = __pyx_int_0;

      /* "cymysql/converters.py":141
 *     try:
 *         microseconds = 0
 *         if ((PYTHON3 and not isinstance(obj, str)) or             # <<<<<<<<<<<<<<
 *             (not PYTHON3 and not isinstance(obj, unicode))):
 *             obj = obj.decode(charset)
 */
      __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__PYTHON3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_5) {
        __pyx_t_4 = ((PyObject *)((PyObject*)(&PyString_Type)));
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_t_4); 
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_7 = (!__pyx_t_6);
        __pyx_t_6 = __pyx_t_7;
      } else {
        __pyx_t_6 = __pyx_t_5;
      }
      if (!__pyx_t_6) {

        /* "cymysql/converters.py":142
 *         microseconds = 0
 *         if ((PYTHON3 and not isinstance(obj, str)) or
 *             (not PYTHON3 and not isinstance(obj, unicode))):             # <<<<<<<<<<<<<<
 *             obj = obj.decode(charset)
 *         if "." in obj:
 */
        __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__PYTHON3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_7 = (!__pyx_t_5);
        if (__pyx_t_7) {
          __pyx_t_4 = ((PyObject *)((PyObject*)(&PyUnicode_Type)));
          __Pyx_INCREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_t_4); 
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_8 = (!__pyx_t_5);
          __pyx_t_5 = __pyx_t_8;
        } else {
          __pyx_t_5 = __pyx_t_7;
        }
        __pyx_t_7 = __pyx_t_5;
      } else {
        __pyx_t_7 = __pyx_t_6;
      }
      if (__pyx_t_7) {

        /* "cymysql/converters.py":143
 *         if ((PYTHON3 and not isinstance(obj, str)) or
 *             (not PYTHON3 and not isinstance(obj, unicode))):
 *             obj = obj.decode(charset)             # <<<<<<<<<<<<<<
 *         if "." in obj:
 *             (obj, tail) = obj.split('.')
 */
        __pyx_t_4 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__decode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_v_charset);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_charset);
        __Pyx_GIVEREF(__pyx_v_charset);
        __pyx_t_10 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_v_obj);
        __pyx_v_obj = __pyx_t_10;
        __pyx_t_10 = 0;
        goto __pyx_L11;
      }
      __pyx_L11:;

      /* "cymysql/converters.py":144
 *             (not PYTHON3 and not isinstance(obj, unicode))):
 *             obj = obj.decode(charset)
 *         if "." in obj:             # <<<<<<<<<<<<<<
 *             (obj, tail) = obj.split('.')
 *             microseconds = int(tail)
 */
      __pyx_t_7 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_kp_s_19), __pyx_v_obj, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      if (__pyx_t_7) {

        /* "cymysql/converters.py":145
 *             obj = obj.decode(charset)
 *         if "." in obj:
 *             (obj, tail) = obj.split('.')             # <<<<<<<<<<<<<<
 *             microseconds = int(tail)
 *         hours, minutes, seconds = obj.split(':')
 */
        __pyx_t_10 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__split); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_9 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_k_tuple_20), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) {
          PyObject* sequence = __pyx_t_9;
          #if CYTHON_COMPILING_IN_CPYTHON
          Py_ssize_t size = Py_SIZE(sequence);
          #else
          Py_ssize_t size = PySequence_Size(sequence);
          #endif
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          }
          #if CYTHON_COMPILING_IN_CPYTHON
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_10 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_10 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_4);
          #else
          __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          #endif
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        } else
        {
          Py_ssize_t index = -1;
          __pyx_t_11 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext;
          index = 0; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L13_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_10);
          index = 1; __pyx_t_4 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_4)) goto __pyx_L13_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_4);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __pyx_t_12 = NULL;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          goto __pyx_L14_unpacking_done;
          __pyx_L13_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_12 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __pyx_L14_unpacking_done:;
        }
        __Pyx_DECREF(__pyx_v_obj);
        __pyx_v_obj = __pyx_t_10;
        __pyx_t_10 = 0;
        __pyx_v_tail = __pyx_t_4;
        __pyx_t_4 = 0;

        /* "cymysql/converters.py":146
 *         if "." in obj:
 *             (obj, tail) = obj.split('.')
 *             microseconds = int(tail)             # <<<<<<<<<<<<<<
 *         hours, minutes, seconds = obj.split(':')
 *         tdelta = datetime.timedelta(
 */
        __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_v_tail);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_tail);
        __Pyx_GIVEREF(__pyx_v_tail);
        __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_v_microseconds);
        __pyx_v_microseconds = __pyx_t_4;
        __pyx_t_4 = 0;
        goto __pyx_L12;
      }
      __pyx_L12:;

      /* "cymysql/converters.py":147
 *             (obj, tail) = obj.split('.')
 *             microseconds = int(tail)
 *         hours, minutes, seconds = obj.split(':')             # <<<<<<<<<<<<<<
 *         tdelta = datetime.timedelta(
 *             hours = int(hours),
 */
      __pyx_t_4 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_21), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) {
        PyObject* sequence = __pyx_t_9;
        #if CYTHON_COMPILING_IN_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 3)) {
          if (size > 3) __Pyx_RaiseTooManyValuesError(3);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); 
          __pyx_t_11 = PyTuple_GET_ITEM(sequence, 2); 
        } else {
          __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_10 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_11 = PyList_GET_ITEM(sequence, 2); 
        }
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_11);
        #else
        __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __pyx_t_11 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        #endif
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else
      {
        Py_ssize_t index = -1;
        __pyx_t_13 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_12 = Py_TYPE(__pyx_t_13)->tp_iternext;
        index = 0; __pyx_t_4 = __pyx_t_12(__pyx_t_13); if (unlikely(!__pyx_t_4)) goto __pyx_L15_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_4);
        index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_13); if (unlikely(!__pyx_t_10)) goto __pyx_L15_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_10);
        index = 2; __pyx_t_11 = __pyx_t_12(__pyx_t_13); if (unlikely(!__pyx_t_11)) goto __pyx_L15_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_11);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_13), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __pyx_t_12 = NULL;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        goto __pyx_L16_unpacking_done;
        __pyx_L15_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_12 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __pyx_L16_unpacking_done:;
      }
      __pyx_v_hours = __pyx_t_4;
      __pyx_t_4 = 0;
      __pyx_v_minutes = __pyx_t_10;
      __pyx_t_10 = 0;
      __pyx_v_seconds = __pyx_t_11;
      __pyx_t_11 = 0;

      /* "cymysql/converters.py":148
 *             microseconds = int(tail)
 *         hours, minutes, seconds = obj.split(':')
 *         tdelta = datetime.timedelta(             # <<<<<<<<<<<<<<
 *             hours = int(hours),
 *             minutes = int(minutes),
 */
      __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_11 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__timedelta); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_9));

      /* "cymysql/converters.py":149
 *         hours, minutes, seconds = obj.split(':')
 *         tdelta = datetime.timedelta(
 *             hours = int(hours),             # <<<<<<<<<<<<<<
 *             minutes = int(minutes),
 *             seconds = int(seconds),
 */
      __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_INCREF(__pyx_v_hours);
      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_hours);
      __Pyx_GIVEREF(__pyx_v_hours);
      __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
      if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__hours), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cymysql/converters.py":150
 *         tdelta = datetime.timedelta(
 *             hours = int(hours),
 *             minutes = int(minutes),             # <<<<<<<<<<<<<<
 *             seconds = int(seconds),
 *             microseconds = microseconds
 */
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_minutes);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_minutes);
      __Pyx_GIVEREF(__pyx_v_minutes);
      __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__minutes), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "cymysql/converters.py":151
 *             hours = int(hours),
 *             minutes = int(minutes),
 *             seconds = int(seconds),             # <<<<<<<<<<<<<<
 *             microseconds = microseconds
 *             )
 */
      __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_INCREF(__pyx_v_seconds);
      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_seconds);
      __Pyx_GIVEREF(__pyx_v_seconds);
      __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
      if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__seconds), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cymysql/converters.py":153
 *             seconds = int(seconds),
 *             microseconds = microseconds
 *             )             # <<<<<<<<<<<<<<
 *         return tdelta
 *     except ValueError:
 */
      if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__microseconds), __pyx_v_microseconds) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_t_4 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
      __pyx_v_tdelta = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "cymysql/converters.py":154
 *             microseconds = microseconds
 *             )
 *         return tdelta             # <<<<<<<<<<<<<<
 *     except ValueError:
 *         return None
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_tdelta);
      __pyx_r = __pyx_v_tdelta;
      goto __pyx_L7_try_return;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cymysql/converters.py":155
 *             )
 *         return tdelta
 *     except ValueError:             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
    __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_14) {
      __Pyx_AddTraceback("cymysql.converters.convert_timedelta", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_9, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GOTREF(__pyx_t_11);

      /* "cymysql/converters.py":156
 *         return tdelta
 *     except ValueError:
 *         return None             # <<<<<<<<<<<<<<
 * 
 * def convert_time(obj, charset=None, field=None, use_unicode=None):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_None);
      __pyx_r = Py_None;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L6_except_return;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cymysql.converters.convert_timedelta", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_microseconds);
  __Pyx_XDECREF(__pyx_v_tail);
  __Pyx_XDECREF(__pyx_v_hours);
  __Pyx_XDECREF(__pyx_v_minutes);
  __Pyx_XDECREF(__pyx_v_seconds);
  __Pyx_XDECREF(__pyx_v_tdelta);
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_37convert_time(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7cymysql_10converters_36convert_time[] = "Returns a TIME column as a time object:\n\n      >>> time_or_None('15:06:17')\n      datetime.time(15, 6, 17)\n\n    Illegal values are returned as None:\n\n      >>> time_or_None('-25:06:17') is None\n      True\n      >>> time_or_None('random crap') is None\n      True\n\n    Note that MySQL always returns TIME columns as (+|-)HH:MM:SS, but\n    can accept values as (+|-)DD HH:MM:SS. The latter format will not\n    be parsed correctly by this function.\n\n    Also note that MySQL's TIME column corresponds more closely to\n    Python's timedelta and not time. However if you want TIME columns\n    to be treated as time-of-day and not a time offset, then you can\n    use set this function as the converter for FIELD_TYPE.TIME.\n    ";
static PyMethodDef __pyx_mdef_7cymysql_10converters_37convert_time = {__Pyx_NAMESTR("convert_time"), (PyCFunction)__pyx_pw_7cymysql_10converters_37convert_time, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7cymysql_10converters_36convert_time)};
static PyObject *__pyx_pw_7cymysql_10converters_37convert_time(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  CYTHON_UNUSED PyObject *__pyx_v_charset = 0;
  CYTHON_UNUSED PyObject *__pyx_v_field = 0;
  CYTHON_UNUSED PyObject *__pyx_v_use_unicode = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("convert_time (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__charset,&__pyx_n_s__field,&__pyx_n_s__use_unicode,0};
    PyObject* values[4] = {0,0,0,0};

    /* "cymysql/converters.py":158
 *         return None
 * 
 * def convert_time(obj, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     """Returns a TIME column as a time object:
 * 
 */
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__charset);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__field);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__use_unicode);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convert_time") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_obj = values[0];
    __pyx_v_charset = values[1];
    __pyx_v_field = values[2];
    __pyx_v_use_unicode = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("convert_time", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cymysql.converters.convert_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cymysql_10converters_36convert_time(__pyx_self, __pyx_v_obj, __pyx_v_charset, __pyx_v_field, __pyx_v_use_unicode);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cymysql_10converters_36convert_time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_charset, CYTHON_UNUSED PyObject *__pyx_v_field, CYTHON_UNUSED PyObject *__pyx_v_use_unicode) {
  PyObject *__pyx_v_microseconds = NULL;
  PyObject *__pyx_v_tail = NULL;
  PyObject *__pyx_v_hours = NULL;
  PyObject *__pyx_v_minutes = NULL;
  PyObject *__pyx_v_seconds = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_time", 0);
  __Pyx_INCREF(__pyx_v_obj);

  /* "cymysql/converters.py":180
 *     use set this function as the converter for FIELD_TYPE.TIME.
 *     """
 *     try:             # <<<<<<<<<<<<<<
 *         microseconds = 0
 *         if "." in obj:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "cymysql/converters.py":181
 *     """
 *     try:
 *         microseconds = 0             # <<<<<<<<<<<<<<
 *         if "." in obj:
 *             (obj, tail) = obj.split('.')
 */
      __Pyx_INCREF(__pyx_int_0);
      __pyx_v_microseconds = __pyx_int_0;

      /* "cymysql/converters.py":182
 *     try:
 *         microseconds = 0
 *         if "." in obj:             # <<<<<<<<<<<<<<
 *             (obj, tail) = obj.split('.')
 *             microseconds = int(tail)
 */
      __pyx_t_4 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_kp_s_19), __pyx_v_obj, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      if (__pyx_t_4) {

        /* "cymysql/converters.py":183
 *         microseconds = 0
 *         if "." in obj:
 *             (obj, tail) = obj.split('.')             # <<<<<<<<<<<<<<
 *             microseconds = int(tail)
 *         hours, minutes, seconds = obj.split(':')
 */
        __pyx_t_5 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__split); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_22), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
          PyObject* sequence = __pyx_t_6;
          #if CYTHON_COMPILING_IN_CPYTHON
          Py_ssize_t size = Py_SIZE(sequence);
          #else
          Py_ssize_t size = PySequence_Size(sequence);
          #endif
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          }
          #if CYTHON_COMPILING_IN_CPYTHON
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_7);
          #else
          __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          #endif
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        } else
        {
          Py_ssize_t index = -1;
          __pyx_t_8 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
          index = 0; __pyx_t_5 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_5)) goto __pyx_L12_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_5);
          index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L12_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_7);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __pyx_t_9 = NULL;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          goto __pyx_L13_unpacking_done;
          __pyx_L12_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_9 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __pyx_L13_unpacking_done:;
        }
        __Pyx_DECREF(__pyx_v_obj);
        __pyx_v_obj = __pyx_t_5;
        __pyx_t_5 = 0;
        __pyx_v_tail = __pyx_t_7;
        __pyx_t_7 = 0;

        /* "cymysql/converters.py":184
 *         if "." in obj:
 *             (obj, tail) = obj.split('.')
 *             microseconds = int(tail)             # <<<<<<<<<<<<<<
 *         hours, minutes, seconds = obj.split(':')
 *         return datetime.time(hour=int(hours), minute=int(minutes),
 */
        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_v_tail);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_tail);
        __Pyx_GIVEREF(__pyx_v_tail);
        __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_v_microseconds);
        __pyx_v_microseconds = __pyx_t_7;
        __pyx_t_7 = 0;
        goto __pyx_L11;
      }
      __pyx_L11:;

      /* "cymysql/converters.py":185
 *             (obj, tail) = obj.split('.')
 *             microseconds = int(tail)
 *         hours, minutes, seconds = obj.split(':')             # <<<<<<<<<<<<<<
 *         return datetime.time(hour=int(hours), minute=int(minutes),
 *                              second=int(seconds), microsecond=microseconds)
 */
      __pyx_t_7 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__split); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_23), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
        PyObject* sequence = __pyx_t_6;
        #if CYTHON_COMPILING_IN_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 3)) {
          if (size > 3) __Pyx_RaiseTooManyValuesError(3);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
          __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2); 
        } else {
          __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_8 = PyList_GET_ITEM(sequence, 2); 
        }
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_8);
        #else
        __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        #endif
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      {
        Py_ssize_t index = -1;
        __pyx_t_10 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_9 = Py_TYPE(__pyx_t_10)->tp_iternext;
        index = 0; __pyx_t_7 = __pyx_t_9(__pyx_t_10); if (unlikely(!__pyx_t_7)) goto __pyx_L14_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        index = 1; __pyx_t_5 = __pyx_t_9(__pyx_t_10); if (unlikely(!__pyx_t_5)) goto __pyx_L14_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_5);
        index = 2; __pyx_t_8 = __pyx_t_9(__pyx_t_10); if (unlikely(!__pyx_t_8)) goto __pyx_L14_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_8);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_10), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __pyx_t_9 = NULL;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L15_unpacking_done;
        __pyx_L14_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_9 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __pyx_L15_unpacking_done:;
      }
      __pyx_v_hours = __pyx_t_7;
      __pyx_t_7 = 0;
      __pyx_v_minutes = __pyx_t_5;
      __pyx_t_5 = 0;
      __pyx_v_seconds = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "cymysql/converters.py":186
 *             microseconds = int(tail)
 *         hours, minutes, seconds = obj.split(':')
 *         return datetime.time(hour=int(hours), minute=int(minutes),             # <<<<<<<<<<<<<<
 *                              second=int(seconds), microsecond=microseconds)
 *     except ValueError:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__time); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_hours);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_hours);
      __Pyx_GIVEREF(__pyx_v_hours);
      __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__hour), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_v_minutes);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_minutes);
      __Pyx_GIVEREF(__pyx_v_minutes);
      __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
      if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__minute), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "cymysql/converters.py":187
 *         hours, minutes, seconds = obj.split(':')
 *         return datetime.time(hour=int(hours), minute=int(minutes),
 *                              second=int(seconds), microsecond=microseconds)             # <<<<<<<<<<<<<<
 *     except ValueError:
 *         return None
 */
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_seconds);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_seconds);
      __Pyx_GIVEREF(__pyx_v_seconds);
      __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__second), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__microsecond), __pyx_v_microseconds) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_t_7 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
      __pyx_r = __pyx_t_7;
      __pyx_t_7 = 0;
      goto __pyx_L7_try_return;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "cymysql/converters.py":188
 *         return datetime.time(hour=int(hours), minute=int(minutes),
 *                              second=int(seconds), microsecond=microseconds)
 *     except ValueError:             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
    __pyx_t_11 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_11) {
      __Pyx_AddTraceback("cymysql.converters.convert_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_8);

      /* "cymysql/converters.py":189
 *                              second=int(seconds), microsecond=microseconds)
 *     except ValueError:
 *         return None             # <<<<<<<<<<<<<<
 * 
 * def convert_date(obj, charset=None, field=None, use_unicode=None):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_None);
      __pyx_r = Py_None;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_except_return;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("cymysql.converters.convert_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_microseconds);
  __Pyx_XDECREF(__pyx_v_tail);
  __Pyx_XDECREF(__pyx_v_hours);
  __Pyx_XDECREF(__pyx_v_minutes);
  __Pyx_XDECREF(__pyx_v_seconds);
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_39convert_date(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7cymysql_10converters_38convert_date[] = "Returns a DATE column as a date object:\n\n      >>> date_or_None('2007-02-26')\n      datetime.date(2007, 2, 26)\n\n    Illegal values are returned as None:\n\n      >>> date_or_None('2007-02-31') is None\n      True\n      >>> date_or_None('0000-00-00') is None\n      True\n\n    ";
static PyMethodDef __pyx_mdef_7cymysql_10converters_39convert_date = {__Pyx_NAMESTR("convert_date"), (PyCFunction)__pyx_pw_7cymysql_10converters_39convert_date, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7cymysql_10converters_38convert_date)};
static PyObject *__pyx_pw_7cymysql_10converters_39convert_date(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_charset = 0;
  CYTHON_UNUSED PyObject *__pyx_v_field = 0;
  CYTHON_UNUSED PyObject *__pyx_v_use_unicode = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("convert_date (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__charset,&__pyx_n_s__field,&__pyx_n_s__use_unicode,0};
    PyObject* values[4] = {0,0,0,0};

    /* "cymysql/converters.py":191
 *         return None
 * 
 * def convert_date(obj, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     """Returns a DATE column as a date object:
 * 
 */
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__charset);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__field);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__use_unicode);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convert_date") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_obj = values[0];
    __pyx_v_charset = values[1];
    __pyx_v_field = values[2];
    __pyx_v_use_unicode = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("convert_date", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cymysql.converters.convert_date", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cymysql_10converters_38convert_date(__pyx_self, __pyx_v_obj, __pyx_v_charset, __pyx_v_field, __pyx_v_use_unicode);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cymysql_10converters_38convert_date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_charset, CYTHON_UNUSED PyObject *__pyx_v_field, CYTHON_UNUSED PyObject *__pyx_v_use_unicode) {
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_date", 0);
  __Pyx_INCREF(__pyx_v_obj);

  /* "cymysql/converters.py":205
 * 
 *     """
 *     try:             # <<<<<<<<<<<<<<
 *         if ((PYTHON3 and not isinstance(obj, str)) or
 *             (not PYTHON3 and not isinstance(obj, unicode))):
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "cymysql/converters.py":206
 *     """
 *     try:
 *         if ((PYTHON3 and not isinstance(obj, str)) or             # <<<<<<<<<<<<<<
 *             (not PYTHON3 and not isinstance(obj, unicode))):
 *             obj = obj.decode(charset)
 */
      __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__PYTHON3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_5) {
        __pyx_t_4 = ((PyObject *)((PyObject*)(&PyString_Type)));
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_t_4); 
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_7 = (!__pyx_t_6);
        __pyx_t_6 = __pyx_t_7;
      } else {
        __pyx_t_6 = __pyx_t_5;
      }
      if (!__pyx_t_6) {

        /* "cymysql/converters.py":207
 *     try:
 *         if ((PYTHON3 and not isinstance(obj, str)) or
 *             (not PYTHON3 and not isinstance(obj, unicode))):             # <<<<<<<<<<<<<<
 *             obj = obj.decode(charset)
 *         return datetime.date(*[ int(x) for x in obj.split('-', 2) ])
 */
        __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__PYTHON3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_7 = (!__pyx_t_5);
        if (__pyx_t_7) {
          __pyx_t_4 = ((PyObject *)((PyObject*)(&PyUnicode_Type)));
          __Pyx_INCREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_t_4); 
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_8 = (!__pyx_t_5);
          __pyx_t_5 = __pyx_t_8;
        } else {
          __pyx_t_5 = __pyx_t_7;
        }
        __pyx_t_7 = __pyx_t_5;
      } else {
        __pyx_t_7 = __pyx_t_6;
      }
      if (__pyx_t_7) {

        /* "cymysql/converters.py":208
 *         if ((PYTHON3 and not isinstance(obj, str)) or
 *             (not PYTHON3 and not isinstance(obj, unicode))):
 *             obj = obj.decode(charset)             # <<<<<<<<<<<<<<
 *         return datetime.date(*[ int(x) for x in obj.split('-', 2) ])
 *     except ValueError:
 */
        __pyx_t_4 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__decode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_v_charset);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_charset);
        __Pyx_GIVEREF(__pyx_v_charset);
        __pyx_t_10 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_v_obj);
        __pyx_v_obj = __pyx_t_10;
        __pyx_t_10 = 0;
        goto __pyx_L11;
      }
      __pyx_L11:;

      /* "cymysql/converters.py":209
 *             (not PYTHON3 and not isinstance(obj, unicode))):
 *             obj = obj.decode(charset)
 *         return datetime.date(*[ int(x) for x in obj.split('-', 2) ])             # <<<<<<<<<<<<<<
 *     except ValueError:
 *         return None
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__date); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_4 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_11 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_24), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (PyList_CheckExact(__pyx_t_11) || PyTuple_CheckExact(__pyx_t_11)) {
        __pyx_t_4 = __pyx_t_11; __Pyx_INCREF(__pyx_t_4); __pyx_t_12 = 0;
        __pyx_t_13 = NULL;
      } else {
        __pyx_t_12 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_13 = Py_TYPE(__pyx_t_4)->tp_iternext;
      }
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      for (;;) {
        if (!__pyx_t_13 && PyList_CheckExact(__pyx_t_4)) {
          if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_11 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_12); __Pyx_INCREF(__pyx_t_11); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          #else
          __pyx_t_11 = PySequence_ITEM(__pyx_t_4, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          #endif
        } else if (!__pyx_t_13 && PyTuple_CheckExact(__pyx_t_4)) {
          if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_12); __Pyx_INCREF(__pyx_t_11); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          #else
          __pyx_t_11 = PySequence_ITEM(__pyx_t_4, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          #endif
        } else {
          __pyx_t_11 = __pyx_t_13(__pyx_t_4);
          if (unlikely(!__pyx_t_11)) {
            if (PyErr_Occurred()) {
              if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_11);
        }
        __Pyx_XDECREF(__pyx_v_x);
        __pyx_v_x = __pyx_t_11;
        __pyx_t_11 = 0;
        __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_INCREF(__pyx_v_x);
        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_x);
        __Pyx_GIVEREF(__pyx_v_x);
        __pyx_t_14 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
        if (unlikely(__Pyx_PyList_Append(__pyx_t_10, (PyObject*)__pyx_t_14))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PySequence_Tuple(((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
      __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
      __pyx_t_10 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_10;
      __pyx_t_10 = 0;
      goto __pyx_L7_try_return;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "cymysql/converters.py":210
 *             obj = obj.decode(charset)
 *         return datetime.date(*[ int(x) for x in obj.split('-', 2) ])
 *     except ValueError:             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
    __pyx_t_15 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_15) {
      __Pyx_AddTraceback("cymysql.converters.convert_date", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_4, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_9);

      /* "cymysql/converters.py":211
 *         return datetime.date(*[ int(x) for x in obj.split('-', 2) ])
 *     except ValueError:
 *         return None             # <<<<<<<<<<<<<<
 * 
 * def convert_mysql_timestamp(timestamp, charset=None, field=None, use_unicode=None):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_None);
      __pyx_r = Py_None;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L6_except_return;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("cymysql.converters.convert_date", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_41convert_mysql_timestamp(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7cymysql_10converters_40convert_mysql_timestamp[] = "Convert a MySQL TIMESTAMP to a Timestamp object.\n\n    MySQL >= 4.1 returns TIMESTAMP in the same format as DATETIME:\n\n      >>> mysql_timestamp_converter('2007-02-25 22:32:17')\n      datetime.datetime(2007, 2, 25, 22, 32, 17)\n\n    MySQL < 4.1 uses a big string of numbers:\n\n      >>> mysql_timestamp_converter('20070225223217')\n      datetime.datetime(2007, 2, 25, 22, 32, 17)\n\n    Illegal values are returned as None:\n\n      >>> mysql_timestamp_converter('2007-02-31 22:32:17') is None\n      True\n      >>> mysql_timestamp_converter('00000000000000') is None\n      True\n\n    ";
static PyMethodDef __pyx_mdef_7cymysql_10converters_41convert_mysql_timestamp = {__Pyx_NAMESTR("convert_mysql_timestamp"), (PyCFunction)__pyx_pw_7cymysql_10converters_41convert_mysql_timestamp, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7cymysql_10converters_40convert_mysql_timestamp)};
static PyObject *__pyx_pw_7cymysql_10converters_41convert_mysql_timestamp(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_timestamp = 0;
  PyObject *__pyx_v_charset = 0;
  PyObject *__pyx_v_field = 0;
  PyObject *__pyx_v_use_unicode = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("convert_mysql_timestamp (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__timestamp,&__pyx_n_s__charset,&__pyx_n_s__field,&__pyx_n_s__use_unicode,0};
    PyObject* values[4] = {0,0,0,0};

    /* "cymysql/converters.py":213
 *         return None
 * 
 * def convert_mysql_timestamp(timestamp, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     """Convert a MySQL TIMESTAMP to a Timestamp object.
 * 
 */
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__timestamp)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__charset);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__field);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__use_unicode);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convert_mysql_timestamp") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_timestamp = values[0];
    __pyx_v_charset = values[1];
    __pyx_v_field = values[2];
    __pyx_v_use_unicode = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("convert_mysql_timestamp", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cymysql.converters.convert_mysql_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cymysql_10converters_40convert_mysql_timestamp(__pyx_self, __pyx_v_timestamp, __pyx_v_charset, __pyx_v_field, __pyx_v_use_unicode);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cymysql_10converters_40convert_mysql_timestamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_timestamp, PyObject *__pyx_v_charset, PyObject *__pyx_v_field, PyObject *__pyx_v_use_unicode) {
  PyObject *__pyx_v_year = NULL;
  PyObject *__pyx_v_month = NULL;
  PyObject *__pyx_v_day = NULL;
  PyObject *__pyx_v_hour = NULL;
  PyObject *__pyx_v_minute = NULL;
  PyObject *__pyx_v_second = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_mysql_timestamp", 0);
  __Pyx_INCREF(__pyx_v_timestamp);

  /* "cymysql/converters.py":234
 * 
 *     """
 *     if ((PYTHON3 and not isinstance(timestamp, str)) or             # <<<<<<<<<<<<<<
 *         (not PYTHON3 and not isinstance(timestamp, unicode))):
 *         timestamp = timestamp.decode(charset)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__PYTHON3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {
    __pyx_t_1 = ((PyObject *)((PyObject*)(&PyString_Type)));
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_timestamp, __pyx_t_1); 
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = (!__pyx_t_3);
    __pyx_t_3 = __pyx_t_4;
  } else {
    __pyx_t_3 = __pyx_t_2;
  }
  if (!__pyx_t_3) {

    /* "cymysql/converters.py":235
 *     """
 *     if ((PYTHON3 and not isinstance(timestamp, str)) or
 *         (not PYTHON3 and not isinstance(timestamp, unicode))):             # <<<<<<<<<<<<<<
 *         timestamp = timestamp.decode(charset)
 * 
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__PYTHON3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = (!__pyx_t_2);
    if (__pyx_t_4) {
      __pyx_t_1 = ((PyObject *)((PyObject*)(&PyUnicode_Type)));
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_timestamp, __pyx_t_1); 
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_5 = (!__pyx_t_2);
      __pyx_t_2 = __pyx_t_5;
    } else {
      __pyx_t_2 = __pyx_t_4;
    }
    __pyx_t_4 = __pyx_t_2;
  } else {
    __pyx_t_4 = __pyx_t_3;
  }
  if (__pyx_t_4) {

    /* "cymysql/converters.py":236
 *     if ((PYTHON3 and not isinstance(timestamp, str)) or
 *         (not PYTHON3 and not isinstance(timestamp, unicode))):
 *         timestamp = timestamp.decode(charset)             # <<<<<<<<<<<<<<
 * 
 *     if timestamp[4] == '-':
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_timestamp, __pyx_n_s__decode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_charset);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_charset);
    __Pyx_GIVEREF(__pyx_v_charset);
    __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_v_timestamp);
    __pyx_v_timestamp = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cymysql/converters.py":238
 *         timestamp = timestamp.decode(charset)
 * 
 *     if timestamp[4] == '-':             # <<<<<<<<<<<<<<
 *         return convert_datetime(timestamp, charset, field, use_unicode)
 *     timestamp += "0"*(14-len(timestamp)) # padding
 */
  __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_timestamp, 4, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, ((PyObject *)__pyx_kp_s_15), Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_4) {

    /* "cymysql/converters.py":239
 * 
 *     if timestamp[4] == '-':
 *         return convert_datetime(timestamp, charset, field, use_unicode)             # <<<<<<<<<<<<<<
 *     timestamp += "0"*(14-len(timestamp)) # padding
 *     year, month, day, hour, minute, second = \
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_datetime); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_timestamp);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_timestamp);
    __Pyx_GIVEREF(__pyx_v_timestamp);
    __Pyx_INCREF(__pyx_v_charset);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_charset);
    __Pyx_GIVEREF(__pyx_v_charset);
    __Pyx_INCREF(__pyx_v_field);
    PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_field);
    __Pyx_GIVEREF(__pyx_v_field);
    __Pyx_INCREF(__pyx_v_use_unicode);
    PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_v_use_unicode);
    __Pyx_GIVEREF(__pyx_v_use_unicode);
    __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "cymysql/converters.py":240
 *     if timestamp[4] == '-':
 *         return convert_datetime(timestamp, charset, field, use_unicode)
 *     timestamp += "0"*(14-len(timestamp)) # padding             # <<<<<<<<<<<<<<
 *     year, month, day, hour, minute, second = \
 *         int(timestamp[:4]), int(timestamp[4:6]), int(timestamp[6:8]), \
 */
  __pyx_t_8 = PyObject_Length(__pyx_v_timestamp); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = PyInt_FromSsize_t((14 - __pyx_t_8)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = PyNumber_Multiply(((PyObject *)__pyx_kp_s__0), __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_7));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_timestamp, ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_v_timestamp);
  __pyx_v_timestamp = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cymysql/converters.py":242
 *     timestamp += "0"*(14-len(timestamp)) # padding
 *     year, month, day, hour, minute, second = \
 *         int(timestamp[:4]), int(timestamp[4:6]), int(timestamp[6:8]), \             # <<<<<<<<<<<<<<
 *         int(timestamp[8:10]), int(timestamp[10:12]), int(timestamp[12:14])
 *     try:
 */
  __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_v_timestamp, 0, 4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PySequence_GetSlice(__pyx_v_timestamp, 4, 6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PySequence_GetSlice(__pyx_v_timestamp, 6, 8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;

  /* "cymysql/converters.py":243
 *     year, month, day, hour, minute, second = \
 *         int(timestamp[:4]), int(timestamp[4:6]), int(timestamp[6:8]), \
 *         int(timestamp[8:10]), int(timestamp[10:12]), int(timestamp[12:14])             # <<<<<<<<<<<<<<
 *     try:
 *         return datetime.datetime(year, month, day, hour, minute, second)
 */
  __pyx_t_9 = __Pyx_PySequence_GetSlice(__pyx_v_timestamp, 8, 10); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  __pyx_t_9 = 0;
  __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
  __pyx_t_10 = __Pyx_PySequence_GetSlice(__pyx_v_timestamp, 10, 12); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_10);
  __pyx_t_10 = 0;
  __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PySequence_GetSlice(__pyx_v_timestamp, 12, 14); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_11);
  __pyx_t_11 = 0;
  __pyx_t_11 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
  __pyx_v_year = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_v_month = __pyx_t_7;
  __pyx_t_7 = 0;
  __pyx_v_day = __pyx_t_6;
  __pyx_t_6 = 0;
  __pyx_v_hour = __pyx_t_9;
  __pyx_t_9 = 0;
  __pyx_v_minute = __pyx_t_10;
  __pyx_t_10 = 0;
  __pyx_v_second = __pyx_t_11;
  __pyx_t_11 = 0;

  /* "cymysql/converters.py":244
 *         int(timestamp[:4]), int(timestamp[4:6]), int(timestamp[6:8]), \
 *         int(timestamp[8:10]), int(timestamp[10:12]), int(timestamp[12:14])
 *     try:             # <<<<<<<<<<<<<<
 *         return datetime.datetime(year, month, day, hour, minute, second)
 *     except ValueError:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
    __Pyx_XGOTREF(__pyx_t_13);
    __Pyx_XGOTREF(__pyx_t_14);
    __Pyx_XGOTREF(__pyx_t_15);
    /*try:*/ {

      /* "cymysql/converters.py":245
 *         int(timestamp[8:10]), int(timestamp[10:12]), int(timestamp[12:14])
 *     try:
 *         return datetime.datetime(year, month, day, hour, minute, second)             # <<<<<<<<<<<<<<
 *     except ValueError:
 *         return None
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = PyObject_GetAttr(__pyx_t_11, __pyx_n_s__datetime); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = PyTuple_New(6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_INCREF(__pyx_v_year);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_year);
      __Pyx_GIVEREF(__pyx_v_year);
      __Pyx_INCREF(__pyx_v_month);
      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_month);
      __Pyx_GIVEREF(__pyx_v_month);
      __Pyx_INCREF(__pyx_v_day);
      PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_v_day);
      __Pyx_GIVEREF(__pyx_v_day);
      __Pyx_INCREF(__pyx_v_hour);
      PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_v_hour);
      __Pyx_GIVEREF(__pyx_v_hour);
      __Pyx_INCREF(__pyx_v_minute);
      PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_v_minute);
      __Pyx_GIVEREF(__pyx_v_minute);
      __Pyx_INCREF(__pyx_v_second);
      PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_v_second);
      __Pyx_GIVEREF(__pyx_v_second);
      __pyx_t_9 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
      __pyx_r = __pyx_t_9;
      __pyx_t_9 = 0;
      goto __pyx_L9_try_return;
    }
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    goto __pyx_L12_try_end;
    __pyx_L9_try_return:;
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
    goto __pyx_L0;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cymysql/converters.py":246
 *     try:
 *         return datetime.datetime(year, month, day, hour, minute, second)
 *     except ValueError:             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
    __pyx_t_16 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_16) {
      __Pyx_AddTraceback("cymysql.converters.convert_mysql_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_11, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GOTREF(__pyx_t_10);

      /* "cymysql/converters.py":247
 *         return datetime.datetime(year, month, day, hour, minute, second)
 *     except ValueError:
 *         return None             # <<<<<<<<<<<<<<
 * 
 * def convert_set(s):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_None);
      __pyx_r = Py_None;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L8_except_return;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L6_exception_handled;
    }
    __pyx_L7_except_error:;
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
    goto __pyx_L1_error;
    __pyx_L8_except_return:;
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
    goto __pyx_L0;
    __pyx_L6_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
    __pyx_L12_try_end:;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cymysql.converters.convert_mysql_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_year);
  __Pyx_XDECREF(__pyx_v_month);
  __Pyx_XDECREF(__pyx_v_day);
  __Pyx_XDECREF(__pyx_v_hour);
  __Pyx_XDECREF(__pyx_v_minute);
  __Pyx_XDECREF(__pyx_v_second);
  __Pyx_XDECREF(__pyx_v_timestamp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_43convert_set(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/
static PyMethodDef __pyx_mdef_7cymysql_10converters_43convert_set = {__Pyx_NAMESTR("convert_set"), (PyCFunction)__pyx_pw_7cymysql_10converters_43convert_set, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7cymysql_10converters_43convert_set(PyObject *__pyx_self, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("convert_set (wrapper)", 0);
  __pyx_r = __pyx_pf_7cymysql_10converters_42convert_set(__pyx_self, ((PyObject *)__pyx_v_s));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cymysql/converters.py":249
 *         return None
 * 
 * def convert_set(s):             # <<<<<<<<<<<<<<
 *     return set(s.split(","))
 * 
 */

static PyObject *__pyx_pf_7cymysql_10converters_42convert_set(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_set", 0);

  /* "cymysql/converters.py":250
 * 
 * def convert_set(s):
 *     return set(s.split(","))             # <<<<<<<<<<<<<<
 * 
 * def convert_bit(b, charset=None, field=None, use_unicode=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_s, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_25), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cymysql.converters.convert_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_45convert_bit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7cymysql_10converters_45convert_bit = {__Pyx_NAMESTR("convert_bit"), (PyCFunction)__pyx_pw_7cymysql_10converters_45convert_bit, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7cymysql_10converters_45convert_bit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_b = 0;
  CYTHON_UNUSED PyObject *__pyx_v_charset = 0;
  CYTHON_UNUSED PyObject *__pyx_v_field = 0;
  CYTHON_UNUSED PyObject *__pyx_v_use_unicode = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("convert_bit (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__b,&__pyx_n_s__charset,&__pyx_n_s__field,&__pyx_n_s__use_unicode,0};
    PyObject* values[4] = {0,0,0,0};

    /* "cymysql/converters.py":252
 *     return set(s.split(","))
 * 
 * def convert_bit(b, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     #b = "\x00" * (8 - len(b)) + b # pad w/ zeroes
 *     #return struct.unpack(">Q", b)[0]
 */
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__b)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__charset);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__field);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__use_unicode);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convert_bit") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_b = values[0];
    __pyx_v_charset = values[1];
    __pyx_v_field = values[2];
    __pyx_v_use_unicode = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("convert_bit", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cymysql.converters.convert_bit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cymysql_10converters_44convert_bit(__pyx_self, __pyx_v_b, __pyx_v_charset, __pyx_v_field, __pyx_v_use_unicode);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cymysql_10converters_44convert_bit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_b, CYTHON_UNUSED PyObject *__pyx_v_charset, CYTHON_UNUSED PyObject *__pyx_v_field, CYTHON_UNUSED PyObject *__pyx_v_use_unicode) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("convert_bit", 0);

  /* "cymysql/converters.py":258
 *     # the snippet above is right, but MySQLdb doesn't process bits,
 *     # so we shouldn't either
 *     return b             # <<<<<<<<<<<<<<
 * 
 * def convert_blob(data, charset=None, field=None, use_unicode=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_b);
  __pyx_r = __pyx_v_b;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_47convert_blob(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7cymysql_10converters_47convert_blob = {__Pyx_NAMESTR("convert_blob"), (PyCFunction)__pyx_pw_7cymysql_10converters_47convert_blob, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7cymysql_10converters_47convert_blob(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_charset = 0;
  PyObject *__pyx_v_field = 0;
  PyObject *__pyx_v_use_unicode = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("convert_blob (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__data,&__pyx_n_s__charset,&__pyx_n_s__field,&__pyx_n_s__use_unicode,0};
    PyObject* values[4] = {0,0,0,0};

    /* "cymysql/converters.py":260
 *     return b
 * 
 * def convert_blob(data, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     return convert_characters(data, charset, field, use_unicode)
 * 
 */
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__data)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__charset);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__field);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__use_unicode);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convert_blob") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_charset = values[1];
    __pyx_v_field = values[2];
    __pyx_v_use_unicode = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("convert_blob", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cymysql.converters.convert_blob", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cymysql_10converters_46convert_blob(__pyx_self, __pyx_v_data, __pyx_v_charset, __pyx_v_field, __pyx_v_use_unicode);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cymysql_10converters_46convert_blob(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_charset, PyObject *__pyx_v_field, PyObject *__pyx_v_use_unicode) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_blob", 0);

  /* "cymysql/converters.py":261
 * 
 * def convert_blob(data, charset=None, field=None, use_unicode=None):
 *     return convert_characters(data, charset, field, use_unicode)             # <<<<<<<<<<<<<<
 * 
 * def convert_characters(data, charset=None, field=None, use_unicode=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_characters); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_data);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_data);
  __Pyx_GIVEREF(__pyx_v_data);
  __Pyx_INCREF(__pyx_v_charset);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_charset);
  __Pyx_GIVEREF(__pyx_v_charset);
  __Pyx_INCREF(__pyx_v_field);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_field);
  __Pyx_GIVEREF(__pyx_v_field);
  __Pyx_INCREF(__pyx_v_use_unicode);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_use_unicode);
  __Pyx_GIVEREF(__pyx_v_use_unicode);
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cymysql.converters.convert_blob", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_49convert_characters(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7cymysql_10converters_49convert_characters = {__Pyx_NAMESTR("convert_characters"), (PyCFunction)__pyx_pw_7cymysql_10converters_49convert_characters, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7cymysql_10converters_49convert_characters(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_charset = 0;
  PyObject *__pyx_v_field = 0;
  PyObject *__pyx_v_use_unicode = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("convert_characters (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__data,&__pyx_n_s__charset,&__pyx_n_s__field,&__pyx_n_s__use_unicode,0};
    PyObject* values[4] = {0,0,0,0};

    /* "cymysql/converters.py":263
 *     return convert_characters(data, charset, field, use_unicode)
 * 
 * def convert_characters(data, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     field_charset = charset_by_id(field.charsetnr).name
 *     if field.flags & FLAG.SET:
 */
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__data)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__charset);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__field);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__use_unicode);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convert_characters") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_charset = values[1];
    __pyx_v_field = values[2];
    __pyx_v_use_unicode = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("convert_characters", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cymysql.converters.convert_characters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cymysql_10converters_48convert_characters(__pyx_self, __pyx_v_data, __pyx_v_charset, __pyx_v_field, __pyx_v_use_unicode);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cymysql_10converters_48convert_characters(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_charset, PyObject *__pyx_v_field, PyObject *__pyx_v_use_unicode) {
  PyObject *__pyx_v_field_charset = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_characters", 0);
  __Pyx_INCREF(__pyx_v_data);

  /* "cymysql/converters.py":264
 * 
 * def convert_characters(data, charset=None, field=None, use_unicode=None):
 *     field_charset = charset_by_id(field.charsetnr).name             # <<<<<<<<<<<<<<
 *     if field.flags & FLAG.SET:
 *         return convert_set(data.decode(field_charset))
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__charset_by_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_field, __pyx_n_s__charsetnr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_field_charset = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cymysql/converters.py":265
 * def convert_characters(data, charset=None, field=None, use_unicode=None):
 *     field_charset = charset_by_id(field.charsetnr).name
 *     if field.flags & FLAG.SET:             # <<<<<<<<<<<<<<
 *         return convert_set(data.decode(field_charset))
 *     if field.flags & FLAG.BINARY:
 */
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_field, __pyx_n_s__flags); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLAG); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__SET); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_And(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_4) {

    /* "cymysql/converters.py":266
 *     field_charset = charset_by_id(field.charsetnr).name
 *     if field.flags & FLAG.SET:
 *         return convert_set(data.decode(field_charset))             # <<<<<<<<<<<<<<
 *     if field.flags & FLAG.BINARY:
 *         if PYTHON3 and field_charset != 'binary':
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_set); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_data, __pyx_n_s__decode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_field_charset);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_field_charset);
    __Pyx_GIVEREF(__pyx_v_field_charset);
    __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cymysql/converters.py":267
 *     if field.flags & FLAG.SET:
 *         return convert_set(data.decode(field_charset))
 *     if field.flags & FLAG.BINARY:             # <<<<<<<<<<<<<<
 *         if PYTHON3 and field_charset != 'binary':
 *             return data.decode(field_charset)
 */
  __pyx_t_5 = PyObject_GetAttr(__pyx_v_field, __pyx_n_s__flags); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLAG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__BINARY); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_And(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "cymysql/converters.py":268
 *         return convert_set(data.decode(field_charset))
 *     if field.flags & FLAG.BINARY:
 *         if PYTHON3 and field_charset != 'binary':             # <<<<<<<<<<<<<<
 *             return data.decode(field_charset)
 *         else:
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__PYTHON3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_4) {
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_field_charset, ((PyObject *)__pyx_n_s__binary), Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __pyx_t_6;
    } else {
      __pyx_t_7 = __pyx_t_4;
    }
    if (__pyx_t_7) {

      /* "cymysql/converters.py":269
 *     if field.flags & FLAG.BINARY:
 *         if PYTHON3 and field_charset != 'binary':
 *             return data.decode(field_charset)             # <<<<<<<<<<<<<<
 *         else:
 *             return data
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = PyObject_GetAttr(__pyx_v_data, __pyx_n_s__decode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_field_charset);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_field_charset);
      __Pyx_GIVEREF(__pyx_v_field_charset);
      __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "cymysql/converters.py":271
 *             return data.decode(field_charset)
 *         else:
 *             return data             # <<<<<<<<<<<<<<
 * 
 *     if use_unicode or PYTHON3:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_data);
      __pyx_r = __pyx_v_data;
      goto __pyx_L0;
    }
    __pyx_L5:;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "cymysql/converters.py":273
 *             return data
 * 
 *     if use_unicode or PYTHON3:             # <<<<<<<<<<<<<<
 *         data = data.decode(field_charset)
 *     elif charset != field_charset:
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_use_unicode); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_7) {
    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__PYTHON3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __pyx_t_4;
  } else {
    __pyx_t_6 = __pyx_t_7;
  }
  if (__pyx_t_6) {

    /* "cymysql/converters.py":274
 * 
 *     if use_unicode or PYTHON3:
 *         data = data.decode(field_charset)             # <<<<<<<<<<<<<<
 *     elif charset != field_charset:
 *         data = data.decode(field_charset)
 */
    __pyx_t_5 = PyObject_GetAttr(__pyx_v_data, __pyx_n_s__decode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_field_charset);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_field_charset);
    __Pyx_GIVEREF(__pyx_v_field_charset);
    __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_data);
    __pyx_v_data = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L6;
  }

  /* "cymysql/converters.py":275
 *     if use_unicode or PYTHON3:
 *         data = data.decode(field_charset)
 *     elif charset != field_charset:             # <<<<<<<<<<<<<<
 *         data = data.decode(field_charset)
 *         data = data.encode(charset)
 */
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_charset, __pyx_v_field_charset, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_6) {

    /* "cymysql/converters.py":276
 *         data = data.decode(field_charset)
 *     elif charset != field_charset:
 *         data = data.decode(field_charset)             # <<<<<<<<<<<<<<
 *         data = data.encode(charset)
 *     return data
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_data, __pyx_n_s__decode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_field_charset);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_field_charset);
    __Pyx_GIVEREF(__pyx_v_field_charset);
    __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_data);
    __pyx_v_data = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cymysql/converters.py":277
 *     elif charset != field_charset:
 *         data = data.decode(field_charset)
 *         data = data.encode(charset)             # <<<<<<<<<<<<<<
 *     return data
 * 
 */
    __pyx_t_5 = PyObject_GetAttr(__pyx_v_data, __pyx_n_s__encode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_charset);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_charset);
    __Pyx_GIVEREF(__pyx_v_charset);
    __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_data);
    __pyx_v_data = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "cymysql/converters.py":278
 *         data = data.decode(field_charset)
 *         data = data.encode(charset)
 *     return data             # <<<<<<<<<<<<<<
 * 
 * def convert_int(data, charset=None, field=None, use_unicode=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_data);
  __pyx_r = __pyx_v_data;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cymysql.converters.convert_characters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_field_charset);
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_51convert_int(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7cymysql_10converters_51convert_int = {__Pyx_NAMESTR("convert_int"), (PyCFunction)__pyx_pw_7cymysql_10converters_51convert_int, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7cymysql_10converters_51convert_int(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  CYTHON_UNUSED PyObject *__pyx_v_charset = 0;
  CYTHON_UNUSED PyObject *__pyx_v_field = 0;
  CYTHON_UNUSED PyObject *__pyx_v_use_unicode = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("convert_int (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__data,&__pyx_n_s__charset,&__pyx_n_s__field,&__pyx_n_s__use_unicode,0};
    PyObject* values[4] = {0,0,0,0};

    /* "cymysql/converters.py":280
 *     return data
 * 
 * def convert_int(data, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     return int(data)
 * 
 */
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__data)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__charset);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__field);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__use_unicode);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convert_int") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_charset = values[1];
    __pyx_v_field = values[2];
    __pyx_v_use_unicode = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("convert_int", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cymysql.converters.convert_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cymysql_10converters_50convert_int(__pyx_self, __pyx_v_data, __pyx_v_charset, __pyx_v_field, __pyx_v_use_unicode);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cymysql_10converters_50convert_int(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_charset, CYTHON_UNUSED PyObject *__pyx_v_field, CYTHON_UNUSED PyObject *__pyx_v_use_unicode) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_int", 0);

  /* "cymysql/converters.py":281
 * 
 * def convert_int(data, charset=None, field=None, use_unicode=None):
 *     return int(data)             # <<<<<<<<<<<<<<
 * 
 * def convert_long(data, charset=None, field=None, use_unicode=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_data);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_data);
  __Pyx_GIVEREF(__pyx_v_data);
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cymysql.converters.convert_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_53convert_long(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7cymysql_10converters_53convert_long = {__Pyx_NAMESTR("convert_long"), (PyCFunction)__pyx_pw_7cymysql_10converters_53convert_long, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7cymysql_10converters_53convert_long(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  CYTHON_UNUSED PyObject *__pyx_v_charset = 0;
  CYTHON_UNUSED PyObject *__pyx_v_field = 0;
  CYTHON_UNUSED PyObject *__pyx_v_use_unicode = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("convert_long (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__data,&__pyx_n_s__charset,&__pyx_n_s__field,&__pyx_n_s__use_unicode,0};
    PyObject* values[4] = {0,0,0,0};

    /* "cymysql/converters.py":283
 *     return int(data)
 * 
 * def convert_long(data, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     if PYTHON3:
 *         return int(data)
 */
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__data)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__charset);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__field);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__use_unicode);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convert_long") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_charset = values[1];
    __pyx_v_field = values[2];
    __pyx_v_use_unicode = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("convert_long", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cymysql.converters.convert_long", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cymysql_10converters_52convert_long(__pyx_self, __pyx_v_data, __pyx_v_charset, __pyx_v_field, __pyx_v_use_unicode);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cymysql_10converters_52convert_long(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_charset, CYTHON_UNUSED PyObject *__pyx_v_field, CYTHON_UNUSED PyObject *__pyx_v_use_unicode) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_long", 0);

  /* "cymysql/converters.py":284
 * 
 * def convert_long(data, charset=None, field=None, use_unicode=None):
 *     if PYTHON3:             # <<<<<<<<<<<<<<
 *         return int(data)
 *     else:
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__PYTHON3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cymysql/converters.py":285
 * def convert_long(data, charset=None, field=None, use_unicode=None):
 *     if PYTHON3:
 *         return int(data)             # <<<<<<<<<<<<<<
 *     else:
 *         return long(data)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_data);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_data);
    __Pyx_GIVEREF(__pyx_v_data);
    __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "cymysql/converters.py":287
 *         return int(data)
 *     else:
 *         return long(data)             # <<<<<<<<<<<<<<
 * 
 * def convert_float(data, charset=None, field=None, use_unicode=None):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_data);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_data);
    __Pyx_GIVEREF(__pyx_v_data);
    __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyLong_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cymysql.converters.convert_long", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_55convert_float(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7cymysql_10converters_55convert_float = {__Pyx_NAMESTR("convert_float"), (PyCFunction)__pyx_pw_7cymysql_10converters_55convert_float, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7cymysql_10converters_55convert_float(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  CYTHON_UNUSED PyObject *__pyx_v_charset = 0;
  CYTHON_UNUSED PyObject *__pyx_v_field = 0;
  CYTHON_UNUSED PyObject *__pyx_v_use_unicode = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("convert_float (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__data,&__pyx_n_s__charset,&__pyx_n_s__field,&__pyx_n_s__use_unicode,0};
    PyObject* values[4] = {0,0,0,0};

    /* "cymysql/converters.py":289
 *         return long(data)
 * 
 * def convert_float(data, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     return float(data)
 * 
 */
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__data)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__charset);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__field);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__use_unicode);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convert_float") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_charset = values[1];
    __pyx_v_field = values[2];
    __pyx_v_use_unicode = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("convert_float", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cymysql.converters.convert_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cymysql_10converters_54convert_float(__pyx_self, __pyx_v_data, __pyx_v_charset, __pyx_v_field, __pyx_v_use_unicode);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cymysql_10converters_54convert_float(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_charset, CYTHON_UNUSED PyObject *__pyx_v_field, CYTHON_UNUSED PyObject *__pyx_v_use_unicode) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_float", 0);

  /* "cymysql/converters.py":290
 * 
 * def convert_float(data, charset=None, field=None, use_unicode=None):
 *     return float(data)             # <<<<<<<<<<<<<<
 * 
 * def convert_decimal(data, charset=None, field=None, use_unicode=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_AsDouble(__pyx_v_data); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cymysql.converters.convert_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_57convert_decimal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7cymysql_10converters_57convert_decimal = {__Pyx_NAMESTR("convert_decimal"), (PyCFunction)__pyx_pw_7cymysql_10converters_57convert_decimal, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7cymysql_10converters_57convert_decimal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_charset = 0;
  CYTHON_UNUSED PyObject *__pyx_v_field = 0;
  CYTHON_UNUSED PyObject *__pyx_v_use_unicode = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("convert_decimal (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__data,&__pyx_n_s__charset,&__pyx_n_s__field,&__pyx_n_s__use_unicode,0};
    PyObject* values[4] = {0,0,0,0};

    /* "cymysql/converters.py":292
 *     return float(data)
 * 
 * def convert_decimal(data, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     data = data.decode(charset)
 *     return Decimal(data)
 */
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__data)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__charset);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__field);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__use_unicode);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convert_decimal") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_charset = values[1];
    __pyx_v_field = values[2];
    __pyx_v_use_unicode = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("convert_decimal", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cymysql.converters.convert_decimal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cymysql_10converters_56convert_decimal(__pyx_self, __pyx_v_data, __pyx_v_charset, __pyx_v_field, __pyx_v_use_unicode);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cymysql_10converters_56convert_decimal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_charset, CYTHON_UNUSED PyObject *__pyx_v_field, CYTHON_UNUSED PyObject *__pyx_v_use_unicode) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_decimal", 0);
  __Pyx_INCREF(__pyx_v_data);

  /* "cymysql/converters.py":293
 * 
 * def convert_decimal(data, charset=None, field=None, use_unicode=None):
 *     data = data.decode(charset)             # <<<<<<<<<<<<<<
 *     return Decimal(data)
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_data, __pyx_n_s__decode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_charset);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_charset);
  __Pyx_GIVEREF(__pyx_v_charset);
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_v_data);
  __pyx_v_data = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cymysql/converters.py":294
 * def convert_decimal(data, charset=None, field=None, use_unicode=None):
 *     data = data.decode(charset)
 *     return Decimal(data)             # <<<<<<<<<<<<<<
 * 
 * decoders = {
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__Decimal); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_data);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_data);
  __Pyx_GIVEREF(__pyx_v_data);
  __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cymysql.converters.convert_decimal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cymysql/converters.py":349
 * 
 * 
 * def escape_item(val, charset, encoders=encoders):             # <<<<<<<<<<<<<<
 *     if type(val) in [tuple, list, set]:
 *         return escape_sequence(val, charset)
 */

static PyObject *__pyx_pf_7cymysql_10converters_60__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_encoders);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_encoders);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_encoders);
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cymysql.converters.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cymysql_10converters_59escape_item(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7cymysql_10converters_59escape_item = {__Pyx_NAMESTR("escape_item"), (PyCFunction)__pyx_pw_7cymysql_10converters_59escape_item, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7cymysql_10converters_59escape_item(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_v_charset = 0;
  PyObject *__pyx_v_encoders = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("escape_item (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__val,&__pyx_n_s__charset,&__pyx_n_s__encoders,0};
    PyObject* values[3] = {0,0,0};
    __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);
    values[2] = __pyx_dynamic_args->__pyx_arg_encoders;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__val)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__charset)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("escape_item", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__encoders);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "escape_item") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_val = values[0];
    __pyx_v_charset = values[1];
    __pyx_v_encoders = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("escape_item", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("cymysql.converters.escape_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cymysql_10converters_58escape_item(__pyx_self, __pyx_v_val, __pyx_v_charset, __pyx_v_encoders);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cymysql_10converters_58escape_item(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_charset, PyObject *__pyx_v_encoders) {
  PyObject *__pyx_v_encoder = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("escape_item", 0);
  __Pyx_INCREF(__pyx_v_val);

  /* "cymysql/converters.py":350
 * 
 * def escape_item(val, charset, encoders=encoders):
 *     if type(val) in [tuple, list, set]:             # <<<<<<<<<<<<<<
 *         return escape_sequence(val, charset)
 *     if type(val) is dict:
 */
  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_val)));
  __pyx_t_1 = ((PyObject *)Py_TYPE(__pyx_v_val));
  __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_t_1), ((PyObject *)((PyObject*)(&PyTuple_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!((int)__pyx_t_3)) {
    __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_t_1), ((PyObject *)((PyObject*)(&PyList_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_5 = ((int)__pyx_t_4);
  } else {
    __pyx_t_5 = ((int)__pyx_t_3);
  }
  if (!__pyx_t_5) {
    __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_t_1), ((PyObject *)((PyObject*)(&PySet_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = ((int)__pyx_t_3);
  } else {
    __pyx_t_4 = __pyx_t_5;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_t_4;
  if (__pyx_t_5) {

    /* "cymysql/converters.py":351
 * def escape_item(val, charset, encoders=encoders):
 *     if type(val) in [tuple, list, set]:
 *         return escape_sequence(val, charset)             # <<<<<<<<<<<<<<
 *     if type(val) is dict:
 *         return escape_dict(val, charset)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_sequence); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_val);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val);
    __Pyx_GIVEREF(__pyx_v_val);
    __Pyx_INCREF(__pyx_v_charset);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_charset);
    __Pyx_GIVEREF(__pyx_v_charset);
    __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "cymysql/converters.py":352
 *     if type(val) in [tuple, list, set]:
 *         return escape_sequence(val, charset)
 *     if type(val) is dict:             # <<<<<<<<<<<<<<
 *         return escape_dict(val, charset)
 *     encoder = encoders[type(val)]
 */
  __pyx_t_5 = (((PyObject *)Py_TYPE(__pyx_v_val)) == ((PyObject *)((PyObject*)(&PyDict_Type))));
  if (__pyx_t_5) {

    /* "cymysql/converters.py":353
 *         return escape_sequence(val, charset)
 *     if type(val) is dict:
 *         return escape_dict(val, charset)             # <<<<<<<<<<<<<<
 *     encoder = encoders[type(val)]
 *     val = encoder(val)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_dict); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_val);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val);
    __Pyx_GIVEREF(__pyx_v_val);
    __Pyx_INCREF(__pyx_v_charset);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_charset);
    __Pyx_GIVEREF(__pyx_v_charset);
    __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "cymysql/converters.py":354
 *     if type(val) is dict:
 *         return escape_dict(val, charset)
 *     encoder = encoders[type(val)]             # <<<<<<<<<<<<<<
 *     val = encoder(val)
 *     if type(val) is str:
 */
  __pyx_t_1 = PyObject_GetItem(__pyx_v_encoders, ((PyObject *)Py_TYPE(__pyx_v_val))); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_encoder = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cymysql/converters.py":355
 *         return escape_dict(val, charset)
 *     encoder = encoders[type(val)]
 *     val = encoder(val)             # <<<<<<<<<<<<<<
 *     if type(val) is str:
 *         return val
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_val);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_val);
  __Pyx_GIVEREF(__pyx_v_val);
  __pyx_t_2 = PyObject_Call(__pyx_v_encoder, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_v_val);
  __pyx_v_val = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cymysql/converters.py":356
 *     encoder = encoders[type(val)]
 *     val = encoder(val)
 *     if type(val) is str:             # <<<<<<<<<<<<<<
 *         return val
 *     val = val.encode(charset)
 */
  __pyx_t_5 = (((PyObject *)Py_TYPE(__pyx_v_val)) == ((PyObject *)((PyObject*)(&PyString_Type))));
  if (__pyx_t_5) {

    /* "cymysql/converters.py":357
 *     val = encoder(val)
 *     if type(val) is str:
 *         return val             # <<<<<<<<<<<<<<
 *     val = val.encode(charset)
 *     return val
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_val);
    __pyx_r = __pyx_v_val;
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "cymysql/converters.py":358
 *     if type(val) is str:
 *         return val
 *     val = val.encode(charset)             # <<<<<<<<<<<<<<
 *     return val
 * 
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_charset);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_charset);
  __Pyx_GIVEREF(__pyx_v_charset);
  __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_v_val);
  __pyx_v_val = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "cymysql/converters.py":359
 *         return val
 *     val = val.encode(charset)
 *     return val             # <<<<<<<<<<<<<<
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_val);
  __pyx_r = __pyx_v_val;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cymysql.converters.escape_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_encoder);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_tp_new_7cymysql_10converters___pyx_scope_struct__escape_set(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_7cymysql_10converters___pyx_scope_struct__escape_set *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_7cymysql_10converters___pyx_scope_struct__escape_set *)o);
  p->__pyx_v_charset = 0;
  return o;
}

static void __pyx_tp_dealloc_7cymysql_10converters___pyx_scope_struct__escape_set(PyObject *o) {
  struct __pyx_obj_7cymysql_10converters___pyx_scope_struct__escape_set *p = (struct __pyx_obj_7cymysql_10converters___pyx_scope_struct__escape_set *)o;
  Py_CLEAR(p->__pyx_v_charset);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7cymysql_10converters___pyx_scope_struct__escape_set(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7cymysql_10converters___pyx_scope_struct__escape_set *p = (struct __pyx_obj_7cymysql_10converters___pyx_scope_struct__escape_set *)o;
  if (p->__pyx_v_charset) {
    e = (*v)(p->__pyx_v_charset, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7cymysql_10converters___pyx_scope_struct__escape_set(PyObject *o) {
  struct __pyx_obj_7cymysql_10converters___pyx_scope_struct__escape_set *p = (struct __pyx_obj_7cymysql_10converters___pyx_scope_struct__escape_set *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->__pyx_v_charset);
  p->__pyx_v_charset = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_7cymysql_10converters___pyx_scope_struct__escape_set[] = {
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct__escape_set = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct__escape_set = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct__escape_set = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct__escape_set = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_7cymysql_10converters___pyx_scope_struct__escape_set = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("cymysql.converters.__pyx_scope_struct__escape_set"), /*tp_name*/
  sizeof(struct __pyx_obj_7cymysql_10converters___pyx_scope_struct__escape_set), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cymysql_10converters___pyx_scope_struct__escape_set, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number___pyx_scope_struct__escape_set, /*tp_as_number*/
  &__pyx_tp_as_sequence___pyx_scope_struct__escape_set, /*tp_as_sequence*/
  &__pyx_tp_as_mapping___pyx_scope_struct__escape_set, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer___pyx_scope_struct__escape_set, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7cymysql_10converters___pyx_scope_struct__escape_set, /*tp_traverse*/
  __pyx_tp_clear_7cymysql_10converters___pyx_scope_struct__escape_set, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7cymysql_10converters___pyx_scope_struct__escape_set, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7cymysql_10converters___pyx_scope_struct__escape_set, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    __Pyx_NAMESTR("converters"),
    0, /* m_doc */
    -1, /* m_size */
    __pyx_methods /* m_methods */,
    NULL, /* m_reload */
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
  {&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0},
  {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0},
  {&__pyx_kp_u_119, __pyx_k_119, sizeof(__pyx_k_119), 0, 1, 0, 0},
  {&__pyx_kp_s_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 0, 1, 0},
  {&__pyx_kp_u_120, __pyx_k_120, sizeof(__pyx_k_120), 0, 1, 0, 0},
  {&__pyx_kp_u_121, __pyx_k_121, sizeof(__pyx_k_121), 0, 1, 0, 0},
  {&__pyx_kp_u_122, __pyx_k_122, sizeof(__pyx_k_122), 0, 1, 0, 0},
  {&__pyx_kp_u_123, __pyx_k_123, sizeof(__pyx_k_123), 0, 1, 0, 0},
  {&__pyx_kp_u_124, __pyx_k_124, sizeof(__pyx_k_124), 0, 1, 0, 0},
  {&__pyx_kp_u_125, __pyx_k_125, sizeof(__pyx_k_125), 0, 1, 0, 0},
  {&__pyx_kp_u_126, __pyx_k_126, sizeof(__pyx_k_126), 0, 1, 0, 0},
  {&__pyx_kp_u_127, __pyx_k_127, sizeof(__pyx_k_127), 0, 1, 0, 0},
  {&__pyx_kp_u_128, __pyx_k_128, sizeof(__pyx_k_128), 0, 1, 0, 0},
  {&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0},
  {&__pyx_kp_s_14, __pyx_k_14, sizeof(__pyx_k_14), 0, 0, 1, 0},
  {&__pyx_kp_s_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 0, 1, 0},
  {&__pyx_kp_s_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 0, 1, 0},
  {&__pyx_kp_s_19, __pyx_k_19, sizeof(__pyx_k_19), 0, 0, 1, 0},
  {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0},
  {&__pyx_n_s_26, __pyx_k_26, sizeof(__pyx_k_26), 0, 0, 1, 1},
  {&__pyx_n_s_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 0, 1, 1},
  {&__pyx_n_s_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 1, 1},
  {&__pyx_kp_s_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 1, 0},
  {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0},
  {&__pyx_kp_s_31, __pyx_k_31, sizeof(__pyx_k_31), 0, 0, 1, 0},
  {&__pyx_kp_s_32, __pyx_k_32, sizeof(__pyx_k_32), 0, 0, 1, 0},
  {&__pyx_kp_s_33, __pyx_k_33, sizeof(__pyx_k_33), 0, 0, 1, 0},
  {&__pyx_kp_s_34, __pyx_k_34, sizeof(__pyx_k_34), 0, 0, 1, 0},
  {&__pyx_kp_s_35, __pyx_k_35, sizeof(__pyx_k_35), 0, 0, 1, 0},
  {&__pyx_kp_s_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 0, 1, 0},
  {&__pyx_kp_s_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 0, 1, 0},
  {&__pyx_kp_s_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 0, 1, 0},
  {&__pyx_kp_s_39, __pyx_k_39, sizeof(__pyx_k_39), 0, 0, 1, 0},
  {&__pyx_n_s_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 0, 1, 1},
  {&__pyx_kp_s_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 0, 1, 0},
  {&__pyx_kp_s_41, __pyx_k_41, sizeof(__pyx_k_41), 0, 0, 1, 0},
  {&__pyx_kp_s_42, __pyx_k_42, sizeof(__pyx_k_42), 0, 0, 1, 0},
  {&__pyx_kp_s_43, __pyx_k_43, sizeof(__pyx_k_43), 0, 0, 1, 0},
  {&__pyx_kp_s_44, __pyx_k_44, sizeof(__pyx_k_44), 0, 0, 1, 0},
  {&__pyx_kp_s_47, __pyx_k_47, sizeof(__pyx_k_47), 0, 0, 1, 0},
  {&__pyx_kp_s_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 1, 0},
  {&__pyx_kp_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 0},
  {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0},
  {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0},
  {&__pyx_n_s_92, __pyx_k_92, sizeof(__pyx_k_92), 0, 0, 1, 1},
  {&__pyx_kp_s__0, __pyx_k__0, sizeof(__pyx_k__0), 0, 0, 1, 0},
  {&__pyx_kp_s__0x, __pyx_k__0x, sizeof(__pyx_k__0x), 0, 0, 1, 0},
  {&__pyx_n_s__BINARY, __pyx_k__BINARY, sizeof(__pyx_k__BINARY), 0, 0, 1, 1},
  {&__pyx_n_s__BIT, __pyx_k__BIT, sizeof(__pyx_k__BIT), 0, 0, 1, 1},
  {&__pyx_n_s__BLOB, __pyx_k__BLOB, sizeof(__pyx_k__BLOB), 0, 0, 1, 1},
  {&__pyx_n_s__DATE, __pyx_k__DATE, sizeof(__pyx_k__DATE), 0, 0, 1, 1},
  {&__pyx_n_s__DATETIME, __pyx_k__DATETIME, sizeof(__pyx_k__DATETIME), 0, 0, 1, 1},
  {&__pyx_n_s__DECIMAL, __pyx_k__DECIMAL, sizeof(__pyx_k__DECIMAL), 0, 0, 1, 1},
  {&__pyx_n_s__DOUBLE, __pyx_k__DOUBLE, sizeof(__pyx_k__DOUBLE), 0, 0, 1, 1},
  {&__pyx_n_s__Decimal, __pyx_k__Decimal, sizeof(__pyx_k__Decimal), 0, 0, 1, 1},
  {&__pyx_n_s__ESCAPE_MAP, __pyx_k__ESCAPE_MAP, sizeof(__pyx_k__ESCAPE_MAP), 0, 0, 1, 1},
  {&__pyx_n_s__ESCAPE_REGEX, __pyx_k__ESCAPE_REGEX, sizeof(__pyx_k__ESCAPE_REGEX), 0, 0, 1, 1},
  {&__pyx_n_s__FIELD_TYPE, __pyx_k__FIELD_TYPE, sizeof(__pyx_k__FIELD_TYPE), 0, 0, 1, 1},
  {&__pyx_n_s__FLAG, __pyx_k__FLAG, sizeof(__pyx_k__FLAG), 0, 0, 1, 1},
  {&__pyx_n_s__FLOAT, __pyx_k__FLOAT, sizeof(__pyx_k__FLOAT), 0, 0, 1, 1},
  {&__pyx_n_s__INT24, __pyx_k__INT24, sizeof(__pyx_k__INT24), 0, 0, 1, 1},
  {&__pyx_n_s__ImportError, __pyx_k__ImportError, sizeof(__pyx_k__ImportError), 0, 0, 1, 1},
  {&__pyx_n_s__LONG, __pyx_k__LONG, sizeof(__pyx_k__LONG), 0, 0, 1, 1},
  {&__pyx_n_s__LONGLONG, __pyx_k__LONGLONG, sizeof(__pyx_k__LONGLONG), 0, 0, 1, 1},
  {&__pyx_n_s__LONG_BLOB, __pyx_k__LONG_BLOB, sizeof(__pyx_k__LONG_BLOB), 0, 0, 1, 1},
  {&__pyx_n_s__MEDIUM_BLOB, __pyx_k__MEDIUM_BLOB, sizeof(__pyx_k__MEDIUM_BLOB), 0, 0, 1, 1},
  {&__pyx_n_s__NEWDECIMAL, __pyx_k__NEWDECIMAL, sizeof(__pyx_k__NEWDECIMAL), 0, 0, 1, 1},
  {&__pyx_n_s__NULL, __pyx_k__NULL, sizeof(__pyx_k__NULL), 0, 0, 1, 1},
  {&__pyx_n_s__PYTHON3, __pyx_k__PYTHON3, sizeof(__pyx_k__PYTHON3), 0, 0, 1, 1},
  {&__pyx_n_s__SET, __pyx_k__SET, sizeof(__pyx_k__SET), 0, 0, 1, 1},
  {&__pyx_n_s__SHORT, __pyx_k__SHORT, sizeof(__pyx_k__SHORT), 0, 0, 1, 1},
  {&__pyx_n_s__STRING, __pyx_k__STRING, sizeof(__pyx_k__STRING), 0, 0, 1, 1},
  {&__pyx_n_s__T, __pyx_k__T, sizeof(__pyx_k__T), 0, 0, 1, 1},
  {&__pyx_n_s__TIME, __pyx_k__TIME, sizeof(__pyx_k__TIME), 0, 0, 1, 1},
  {&__pyx_n_s__TIMESTAMP, __pyx_k__TIMESTAMP, sizeof(__pyx_k__TIMESTAMP), 0, 0, 1, 1},
  {&__pyx_n_s__TINY, __pyx_k__TINY, sizeof(__pyx_k__TINY), 0, 0, 1, 1},
  {&__pyx_n_s__TINY_BLOB, __pyx_k__TINY_BLOB, sizeof(__pyx_k__TINY_BLOB), 0, 0, 1, 1},
  {&__pyx_n_s__VARCHAR, __pyx_k__VARCHAR, sizeof(__pyx_k__VARCHAR), 0, 0, 1, 1},
  {&__pyx_n_s__VAR_STRING, __pyx_k__VAR_STRING, sizeof(__pyx_k__VAR_STRING), 0, 0, 1, 1},
  {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
  {&__pyx_n_s__YEAR, __pyx_k__YEAR, sizeof(__pyx_k__YEAR), 0, 0, 1, 1},
  {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
  {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
  {&__pyx_n_s__ascii, __pyx_k__ascii, sizeof(__pyx_k__ascii), 0, 0, 1, 1},
  {&__pyx_n_s__b, __pyx_k__b, sizeof(__pyx_k__b), 0, 0, 1, 1},
  {&__pyx_n_s__binary, __pyx_k__binary, sizeof(__pyx_k__binary), 0, 0, 1, 1},
  {&__pyx_n_s__c, __pyx_k__c, sizeof(__pyx_k__c), 0, 0, 1, 1},
  {&__pyx_n_s__charset, __pyx_k__charset, sizeof(__pyx_k__charset), 0, 0, 1, 1},
  {&__pyx_n_s__charset_by_id, __pyx_k__charset_by_id, sizeof(__pyx_k__charset_by_id), 0, 0, 1, 1},
  {&__pyx_n_s__charsetnr, __pyx_k__charsetnr, sizeof(__pyx_k__charsetnr), 0, 0, 1, 1},
  {&__pyx_n_s__compile, __pyx_k__compile, sizeof(__pyx_k__compile), 0, 0, 1, 1},
  {&__pyx_n_s__convert_bit, __pyx_k__convert_bit, sizeof(__pyx_k__convert_bit), 0, 0, 1, 1},
  {&__pyx_n_s__convert_blob, __pyx_k__convert_blob, sizeof(__pyx_k__convert_blob), 0, 0, 1, 1},
  {&__pyx_n_s__convert_characters, __pyx_k__convert_characters, sizeof(__pyx_k__convert_characters), 0, 0, 1, 1},
  {&__pyx_n_s__convert_date, __pyx_k__convert_date, sizeof(__pyx_k__convert_date), 0, 0, 1, 1},
  {&__pyx_n_s__convert_datetime, __pyx_k__convert_datetime, sizeof(__pyx_k__convert_datetime), 0, 0, 1, 1},
  {&__pyx_n_s__convert_decimal, __pyx_k__convert_decimal, sizeof(__pyx_k__convert_decimal), 0, 0, 1, 1},
  {&__pyx_n_s__convert_float, __pyx_k__convert_float, sizeof(__pyx_k__convert_float), 0, 0, 1, 1},
  {&__pyx_n_s__convert_int, __pyx_k__convert_int, sizeof(__pyx_k__convert_int), 0, 0, 1, 1},
  {&__pyx_n_s__convert_long, __pyx_k__convert_long, sizeof(__pyx_k__convert_long), 0, 0, 1, 1},
  {&__pyx_n_s__convert_set, __pyx_k__convert_set, sizeof(__pyx_k__convert_set), 0, 0, 1, 1},
  {&__pyx_n_s__convert_time, __pyx_k__convert_time, sizeof(__pyx_k__convert_time), 0, 0, 1, 1},
  {&__pyx_n_s__convert_timedelta, __pyx_k__convert_timedelta, sizeof(__pyx_k__convert_timedelta), 0, 0, 1, 1},
  {&__pyx_n_s__data, __pyx_k__data, sizeof(__pyx_k__data), 0, 0, 1, 1},
  {&__pyx_n_s__date, __pyx_k__date, sizeof(__pyx_k__date), 0, 0, 1, 1},
  {&__pyx_n_s__datetime, __pyx_k__datetime, sizeof(__pyx_k__datetime), 0, 0, 1, 1},
  {&__pyx_n_s__day, __pyx_k__day, sizeof(__pyx_k__day), 0, 0, 1, 1},
  {&__pyx_n_s__days, __pyx_k__days, sizeof(__pyx_k__days), 0, 0, 1, 1},
  {&__pyx_n_s__decimal, __pyx_k__decimal, sizeof(__pyx_k__decimal), 0, 0, 1, 1},
  {&__pyx_n_s__decode, __pyx_k__decode, sizeof(__pyx_k__decode), 0, 0, 1, 1},
  {&__pyx_n_s__decoders, __pyx_k__decoders, sizeof(__pyx_k__decoders), 0, 0, 1, 1},
  {&__pyx_n_s__encode, __pyx_k__encode, sizeof(__pyx_k__encode), 0, 0, 1, 1},
  {&__pyx_n_s__encoder, __pyx_k__encoder, sizeof(__pyx_k__encoder), 0, 0, 1, 1},
  {&__pyx_n_s__encoders, __pyx_k__encoders, sizeof(__pyx_k__encoders), 0, 0, 1, 1},
  {&__pyx_n_s__escape_None, __pyx_k__escape_None, sizeof(__pyx_k__escape_None), 0, 0, 1, 1},
  {&__pyx_n_s__escape_bool, __pyx_k__escape_bool, sizeof(__pyx_k__escape_bool), 0, 0, 1, 1},
  {&__pyx_n_s__escape_bytes, __pyx_k__escape_bytes, sizeof(__pyx_k__escape_bytes), 0, 0, 1, 1},
  {&__pyx_n_s__escape_date, __pyx_k__escape_date, sizeof(__pyx_k__escape_date), 0, 0, 1, 1},
  {&__pyx_n_s__escape_datetime, __pyx_k__escape_datetime, sizeof(__pyx_k__escape_datetime), 0, 0, 1, 1},
  {&__pyx_n_s__escape_decimal, __pyx_k__escape_decimal, sizeof(__pyx_k__escape_decimal), 0, 0, 1, 1},
  {&__pyx_n_s__escape_dict, __pyx_k__escape_dict, sizeof(__pyx_k__escape_dict), 0, 0, 1, 1},
  {&__pyx_n_s__escape_float, __pyx_k__escape_float, sizeof(__pyx_k__escape_float), 0, 0, 1, 1},
  {&__pyx_n_s__escape_int, __pyx_k__escape_int, sizeof(__pyx_k__escape_int), 0, 0, 1, 1},
  {&__pyx_n_s__escape_item, __pyx_k__escape_item, sizeof(__pyx_k__escape_item), 0, 0, 1, 1},
  {&__pyx_n_s__escape_long, __pyx_k__escape_long, sizeof(__pyx_k__escape_long), 0, 0, 1, 1},
  {&__pyx_n_s__escape_object, __pyx_k__escape_object, sizeof(__pyx_k__escape_object), 0, 0, 1, 1},
  {&__pyx_n_s__escape_sequence, __pyx_k__escape_sequence, sizeof(__pyx_k__escape_sequence), 0, 0, 1, 1},
  {&__pyx_n_s__escape_set, __pyx_k__escape_set, sizeof(__pyx_k__escape_set), 0, 0, 1, 1},
  {&__pyx_n_s__escape_string, __pyx_k__escape_string, sizeof(__pyx_k__escape_string), 0, 0, 1, 1},
  {&__pyx_n_s__escape_struct_time, __pyx_k__escape_struct_time, sizeof(__pyx_k__escape_struct_time), 0, 0, 1, 1},
  {&__pyx_n_s__escape_time, __pyx_k__escape_time, sizeof(__pyx_k__escape_time), 0, 0, 1, 1},
  {&__pyx_n_s__escape_timedelta, __pyx_k__escape_timedelta, sizeof(__pyx_k__escape_timedelta), 0, 0, 1, 1},
  {&__pyx_n_s__escape_unicode, __pyx_k__escape_unicode, sizeof(__pyx_k__escape_unicode), 0, 0, 1, 1},
  {&__pyx_n_s__field, __pyx_k__field, sizeof(__pyx_k__field), 0, 0, 1, 1},
  {&__pyx_n_s__field_charset, __pyx_k__field_charset, sizeof(__pyx_k__field_charset), 0, 0, 1, 1},
  {&__pyx_n_s__flags, __pyx_k__flags, sizeof(__pyx_k__flags), 0, 0, 1, 1},
  {&__pyx_n_s__get, __pyx_k__get, sizeof(__pyx_k__get), 0, 0, 1, 1},
  {&__pyx_n_s__group, __pyx_k__group, sizeof(__pyx_k__group), 0, 0, 1, 1},
  {&__pyx_n_s__hex, __pyx_k__hex, sizeof(__pyx_k__hex), 0, 0, 1, 1},
  {&__pyx_n_s__hms, __pyx_k__hms, sizeof(__pyx_k__hms), 0, 0, 1, 1},
  {&__pyx_n_s__hour, __pyx_k__hour, sizeof(__pyx_k__hour), 0, 0, 1, 1},
  {&__pyx_n_s__hours, __pyx_k__hours, sizeof(__pyx_k__hours), 0, 0, 1, 1},
  {&__pyx_n_s__item, __pyx_k__item, sizeof(__pyx_k__item), 0, 0, 1, 1},
  {&__pyx_n_s__items, __pyx_k__items, sizeof(__pyx_k__items), 0, 0, 1, 1},
  {&__pyx_n_s__join, __pyx_k__join, sizeof(__pyx_k__join), 0, 0, 1, 1},
  {&__pyx_n_s__k, __pyx_k__k, sizeof(__pyx_k__k), 0, 0, 1, 1},
  {&__pyx_n_s__map, __pyx_k__map, sizeof(__pyx_k__map), 0, 0, 1, 1},
  {&__pyx_n_s__microsecond, __pyx_k__microsecond, sizeof(__pyx_k__microsecond), 0, 0, 1, 1},
  {&__pyx_n_s__microseconds, __pyx_k__microseconds, sizeof(__pyx_k__microseconds), 0, 0, 1, 1},
  {&__pyx_n_s__minute, __pyx_k__minute, sizeof(__pyx_k__minute), 0, 0, 1, 1},
  {&__pyx_n_s__minutes, __pyx_k__minutes, sizeof(__pyx_k__minutes), 0, 0, 1, 1},
  {&__pyx_n_s__month, __pyx_k__month, sizeof(__pyx_k__month), 0, 0, 1, 1},
  {&__pyx_n_s__n, __pyx_k__n, sizeof(__pyx_k__n), 0, 0, 1, 1},
  {&__pyx_n_s__name, __pyx_k__name, sizeof(__pyx_k__name), 0, 0, 1, 1},
  {&__pyx_n_s__obj, __pyx_k__obj, sizeof(__pyx_k__obj), 0, 0, 1, 1},
  {&__pyx_n_s__quoted, __pyx_k__quoted, sizeof(__pyx_k__quoted), 0, 0, 1, 1},
  {&__pyx_n_s__re, __pyx_k__re, sizeof(__pyx_k__re), 0, 0, 1, 1},
  {&__pyx_n_s__s, __pyx_k__s, sizeof(__pyx_k__s), 0, 0, 1, 1},
  {&__pyx_n_s__second, __pyx_k__second, sizeof(__pyx_k__second), 0, 0, 1, 1},
  {&__pyx_n_s__seconds, __pyx_k__seconds, sizeof(__pyx_k__seconds), 0, 0, 1, 1},
  {&__pyx_n_s__sep, __pyx_k__sep, sizeof(__pyx_k__sep), 0, 0, 1, 1},
  {&__pyx_n_s__split, __pyx_k__split, sizeof(__pyx_k__split), 0, 0, 1, 1},
  {&__pyx_n_s__struct_time, __pyx_k__struct_time, sizeof(__pyx_k__struct_time), 0, 0, 1, 1},
  {&__pyx_n_s__sub, __pyx_k__sub, sizeof(__pyx_k__sub), 0, 0, 1, 1},
  {&__pyx_n_s__sys, __pyx_k__sys, sizeof(__pyx_k__sys), 0, 0, 1, 1},
  {&__pyx_n_s__tail, __pyx_k__tail, sizeof(__pyx_k__tail), 0, 0, 1, 1},
  {&__pyx_n_s__tdelta, __pyx_k__tdelta, sizeof(__pyx_k__tdelta), 0, 0, 1, 1},
  {&__pyx_n_s__time, __pyx_k__time, sizeof(__pyx_k__time), 0, 0, 1, 1},
  {&__pyx_n_s__timedelta, __pyx_k__timedelta, sizeof(__pyx_k__timedelta), 0, 0, 1, 1},
  {&__pyx_n_s__timestamp, __pyx_k__timestamp, sizeof(__pyx_k__timestamp), 0, 0, 1, 1},
  {&__pyx_n_s__use_unicode, __pyx_k__use_unicode, sizeof(__pyx_k__use_unicode), 0, 0, 1, 1},
  {&__pyx_n_s__v, __pyx_k__v, sizeof(__pyx_k__v), 0, 0, 1, 1},
  {&__pyx_n_s__val, __pyx_k__val, sizeof(__pyx_k__val), 0, 0, 1, 1},
  {&__pyx_n_s__value, __pyx_k__value, sizeof(__pyx_k__value), 0, 0, 1, 1},
  {&__pyx_n_s__version_info, __pyx_k__version_info, sizeof(__pyx_k__version_info), 0, 0, 1, 1},
  {&__pyx_n_s__x, __pyx_k__x, sizeof(__pyx_k__x), 0, 0, 1, 1},
  {&__pyx_n_s__year, __pyx_k__year, sizeof(__pyx_k__year), 0, 0, 1, 1},
  {&__pyx_n_s__ymd, __pyx_k__ymd, sizeof(__pyx_k__ymd), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_ImportError = __Pyx_GetName(__pyx_b, __pyx_n_s__ImportError); if (!__pyx_builtin_ImportError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_map = __Pyx_GetName(__pyx_b, __pyx_n_s__map); if (!__pyx_builtin_map) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_hex = __Pyx_GetName(__pyx_b, __pyx_n_s__hex); if (!__pyx_builtin_hex) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "cymysql/converters.py":50
 * def escape_string(value):
 *     return ("'%s'" % ESCAPE_REGEX.sub(
 *             lambda match: ESCAPE_MAP.get(match.group(0)), value))             # <<<<<<<<<<<<<<
 * 
 * def escape_bytes(value):
 */
  __pyx_k_tuple_6 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_6);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_6, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_6));

  /* "cymysql/converters.py":118
 *     try:
 *         ymd, hms = obj.split(sep, 1)
 *         return datetime.datetime(*[ int(x) for x in ymd.split('-')+hms.split(':') ])             # <<<<<<<<<<<<<<
 *     except ValueError:
 *         return convert_date(obj, charset, field, use_unicode)
 */
  __pyx_k_tuple_16 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_16);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_15));
  PyTuple_SET_ITEM(__pyx_k_tuple_16, 0, ((PyObject *)__pyx_kp_s_15));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_15));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_16));
  __pyx_k_tuple_18 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_18);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_17));
  PyTuple_SET_ITEM(__pyx_k_tuple_18, 0, ((PyObject *)__pyx_kp_s_17));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_17));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_18));

  /* "cymysql/converters.py":145
 *             obj = obj.decode(charset)
 *         if "." in obj:
 *             (obj, tail) = obj.split('.')             # <<<<<<<<<<<<<<
 *             microseconds = int(tail)
 *         hours, minutes, seconds = obj.split(':')
 */
  __pyx_k_tuple_20 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_20);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_19));
  PyTuple_SET_ITEM(__pyx_k_tuple_20, 0, ((PyObject *)__pyx_kp_s_19));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_20));

  /* "cymysql/converters.py":147
 *             (obj, tail) = obj.split('.')
 *             microseconds = int(tail)
 *         hours, minutes, seconds = obj.split(':')             # <<<<<<<<<<<<<<
 *         tdelta = datetime.timedelta(
 *             hours = int(hours),
 */
  __pyx_k_tuple_21 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_21);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_17));
  PyTuple_SET_ITEM(__pyx_k_tuple_21, 0, ((PyObject *)__pyx_kp_s_17));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_17));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_21));

  /* "cymysql/converters.py":183
 *         microseconds = 0
 *         if "." in obj:
 *             (obj, tail) = obj.split('.')             # <<<<<<<<<<<<<<
 *             microseconds = int(tail)
 *         hours, minutes, seconds = obj.split(':')
 */
  __pyx_k_tuple_22 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_22);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_19));
  PyTuple_SET_ITEM(__pyx_k_tuple_22, 0, ((PyObject *)__pyx_kp_s_19));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_22));

  /* "cymysql/converters.py":185
 *             (obj, tail) = obj.split('.')
 *             microseconds = int(tail)
 *         hours, minutes, seconds = obj.split(':')             # <<<<<<<<<<<<<<
 *         return datetime.time(hour=int(hours), minute=int(minutes),
 *                              second=int(seconds), microsecond=microseconds)
 */
  __pyx_k_tuple_23 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_23);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_17));
  PyTuple_SET_ITEM(__pyx_k_tuple_23, 0, ((PyObject *)__pyx_kp_s_17));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_17));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_23));

  /* "cymysql/converters.py":209
 *             (not PYTHON3 and not isinstance(obj, unicode))):
 *             obj = obj.decode(charset)
 *         return datetime.date(*[ int(x) for x in obj.split('-', 2) ])             # <<<<<<<<<<<<<<
 *     except ValueError:
 *         return None
 */
  __pyx_k_tuple_24 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_24);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_15));
  PyTuple_SET_ITEM(__pyx_k_tuple_24, 0, ((PyObject *)__pyx_kp_s_15));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_15));
  __Pyx_INCREF(__pyx_int_2);
  PyTuple_SET_ITEM(__pyx_k_tuple_24, 1, __pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_24));

  /* "cymysql/converters.py":250
 * 
 * def convert_set(s):
 *     return set(s.split(","))             # <<<<<<<<<<<<<<
 * 
 * def convert_bit(b, charset=None, field=None, use_unicode=None):
 */
  __pyx_k_tuple_25 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_25);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
  PyTuple_SET_ITEM(__pyx_k_tuple_25, 0, ((PyObject *)__pyx_kp_s_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_25));

  /* "cymysql/converters.py":15
 * PYTHON3 = sys.version_info[0] > 2
 * 
 * ESCAPE_REGEX = re.compile(r"[\0\n\r\032\'\"\\]")             # <<<<<<<<<<<<<<
 * ESCAPE_MAP = {'\0': '\\0', '\n': '\\n', '\r': '\\r', '\032': '\\Z',
 *               '\'': '\\\'', '"': '\\"', '\\': '\\\\'}
 */
  __pyx_k_tuple_30 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_30);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_29));
  PyTuple_SET_ITEM(__pyx_k_tuple_30, 0, ((PyObject *)__pyx_kp_s_29));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_29));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_30));

  /* "cymysql/converters.py":19
 *               '\'': '\\\'', '"': '\\"', '\\': '\\\\'}
 * 
 * def escape_dict(val, charset):             # <<<<<<<<<<<<<<
 *     n = {}
 *     for k, v in val.items():
 */
  __pyx_k_tuple_45 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_45);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_45, 0, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__charset));
  PyTuple_SET_ITEM(__pyx_k_tuple_45, 1, ((PyObject *)__pyx_n_s__charset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__charset));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_45, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_45, 3, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__v));
  PyTuple_SET_ITEM(__pyx_k_tuple_45, 4, ((PyObject *)__pyx_n_s__v));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__quoted));
  PyTuple_SET_ITEM(__pyx_k_tuple_45, 5, ((PyObject *)__pyx_n_s__quoted));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__quoted));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_45));
  __pyx_k_codeobj_46 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__escape_dict, 19, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cymysql/converters.py":26
 *     return n
 * 
 * def escape_sequence(val, charset):             # <<<<<<<<<<<<<<
 *     n = []
 *     for item in val:
 */
  __pyx_k_tuple_48 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_48);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_48, 0, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__charset));
  PyTuple_SET_ITEM(__pyx_k_tuple_48, 1, ((PyObject *)__pyx_n_s__charset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__charset));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_48, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__item));
  PyTuple_SET_ITEM(__pyx_k_tuple_48, 3, ((PyObject *)__pyx_n_s__item));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__item));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__quoted));
  PyTuple_SET_ITEM(__pyx_k_tuple_48, 4, ((PyObject *)__pyx_n_s__quoted));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__quoted));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_48));
  __pyx_k_codeobj_49 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__escape_sequence, 26, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cymysql/converters.py":33
 *     return "(" + ",".join(n) + ")"
 * 
 * def escape_set(val, charset):             # <<<<<<<<<<<<<<
 *     val = map(lambda x: escape_item(x, charset), val)
 *     return ','.join(val)
 */
  __pyx_k_tuple_50 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_50);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_50, 0, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__charset));
  PyTuple_SET_ITEM(__pyx_k_tuple_50, 1, ((PyObject *)__pyx_n_s__charset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__charset));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_50));
  __pyx_k_codeobj_51 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__escape_set, 33, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cymysql/converters.py":37
 *     return ','.join(val)
 * 
 * def escape_bool(value):             # <<<<<<<<<<<<<<
 *     return str(int(value))
 * 
 */
  __pyx_k_tuple_52 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_52);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__value));
  PyTuple_SET_ITEM(__pyx_k_tuple_52, 0, ((PyObject *)__pyx_n_s__value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__value));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_52));
  __pyx_k_codeobj_53 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__escape_bool, 37, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cymysql/converters.py":40
 *     return str(int(value))
 * 
 * def escape_object(value):             # <<<<<<<<<<<<<<
 *     return str(value)
 * 
 */
  __pyx_k_tuple_54 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_54);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__value));
  PyTuple_SET_ITEM(__pyx_k_tuple_54, 0, ((PyObject *)__pyx_n_s__value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__value));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_54));
  __pyx_k_codeobj_55 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__escape_object, 40, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cymysql/converters.py":45
 * escape_int = escape_long = escape_object
 * 
 * def escape_float(value):             # <<<<<<<<<<<<<<
 *     return ('%.15g' % value)
 * 
 */
  __pyx_k_tuple_56 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_56);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__value));
  PyTuple_SET_ITEM(__pyx_k_tuple_56, 0, ((PyObject *)__pyx_n_s__value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__value));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_56));
  __pyx_k_codeobj_57 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__escape_float, 45, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cymysql/converters.py":48
 *     return ('%.15g' % value)
 * 
 * def escape_string(value):             # <<<<<<<<<<<<<<
 *     return ("'%s'" % ESCAPE_REGEX.sub(
 *             lambda match: ESCAPE_MAP.get(match.group(0)), value))
 */
  __pyx_k_tuple_58 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_58);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__value));
  PyTuple_SET_ITEM(__pyx_k_tuple_58, 0, ((PyObject *)__pyx_n_s__value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__value));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_58));
  __pyx_k_codeobj_59 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__escape_string, 48, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cymysql/converters.py":52
 *             lambda match: ESCAPE_MAP.get(match.group(0)), value))
 * 
 * def escape_bytes(value):             # <<<<<<<<<<<<<<
 *     if len(value)==0:
 *         return "''"
 */
  __pyx_k_tuple_60 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_60);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__value));
  PyTuple_SET_ITEM(__pyx_k_tuple_60, 0, ((PyObject *)__pyx_n_s__value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__value));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__c));
  PyTuple_SET_ITEM(__pyx_k_tuple_60, 1, ((PyObject *)__pyx_n_s__c));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_60));
  __pyx_k_codeobj_61 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__escape_bytes, 52, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cymysql/converters.py":57
 *     return '0x' + ''.join([('0'+hex(c)[2:])[-2:] for c in value])
 * 
 * def escape_unicode(value):             # <<<<<<<<<<<<<<
 *     return escape_string(value)
 * 
 */
  __pyx_k_tuple_62 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_62);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__value));
  PyTuple_SET_ITEM(__pyx_k_tuple_62, 0, ((PyObject *)__pyx_n_s__value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__value));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_62));
  __pyx_k_codeobj_63 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__escape_unicode, 57, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cymysql/converters.py":60
 *     return escape_string(value)
 * 
 * def escape_None(value):             # <<<<<<<<<<<<<<
 *     return 'NULL'
 * 
 */
  __pyx_k_tuple_64 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_64);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__value));
  PyTuple_SET_ITEM(__pyx_k_tuple_64, 0, ((PyObject *)__pyx_n_s__value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__value));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_64));
  __pyx_k_codeobj_65 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__escape_None, 60, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cymysql/converters.py":63
 *     return 'NULL'
 * 
 * def escape_timedelta(obj):             # <<<<<<<<<<<<<<
 *     seconds = int(obj.seconds) % 60
 *     minutes = int(obj.seconds // 60) % 60
 */
  __pyx_k_tuple_66 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_66);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj));
  PyTuple_SET_ITEM(__pyx_k_tuple_66, 0, ((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seconds));
  PyTuple_SET_ITEM(__pyx_k_tuple_66, 1, ((PyObject *)__pyx_n_s__seconds));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seconds));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__minutes));
  PyTuple_SET_ITEM(__pyx_k_tuple_66, 2, ((PyObject *)__pyx_n_s__minutes));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__minutes));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__hours));
  PyTuple_SET_ITEM(__pyx_k_tuple_66, 3, ((PyObject *)__pyx_n_s__hours));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__hours));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_66));
  __pyx_k_codeobj_67 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__escape_timedelta, 63, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cymysql/converters.py":69
 *     return escape_string('%02d:%02d:%02d' % (hours, minutes, seconds))
 * 
 * def escape_time(obj):             # <<<<<<<<<<<<<<
 *     s = "%02d:%02d:%02d" % (int(obj.hour), int(obj.minute),
 *                             int(obj.second))
 */
  __pyx_k_tuple_68 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_68);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj));
  PyTuple_SET_ITEM(__pyx_k_tuple_68, 0, ((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__s));
  PyTuple_SET_ITEM(__pyx_k_tuple_68, 1, ((PyObject *)__pyx_n_s__s));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__s));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_68));
  __pyx_k_codeobj_69 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__escape_time, 69, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cymysql/converters.py":77
 *     return escape_string(s)
 * 
 * def escape_datetime(obj):             # <<<<<<<<<<<<<<
 *     return escape_string("%04d-%02d-%02d %02d:%02d:%02d" % (
 *             obj.year, obj.month, obj.day, obj.hour, obj.minute, obj.second))
 */
  __pyx_k_tuple_70 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_70);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj));
  PyTuple_SET_ITEM(__pyx_k_tuple_70, 0, ((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_70));
  __pyx_k_codeobj_71 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__escape_datetime, 77, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cymysql/converters.py":81
 *             obj.year, obj.month, obj.day, obj.hour, obj.minute, obj.second))
 * 
 * def escape_date(obj):             # <<<<<<<<<<<<<<
 *     return escape_string("%04d-%02d-%02d" % (obj.year, obj.month, obj.day))
 * 
 */
  __pyx_k_tuple_72 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_72);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj));
  PyTuple_SET_ITEM(__pyx_k_tuple_72, 0, ((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_72));
  __pyx_k_codeobj_73 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__escape_date, 81, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cymysql/converters.py":84
 *     return escape_string("%04d-%02d-%02d" % (obj.year, obj.month, obj.day))
 * 
 * def escape_struct_time(obj):             # <<<<<<<<<<<<<<
 *     return escape_datetime(datetime.datetime(*obj[:6]))
 * 
 */
  __pyx_k_tuple_74 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_74);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj));
  PyTuple_SET_ITEM(__pyx_k_tuple_74, 0, ((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_74));
  __pyx_k_codeobj_75 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__escape_struct_time, 84, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cymysql/converters.py":87
 *     return escape_datetime(datetime.datetime(*obj[:6]))
 * 
 * def escape_decimal(obj):             # <<<<<<<<<<<<<<
 *     return str(obj)
 * 
 */
  __pyx_k_tuple_76 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_76);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj));
  PyTuple_SET_ITEM(__pyx_k_tuple_76, 0, ((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_76));
  __pyx_k_codeobj_77 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__escape_decimal, 87, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cymysql/converters.py":90
 *     return str(obj)
 * 
 * def convert_datetime(obj, charset='ascii', field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     """Returns a DATETIME or TIMESTAMP column value as a datetime object:
 * 
 */
  __pyx_k_tuple_78 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_78);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj));
  PyTuple_SET_ITEM(__pyx_k_tuple_78, 0, ((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__charset));
  PyTuple_SET_ITEM(__pyx_k_tuple_78, 1, ((PyObject *)__pyx_n_s__charset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__charset));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__field));
  PyTuple_SET_ITEM(__pyx_k_tuple_78, 2, ((PyObject *)__pyx_n_s__field));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__field));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__use_unicode));
  PyTuple_SET_ITEM(__pyx_k_tuple_78, 3, ((PyObject *)__pyx_n_s__use_unicode));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__use_unicode));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sep));
  PyTuple_SET_ITEM(__pyx_k_tuple_78, 4, ((PyObject *)__pyx_n_s__sep));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sep));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ymd));
  PyTuple_SET_ITEM(__pyx_k_tuple_78, 5, ((PyObject *)__pyx_n_s__ymd));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ymd));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__hms));
  PyTuple_SET_ITEM(__pyx_k_tuple_78, 6, ((PyObject *)__pyx_n_s__hms));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__hms));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__x));
  PyTuple_SET_ITEM(__pyx_k_tuple_78, 7, ((PyObject *)__pyx_n_s__x));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__x));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_78));
  __pyx_k_codeobj_79 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__convert_datetime, 90, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_80 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_80);
  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_n_s__ascii)));
  PyTuple_SET_ITEM(__pyx_k_tuple_80, 0, ((PyObject *)((PyObject*)__pyx_n_s__ascii)));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_n_s__ascii)));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_80, 1, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_80, 2, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_80));

  /* "cymysql/converters.py":122
 *         return convert_date(obj, charset, field, use_unicode)
 * 
 * def convert_timedelta(obj, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     """Returns a TIME column as a timedelta object:
 * 
 */
  __pyx_k_tuple_81 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_81)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_81);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj));
  PyTuple_SET_ITEM(__pyx_k_tuple_81, 0, ((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__charset));
  PyTuple_SET_ITEM(__pyx_k_tuple_81, 1, ((PyObject *)__pyx_n_s__charset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__charset));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__field));
  PyTuple_SET_ITEM(__pyx_k_tuple_81, 2, ((PyObject *)__pyx_n_s__field));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__field));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__use_unicode));
  PyTuple_SET_ITEM(__pyx_k_tuple_81, 3, ((PyObject *)__pyx_n_s__use_unicode));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__use_unicode));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__microseconds));
  PyTuple_SET_ITEM(__pyx_k_tuple_81, 4, ((PyObject *)__pyx_n_s__microseconds));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__microseconds));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tail));
  PyTuple_SET_ITEM(__pyx_k_tuple_81, 5, ((PyObject *)__pyx_n_s__tail));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tail));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__hours));
  PyTuple_SET_ITEM(__pyx_k_tuple_81, 6, ((PyObject *)__pyx_n_s__hours));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__hours));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__minutes));
  PyTuple_SET_ITEM(__pyx_k_tuple_81, 7, ((PyObject *)__pyx_n_s__minutes));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__minutes));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seconds));
  PyTuple_SET_ITEM(__pyx_k_tuple_81, 8, ((PyObject *)__pyx_n_s__seconds));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seconds));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tdelta));
  PyTuple_SET_ITEM(__pyx_k_tuple_81, 9, ((PyObject *)__pyx_n_s__tdelta));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tdelta));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_81));
  __pyx_k_codeobj_82 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__convert_timedelta, 122, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_82)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_83 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_83);
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_83, 0, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_83, 1, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_83, 2, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_83));

  /* "cymysql/converters.py":158
 *         return None
 * 
 * def convert_time(obj, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     """Returns a TIME column as a time object:
 * 
 */
  __pyx_k_tuple_84 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_84);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj));
  PyTuple_SET_ITEM(__pyx_k_tuple_84, 0, ((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__charset));
  PyTuple_SET_ITEM(__pyx_k_tuple_84, 1, ((PyObject *)__pyx_n_s__charset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__charset));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__field));
  PyTuple_SET_ITEM(__pyx_k_tuple_84, 2, ((PyObject *)__pyx_n_s__field));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__field));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__use_unicode));
  PyTuple_SET_ITEM(__pyx_k_tuple_84, 3, ((PyObject *)__pyx_n_s__use_unicode));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__use_unicode));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__microseconds));
  PyTuple_SET_ITEM(__pyx_k_tuple_84, 4, ((PyObject *)__pyx_n_s__microseconds));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__microseconds));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tail));
  PyTuple_SET_ITEM(__pyx_k_tuple_84, 5, ((PyObject *)__pyx_n_s__tail));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tail));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__hours));
  PyTuple_SET_ITEM(__pyx_k_tuple_84, 6, ((PyObject *)__pyx_n_s__hours));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__hours));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__minutes));
  PyTuple_SET_ITEM(__pyx_k_tuple_84, 7, ((PyObject *)__pyx_n_s__minutes));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__minutes));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seconds));
  PyTuple_SET_ITEM(__pyx_k_tuple_84, 8, ((PyObject *)__pyx_n_s__seconds));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seconds));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_84));
  __pyx_k_codeobj_85 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_84, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__convert_time, 158, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_85)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_86 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_86);
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_86, 0, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_86, 1, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_86, 2, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_86));

  /* "cymysql/converters.py":191
 *         return None
 * 
 * def convert_date(obj, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     """Returns a DATE column as a date object:
 * 
 */
  __pyx_k_tuple_87 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_87);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj));
  PyTuple_SET_ITEM(__pyx_k_tuple_87, 0, ((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__charset));
  PyTuple_SET_ITEM(__pyx_k_tuple_87, 1, ((PyObject *)__pyx_n_s__charset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__charset));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__field));
  PyTuple_SET_ITEM(__pyx_k_tuple_87, 2, ((PyObject *)__pyx_n_s__field));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__field));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__use_unicode));
  PyTuple_SET_ITEM(__pyx_k_tuple_87, 3, ((PyObject *)__pyx_n_s__use_unicode));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__use_unicode));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__x));
  PyTuple_SET_ITEM(__pyx_k_tuple_87, 4, ((PyObject *)__pyx_n_s__x));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__x));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_87));
  __pyx_k_codeobj_88 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_87, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__convert_date, 191, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_89 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_89);
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_89, 0, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_89, 1, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_89, 2, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_89));

  /* "cymysql/converters.py":213
 *         return None
 * 
 * def convert_mysql_timestamp(timestamp, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     """Convert a MySQL TIMESTAMP to a Timestamp object.
 * 
 */
  __pyx_k_tuple_90 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_90)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_90);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__timestamp));
  PyTuple_SET_ITEM(__pyx_k_tuple_90, 0, ((PyObject *)__pyx_n_s__timestamp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__timestamp));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__charset));
  PyTuple_SET_ITEM(__pyx_k_tuple_90, 1, ((PyObject *)__pyx_n_s__charset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__charset));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__field));
  PyTuple_SET_ITEM(__pyx_k_tuple_90, 2, ((PyObject *)__pyx_n_s__field));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__field));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__use_unicode));
  PyTuple_SET_ITEM(__pyx_k_tuple_90, 3, ((PyObject *)__pyx_n_s__use_unicode));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__use_unicode));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__year));
  PyTuple_SET_ITEM(__pyx_k_tuple_90, 4, ((PyObject *)__pyx_n_s__year));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__year));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__month));
  PyTuple_SET_ITEM(__pyx_k_tuple_90, 5, ((PyObject *)__pyx_n_s__month));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__month));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__day));
  PyTuple_SET_ITEM(__pyx_k_tuple_90, 6, ((PyObject *)__pyx_n_s__day));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__day));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__hour));
  PyTuple_SET_ITEM(__pyx_k_tuple_90, 7, ((PyObject *)__pyx_n_s__hour));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__hour));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__minute));
  PyTuple_SET_ITEM(__pyx_k_tuple_90, 8, ((PyObject *)__pyx_n_s__minute));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__minute));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__second));
  PyTuple_SET_ITEM(__pyx_k_tuple_90, 9, ((PyObject *)__pyx_n_s__second));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__second));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_90));
  __pyx_k_codeobj_91 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s_92, 213, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_91)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_93 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_93)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_93);
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_93, 0, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_93, 1, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_93, 2, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_93));

  /* "cymysql/converters.py":249
 *         return None
 * 
 * def convert_set(s):             # <<<<<<<<<<<<<<
 *     return set(s.split(","))
 * 
 */
  __pyx_k_tuple_94 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_94)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_94);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__s));
  PyTuple_SET_ITEM(__pyx_k_tuple_94, 0, ((PyObject *)__pyx_n_s__s));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__s));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_94));
  __pyx_k_codeobj_95 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__convert_set, 249, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_95)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "cymysql/converters.py":252
 *     return set(s.split(","))
 * 
 * def convert_bit(b, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     #b = "\x00" * (8 - len(b)) + b # pad w/ zeroes
 *     #return struct.unpack(">Q", b)[0]
 */
  __pyx_k_tuple_96 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_96);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__b));
  PyTuple_SET_ITEM(__pyx_k_tuple_96, 0, ((PyObject *)__pyx_n_s__b));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__b));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__charset));
  PyTuple_SET_ITEM(__pyx_k_tuple_96, 1, ((PyObject *)__pyx_n_s__charset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__charset));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__field));
  PyTuple_SET_ITEM(__pyx_k_tuple_96, 2, ((PyObject *)__pyx_n_s__field));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__field));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__use_unicode));
  PyTuple_SET_ITEM(__pyx_k_tuple_96, 3, ((PyObject *)__pyx_n_s__use_unicode));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__use_unicode));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_96));
  __pyx_k_codeobj_97 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_96, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__convert_bit, 252, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_97)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_98 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_98)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_98);
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_98, 0, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_98, 1, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_98, 2, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_98));

  /* "cymysql/converters.py":260
 *     return b
 * 
 * def convert_blob(data, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     return convert_characters(data, charset, field, use_unicode)
 * 
 */
  __pyx_k_tuple_99 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_99)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_99);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__data));
  PyTuple_SET_ITEM(__pyx_k_tuple_99, 0, ((PyObject *)__pyx_n_s__data));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__charset));
  PyTuple_SET_ITEM(__pyx_k_tuple_99, 1, ((PyObject *)__pyx_n_s__charset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__charset));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__field));
  PyTuple_SET_ITEM(__pyx_k_tuple_99, 2, ((PyObject *)__pyx_n_s__field));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__field));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__use_unicode));
  PyTuple_SET_ITEM(__pyx_k_tuple_99, 3, ((PyObject *)__pyx_n_s__use_unicode));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__use_unicode));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_99));
  __pyx_k_codeobj_100 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__convert_blob, 260, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_101 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_101)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_101);
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_101, 0, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_101, 1, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_101, 2, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_101));

  /* "cymysql/converters.py":263
 *     return convert_characters(data, charset, field, use_unicode)
 * 
 * def convert_characters(data, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     field_charset = charset_by_id(field.charsetnr).name
 *     if field.flags & FLAG.SET:
 */
  __pyx_k_tuple_102 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_102)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_102);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__data));
  PyTuple_SET_ITEM(__pyx_k_tuple_102, 0, ((PyObject *)__pyx_n_s__data));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__charset));
  PyTuple_SET_ITEM(__pyx_k_tuple_102, 1, ((PyObject *)__pyx_n_s__charset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__charset));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__field));
  PyTuple_SET_ITEM(__pyx_k_tuple_102, 2, ((PyObject *)__pyx_n_s__field));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__field));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__use_unicode));
  PyTuple_SET_ITEM(__pyx_k_tuple_102, 3, ((PyObject *)__pyx_n_s__use_unicode));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__use_unicode));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__field_charset));
  PyTuple_SET_ITEM(__pyx_k_tuple_102, 4, ((PyObject *)__pyx_n_s__field_charset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__field_charset));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_102));
  __pyx_k_codeobj_103 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_102, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__convert_characters, 263, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_103)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_104 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_104)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_104);
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_104, 0, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_104, 1, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_104, 2, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_104));

  /* "cymysql/converters.py":280
 *     return data
 * 
 * def convert_int(data, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     return int(data)
 * 
 */
  __pyx_k_tuple_105 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_105)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_105);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__data));
  PyTuple_SET_ITEM(__pyx_k_tuple_105, 0, ((PyObject *)__pyx_n_s__data));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__charset));
  PyTuple_SET_ITEM(__pyx_k_tuple_105, 1, ((PyObject *)__pyx_n_s__charset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__charset));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__field));
  PyTuple_SET_ITEM(__pyx_k_tuple_105, 2, ((PyObject *)__pyx_n_s__field));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__field));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__use_unicode));
  PyTuple_SET_ITEM(__pyx_k_tuple_105, 3, ((PyObject *)__pyx_n_s__use_unicode));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__use_unicode));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_105));
  __pyx_k_codeobj_106 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_105, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__convert_int, 280, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_106)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_107 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_107)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_107);
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_107, 0, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_107, 1, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_107, 2, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_107));

  /* "cymysql/converters.py":283
 *     return int(data)
 * 
 * def convert_long(data, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     if PYTHON3:
 *         return int(data)
 */
  __pyx_k_tuple_108 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_108)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_108);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__data));
  PyTuple_SET_ITEM(__pyx_k_tuple_108, 0, ((PyObject *)__pyx_n_s__data));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__charset));
  PyTuple_SET_ITEM(__pyx_k_tuple_108, 1, ((PyObject *)__pyx_n_s__charset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__charset));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__field));
  PyTuple_SET_ITEM(__pyx_k_tuple_108, 2, ((PyObject *)__pyx_n_s__field));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__field));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__use_unicode));
  PyTuple_SET_ITEM(__pyx_k_tuple_108, 3, ((PyObject *)__pyx_n_s__use_unicode));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__use_unicode));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_108));
  __pyx_k_codeobj_109 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__convert_long, 283, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_109)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_110 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_110)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_110);
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_110, 0, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_110, 1, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_110, 2, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_110));

  /* "cymysql/converters.py":289
 *         return long(data)
 * 
 * def convert_float(data, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     return float(data)
 * 
 */
  __pyx_k_tuple_111 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_111)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_111);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__data));
  PyTuple_SET_ITEM(__pyx_k_tuple_111, 0, ((PyObject *)__pyx_n_s__data));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__charset));
  PyTuple_SET_ITEM(__pyx_k_tuple_111, 1, ((PyObject *)__pyx_n_s__charset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__charset));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__field));
  PyTuple_SET_ITEM(__pyx_k_tuple_111, 2, ((PyObject *)__pyx_n_s__field));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__field));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__use_unicode));
  PyTuple_SET_ITEM(__pyx_k_tuple_111, 3, ((PyObject *)__pyx_n_s__use_unicode));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__use_unicode));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_111));
  __pyx_k_codeobj_112 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__convert_float, 289, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_112)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_113 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_113)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_113);
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_113, 0, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_113, 1, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_113, 2, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_113));

  /* "cymysql/converters.py":292
 *     return float(data)
 * 
 * def convert_decimal(data, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     data = data.decode(charset)
 *     return Decimal(data)
 */
  __pyx_k_tuple_114 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_114)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_114);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__data));
  PyTuple_SET_ITEM(__pyx_k_tuple_114, 0, ((PyObject *)__pyx_n_s__data));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__charset));
  PyTuple_SET_ITEM(__pyx_k_tuple_114, 1, ((PyObject *)__pyx_n_s__charset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__charset));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__field));
  PyTuple_SET_ITEM(__pyx_k_tuple_114, 2, ((PyObject *)__pyx_n_s__field));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__field));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__use_unicode));
  PyTuple_SET_ITEM(__pyx_k_tuple_114, 3, ((PyObject *)__pyx_n_s__use_unicode));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__use_unicode));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_114));
  __pyx_k_codeobj_115 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__convert_decimal, 292, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_115)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_116 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_116)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_116);
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_116, 0, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_116, 1, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_116, 2, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_116));

  /* "cymysql/converters.py":349
 * 
 * 
 * def escape_item(val, charset, encoders=encoders):             # <<<<<<<<<<<<<<
 *     if type(val) in [tuple, list, set]:
 *         return escape_sequence(val, charset)
 */
  __pyx_k_tuple_117 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_117)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_117);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_117, 0, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__charset));
  PyTuple_SET_ITEM(__pyx_k_tuple_117, 1, ((PyObject *)__pyx_n_s__charset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__charset));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__encoders));
  PyTuple_SET_ITEM(__pyx_k_tuple_117, 2, ((PyObject *)__pyx_n_s__encoders));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__encoders));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__encoder));
  PyTuple_SET_ITEM(__pyx_k_tuple_117, 3, ((PyObject *)__pyx_n_s__encoder));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__encoder));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_117));
  __pyx_k_codeobj_118 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_47, __pyx_n_s__escape_item, 349, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_118)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_24 = PyInt_FromLong(24); if (unlikely(!__pyx_int_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_60 = PyInt_FromLong(60); if (unlikely(!__pyx_int_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_3600 = PyInt_FromLong(3600); if (unlikely(!__pyx_int_3600)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC initconverters(void); /*proto*/
PyMODINIT_FUNC initconverters(void)
#else
PyMODINIT_FUNC PyInit_converters(void); /*proto*/
PyMODINIT_FUNC PyInit_converters(void)
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  __Pyx_RefNannyDeclarations
  #if CYTHON_REFNANNY
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  if (!__Pyx_RefNanny) {
      PyErr_Clear();
      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
      if (!__Pyx_RefNanny)
          Py_FatalError("failed to import 'refnanny' module");
  }
  #endif
  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_converters(void)", 0);
  if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #ifdef __Pyx_CyFunction_USED
  if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("converters"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!PyDict_GetItemString(modules, "cymysql.converters")) {
      if (unlikely(PyDict_SetItemString(modules, "cymysql.converters", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
  }
  #endif
  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  /*--- Initialize various global constants etc. ---*/
  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_module_is_main_cymysql__converters) {
    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  }
  /*--- Builtin init code ---*/
  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Constants init code ---*/
  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Global init code ---*/
  /*--- Variable export code ---*/
  /*--- Function export code ---*/
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_7cymysql_10converters___pyx_scope_struct__escape_set) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_7cymysql_10converters___pyx_scope_struct__escape_set = &__pyx_type_7cymysql_10converters___pyx_scope_struct__escape_set;
  /*--- Type import code ---*/
  /*--- Variable import code ---*/
  /*--- Function import code ---*/
  /*--- Execution code ---*/

  /* "cymysql/converters.py":1
 * import re             # <<<<<<<<<<<<<<
 * import datetime
 * import time
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__re), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__re, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":2
 * import re
 * import datetime             # <<<<<<<<<<<<<<
 * import time
 * import sys
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__datetime, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":3
 * import re
 * import datetime
 * import time             # <<<<<<<<<<<<<<
 * import sys
 * from decimal import Decimal
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__time), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__time, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":4
 * import datetime
 * import time
 * import sys             # <<<<<<<<<<<<<<
 * from decimal import Decimal
 * 
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":5
 * import time
 * import sys
 * from decimal import Decimal             # <<<<<<<<<<<<<<
 * 
 * from cymysql.constants import FIELD_TYPE, FLAG
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__Decimal));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__Decimal));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Decimal));
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__decimal), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__Decimal);
  if (__pyx_t_1 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__Decimal);
    if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Decimal, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cymysql/converters.py":7
 * from decimal import Decimal
 * 
 * from cymysql.constants import FIELD_TYPE, FLAG             # <<<<<<<<<<<<<<
 * try:
 *     from cymysql.charsetx import charset_by_id
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__FIELD_TYPE));
  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__FIELD_TYPE));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FIELD_TYPE));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__FLAG));
  PyList_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_s__FLAG));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FLAG));
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s_26), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__FIELD_TYPE);
  if (__pyx_t_2 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__FIELD_TYPE);
    if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__FIELD_TYPE, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__FLAG);
  if (__pyx_t_2 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__FLAG);
    if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__FLAG, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":8
 * 
 * from cymysql.constants import FIELD_TYPE, FLAG
 * try:             # <<<<<<<<<<<<<<
 *     from cymysql.charsetx import charset_by_id
 * except ImportError:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "cymysql/converters.py":9
 * from cymysql.constants import FIELD_TYPE, FLAG
 * try:
 *     from cymysql.charsetx import charset_by_id             # <<<<<<<<<<<<<<
 * except ImportError:
 *     from cymysql.charset import charset_by_id
 */
      __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__charset_by_id));
      PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__charset_by_id));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__charset_by_id));
      __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_27), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
      __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__charset_by_id);
      if (__pyx_t_1 == NULL) {
        if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__charset_by_id);
        if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      }
      __Pyx_GOTREF(__pyx_t_1);
      if (PyObject_SetAttr(__pyx_m, __pyx_n_s__charset_by_id, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L2_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cymysql/converters.py":10
 * try:
 *     from cymysql.charsetx import charset_by_id
 * except ImportError:             # <<<<<<<<<<<<<<
 *     from cymysql.charset import charset_by_id
 * 
 */
    __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_ImportError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("cymysql.converters", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_7);

      /* "cymysql/converters.py":11
 *     from cymysql.charsetx import charset_by_id
 * except ImportError:
 *     from cymysql.charset import charset_by_id             # <<<<<<<<<<<<<<
 * 
 * PYTHON3 = sys.version_info[0] > 2
 */
      __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__charset_by_id));
      PyList_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_n_s__charset_by_id));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__charset_by_id));
      __pyx_t_9 = __Pyx_Import(((PyObject *)__pyx_n_s_28), ((PyObject *)__pyx_t_8), -1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
      __pyx_t_8 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__charset_by_id);
      if (__pyx_t_8 == NULL) {
        if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__charset_by_id);
        if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;}
      }
      __Pyx_GOTREF(__pyx_t_8);
      if (PyObject_SetAttr(__pyx_m, __pyx_n_s__charset_by_id, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L3_exception_handled;
    }
    __pyx_L4_except_error:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L3_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    __pyx_L9_try_end:;
  }

  /* "cymysql/converters.py":13
 *     from cymysql.charset import charset_by_id
 * 
 * PYTHON3 = sys.version_info[0] > 2             # <<<<<<<<<<<<<<
 * 
 * ESCAPE_REGEX = re.compile(r"[\0\n\r\032\'\"\\]")
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__version_info); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_1, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_7, __pyx_int_2, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__PYTHON3, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":15
 * PYTHON3 = sys.version_info[0] > 2
 * 
 * ESCAPE_REGEX = re.compile(r"[\0\n\r\032\'\"\\]")             # <<<<<<<<<<<<<<
 * ESCAPE_MAP = {'\0': '\\0', '\n': '\\n', '\r': '\\r', '\032': '\\Z',
 *               '\'': '\\\'', '"': '\\"', '\\': '\\\\'}
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__re); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__compile); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_30), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ESCAPE_REGEX, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":16
 * 
 * ESCAPE_REGEX = re.compile(r"[\0\n\r\032\'\"\\]")
 * ESCAPE_MAP = {'\0': '\\0', '\n': '\\n', '\r': '\\r', '\032': '\\Z',             # <<<<<<<<<<<<<<
 *               '\'': '\\\'', '"': '\\"', '\\': '\\\\'}
 * 
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_s_31), ((PyObject *)__pyx_kp_s_32)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_s_33), ((PyObject *)__pyx_kp_s_34)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_s_35), ((PyObject *)__pyx_kp_s_36)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_s_37), ((PyObject *)__pyx_kp_s_38)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_s_39), ((PyObject *)__pyx_kp_s_40)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_s_41), ((PyObject *)__pyx_kp_s_42)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_s_43), ((PyObject *)__pyx_kp_s_44)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ESCAPE_MAP, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;

  /* "cymysql/converters.py":19
 *               '\'': '\\\'', '"': '\\"', '\\': '\\\\'}
 * 
 * def escape_dict(val, charset):             # <<<<<<<<<<<<<<
 *     n = {}
 *     for k, v in val.items():
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_1escape_dict, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_46)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__escape_dict, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":26
 *     return n
 * 
 * def escape_sequence(val, charset):             # <<<<<<<<<<<<<<
 *     n = []
 *     for item in val:
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_3escape_sequence, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_49)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__escape_sequence, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":33
 *     return "(" + ",".join(n) + ")"
 * 
 * def escape_set(val, charset):             # <<<<<<<<<<<<<<
 *     val = map(lambda x: escape_item(x, charset), val)
 *     return ','.join(val)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_5escape_set, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_51)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__escape_set, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":37
 *     return ','.join(val)
 * 
 * def escape_bool(value):             # <<<<<<<<<<<<<<
 *     return str(int(value))
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_7escape_bool, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_53)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__escape_bool, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":40
 *     return str(int(value))
 * 
 * def escape_object(value):             # <<<<<<<<<<<<<<
 *     return str(value)
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_9escape_object, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_55)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__escape_object, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":43
 *     return str(value)
 * 
 * escape_int = escape_long = escape_object             # <<<<<<<<<<<<<<
 * 
 * def escape_float(value):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_object); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__escape_int, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__escape_long, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":45
 * escape_int = escape_long = escape_object
 * 
 * def escape_float(value):             # <<<<<<<<<<<<<<
 *     return ('%.15g' % value)
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_11escape_float, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_57)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__escape_float, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":48
 *     return ('%.15g' % value)
 * 
 * def escape_string(value):             # <<<<<<<<<<<<<<
 *     return ("'%s'" % ESCAPE_REGEX.sub(
 *             lambda match: ESCAPE_MAP.get(match.group(0)), value))
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_13escape_string, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_59)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__escape_string, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":52
 *             lambda match: ESCAPE_MAP.get(match.group(0)), value))
 * 
 * def escape_bytes(value):             # <<<<<<<<<<<<<<
 *     if len(value)==0:
 *         return "''"
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_15escape_bytes, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_61)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__escape_bytes, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":57
 *     return '0x' + ''.join([('0'+hex(c)[2:])[-2:] for c in value])
 * 
 * def escape_unicode(value):             # <<<<<<<<<<<<<<
 *     return escape_string(value)
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_17escape_unicode, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_63)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__escape_unicode, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":60
 *     return escape_string(value)
 * 
 * def escape_None(value):             # <<<<<<<<<<<<<<
 *     return 'NULL'
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_19escape_None, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_65)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__escape_None, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":63
 *     return 'NULL'
 * 
 * def escape_timedelta(obj):             # <<<<<<<<<<<<<<
 *     seconds = int(obj.seconds) % 60
 *     minutes = int(obj.seconds // 60) % 60
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_21escape_timedelta, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_67)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__escape_timedelta, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":69
 *     return escape_string('%02d:%02d:%02d' % (hours, minutes, seconds))
 * 
 * def escape_time(obj):             # <<<<<<<<<<<<<<
 *     s = "%02d:%02d:%02d" % (int(obj.hour), int(obj.minute),
 *                             int(obj.second))
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_23escape_time, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_69)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__escape_time, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":77
 *     return escape_string(s)
 * 
 * def escape_datetime(obj):             # <<<<<<<<<<<<<<
 *     return escape_string("%04d-%02d-%02d %02d:%02d:%02d" % (
 *             obj.year, obj.month, obj.day, obj.hour, obj.minute, obj.second))
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_25escape_datetime, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_71)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__escape_datetime, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":81
 *             obj.year, obj.month, obj.day, obj.hour, obj.minute, obj.second))
 * 
 * def escape_date(obj):             # <<<<<<<<<<<<<<
 *     return escape_string("%04d-%02d-%02d" % (obj.year, obj.month, obj.day))
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_27escape_date, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_73)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__escape_date, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":84
 *     return escape_string("%04d-%02d-%02d" % (obj.year, obj.month, obj.day))
 * 
 * def escape_struct_time(obj):             # <<<<<<<<<<<<<<
 *     return escape_datetime(datetime.datetime(*obj[:6]))
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_29escape_struct_time, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_75)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__escape_struct_time, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":87
 *     return escape_datetime(datetime.datetime(*obj[:6]))
 * 
 * def escape_decimal(obj):             # <<<<<<<<<<<<<<
 *     return str(obj)
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_31escape_decimal, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_77)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__escape_decimal, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":90
 *     return str(obj)
 * 
 * def convert_datetime(obj, charset='ascii', field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     """Returns a DATETIME or TIMESTAMP column value as a datetime object:
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_33convert_datetime, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_79)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, ((PyObject *)__pyx_k_tuple_80));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__convert_datetime, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":122
 *         return convert_date(obj, charset, field, use_unicode)
 * 
 * def convert_timedelta(obj, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     """Returns a TIME column as a timedelta object:
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_35convert_timedelta, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_82)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, ((PyObject *)__pyx_k_tuple_83));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__convert_timedelta, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":158
 *         return None
 * 
 * def convert_time(obj, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     """Returns a TIME column as a time object:
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_37convert_time, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_85)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, ((PyObject *)__pyx_k_tuple_86));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__convert_time, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":191
 *         return None
 * 
 * def convert_date(obj, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     """Returns a DATE column as a date object:
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_39convert_date, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_88)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, ((PyObject *)__pyx_k_tuple_89));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__convert_date, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":213
 *         return None
 * 
 * def convert_mysql_timestamp(timestamp, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     """Convert a MySQL TIMESTAMP to a Timestamp object.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_41convert_mysql_timestamp, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_91)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, ((PyObject *)__pyx_k_tuple_93));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_92, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":249
 *         return None
 * 
 * def convert_set(s):             # <<<<<<<<<<<<<<
 *     return set(s.split(","))
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_43convert_set, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_95)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__convert_set, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":252
 *     return set(s.split(","))
 * 
 * def convert_bit(b, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     #b = "\x00" * (8 - len(b)) + b # pad w/ zeroes
 *     #return struct.unpack(">Q", b)[0]
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_45convert_bit, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_97)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, ((PyObject *)__pyx_k_tuple_98));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__convert_bit, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":260
 *     return b
 * 
 * def convert_blob(data, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     return convert_characters(data, charset, field, use_unicode)
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_47convert_blob, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_100)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, ((PyObject *)__pyx_k_tuple_101));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__convert_blob, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":263
 *     return convert_characters(data, charset, field, use_unicode)
 * 
 * def convert_characters(data, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     field_charset = charset_by_id(field.charsetnr).name
 *     if field.flags & FLAG.SET:
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_49convert_characters, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_103)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, ((PyObject *)__pyx_k_tuple_104));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__convert_characters, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":280
 *     return data
 * 
 * def convert_int(data, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     return int(data)
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_51convert_int, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_106)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, ((PyObject *)__pyx_k_tuple_107));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__convert_int, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":283
 *     return int(data)
 * 
 * def convert_long(data, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     if PYTHON3:
 *         return int(data)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_53convert_long, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_109)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, ((PyObject *)__pyx_k_tuple_110));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__convert_long, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":289
 *         return long(data)
 * 
 * def convert_float(data, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     return float(data)
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_55convert_float, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_112)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, ((PyObject *)__pyx_k_tuple_113));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__convert_float, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":292
 *     return float(data)
 * 
 * def convert_decimal(data, charset=None, field=None, use_unicode=None):             # <<<<<<<<<<<<<<
 *     data = data.decode(charset)
 *     return Decimal(data)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_57convert_decimal, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_115)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, ((PyObject *)__pyx_k_tuple_116));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__convert_decimal, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":296
 *     return Decimal(data)
 * 
 * decoders = {             # <<<<<<<<<<<<<<
 *         FIELD_TYPE.BIT: convert_bit,
 *         FIELD_TYPE.TINY: convert_int,
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));

  /* "cymysql/converters.py":297
 * 
 * decoders = {
 *         FIELD_TYPE.BIT: convert_bit,             # <<<<<<<<<<<<<<
 *         FIELD_TYPE.TINY: convert_int,
 *         FIELD_TYPE.SHORT: convert_int,
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FIELD_TYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__BIT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_bit); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cymysql/converters.py":298
 * decoders = {
 *         FIELD_TYPE.BIT: convert_bit,
 *         FIELD_TYPE.TINY: convert_int,             # <<<<<<<<<<<<<<
 *         FIELD_TYPE.SHORT: convert_int,
 *         FIELD_TYPE.LONG: convert_long,
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FIELD_TYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__TINY); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_int); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cymysql/converters.py":299
 *         FIELD_TYPE.BIT: convert_bit,
 *         FIELD_TYPE.TINY: convert_int,
 *         FIELD_TYPE.SHORT: convert_int,             # <<<<<<<<<<<<<<
 *         FIELD_TYPE.LONG: convert_long,
 *         FIELD_TYPE.FLOAT: convert_float,
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FIELD_TYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__SHORT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_int); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cymysql/converters.py":300
 *         FIELD_TYPE.TINY: convert_int,
 *         FIELD_TYPE.SHORT: convert_int,
 *         FIELD_TYPE.LONG: convert_long,             # <<<<<<<<<<<<<<
 *         FIELD_TYPE.FLOAT: convert_float,
 *         FIELD_TYPE.DOUBLE: convert_float,
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FIELD_TYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__LONG); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_long); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cymysql/converters.py":301
 *         FIELD_TYPE.SHORT: convert_int,
 *         FIELD_TYPE.LONG: convert_long,
 *         FIELD_TYPE.FLOAT: convert_float,             # <<<<<<<<<<<<<<
 *         FIELD_TYPE.DOUBLE: convert_float,
 *         FIELD_TYPE.DECIMAL: convert_float,
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FIELD_TYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__FLOAT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_float); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cymysql/converters.py":302
 *         FIELD_TYPE.LONG: convert_long,
 *         FIELD_TYPE.FLOAT: convert_float,
 *         FIELD_TYPE.DOUBLE: convert_float,             # <<<<<<<<<<<<<<
 *         FIELD_TYPE.DECIMAL: convert_float,
 *         FIELD_TYPE.NEWDECIMAL: convert_float,
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FIELD_TYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__DOUBLE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_float); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cymysql/converters.py":303
 *         FIELD_TYPE.FLOAT: convert_float,
 *         FIELD_TYPE.DOUBLE: convert_float,
 *         FIELD_TYPE.DECIMAL: convert_float,             # <<<<<<<<<<<<<<
 *         FIELD_TYPE.NEWDECIMAL: convert_float,
 *         FIELD_TYPE.LONGLONG: convert_long,
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FIELD_TYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__DECIMAL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_float); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cymysql/converters.py":304
 *         FIELD_TYPE.DOUBLE: convert_float,
 *         FIELD_TYPE.DECIMAL: convert_float,
 *         FIELD_TYPE.NEWDECIMAL: convert_float,             # <<<<<<<<<<<<<<
 *         FIELD_TYPE.LONGLONG: convert_long,
 *         FIELD_TYPE.INT24: convert_int,
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FIELD_TYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__NEWDECIMAL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_float); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cymysql/converters.py":305
 *         FIELD_TYPE.DECIMAL: convert_float,
 *         FIELD_TYPE.NEWDECIMAL: convert_float,
 *         FIELD_TYPE.LONGLONG: convert_long,             # <<<<<<<<<<<<<<
 *         FIELD_TYPE.INT24: convert_int,
 *         FIELD_TYPE.DECIMAL:  convert_decimal,
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FIELD_TYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__LONGLONG); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_long); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cymysql/converters.py":306
 *         FIELD_TYPE.NEWDECIMAL: convert_float,
 *         FIELD_TYPE.LONGLONG: convert_long,
 *         FIELD_TYPE.INT24: convert_int,             # <<<<<<<<<<<<<<
 *         FIELD_TYPE.DECIMAL:  convert_decimal,
 *         FIELD_TYPE.NEWDECIMAL: convert_decimal,
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FIELD_TYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__INT24); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_int); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cymysql/converters.py":307
 *         FIELD_TYPE.LONGLONG: convert_long,
 *         FIELD_TYPE.INT24: convert_int,
 *         FIELD_TYPE.DECIMAL:  convert_decimal,             # <<<<<<<<<<<<<<
 *         FIELD_TYPE.NEWDECIMAL: convert_decimal,
 *         FIELD_TYPE.YEAR: convert_int,
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FIELD_TYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__DECIMAL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_decimal); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cymysql/converters.py":308
 *         FIELD_TYPE.INT24: convert_int,
 *         FIELD_TYPE.DECIMAL:  convert_decimal,
 *         FIELD_TYPE.NEWDECIMAL: convert_decimal,             # <<<<<<<<<<<<<<
 *         FIELD_TYPE.YEAR: convert_int,
 *         FIELD_TYPE.TIMESTAMP: convert_mysql_timestamp,
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FIELD_TYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__NEWDECIMAL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_decimal); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cymysql/converters.py":309
 *         FIELD_TYPE.DECIMAL:  convert_decimal,
 *         FIELD_TYPE.NEWDECIMAL: convert_decimal,
 *         FIELD_TYPE.YEAR: convert_int,             # <<<<<<<<<<<<<<
 *         FIELD_TYPE.TIMESTAMP: convert_mysql_timestamp,
 *         FIELD_TYPE.DATETIME: convert_datetime,
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FIELD_TYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__YEAR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_int); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cymysql/converters.py":310
 *         FIELD_TYPE.NEWDECIMAL: convert_decimal,
 *         FIELD_TYPE.YEAR: convert_int,
 *         FIELD_TYPE.TIMESTAMP: convert_mysql_timestamp,             # <<<<<<<<<<<<<<
 *         FIELD_TYPE.DATETIME: convert_datetime,
 *         FIELD_TYPE.TIME: convert_timedelta,
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FIELD_TYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__TIMESTAMP); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s_92); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cymysql/converters.py":311
 *         FIELD_TYPE.YEAR: convert_int,
 *         FIELD_TYPE.TIMESTAMP: convert_mysql_timestamp,
 *         FIELD_TYPE.DATETIME: convert_datetime,             # <<<<<<<<<<<<<<
 *         FIELD_TYPE.TIME: convert_timedelta,
 *         FIELD_TYPE.DATE: convert_date,
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FIELD_TYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__DATETIME); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_datetime); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cymysql/converters.py":312
 *         FIELD_TYPE.TIMESTAMP: convert_mysql_timestamp,
 *         FIELD_TYPE.DATETIME: convert_datetime,
 *         FIELD_TYPE.TIME: convert_timedelta,             # <<<<<<<<<<<<<<
 *         FIELD_TYPE.DATE: convert_date,
 *         FIELD_TYPE.SET: convert_set,
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FIELD_TYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__TIME); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_timedelta); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cymysql/converters.py":313
 *         FIELD_TYPE.DATETIME: convert_datetime,
 *         FIELD_TYPE.TIME: convert_timedelta,
 *         FIELD_TYPE.DATE: convert_date,             # <<<<<<<<<<<<<<
 *         FIELD_TYPE.SET: convert_set,
 *         FIELD_TYPE.BLOB: convert_blob,
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FIELD_TYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__DATE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_date); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cymysql/converters.py":314
 *         FIELD_TYPE.TIME: convert_timedelta,
 *         FIELD_TYPE.DATE: convert_date,
 *         FIELD_TYPE.SET: convert_set,             # <<<<<<<<<<<<<<
 *         FIELD_TYPE.BLOB: convert_blob,
 *         FIELD_TYPE.TINY_BLOB: convert_blob,
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FIELD_TYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__SET); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_set); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cymysql/converters.py":315
 *         FIELD_TYPE.DATE: convert_date,
 *         FIELD_TYPE.SET: convert_set,
 *         FIELD_TYPE.BLOB: convert_blob,             # <<<<<<<<<<<<<<
 *         FIELD_TYPE.TINY_BLOB: convert_blob,
 *         FIELD_TYPE.MEDIUM_BLOB: convert_blob,
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FIELD_TYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__BLOB); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_blob); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cymysql/converters.py":316
 *         FIELD_TYPE.SET: convert_set,
 *         FIELD_TYPE.BLOB: convert_blob,
 *         FIELD_TYPE.TINY_BLOB: convert_blob,             # <<<<<<<<<<<<<<
 *         FIELD_TYPE.MEDIUM_BLOB: convert_blob,
 *         FIELD_TYPE.LONG_BLOB: convert_blob,
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FIELD_TYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__TINY_BLOB); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_blob); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cymysql/converters.py":317
 *         FIELD_TYPE.BLOB: convert_blob,
 *         FIELD_TYPE.TINY_BLOB: convert_blob,
 *         FIELD_TYPE.MEDIUM_BLOB: convert_blob,             # <<<<<<<<<<<<<<
 *         FIELD_TYPE.LONG_BLOB: convert_blob,
 *         FIELD_TYPE.STRING: convert_characters,
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FIELD_TYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__MEDIUM_BLOB); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_blob); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cymysql/converters.py":318
 *         FIELD_TYPE.TINY_BLOB: convert_blob,
 *         FIELD_TYPE.MEDIUM_BLOB: convert_blob,
 *         FIELD_TYPE.LONG_BLOB: convert_blob,             # <<<<<<<<<<<<<<
 *         FIELD_TYPE.STRING: convert_characters,
 *         FIELD_TYPE.VAR_STRING: convert_characters,
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FIELD_TYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__LONG_BLOB); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_blob); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cymysql/converters.py":319
 *         FIELD_TYPE.MEDIUM_BLOB: convert_blob,
 *         FIELD_TYPE.LONG_BLOB: convert_blob,
 *         FIELD_TYPE.STRING: convert_characters,             # <<<<<<<<<<<<<<
 *         FIELD_TYPE.VAR_STRING: convert_characters,
 *         FIELD_TYPE.VARCHAR: convert_characters,
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FIELD_TYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__STRING); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_characters); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cymysql/converters.py":320
 *         FIELD_TYPE.LONG_BLOB: convert_blob,
 *         FIELD_TYPE.STRING: convert_characters,
 *         FIELD_TYPE.VAR_STRING: convert_characters,             # <<<<<<<<<<<<<<
 *         FIELD_TYPE.VARCHAR: convert_characters,
 *         }
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FIELD_TYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__VAR_STRING); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_characters); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cymysql/converters.py":321
 *         FIELD_TYPE.STRING: convert_characters,
 *         FIELD_TYPE.VAR_STRING: convert_characters,
 *         FIELD_TYPE.VARCHAR: convert_characters,             # <<<<<<<<<<<<<<
 *         }
 * 
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FIELD_TYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__VARCHAR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__convert_characters); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__decoders, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;

  /* "cymysql/converters.py":324
 *         }
 * 
 * encoders = {             # <<<<<<<<<<<<<<
 *         bool: escape_bool,
 *         int: escape_int,
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));

  /* "cymysql/converters.py":325
 * 
 * encoders = {
 *         bool: escape_bool,             # <<<<<<<<<<<<<<
 *         int: escape_int,
 *         float: escape_float,
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_bool); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, ((PyObject*)&PyBool_Type), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cymysql/converters.py":326
 * encoders = {
 *         bool: escape_bool,
 *         int: escape_int,             # <<<<<<<<<<<<<<
 *         float: escape_float,
 *         Decimal: escape_decimal,
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_int); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)((PyObject*)(&PyInt_Type))), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cymysql/converters.py":327
 *         bool: escape_bool,
 *         int: escape_int,
 *         float: escape_float,             # <<<<<<<<<<<<<<
 *         Decimal: escape_decimal,
 *         str: escape_string,
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_float); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)((PyObject*)(&PyFloat_Type))), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cymysql/converters.py":328
 *         int: escape_int,
 *         float: escape_float,
 *         Decimal: escape_decimal,             # <<<<<<<<<<<<<<
 *         str: escape_string,
 *         tuple: escape_sequence,
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__Decimal); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_decimal); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_7, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cymysql/converters.py":329
 *         float: escape_float,
 *         Decimal: escape_decimal,
 *         str: escape_string,             # <<<<<<<<<<<<<<
 *         tuple: escape_sequence,
 *         list:escape_sequence,
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_string); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cymysql/converters.py":330
 *         Decimal: escape_decimal,
 *         str: escape_string,
 *         tuple: escape_sequence,             # <<<<<<<<<<<<<<
 *         list:escape_sequence,
 *         set:escape_sequence,
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_sequence); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cymysql/converters.py":331
 *         str: escape_string,
 *         tuple: escape_sequence,
 *         list:escape_sequence,             # <<<<<<<<<<<<<<
 *         set:escape_sequence,
 *         dict:escape_dict,
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_sequence); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cymysql/converters.py":332
 *         tuple: escape_sequence,
 *         list:escape_sequence,
 *         set:escape_sequence,             # <<<<<<<<<<<<<<
 *         dict:escape_dict,
 *         type(None):escape_None,
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_sequence); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cymysql/converters.py":333
 *         list:escape_sequence,
 *         set:escape_sequence,
 *         dict:escape_dict,             # <<<<<<<<<<<<<<
 *         type(None):escape_None,
 *         datetime.date: escape_date,
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_dict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cymysql/converters.py":334
 *         set:escape_sequence,
 *         dict:escape_dict,
 *         type(None):escape_None,             # <<<<<<<<<<<<<<
 *         datetime.date: escape_date,
 *         datetime.datetime : escape_datetime,
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)Py_TYPE(Py_None)), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cymysql/converters.py":335
 *         dict:escape_dict,
 *         type(None):escape_None,
 *         datetime.date: escape_date,             # <<<<<<<<<<<<<<
 *         datetime.datetime : escape_datetime,
 *         datetime.timedelta : escape_timedelta,
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__date); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_date); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_7, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cymysql/converters.py":336
 *         type(None):escape_None,
 *         datetime.date: escape_date,
 *         datetime.datetime : escape_datetime,             # <<<<<<<<<<<<<<
 *         datetime.timedelta : escape_timedelta,
 *         datetime.time : escape_time,
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__datetime); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_datetime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_7, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cymysql/converters.py":337
 *         datetime.date: escape_date,
 *         datetime.datetime : escape_datetime,
 *         datetime.timedelta : escape_timedelta,             # <<<<<<<<<<<<<<
 *         datetime.time : escape_time,
 *         time.struct_time : escape_struct_time,
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__timedelta); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_timedelta); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_7, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cymysql/converters.py":338
 *         datetime.datetime : escape_datetime,
 *         datetime.timedelta : escape_timedelta,
 *         datetime.time : escape_time,             # <<<<<<<<<<<<<<
 *         time.struct_time : escape_struct_time,
 *         }
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__time); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_7, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cymysql/converters.py":339
 *         datetime.timedelta : escape_timedelta,
 *         datetime.time : escape_time,
 *         time.struct_time : escape_struct_time,             # <<<<<<<<<<<<<<
 *         }
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__struct_time); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_struct_time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_7, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__encoders, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;

  /* "cymysql/converters.py":342
 *         }
 * 
 * if PYTHON3:             # <<<<<<<<<<<<<<
 *     encoders[bytes] = escape_bytes
 * else:
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__PYTHON3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_10) {

    /* "cymysql/converters.py":343
 * 
 * if PYTHON3:
 *     encoders[bytes] = escape_bytes             # <<<<<<<<<<<<<<
 * else:
 *     encoders[unicode] = escape_unicode
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_bytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__encoders); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyObject_SetItem(__pyx_t_2, ((PyObject *)((PyObject*)(&PyBytes_Type))), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L12;
  }
  /*else*/ {

    /* "cymysql/converters.py":345
 *     encoders[bytes] = escape_bytes
 * else:
 *     encoders[unicode] = escape_unicode             # <<<<<<<<<<<<<<
 *     encoders[long] = escape_long
 * 
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_unicode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__encoders); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyObject_SetItem(__pyx_t_2, ((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cymysql/converters.py":346
 * else:
 *     encoders[unicode] = escape_unicode
 *     encoders[long] = escape_long             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__escape_long); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__encoders); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyObject_SetItem(__pyx_t_2, ((PyObject *)((PyObject*)(&PyLong_Type))), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L12:;

  /* "cymysql/converters.py":349
 * 
 * 
 * def escape_item(val, charset, encoders=encoders):             # <<<<<<<<<<<<<<
 *     if type(val) in [tuple, list, set]:
 *         return escape_sequence(val, charset)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7cymysql_10converters_59escape_item, 0, NULL, __pyx_n_s_4, ((PyObject *)__pyx_k_codeobj_118)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_1, sizeof(__pyx_defaults), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__encoders); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_1)->__pyx_arg_encoders = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_1, __pyx_pf_7cymysql_10converters_60__defaults__);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__escape_item, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cymysql/converters.py":1
 * import re             # <<<<<<<<<<<<<<
 * import datetime
 * import time
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_119), ((PyObject *)__pyx_kp_u_120)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_121), ((PyObject *)__pyx_kp_u_122)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_123), ((PyObject *)__pyx_kp_u_124)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_125), ((PyObject *)__pyx_kp_u_126)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_127), ((PyObject *)__pyx_kp_u_128)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  if (__pyx_m) {
    __Pyx_AddTraceback("init cymysql.converters", __pyx_clineno, __pyx_lineno, __pyx_filename);
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init cymysql.converters");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if PY_MAJOR_VERSION < 3
  return;
  #else
  return __pyx_m;
  #endif
}

/* Runtime support code */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule((char *)modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif /* CYTHON_REFNANNY */

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
    PyObject *result;
    result = PyObject_GetAttr(dict, name);
    if (!result) {
        if (dict != __pyx_b) {
            PyErr_Clear();
            result = PyObject_GetAttr(__pyx_b, name);
        }
        if (!result) {
            PyErr_SetObject(PyExc_NameError, name);
        }
    }
    return result;
}

static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%s() got an unexpected keyword argument '%s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%s to unpack",
                 index, (index == 1) ? "" : "s");
}

static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_COMPILING_IN_CPYTHON
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
        goto bad;
    #endif
    Py_INCREF(local_type);
    Py_INCREF(local_value);
    Py_INCREF(local_tb);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    /* Make sure tstate is in a consistent state when we XDECREF
       these objects (DECREF may run arbitrary code). */
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

static double __Pyx__PyObject_AsDouble(PyObject* obj) {
    PyObject* float_value;
#if CYTHON_COMPILING_IN_PYPY
    float_value = PyNumber_Float(obj);
#else
    if (Py_TYPE(obj)->tp_as_number && Py_TYPE(obj)->tp_as_number->nb_float) {
        return PyFloat_AsDouble(obj);
    } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) {
#if PY_MAJOR_VERSION >= 3
        float_value = PyFloat_FromString(obj);
#else
        float_value = PyFloat_FromString(obj, 0);
#endif
    } else {
        PyObject* args = PyTuple_New(1);
        if (unlikely(!args)) goto bad;
        PyTuple_SET_ITEM(args, 0, obj);
        float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0);
        PyTuple_SET_ITEM(args, 0, 0);
        Py_DECREF(args);
    }
#endif
    if (likely(float_value)) {
        double value = PyFloat_AS_DOUBLE(float_value);
        Py_DECREF(float_value);
        return value;
    }
bad:
    return (double)-1;
}

static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
#else
    PyErr_GetExcInfo(type, value, tb);
#endif
}
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(type, value, tb);
#endif
}

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level) {
    PyObject *py_import = 0;
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    py_import = __Pyx_GetAttrString(__pyx_b, "__import__");
    if (!py_import)
        goto bad;
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    #if PY_VERSION_HEX >= 0x02050000
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.')) {
                /* try package relative import first */
                PyObject *py_level = PyInt_FromLong(1);
                if (!py_level)
                    goto bad;
                module = PyObject_CallFunctionObjArgs(py_import,
                    name, global_dict, empty_dict, list, py_level, NULL);
                Py_DECREF(py_level);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0; /* try absolute import on failure */
        }
        #endif
        if (!module) {
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, NULL);
            Py_DECREF(py_level);
        }
    }
    #else
    if (level>0) {
        PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4.");
        goto bad;
    }
    module = PyObject_CallFunctionObjArgs(py_import,
        name, global_dict, empty_dict, list, NULL);
    #endif
bad:
    Py_XDECREF(empty_list);
    Py_XDECREF(py_import);
    Py_XDECREF(empty_dict);
    return module;
}

static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name) {
#if PY_MAJOR_VERSION < 3
    PyErr_Format(PyExc_ImportError, "cannot import name %.230s",
                 PyString_AsString(name));
#else
    PyErr_Format(PyExc_ImportError, "cannot import name %S", name);
#endif
}

static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (op->func_doc == NULL && op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
        op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
        op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
    }
    if (op->func_doc == 0) {
        Py_INCREF(Py_None);
        return Py_None;
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL)
        op->func_doc = Py_None; /* Mark as deleted */
    else
        op->func_doc = value;
    Py_INCREF(op->func_doc);
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
{
    if (op->func_name == NULL) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (value == NULL || !PyUnicode_Check(value)) {
#else
    if (value == NULL || !PyString_Check(value)) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
{
    if (op->func_dict == NULL) {
        op->func_dict = PyDict_New();
        if (op->func_dict == NULL)
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
    if (value == NULL) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(CYTHON_UNUSED __pyx_CyFunctionObject *op)
{
    PyObject* dict = PyModule_GetDict(__pyx_m);
    Py_XINCREF(dict);
    return dict;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op)
{
    if (op->defaults_tuple) {
        Py_INCREF(op->defaults_tuple);
        return op->defaults_tuple;
    }
    if (op->defaults_getter) {
        PyObject *res = op->defaults_getter((PyObject *) op);
        if (res) {
            Py_INCREF(res);
            op->defaults_tuple = res;
        }
        return res;
    }
    Py_INCREF(Py_None);
    return Py_None;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, 0, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, 0, 0, 0},
    {0, 0, 0, 0, 0}
};
#ifndef PY_WRITE_RESTRICTED /* < Py2.5 */
#define PY_WRITE_RESTRICTED WRITE_RESTRICTED
#endif
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromString(m->func.m_ml->ml_name);
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags,
                                      PyObject *closure, PyObject *module, PyObject* code) {
    __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
    if (op == NULL)
        return NULL;
    op->flags = flags;
    op->func_weakreflist = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_getter = NULL;
    PyObject_GC_Track(op);
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyMem_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    if (m->func_weakreflist != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return PyMethod_New(func,
                            type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
    return PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
    PyObject *func_name = __Pyx_CyFunction_get_name(op);
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                func_name, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(func_name), (void *)op);
#endif
}
#if CYTHON_COMPILING_IN_PYPY
static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    Py_ssize_t size;
    switch (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) {
    case METH_VARARGS:
        if (likely(kw == NULL) || PyDict_Size(kw) == 0)
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL) || PyDict_Size(kw) == 0) {
            size = PyTuple_GET_SIZE(arg);
            if (size == 0)
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%zd given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL) || PyDict_Size(kw) == 0) {
            size = PyTuple_GET_SIZE(arg);
            if (size == 1)
                return (*meth)(self, PyTuple_GET_ITEM(arg, 0));
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%zd given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
#else
static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
	return PyCFunction_Call(func, arg, kw);
}
#endif
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    __Pyx_NAMESTR("cython_function_or_method"), /*tp_name*/
    sizeof(__pyx_CyFunctionObject),   /*tp_basicsize*/
    0,                                  /*tp_itemsize*/
    (destructor) __Pyx_CyFunction_dealloc, /*tp_dealloc*/
    0,                                  /*tp_print*/
    0,                                  /*tp_getattr*/
    0,                                  /*tp_setattr*/
#if PY_MAJOR_VERSION < 3
    0,                                  /*tp_compare*/
#else
    0,                                  /*reserved*/
#endif
    (reprfunc) __Pyx_CyFunction_repr,   /*tp_repr*/
    0,                                  /*tp_as_number*/
    0,                                  /*tp_as_sequence*/
    0,                                  /*tp_as_mapping*/
    0,                                  /*tp_hash*/
    __Pyx_CyFunction_Call,              /*tp_call*/
    0,                                  /*tp_str*/
    0,                                  /*tp_getattro*/
    0,                                  /*tp_setattro*/
    0,                                  /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/
    0,                                  /*tp_doc*/
    (traverseproc) __Pyx_CyFunction_traverse,   /*tp_traverse*/
    (inquiry) __Pyx_CyFunction_clear,   /*tp_clear*/
    0,                                  /*tp_richcompare*/
    offsetof(__pyx_CyFunctionObject, func_weakreflist), /* tp_weaklistoffse */
    0,                                  /*tp_iter*/
    0,                                  /*tp_iternext*/
    __pyx_CyFunction_methods,           /*tp_methods*/
    __pyx_CyFunction_members,           /*tp_members*/
    __pyx_CyFunction_getsets,           /*tp_getset*/
    0,                                  /*tp_base*/
    0,                                  /*tp_dict*/
    __Pyx_CyFunction_descr_get,         /*tp_descr_get*/
    0,                                  /*tp_descr_set*/
    offsetof(__pyx_CyFunctionObject, func_dict),/*tp_dictoffset*/
    0,                                  /*tp_init*/
    0,                                  /*tp_alloc*/
    0,                                  /*tp_new*/
    0,                                  /*tp_free*/
    0,                                  /*tp_is_gc*/
    0,                                  /*tp_bases*/
    0,                                  /*tp_mro*/
    0,                                  /*tp_cache*/
    0,                                  /*tp_subclasses*/
    0,                                  /*tp_weaklist*/
    0,                                  /*tp_del*/
#if PY_VERSION_HEX >= 0x02060000
    0,                                  /*tp_version_tag*/
#endif
};
static int __Pyx_CyFunction_init(void) {
#if !CYTHON_COMPILING_IN_PYPY
    __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
#endif
    if (PyType_Ready(&__pyx_CyFunctionType_type) < 0)
        return -1;
    __pyx_CyFunctionType = &__pyx_CyFunctionType_type;
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyMem_Malloc(size);
    if (!m->defaults)
        return PyErr_NoMemory();
    memset(m->defaults, 0, sizeof(size));
    m->defaults_pyobjects = pyobjects;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
    const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned char" :
                    "value too large to convert to unsigned char");
            }
            return (unsigned char)-1;
        }
        return (unsigned char)val;
    }
    return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
    const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned short" :
                    "value too large to convert to unsigned short");
            }
            return (unsigned short)-1;
        }
        return (unsigned short)val;
    }
    return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
    const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned int" :
                    "value too large to convert to unsigned int");
            }
            return (unsigned int)-1;
        }
        return (unsigned int)val;
    }
    return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
    const char neg_one = (char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to char" :
                    "value too large to convert to char");
            }
            return (char)-1;
        }
        return (char)val;
    }
    return (char)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
    const short neg_one = (short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to short" :
                    "value too large to convert to short");
            }
            return (short)-1;
        }
        return (short)val;
    }
    return (short)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
    const signed char neg_one = (signed char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed char" :
                    "value too large to convert to signed char");
            }
            return (signed char)-1;
        }
        return (signed char)val;
    }
    return (signed char)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
    const signed short neg_one = (signed short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed short" :
                    "value too large to convert to signed short");
            }
            return (signed short)-1;
        }
        return (signed short)val;
    }
    return (signed short)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
    const signed int neg_one = (signed int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed int" :
                    "value too large to convert to signed int");
            }
            return (signed int)-1;
        }
        return (signed int)val;
    }
    return (signed int)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
    const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned long");
            return (unsigned long)-1;
        }
        return (unsigned long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned long");
                return (unsigned long)-1;
            }
            return (unsigned long)PyLong_AsUnsignedLong(x);
        } else {
            return (unsigned long)PyLong_AsLong(x);
        }
    } else {
        unsigned long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned long)-1;
        val = __Pyx_PyInt_AsUnsignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned PY_LONG_LONG");
            return (unsigned PY_LONG_LONG)-1;
        }
        return (unsigned PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned PY_LONG_LONG");
                return (unsigned PY_LONG_LONG)-1;
            }
            return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        unsigned PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
    const long neg_one = (long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to long");
            return (long)-1;
        }
        return (long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to long");
                return (long)-1;
            }
            return (long)PyLong_AsUnsignedLong(x);
        } else {
            return (long)PyLong_AsLong(x);
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (long)-1;
        val = __Pyx_PyInt_AsLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
    const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to PY_LONG_LONG");
            return (PY_LONG_LONG)-1;
        }
        return (PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to PY_LONG_LONG");
                return (PY_LONG_LONG)-1;
            }
            return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
    const signed long neg_one = (signed long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed long");
            return (signed long)-1;
        }
        return (signed long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed long");
                return (signed long)-1;
            }
            return (signed long)PyLong_AsUnsignedLong(x);
        } else {
            return (signed long)PyLong_AsLong(x);
        }
    } else {
        signed long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed long)-1;
        val = __Pyx_PyInt_AsSignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
    const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed PY_LONG_LONG");
            return (signed PY_LONG_LONG)-1;
        }
        return (signed PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed PY_LONG_LONG");
                return (signed PY_LONG_LONG)-1;
            }
            return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (signed PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        signed PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsSignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        #if PY_VERSION_HEX < 0x02050000
        return PyErr_Warn(NULL, message);
        #else
        return PyErr_WarnEx(NULL, message, 1);
        #endif
    }
    return 0;
}

static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = (start + end) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, new_max*sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,            /*int argcount,*/
        0,            /*int kwonlyargcount,*/
        0,            /*int nlocals,*/
        0,            /*int stacksize,*/
        0,            /*int flags,*/
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,      /*int firstlineno,*/
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_globals = 0;
    PyFrameObject *py_frame = 0;
    py_code = __pyx_find_code_object(c_line ? c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
    }
    py_globals = PyModule_GetDict(__pyx_m);
    if (!py_globals) goto bad;
    py_frame = PyFrame_New(
        PyThreadState_GET(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        py_globals,          /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = py_line;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else  /* Python 3+ has unicode identifiers */
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}


/* Type Conversion Functions */

static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}

static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
  PyNumberMethods *m;
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_VERSION_HEX < 0x03000000
  if (PyInt_Check(x) || PyLong_Check(x))
#else
  if (PyLong_Check(x))
#endif
    return Py_INCREF(x), x;
  m = Py_TYPE(x)->tp_as_number;
#if PY_VERSION_HEX < 0x03000000
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = PyNumber_Long(x);
  }
#else
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Long(x);
  }
#endif
  if (res) {
#if PY_VERSION_HEX < 0x03000000
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
#else
    if (!PyLong_Check(res)) {
#endif
      PyErr_Format(PyExc_TypeError,
                   "__%s__ returned non-%s (type %.200s)",
                   name, name, Py_TYPE(res)->tp_name);
      Py_DECREF(res);
      return NULL;
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}

static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject* x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}

static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
#if PY_VERSION_HEX < 0x02050000
   if (ival <= LONG_MAX)
       return PyInt_FromLong((long)ival);
   else {
       unsigned char *bytes = (unsigned char *) &ival;
       int one = 1; int little = (int)*(unsigned char*)&one;
       return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
   }
#else
   return PyInt_FromSize_t(ival);
#endif
}

static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
   unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
   if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
       return (size_t)-1;
   } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
       PyErr_SetString(PyExc_OverflowError,
                       "value too large to convert to size_t");
       return (size_t)-1;
   }
   return (size_t)val;
}


#endif /* Py_PYTHON_H */
