--- oursqlx/oursql.c.orig 2013-09-14 15:20:10.000000000 -0400 +++ oursqlx/oursql.c 2013-09-14 15:16:59.000000000 -0400 @@ -1,16 +1,28 @@ -/* Generated by Cython 0.15.1 on Mon Dec 19 20:32:33 2011 */ +/* Generated by Cython 0.19.1 on Sat Sep 14 15:16:57 2013 */ #define PY_SSIZE_T_CLEAN +#ifndef CYTHON_USE_PYLONG_INTERNALS +#ifdef PYLONG_BITS_IN_DIGIT +#define CYTHON_USE_PYLONG_INTERNALS 0 +#else +#include "pyconfig.h" +#ifdef PYLONG_BITS_IN_DIGIT +#define CYTHON_USE_PYLONG_INTERNALS 1 +#else +#define CYTHON_USE_PYLONG_INTERNALS 0 +#endif +#endif +#endif #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 /* For offsetof */ #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif - #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall @@ -22,36 +34,47 @@ #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 - -#if PY_VERSION_HEX < 0x02040000 - #define METH_COEXIST 0 - #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type) - #define PyDict_Contains(d,o) PySequence_Contains(d,o) +#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_Int(o) - #define PyIndex_Check(o) PyNumber_Check(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) @@ -59,7 +82,6 @@ #define PyVarObject_HEAD_INIT(type, size) \ PyObject_HEAD_INIT(type) size, #define PyType_Modified(t) - typedef struct { void *buf; PyObject *obj; @@ -73,7 +95,6 @@ Py_ssize_t *suboffsets; void *internal; } Py_buffer; - #define PyBUF_SIMPLE 0 #define PyBUF_WRITABLE 0x0001 #define PyBUF_FORMAT 0x0004 @@ -83,24 +104,47 @@ #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 < 0x02060000 + #define Py_TPFLAGS_HAVE_VERSION_TAG 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 @@ -108,7 +152,6 @@ #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact #endif - #if PY_VERSION_HEX < 0x02060000 #define PyBytesObject PyStringObject #define PyBytes_Type PyString_Type @@ -127,7 +170,14 @@ #define PyBytes_Concat PyString_Concat #define PyBytes_ConcatAndDel PyString_ConcatAndDel #endif - +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) + #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) +#else + #define __Pyx_PyBaseString_Check(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj) || \ + PyString_Check(obj) || PyUnicode_Check(obj)) + #define __Pyx_PyBaseString_CheckExact(obj) (Py_TYPE(obj) == &PyBaseString_Type) +#endif #if PY_VERSION_HEX < 0x02060000 #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type) @@ -135,9 +185,7 @@ #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 @@ -154,11 +202,9 @@ #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 @@ -167,16 +213,6 @@ #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t #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 - #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) @@ -195,11 +231,9 @@ (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)) @@ -209,7 +243,6 @@ #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)) @@ -217,6 +250,49 @@ #define __Pyx_NAMESTR(n) (n) #define __Pyx_DOCSTR(n) (n) #endif +#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 +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and + a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is + a quiet NaN. */ + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#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 @@ -245,21 +321,6 @@ #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)) @@ -267,31 +328,135 @@ # else # define CYTHON_UNUSED # endif -# elif defined(__ICC) || defined(__INTEL_COMPILER) +# 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 Py_ssize_t n; const char* encoding; + const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ -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_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*); +#if PY_MAJOR_VERSION < 3 + #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#else + #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize +#endif +#define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((char*)s) +#define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s) +#define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((char*)s) +#define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s) +#if PY_MAJOR_VERSION < 3 +static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) +{ + const Py_UNICODE *u_end = u; + while (*u_end++) ; + return u_end - u - 1; +} +#else +#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen +#endif +#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) +#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #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)) +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII +static int __Pyx_sys_getdefaultencoding_not_ascii; +static int __Pyx_init_sys_getdefaultencoding_params() { + PyObject* sys = NULL; + PyObject* default_encoding = NULL; + PyObject* ascii_chars_u = NULL; + PyObject* ascii_chars_b = NULL; + sys = PyImport_ImportModule("sys"); + if (sys == NULL) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); + if (default_encoding == NULL) goto bad; + if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) { + __Pyx_sys_getdefaultencoding_not_ascii = 0; + } else { + const char* default_encoding_c = PyBytes_AS_STRING(default_encoding); + char ascii_chars[128]; + int c; + for (c = 0; c < 128; c++) { + ascii_chars[c] = c; + } + __Pyx_sys_getdefaultencoding_not_ascii = 1; + ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); + if (ascii_chars_u == NULL) goto bad; + ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); + if (ascii_chars_b == NULL || strncmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { + PyErr_Format( + PyExc_ValueError, + "This module compiled with c_string_encoding=ascii, but default encoding '%s' is not a superset of ascii.", + default_encoding_c); + goto bad; + } + } + Py_XDECREF(sys); + Py_XDECREF(default_encoding); + Py_XDECREF(ascii_chars_u); + Py_XDECREF(ascii_chars_b); + return 0; +bad: + Py_XDECREF(sys); + Py_XDECREF(default_encoding); + Py_XDECREF(ascii_chars_u); + Py_XDECREF(ascii_chars_b); + return -1; +} +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#else +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +static char* __PYX_DEFAULT_STRING_ENCODING; +static int __Pyx_init_sys_getdefaultencoding_params() { + PyObject* sys = NULL; + PyObject* default_encoding = NULL; + char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (sys == NULL) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); + if (default_encoding == NULL) goto bad; + default_encoding_c = PyBytes_AS_STRING(default_encoding); + __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); + strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); + Py_DECREF(sys); + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(sys); + Py_XDECREF(default_encoding); + return -1; +} +#endif +#endif #ifdef __GNUC__ @@ -307,8 +472,9 @@ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ - + static PyObject *__pyx_m; +static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; @@ -329,20 +495,20 @@ }; /*--- Type declarations ---*/ -struct __pyx_obj_6oursql__Query; struct __pyx_obj_6oursql__DictWhateverMixin; -struct __pyx_obj_6oursql_Cursor; -struct __pyx_obj_6oursql__DictQuery; -struct __pyx_obj_6oursql_Connection; struct __pyx_obj_6oursql__AbstractIterWrapper; struct __pyx_obj_6oursql_FileWrapper; -struct __pyx_obj_6oursql__ResultSet; -struct __pyx_obj_6oursql_DictCursor; +struct __pyx_obj_6oursql__Query; struct __pyx_obj_6oursql__DBAPITypeObject; struct __pyx_obj_6oursql__Statement; struct __pyx_obj_6oursql__ResultStringStream; struct __pyx_obj_6oursql__BinaryWhateverMixin; +struct __pyx_obj_6oursql_Connection; +struct __pyx_obj_6oursql__ResultSet; +struct __pyx_obj_6oursql__DictQuery; struct __pyx_obj_6oursql_IterWrapper; +struct __pyx_obj_6oursql_Cursor; +struct __pyx_obj_6oursql_DictCursor; union __pyx_t_6oursql_column_data; union __pyx_t_6oursql_bitfield; struct __pyx_t_6oursql_column_output; @@ -406,7 +572,7 @@ union __pyx_t_6oursql_column_data buf; }; -/* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":1 +/* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":1 * cdef object bytes_maybe_from_encoding(object s, object encoding, # <<<<<<<<<<<<<< * bint allow_none=True): * if s is None and allow_none: @@ -416,7 +582,7 @@ int allow_none; }; -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":147 +/* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":147 * self._update_fields(stmt, rowcount) * * cdef int _update_fields(self, stmt, rowcount=None) except -1: # <<<<<<<<<<<<<< @@ -428,29 +594,7 @@ PyObject *rowcount; }; -/* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":116 - * return PyCallIter_New(self.fetchone, None) - * - * cdef class _Query: # <<<<<<<<<<<<<< - * """_Query(...) - * - */ -struct __pyx_obj_6oursql__Query { - PyObject_HEAD - struct __pyx_vtabstruct_6oursql__Query *__pyx_vtab; - struct __pyx_obj_6oursql_Connection *conn; - PyObject *result; - PyObject *res_a; - PyObject *res_kw; - PyObject *rowcount; - PyObject *lastrowid; - PyObject *description; - PyObject *warnings; - PyObject *has_result; -}; - - -/* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":59 +/* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":59 * return ret * * cdef class _DictWhateverMixin: # <<<<<<<<<<<<<< @@ -462,63 +606,7 @@ }; -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":3 - * import collections, itertools - * - * cdef class Cursor: # <<<<<<<<<<<<<< - * """Cursor(...) - * - */ -struct __pyx_obj_6oursql_Cursor { - PyObject_HEAD - struct __pyx_vtabstruct_6oursql_Cursor *__pyx_vtab; - PyObject *_statements; - PyObject *_stmt_kwargs; - struct __pyx_obj_6oursql_Connection *conn; - int closed; - int try_plain_query; - PyObject *rowcount; - PyObject *lastrowid; - PyObject *description; - PyObject *messages; - unsigned long arraysize; -}; - - -/* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":193 - * {'__module__': __name__}) - * - * cdef class _DictQuery(_Query): # <<<<<<<<<<<<<< - * _result_class = _DictResultSet - */ -struct __pyx_obj_6oursql__DictQuery { - struct __pyx_obj_6oursql__Query __pyx_base; -}; - - -/* "oursql.pyx":79 - * class UnknownError(Error): pass - * - * cdef class Connection # <<<<<<<<<<<<<< - * - * include "util.pyx" - */ -struct __pyx_obj_6oursql_Connection { - PyObject_HEAD - struct __pyx_vtabstruct_6oursql_Connection *__pyx_vtab; - PyObject *__weakref__; - MYSQL *conn; - PyObject *_charset; - PyObject *_charset_bytes; - PyObject *_context_cursors; - int use_unicode; - int autoping; - int raise_on_warnings; - PyObject *default_cursor; -}; - - -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":8 +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":8 * cdef my_ulonglong ull_negone = -1 * * cdef class _AbstractIterWrapper: # <<<<<<<<<<<<<< @@ -530,7 +618,7 @@ }; -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":43 +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":43 * """}) * * cdef class FileWrapper(_AbstractIterWrapper): # <<<<<<<<<<<<<< @@ -547,38 +635,25 @@ }; -/* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":4 - * # MySQL, I really do. +/* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":116 + * return PyCallIter_New(self.fetchone, None) * - * cdef class _ResultSet: # <<<<<<<<<<<<<< - * """_ResultSet(...) + * cdef class _Query: # <<<<<<<<<<<<<< + * """_Query(...) * */ -struct __pyx_obj_6oursql__ResultSet { +struct __pyx_obj_6oursql__Query { PyObject_HEAD - struct __pyx_vtabstruct_6oursql__ResultSet *__pyx_vtab; + struct __pyx_vtabstruct_6oursql__Query *__pyx_vtab; struct __pyx_obj_6oursql_Connection *conn; - MYSQL_RES *res; - unsigned int fields; - PyObject *conversion_info; + PyObject *result; + PyObject *res_a; + PyObject *res_kw; PyObject *rowcount; PyObject *lastrowid; PyObject *description; - PyObject *column_names; PyObject *warnings; - int show_table; -}; - - -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":265 - * self.close() - * - * cdef class DictCursor(Cursor): # <<<<<<<<<<<<<< - * """DictCursor(...) - * - */ -struct __pyx_obj_6oursql_DictCursor { - struct __pyx_obj_6oursql_Cursor __pyx_base; + PyObject *has_result; }; @@ -595,7 +670,7 @@ }; -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":85 +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":85 * """}) * * cdef class _Statement: # <<<<<<<<<<<<<< @@ -623,7 +698,7 @@ }; -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":604 +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":604 * {'__module__': __name__}) * * cdef class _ResultStringStream: # <<<<<<<<<<<<<< @@ -642,7 +717,7 @@ }; -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":12 +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":12 * return self * * cdef class _BinaryWhateverMixin: # <<<<<<<<<<<<<< @@ -654,22 +729,113 @@ }; -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":17 - * return ret +/* "oursql.pyx":79 + * class UnknownError(Error): pass * - * cdef class IterWrapper(_AbstractIterWrapper): # <<<<<<<<<<<<<< - * """IterWrapper(iterobj) + * cdef class Connection # <<<<<<<<<<<<<< * + * include "util.pyx" */ -struct __pyx_obj_6oursql_IterWrapper { - struct __pyx_obj_6oursql__AbstractIterWrapper __pyx_base; - PyObject *iterobj; - PyObject *nextfunc; -}; - - - -/* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":116 +struct __pyx_obj_6oursql_Connection { + PyObject_HEAD + struct __pyx_vtabstruct_6oursql_Connection *__pyx_vtab; + PyObject *__weakref__; + MYSQL *conn; + PyObject *_charset; + PyObject *_charset_bytes; + PyObject *_context_cursors; + int use_unicode; + int autoping; + int raise_on_warnings; + PyObject *default_cursor; +}; + + +/* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":4 + * # MySQL, I really do. + * + * cdef class _ResultSet: # <<<<<<<<<<<<<< + * """_ResultSet(...) + * + */ +struct __pyx_obj_6oursql__ResultSet { + PyObject_HEAD + struct __pyx_vtabstruct_6oursql__ResultSet *__pyx_vtab; + struct __pyx_obj_6oursql_Connection *conn; + MYSQL_RES *res; + unsigned int fields; + PyObject *conversion_info; + PyObject *rowcount; + PyObject *lastrowid; + PyObject *description; + PyObject *column_names; + PyObject *warnings; + int show_table; +}; + + +/* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":193 + * {'__module__': __name__}) + * + * cdef class _DictQuery(_Query): # <<<<<<<<<<<<<< + * _result_class = _DictResultSet + */ +struct __pyx_obj_6oursql__DictQuery { + struct __pyx_obj_6oursql__Query __pyx_base; +}; + + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":17 + * return ret + * + * cdef class IterWrapper(_AbstractIterWrapper): # <<<<<<<<<<<<<< + * """IterWrapper(iterobj) + * + */ +struct __pyx_obj_6oursql_IterWrapper { + struct __pyx_obj_6oursql__AbstractIterWrapper __pyx_base; + PyObject *iterobj; + PyObject *nextfunc; +}; + + +/* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":3 + * import collections, itertools + * + * cdef class Cursor: # <<<<<<<<<<<<<< + * """Cursor(...) + * + */ +struct __pyx_obj_6oursql_Cursor { + PyObject_HEAD + struct __pyx_vtabstruct_6oursql_Cursor *__pyx_vtab; + PyObject *_statements; + PyObject *_stmt_kwargs; + struct __pyx_obj_6oursql_Connection *conn; + int closed; + int try_plain_query; + PyObject *rowcount; + PyObject *lastrowid; + PyObject *description; + PyObject *messages; + unsigned long arraysize; +}; + + +/* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":265 + * self.close() + * + * cdef class DictCursor(Cursor): # <<<<<<<<<<<<<< + * """DictCursor(...) + * + */ +struct __pyx_obj_6oursql_DictCursor { + struct __pyx_obj_6oursql_Cursor __pyx_base; +}; + + + +/* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":116 * return PyCallIter_New(self.fetchone, None) * * cdef class _Query: # <<<<<<<<<<<<<< @@ -683,7 +849,36 @@ static struct __pyx_vtabstruct_6oursql__Query *__pyx_vtabptr_6oursql__Query; -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":85 +/* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":193 + * {'__module__': __name__}) + * + * cdef class _DictQuery(_Query): # <<<<<<<<<<<<<< + * _result_class = _DictResultSet + */ + +struct __pyx_vtabstruct_6oursql__DictQuery { + struct __pyx_vtabstruct_6oursql__Query __pyx_base; +}; +static struct __pyx_vtabstruct_6oursql__DictQuery *__pyx_vtabptr_6oursql__DictQuery; + + +/* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":3 + * import collections, itertools + * + * cdef class Cursor: # <<<<<<<<<<<<<< + * """Cursor(...) + * + */ + +struct __pyx_vtabstruct_6oursql_Cursor { + int (*_check_closed)(struct __pyx_obj_6oursql_Cursor *); + int (*_update_fields)(struct __pyx_obj_6oursql_Cursor *, PyObject *, struct __pyx_opt_args_6oursql_6Cursor__update_fields *__pyx_optional_args); + int (*_check_statements)(struct __pyx_obj_6oursql_Cursor *); +}; +static struct __pyx_vtabstruct_6oursql_Cursor *__pyx_vtabptr_6oursql_Cursor; + + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":85 * """}) * * cdef class _Statement: # <<<<<<<<<<<<<< @@ -700,7 +895,7 @@ static struct __pyx_vtabstruct_6oursql__Statement *__pyx_vtabptr_6oursql__Statement; -/* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":9 +/* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":9 * } * * cdef class Connection: # <<<<<<<<<<<<<< @@ -716,7 +911,7 @@ static struct __pyx_vtabstruct_6oursql_Connection *__pyx_vtabptr_6oursql_Connection; -/* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":4 +/* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":4 * # MySQL, I really do. * * cdef class _ResultSet: # <<<<<<<<<<<<<< @@ -731,23 +926,7 @@ static struct __pyx_vtabstruct_6oursql__ResultSet *__pyx_vtabptr_6oursql__ResultSet; -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":3 - * import collections, itertools - * - * cdef class Cursor: # <<<<<<<<<<<<<< - * """Cursor(...) - * - */ - -struct __pyx_vtabstruct_6oursql_Cursor { - int (*_check_closed)(struct __pyx_obj_6oursql_Cursor *); - int (*_update_fields)(struct __pyx_obj_6oursql_Cursor *, PyObject *, struct __pyx_opt_args_6oursql_6Cursor__update_fields *__pyx_optional_args); - int (*_check_statements)(struct __pyx_obj_6oursql_Cursor *); -}; -static struct __pyx_vtabstruct_6oursql_Cursor *__pyx_vtabptr_6oursql_Cursor; - - -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":265 +/* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":265 * self.close() * * cdef class DictCursor(Cursor): # <<<<<<<<<<<<<< @@ -759,24 +938,9 @@ struct __pyx_vtabstruct_6oursql_Cursor __pyx_base; }; static struct __pyx_vtabstruct_6oursql_DictCursor *__pyx_vtabptr_6oursql_DictCursor; - - -/* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":193 - * {'__module__': __name__}) - * - * cdef class _DictQuery(_Query): # <<<<<<<<<<<<<< - * _result_class = _DictResultSet - */ - -struct __pyx_vtabstruct_6oursql__DictQuery { - struct __pyx_vtabstruct_6oursql__Query __pyx_base; -}; -static struct __pyx_vtabstruct_6oursql__DictQuery *__pyx_vtabptr_6oursql__DictQuery; - #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif - #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, int); @@ -789,8 +953,21 @@ static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); /*proto*/ #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; - #define __Pyx_RefNannySetupContext(name) __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) - #define __Pyx_RefNannyFinishContext() __Pyx_RefNanny->FinishContext(&__pyx_refnanny) +#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__) @@ -801,7 +978,7 @@ #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations - #define __Pyx_RefNannySetupContext(name) + #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContext() #define __Pyx_INCREF(r) Py_INCREF(r) #define __Pyx_DECREF(r) Py_DECREF(r) @@ -812,43 +989,78 @@ #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) + +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); +#if PY_MAJOR_VERSION < 3 + if (likely(tp->tp_getattr)) + return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); +#endif + return PyObject_GetAttr(obj, attr_name); +} +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif -static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ +static PyObject *__Pyx_GetBuiltinName(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 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 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 PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ + +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL) +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_setattro)) + return tp->tp_setattro(obj, attr_name, value); +#if PY_MAJOR_VERSION < 3 + if (likely(tp->tp_setattr)) + return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); +#endif + return PyObject_SetAttr(obj, attr_name, value); +} +#else +#define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) +#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) +#endif + +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); -static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); +static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/ -static CYTHON_INLINE int __Pyx_NegateNonNeg(int b) { - return unlikely(b < 0) ? b : !b; +static CYTHON_INLINE int __Pyx_PyDict_Contains(PyObject* item, PyObject* dict, int eq) { + int result = PyDict_Contains(dict, item); + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } -static CYTHON_INLINE PyObject* __Pyx_PyBoolOrNull_FromLong(long b) { - return unlikely(b < 0) ? NULL : __Pyx_PyBool_FromLong(b); -} - -static CYTHON_INLINE void __Pyx_RaiseNoneIndexingError(void); #if PY_MAJOR_VERSION >= 3 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { PyObject *value; - if (unlikely(d == Py_None)) { - __Pyx_RaiseNoneIndexingError(); - return NULL; - } value = PyDict_GetItemWithError(d, key); if (unlikely(!value)) { - if (!PyErr_Occurred()) - PyErr_SetObject(PyExc_KeyError, key); + if (!PyErr_Occurred()) { + PyObject* args = PyTuple_Pack(1, key); + if (likely(args)) + PyErr_SetObject(PyExc_KeyError, args); + Py_XDECREF(args); + } return NULL; } Py_INCREF(value); @@ -866,253 +1078,199 @@ static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); /*proto*/ -static PyObject* __Pyx_PyEval_CallObjectWithKeywords(PyObject*, PyObject*, PyObject*); /*proto*/ - -static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) { - if (likely(PyList_CheckExact(L))) { - if (PyList_Append(L, x) < 0) return NULL; - Py_INCREF(Py_None); - return Py_None; /* this is just to have an accurate signature */ - } - else { - PyObject *r, *m; - m = __Pyx_GetAttrString(L, "append"); - if (!m) return NULL; - r = PyObject_CallFunctionObjArgs(m, x, NULL); - Py_DECREF(m); - return r; +#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) & likely(len > (L->allocated >> 1))) { + Py_INCREF(x); + PyList_SET_ITEM(list, len, x); + Py_SIZE(list) = len+1; + return 0; } + return PyList_Append(list, x); } - -static CYTHON_INLINE PyObject* __Pyx_PyObject_Pop(PyObject* L) { -#if PY_VERSION_HEX >= 0x02040000 - if (likely(PyList_CheckExact(L)) - /* Check that both the size is positive and no reallocation shrinking needs to be done. */ - && likely(PyList_GET_SIZE(L) > (((PyListObject*)L)->allocated >> 1))) { - Py_SIZE(L) -= 1; - return PyList_GET_ITEM(L, PyList_GET_SIZE(L)); - } -#if PY_VERSION_HEX >= 0x02050000 - else if (Py_TYPE(L) == (&PySet_Type)) { - return PySet_Pop(L); - } -#endif +#else +#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif - return PyObject_CallMethod(L, (char*)"pop", NULL); -} - -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 (likely(o != Py_None)) { - 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)); +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( + PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** py_start, PyObject** py_stop, PyObject** py_slice, + int has_cstart, int has_cstop, int wraparound); + +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 PyObject* __Pyx_PyObject_CallMethodTuple(PyObject* obj, PyObject* method_name, PyObject* args) { + PyObject *method, *result = NULL; + if (unlikely(!args)) return NULL; + method = __Pyx_PyObject_GetAttrStr(obj, method_name); + if (unlikely(!method)) goto bad; + result = PyObject_Call(method, args, NULL); + Py_DECREF(method); +bad: + Py_DECREF(args); + return result; } +#define __Pyx_PyObject_CallMethod3(obj, name, arg1, arg2, arg3) \ + __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(3, arg1, arg2, arg3)) +#define __Pyx_PyObject_CallMethod2(obj, name, arg1, arg2) \ + __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(2, arg1, arg2)) +#define __Pyx_PyObject_CallMethod1(obj, name, arg1) \ + __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(1, arg1)) +#define __Pyx_PyObject_CallMethod0(obj, name) \ + __Pyx_PyObject_CallMethodTuple(obj, name, (Py_INCREF(__pyx_empty_tuple), __pyx_empty_tuple)) -#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 (likely(o != Py_None)) { - 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)); -} +static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x); /*proto*/ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Pop(PyObject* L); /*proto*/ -#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 int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) { - PyObject *r; - if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) { - r = PyList_GET_ITEM(o, i); - Py_INCREF(r); - } - else if (PyTuple_CheckExact(o) && ((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { - r = PyTuple_GET_ITEM(o, i); - Py_INCREF(r); - } - else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_item && (likely(i >= 0))) { - r = PySequence_GetItem(o, i); - } - else { - r = __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE int __Pyx_ListComp_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 r; + return PyList_Append(list, x); } +#else +#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) +#endif -static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, - const char* function_name, int kw_allowed); /*proto*/ - -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 PyObject *__Pyx_FindPy2Metaclass(PyObject *bases); /*proto*/ - -static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, - PyObject *modname); /*proto*/ - -#define __pyx_binding_PyCFunctionType_USED 1 - -typedef struct { - PyCFunctionObject func; -} __pyx_binding_PyCFunctionType_object; - -static PyTypeObject __pyx_binding_PyCFunctionType_type; -static PyTypeObject *__pyx_binding_PyCFunctionType = NULL; - -static PyObject *__pyx_binding_PyCFunctionType_NewEx(PyMethodDef *ml, PyObject *self, PyObject *module); /* proto */ -#define __pyx_binding_PyCFunctionType_New(ml, self) __pyx_binding_PyCFunctionType_NewEx(ml, self, NULL) +#define __Pyx_GetItemInt(o, i, size, to_py_func, is_list, wraparound, boundscheck) \ + (((size) <= sizeof(Py_ssize_t)) ? \ + __Pyx_GetItemInt_Fast(o, i, is_list, wraparound, boundscheck) : \ + __Pyx_GetItemInt_Generic(o, to_py_func(i))) +#define __Pyx_GetItemInt_List(o, i, size, to_py_func, is_list, wraparound, boundscheck) \ + (((size) <= sizeof(Py_ssize_t)) ? \ + __Pyx_GetItemInt_List_Fast(o, i, wraparound, boundscheck) : \ + __Pyx_GetItemInt_Generic(o, to_py_func(i))) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func, is_list, wraparound, boundscheck) \ + (((size) <= sizeof(Py_ssize_t)) ? \ + __Pyx_GetItemInt_Tuple_Fast(o, i, wraparound, boundscheck) : \ + __Pyx_GetItemInt_Generic(o, to_py_func(i))) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck); -static int __pyx_binding_PyCFunctionType_init(void); /* proto */ - -#ifndef __PYX_FORCE_INIT_THREADS - #if PY_VERSION_HEX < 0x02040200 - #define __PYX_FORCE_INIT_THREADS 1 - #else - #define __PYX_FORCE_INIT_THREADS 0 - #endif -#endif - -#include - -static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/ - -static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/ - -#if PY_MAJOR_VERSION >= 3 -#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals -#else -#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals -#endif - -static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_my_ulonglong(my_ulonglong); +static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /*proto*/ #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 */ -#if PY_VERSION_HEX < 0x02040000 -#ifndef Py_SETOBJECT_H -#define Py_SETOBJECT_H - -static PyTypeObject *__Pyx_PySet_Type = NULL; -static PyTypeObject *__Pyx_PyFrozenSet_Type = NULL; - -#define PySet_Type (*__Pyx_PySet_Type) -#define PyFrozenSet_Type (*__Pyx_PyFrozenSet_Type) - -#define PyAnySet_Check(ob) \ - (PyAnySet_CheckExact(ob) || \ - PyType_IsSubtype((ob)->ob_type, &PySet_Type) || \ - PyType_IsSubtype((ob)->ob_type, &PyFrozenSet_Type)) - -#define PyFrozenSet_CheckExact(ob) ((ob)->ob_type == &PyFrozenSet_Type) - -static int __Pyx_Py23SetsImport(void) { - PyObject *sets=0, *Set=0, *ImmutableSet=0; - - sets = PyImport_ImportModule((char *)"sets"); - if (!sets) goto bad; - Set = PyObject_GetAttrString(sets, (char *)"Set"); - if (!Set) goto bad; - ImmutableSet = PyObject_GetAttrString(sets, (char *)"ImmutableSet"); - if (!ImmutableSet) goto bad; - Py_DECREF(sets); +static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse); - __Pyx_PySet_Type = (PyTypeObject*) Set; - __Pyx_PyFrozenSet_Type = (PyTypeObject*) ImmutableSet; +static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc); - return 0; +static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ - bad: - Py_XDECREF(sets); - Py_XDECREF(Set); - Py_XDECREF(ImmutableSet); - return -1; -} +#define __Pyx_CyFunction_USED 1 +#include +#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_qualname; + 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_kwdict; /* Const kwonly defaults dict */ + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; /* function annotations dict */ +} __pyx_CyFunctionObject; +static PyTypeObject *__pyx_CyFunctionType = 0; +#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, code) \ + __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, code) +static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, + int flags, PyObject* qualname, + 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 CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __Pyx_CyFunction_init(void); -#else -static int __Pyx_Py23SetsImport(void) { return 0; } -#endif /* !Py_SETOBJECT_H */ -#endif /* < Py2.4 */ -#endif /* < Py2.5 */ +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, int level); /*proto*/ + +static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases); /*proto*/ + +static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, + PyObject *qualname, PyObject *modname); /*proto*/ + +#ifndef __PYX_FORCE_INIT_THREADS + #define __PYX_FORCE_INIT_THREADS 0 +#endif + +static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_my_ulonglong(my_ulonglong); static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); @@ -1148,28 +1306,41 @@ static int __Pyx_check_binary_version(void); -static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ +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 __pyx_clineno, - int __pyx_lineno, const char *__pyx_filename); /*proto*/ +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 'oursql' */ -static PyTypeObject *__pyx_ptype_6oursql_Connection = 0; static PyTypeObject *__pyx_ptype_6oursql__DictWhateverMixin = 0; static PyTypeObject *__pyx_ptype_6oursql__AbstractIterWrapper = 0; -static PyTypeObject *__pyx_ptype_6oursql__BinaryWhateverMixin = 0; -static PyTypeObject *__pyx_ptype_6oursql_IterWrapper = 0; static PyTypeObject *__pyx_ptype_6oursql_FileWrapper = 0; +static PyTypeObject *__pyx_ptype_6oursql__Query = 0; +static PyTypeObject *__pyx_ptype_6oursql__DBAPITypeObject = 0; static PyTypeObject *__pyx_ptype_6oursql__Statement = 0; static PyTypeObject *__pyx_ptype_6oursql__ResultStringStream = 0; +static PyTypeObject *__pyx_ptype_6oursql__BinaryWhateverMixin = 0; +static PyTypeObject *__pyx_ptype_6oursql_Connection = 0; static PyTypeObject *__pyx_ptype_6oursql__ResultSet = 0; -static PyTypeObject *__pyx_ptype_6oursql__Query = 0; static PyTypeObject *__pyx_ptype_6oursql__DictQuery = 0; +static PyTypeObject *__pyx_ptype_6oursql_IterWrapper = 0; static PyTypeObject *__pyx_ptype_6oursql_Cursor = 0; static PyTypeObject *__pyx_ptype_6oursql_DictCursor = 0; -static PyTypeObject *__pyx_ptype_6oursql__DBAPITypeObject = 0; static unsigned int __pyx_v_6oursql_UNSIGNED_NUM_FLAG; static my_ulonglong __pyx_v_6oursql_ull_negone; static CYTHON_INLINE MYSQL *__pyx_f_6oursql_mysql_real_connect(MYSQL *, char *, char *, char *, char *, unsigned int, char *, unsigned long); /*proto*/ @@ -1183,9 +1354,7 @@ static CYTHON_INLINE int __pyx_f_6oursql_mysql_stmt_fetch_column(MYSQL_STMT *, MYSQL_BIND *, unsigned int, unsigned long); /*proto*/ static CYTHON_INLINE int __pyx_f_6oursql_mysql_stmt_store_result(MYSQL_STMT *); /*proto*/ static CYTHON_INLINE int __pyx_f_6oursql_mysql_real_query(MYSQL *, char *, unsigned long); /*proto*/ -static CYTHON_INLINE MYSQL_RES *__pyx_f_6oursql_mysql_use_result(MYSQL *); /*proto*/ static CYTHON_INLINE MYSQL_RES *__pyx_f_6oursql_mysql_store_result(MYSQL *); /*proto*/ -static CYTHON_INLINE int __pyx_f_6oursql_mysql_next_result(MYSQL *); /*proto*/ static CYTHON_INLINE MYSQL_ROW __pyx_f_6oursql_mysql_fetch_row(MYSQL_RES *); /*proto*/ static PyObject *__pyx_f_6oursql_bytes_maybe_from_encoding(PyObject *, PyObject *, struct __pyx_opt_args_6oursql_bytes_maybe_from_encoding *__pyx_optional_args); /*proto*/ static char *__pyx_f_6oursql_bytes_or_null(PyObject *); /*proto*/ @@ -1203,6 +1372,139 @@ static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_id; +static PyObject *__pyx_pf_6oursql_5Error___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno, PyObject *__pyx_v_extra); /* proto */ +static PyObject *__pyx_pf_6oursql_18_DictWhateverMixin_fetchone(struct __pyx_obj_6oursql__DictWhateverMixin *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql__exception_from_errno(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_err); /* proto */ +static PyObject *__pyx_pf_6oursql_2_do_warnings_query(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_6oursql_Connection *__pyx_v_conn); /* proto */ +static PyObject *__pyx_pf_6oursql_4_bitval_from_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */ +static PyObject *__pyx_pf_6oursql_6_datetime_from_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */ +static PyObject *__pyx_pf_6oursql_8_date_from_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */ +static PyObject *__pyx_pf_6oursql_10_time_from_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */ +static PyObject *__pyx_pf_6oursql_12TimestampFromTicks(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ticks); /* proto */ +static PyObject *__pyx_pf_6oursql_14DateFromTicks(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ticks); /* proto */ +static PyObject *__pyx_pf_6oursql_16TimeFromTicks(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ticks); /* proto */ +static int __pyx_pf_6oursql_10Connection___cinit__(struct __pyx_obj_6oursql_Connection *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_user, PyObject *__pyx_v_passwd, PyObject *__pyx_v_db, unsigned int __pyx_v_port, PyObject *__pyx_v_unix_socket, PyObject *__pyx_v_connect_timeout, PyObject *__pyx_v_read_timeout, PyObject *__pyx_v_write_timeout, PyObject *__pyx_v_protocol, PyObject *__pyx_v_ssl, PyObject *__pyx_v_read_default_file, PyObject *__pyx_v_read_default_group, PyObject *__pyx_v_init_command, PyObject *__pyx_v_charset_dir, PyObject *__pyx_v_shared_memory_base_name, int __pyx_v_local_infile, int __pyx_v_require_secure_auth, int __pyx_v_compress, int __pyx_v_report_truncation, int __pyx_v_found_rows, int __pyx_v_use_unicode, PyObject *__pyx_v_charset, int __pyx_v_autoping, PyObject *__pyx_v_default_cursor, int __pyx_v_raise_on_warnings, CYTHON_UNUSED int __pyx_v_multi_results, CYTHON_UNUSED int __pyx_v_multi_statements, int __pyx_v_autoreconnect); /* proto */ +static PyObject *__pyx_pf_6oursql_10Connection_2_setup_ssl_options(struct __pyx_obj_6oursql_Connection *__pyx_v_self, PyObject *__pyx_v_charset, PyObject *__pyx_v_key, PyObject *__pyx_v_cert, PyObject *__pyx_v_ca, PyObject *__pyx_v_capath, PyObject *__pyx_v_cipher); /* proto */ +static PyObject *__pyx_pf_6oursql_10Connection_4close(struct __pyx_obj_6oursql_Connection *__pyx_v_self); /* proto */ +static void __pyx_pf_6oursql_10Connection_6__dealloc__(struct __pyx_obj_6oursql_Connection *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10Connection_8ping(struct __pyx_obj_6oursql_Connection *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10Connection_10commit(struct __pyx_obj_6oursql_Connection *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10Connection_12rollback(struct __pyx_obj_6oursql_Connection *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10Connection_7charset___get__(struct __pyx_obj_6oursql_Connection *__pyx_v_self); /* proto */ +static int __pyx_pf_6oursql_10Connection_7charset_2__set__(struct __pyx_obj_6oursql_Connection *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_6oursql_10Connection_14warning_count(struct __pyx_obj_6oursql_Connection *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10Connection_16cursor(struct __pyx_obj_6oursql_Connection *__pyx_v_self, PyObject *__pyx_v_cursor_class, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_6oursql_10Connection_11server_info___get__(struct __pyx_obj_6oursql_Connection *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10Connection_10ssl_cipher___get__(struct __pyx_obj_6oursql_Connection *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10Connection_18__enter__(struct __pyx_obj_6oursql_Connection *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10Connection_20__exit__(struct __pyx_obj_6oursql_Connection *__pyx_v_self, PyObject *__pyx_v_exc, PyObject *__pyx_v_value, PyObject *__pyx_v_tb); /* proto */ +static PyObject *__pyx_pf_6oursql_10Connection_22_escape_string(struct __pyx_obj_6oursql_Connection *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_6oursql_10Connection_24_escape_unicode_string(struct __pyx_obj_6oursql_Connection *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_6oursql_10Connection_11use_unicode___get__(struct __pyx_obj_6oursql_Connection *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10Connection_8autoping___get__(struct __pyx_obj_6oursql_Connection *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10Connection_17raise_on_warnings___get__(struct __pyx_obj_6oursql_Connection *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10Connection_14default_cursor___get__(struct __pyx_obj_6oursql_Connection *__pyx_v_self); /* proto */ +static int __pyx_pf_6oursql_10Connection_14default_cursor_2__set__(struct __pyx_obj_6oursql_Connection *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_6oursql_10Connection_14default_cursor_4__del__(struct __pyx_obj_6oursql_Connection *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_20_AbstractIterWrapper___iter__(struct __pyx_obj_6oursql__AbstractIterWrapper *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_20_BinaryWhateverMixin___next__(struct __pyx_obj_6oursql__BinaryWhateverMixin *__pyx_v_self); /* proto */ +static int __pyx_pf_6oursql_11IterWrapper___cinit__(struct __pyx_obj_6oursql_IterWrapper *__pyx_v_self, PyObject *__pyx_v_iterobj); /* proto */ +static PyObject *__pyx_pf_6oursql_11IterWrapper_2__next__(struct __pyx_obj_6oursql_IterWrapper *__pyx_v_self); /* proto */ +static int __pyx_pf_6oursql_11FileWrapper___cinit__(struct __pyx_obj_6oursql_FileWrapper *__pyx_v_self, PyObject *__pyx_v_fileobj, PyObject *__pyx_v_chunksize, int __pyx_v_doclose); /* proto */ +static PyObject *__pyx_pf_6oursql_11FileWrapper_2__next__(struct __pyx_obj_6oursql_FileWrapper *__pyx_v_self); /* proto */ +static int __pyx_pf_6oursql_10_Statement___cinit__(struct __pyx_obj_6oursql__Statement *__pyx_v_self, struct __pyx_obj_6oursql_Connection *__pyx_v_connection, unsigned long __pyx_v_string_limit, int __pyx_v_show_table, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */ +static void __pyx_pf_6oursql_10_Statement_2__dealloc__(struct __pyx_obj_6oursql__Statement *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10_Statement_4close(struct __pyx_obj_6oursql__Statement *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10_Statement_12string_limit___get__(struct __pyx_obj_6oursql__Statement *__pyx_v_self); /* proto */ +static int __pyx_pf_6oursql_10_Statement_12string_limit_2__set__(struct __pyx_obj_6oursql__Statement *__pyx_v_self, unsigned long __pyx_v_value); /* proto */ +static PyObject *__pyx_pf_6oursql_10_Statement_6prepare(struct __pyx_obj_6oursql__Statement *__pyx_v_self, PyObject *__pyx_v_statement); /* proto */ +static PyObject *__pyx_pf_6oursql_10_Statement_10has_result___get__(struct __pyx_obj_6oursql__Statement *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10_Statement_11description___get__(struct __pyx_obj_6oursql__Statement *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10_Statement_12column_names___get__(struct __pyx_obj_6oursql__Statement *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10_Statement_8execute(struct __pyx_obj_6oursql__Statement *__pyx_v_self, PyObject *__pyx_v_parameters); /* proto */ +static PyObject *__pyx_pf_6oursql_10_Statement_10fetchone(struct __pyx_obj_6oursql__Statement *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10_Statement_12fetchall(struct __pyx_obj_6oursql__Statement *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10_Statement_14buffer_results(struct __pyx_obj_6oursql__Statement *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10_Statement_16nextset(CYTHON_UNUSED struct __pyx_obj_6oursql__Statement *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10_Statement_18__iter__(struct __pyx_obj_6oursql__Statement *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10_Statement_8rowcount___get__(struct __pyx_obj_6oursql__Statement *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10_Statement_9lastrowid___get__(struct __pyx_obj_6oursql__Statement *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10_Statement_13prefetch_rows___get__(struct __pyx_obj_6oursql__Statement *__pyx_v_self); /* proto */ +static int __pyx_pf_6oursql_10_Statement_13prefetch_rows_2__set__(struct __pyx_obj_6oursql__Statement *__pyx_v_self, unsigned long __pyx_v_value); /* proto */ +static PyObject *__pyx_pf_6oursql_10_Statement_8warnings___get__(struct __pyx_obj_6oursql__Statement *__pyx_v_self); /* proto */ +static int __pyx_pf_6oursql_10_Statement_8warnings_2__set__(struct __pyx_obj_6oursql__Statement *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_6oursql_10_Statement_8warnings_4__del__(struct __pyx_obj_6oursql__Statement *__pyx_v_self); /* proto */ +static int __pyx_pf_6oursql_19_ResultStringStream___cinit__(struct __pyx_obj_6oursql__ResultStringStream *__pyx_v_self, struct __pyx_obj_6oursql__Statement *__pyx_v_stmt, unsigned int __pyx_v_index, unsigned int __pyx_v_length); /* proto */ +static PyObject *__pyx_pf_6oursql_19_ResultStringStream_2read(struct __pyx_obj_6oursql__ResultStringStream *__pyx_v_self, Py_ssize_t __pyx_v_size); /* proto */ +static int __pyx_pf_6oursql_10_ResultSet___cinit__(struct __pyx_obj_6oursql__ResultSet *__pyx_v_self, struct __pyx_obj_6oursql_Connection *__pyx_v_conn, CYTHON_UNUSED int __pyx_v_show_table, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */ +static void __pyx_pf_6oursql_10_ResultSet_2__dealloc__(struct __pyx_obj_6oursql__ResultSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10_ResultSet_4close(struct __pyx_obj_6oursql__ResultSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10_ResultSet_10has_result___get__(struct __pyx_obj_6oursql__ResultSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10_ResultSet_6fetchone(struct __pyx_obj_6oursql__ResultSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10_ResultSet_8fetchall(struct __pyx_obj_6oursql__ResultSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10_ResultSet_10__iter__(struct __pyx_obj_6oursql__ResultSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10_ResultSet_8rowcount___get__(struct __pyx_obj_6oursql__ResultSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10_ResultSet_9lastrowid___get__(struct __pyx_obj_6oursql__ResultSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10_ResultSet_11description___get__(struct __pyx_obj_6oursql__ResultSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10_ResultSet_12column_names___get__(struct __pyx_obj_6oursql__ResultSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_10_ResultSet_8warnings___get__(struct __pyx_obj_6oursql__ResultSet *__pyx_v_self); /* proto */ +static int __pyx_pf_6oursql_10_ResultSet_8warnings_2__set__(struct __pyx_obj_6oursql__ResultSet *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_6oursql_10_ResultSet_8warnings_4__del__(struct __pyx_obj_6oursql__ResultSet *__pyx_v_self); /* proto */ +static int __pyx_pf_6oursql_6_Query___cinit__(struct __pyx_obj_6oursql__Query *__pyx_v_self, struct __pyx_obj_6oursql_Connection *__pyx_v_conn, PyObject *__pyx_v_query, PyObject *__pyx_v_a, PyObject *__pyx_v_kw); /* proto */ +static PyObject *__pyx_pf_6oursql_6_Query_2new_result(struct __pyx_obj_6oursql__Query *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_6_Query_4nextset(struct __pyx_obj_6oursql__Query *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_6_Query_6fetchone(struct __pyx_obj_6oursql__Query *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_6_Query_8__iter__(struct __pyx_obj_6oursql__Query *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_6_Query_10fetchall(struct __pyx_obj_6oursql__Query *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_6_Query_8rowcount___get__(struct __pyx_obj_6oursql__Query *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_6_Query_9lastrowid___get__(struct __pyx_obj_6oursql__Query *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_6_Query_11description___get__(struct __pyx_obj_6oursql__Query *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_6_Query_8warnings___get__(struct __pyx_obj_6oursql__Query *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_6_Query_10has_result___get__(struct __pyx_obj_6oursql__Query *__pyx_v_self); /* proto */ +static int __pyx_pf_6oursql_6Cursor___cinit__(struct __pyx_obj_6oursql_Cursor *__pyx_v_self, struct __pyx_obj_6oursql_Connection *__pyx_v_conn, int __pyx_v_try_plain_query, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_6oursql_6Cursor_2close(struct __pyx_obj_6oursql_Cursor *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_6Cursor_4_new_statement(struct __pyx_obj_6oursql_Cursor *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_6Cursor_6_new_query(struct __pyx_obj_6oursql_Cursor *__pyx_v_self, PyObject *__pyx_v_query); /* proto */ +static PyObject *__pyx_pf_6oursql_6Cursor_8callproc(CYTHON_UNUSED struct __pyx_obj_6oursql_Cursor *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_procname, CYTHON_UNUSED PyObject *__pyx_v_params); /* proto */ +static PyObject *__pyx_pf_6oursql_6Cursor_10_do_autoping(struct __pyx_obj_6oursql_Cursor *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_6Cursor_12execute(struct __pyx_obj_6oursql_Cursor *__pyx_v_self, PyObject *__pyx_v_query, PyObject *__pyx_v_params, PyObject *__pyx_v_plain_query); /* proto */ +static PyObject *__pyx_pf_6oursql_6Cursor_14executemany(struct __pyx_obj_6oursql_Cursor *__pyx_v_self, PyObject *__pyx_v_query, PyObject *__pyx_v_parambatch); /* proto */ +static PyObject *__pyx_pf_6oursql_6Cursor_16nextset(struct __pyx_obj_6oursql_Cursor *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_6Cursor_18fetchone(struct __pyx_obj_6oursql_Cursor *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_6Cursor_20fetchmany(struct __pyx_obj_6oursql_Cursor *__pyx_v_self, PyObject *__pyx_v_size); /* proto */ +static PyObject *__pyx_pf_6oursql_6Cursor_22fetchall(struct __pyx_obj_6oursql_Cursor *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_6Cursor_24__iter__(struct __pyx_obj_6oursql_Cursor *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_6Cursor_10connection___get__(struct __pyx_obj_6oursql_Cursor *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_6Cursor_26setinputsizes(CYTHON_UNUSED struct __pyx_obj_6oursql_Cursor *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_sizes); /* proto */ +static PyObject *__pyx_pf_6oursql_6Cursor_28setoutputsize(CYTHON_UNUSED struct __pyx_obj_6oursql_Cursor *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_size, CYTHON_UNUSED PyObject *__pyx_v_column); /* proto */ +static PyObject *__pyx_pf_6oursql_6Cursor_30__enter__(struct __pyx_obj_6oursql_Cursor *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_6Cursor_32__exit__(struct __pyx_obj_6oursql_Cursor *__pyx_v_self, PyObject *__pyx_v_exc, CYTHON_UNUSED PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_tb); /* proto */ +static PyObject *__pyx_pf_6oursql_6Cursor_11_statements___get__(struct __pyx_obj_6oursql_Cursor *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_6Cursor_12_stmt_kwargs___get__(struct __pyx_obj_6oursql_Cursor *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_6Cursor_8rowcount___get__(struct __pyx_obj_6oursql_Cursor *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_6Cursor_9lastrowid___get__(struct __pyx_obj_6oursql_Cursor *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_6Cursor_11description___get__(struct __pyx_obj_6oursql_Cursor *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_6Cursor_8messages___get__(struct __pyx_obj_6oursql_Cursor *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_6Cursor_9arraysize___get__(struct __pyx_obj_6oursql_Cursor *__pyx_v_self); /* proto */ +static int __pyx_pf_6oursql_6Cursor_9arraysize_2__set__(struct __pyx_obj_6oursql_Cursor *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_6oursql_16_DBAPITypeObject___init__(struct __pyx_obj_6oursql__DBAPITypeObject *__pyx_v_self, PyObject *__pyx_v_values); /* proto */ +static PyObject *__pyx_pf_6oursql_16_DBAPITypeObject_2__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */ +static PyObject *__pyx_pf_6oursql_16_DBAPITypeObject_4__repr__(struct __pyx_obj_6oursql__DBAPITypeObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6oursql_16_DBAPITypeObject_6values___get__(struct __pyx_obj_6oursql__DBAPITypeObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_tp_new_6oursql__DictWhateverMixin(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6oursql__AbstractIterWrapper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6oursql_FileWrapper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6oursql__Query(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6oursql__DBAPITypeObject(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6oursql__Statement(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6oursql__ResultStringStream(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6oursql__BinaryWhateverMixin(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6oursql_Connection(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6oursql__ResultSet(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6oursql__DictQuery(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6oursql_IterWrapper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6oursql_Cursor(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6oursql_DictCursor(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static char __pyx_k_1[] = "%s.%s"; static char __pyx_k_2[] = "column \"%s\" appears more than once in output"; static char __pyx_k_3[] = "SHOW WARNINGS"; @@ -1211,53 +1513,64 @@ static char __pyx_k_6[] = "CollatedWarningsError"; static char __pyx_k_7[] = "query caused warnings"; static char __pyx_k_9[] = "%Y-%m-%d %H:%M:%S"; -static char __pyx_k_10[] = "%Y-%m-%d"; -static char __pyx_k_11[] = "%H:%M:%S"; -static char __pyx_k_12[] = "shared_memory_base_name"; -static char __pyx_k_13[] = "alloc of conn object failed"; -static char __pyx_k_15[] = "unknown protocol %r"; -static char __pyx_k_16[] = "connection closed"; -static char __pyx_k_18[] = "alloc of statement failed"; -static char __pyx_k_21[] = "statement closed"; -static char __pyx_k_23[] = "string limit must be >= 0"; -static char __pyx_k_25[] = "binding this query would cause rows to become unfetchable"; -static char __pyx_k_27[] = "alloc of result bind structure failed"; -static char __pyx_k_29[] = "alloc of result buffers failed"; -static char __pyx_k_31[] = "executing this query would cause rows to become unfetchable"; -static char __pyx_k_33[] = "%d parameters expected, %d given"; -static char __pyx_k_34[] = "alloc of bind parameters failed"; -static char __pyx_k_36[] = "cannot bind %r object"; -static char __pyx_k_37[] = "unknown column returned as string"; -static char __pyx_k_38[] = "truncated column %d, type %d"; -static char __pyx_k_39[] = "must prefetch at least 1 row"; -static char __pyx_k_41[] = ""; -static char __pyx_k_42[] = "row no longer available from database"; -static char __pyx_k_44[] = "can't read negative bytes"; -static char __pyx_k_46[] = "size remaining should be >= 0"; -static char __pyx_k_48[] = "query closed"; -static char __pyx_k_51[] = "cursor closed"; -static char __pyx_k_53[] = "use the CALL statement with the execute method to call stored procedures"; -static char __pyx_k_56[] = "can't call execute with both parameters and a plain query"; -static char __pyx_k_58[] = "no results available"; -static char __pyx_k_60[] = "unorderable types: %r and %r"; -static char __pyx_k_61[] = "<_DBAPITypeObject representing %r at %#x>"; -static char __pyx_k_62[] = "charset -> str\n \n Get or set the connection's current encoding. If use_unicode is \n enabled, this is the encoding that will be used to decode incoming\n strings.\n "; -static char __pyx_k_63[] = "oursql python bindings for MySQL.\n\nThis module is a new, better set of MySQL bindings for python, supporting novel\nfeatures like parameterization!\n"; -static char __pyx_k_64[] = "Aaron Gallagher "; -static char __pyx_k_65[] = "0.9.2"; -static char __pyx_k_66[] = "_datetime_from_string"; -static char __pyx_k_67[] = "BinaryIterWrapper(iterobj)\n \n BinaryIterWrapper behaves like IterWrapper, except the strings yielded from\n the iterable are treated as bytes instead of text strings.\n "; -static char __pyx_k_68[] = "BinaryFileWrapper(fileobj, chunksize=8192, doclose=False)\n \n BinaryFileWrapper behaves exactly like FileWrapper, except the strings \n yielded from the file object are treated as bytes instead of text strings.\n "; -static char __pyx_k_69[] = "could not initialize mysql"; -static char __pyx_k_71[] = "2.0"; +static char __pyx_k_11[] = "%Y-%m-%d"; +static char __pyx_k_13[] = "%H:%M:%S"; +static char __pyx_k_18[] = "shared_memory_base_name"; +static char __pyx_k_19[] = "alloc of conn object failed"; +static char __pyx_k_21[] = "unknown protocol %r"; +static char __pyx_k_22[] = "connection closed"; +static char __pyx_k_24[] = "alloc of statement failed"; +static char __pyx_k_27[] = "statement closed"; +static char __pyx_k_29[] = "string limit must be >= 0"; +static char __pyx_k_31[] = "binding this query would cause rows to become unfetchable"; +static char __pyx_k_33[] = "alloc of result bind structure failed"; +static char __pyx_k_35[] = "alloc of result buffers failed"; +static char __pyx_k_37[] = "executing this query would cause rows to become unfetchable"; +static char __pyx_k_39[] = "%d parameters expected, %d given"; +static char __pyx_k_40[] = "alloc of bind parameters failed"; +static char __pyx_k_42[] = "cannot bind %r object"; +static char __pyx_k_43[] = "unknown column returned as string"; +static char __pyx_k_44[] = "truncated column %d, type %d"; +static char __pyx_k_45[] = "must prefetch at least 1 row"; +static char __pyx_k_47[] = ""; +static char __pyx_k_48[] = "row no longer available from database"; +static char __pyx_k_50[] = "can't read negative bytes"; +static char __pyx_k_52[] = "size remaining should be >= 0"; +static char __pyx_k_54[] = "query closed"; +static char __pyx_k_57[] = "cursor closed"; +static char __pyx_k_59[] = "use the CALL statement with the execute method to call stored procedures"; +static char __pyx_k_62[] = "can't call execute with both parameters and a plain query"; +static char __pyx_k_64[] = "no results available"; +static char __pyx_k_66[] = "unorderable types: %r and %r"; +static char __pyx_k_67[] = "<_DBAPITypeObject representing %r at %#x>"; +static char __pyx_k_68[] = "charset -> str\n \n Get or set the connection's current encoding. If use_unicode is \n enabled, this is the encoding that will be used to decode incoming\n strings.\n "; +static char __pyx_k_69[] = "oursql python bindings for MySQL.\n\nThis module is a new, better set of MySQL bindings for python, supporting novel\nfeatures like parameterization!\n"; +static char __pyx_k_70[] = "Aaron Gallagher "; +static char __pyx_k_71[] = "0.9.3"; +static char __pyx_k_74[] = "/private/tmp/oursql-0.9.3/oursqlx/oursql.pyx"; +static char __pyx_k_76[] = "Error.__init__"; +static char __pyx_k_79[] = "/private/tmp/oursql-0.9.3/oursqlx/util.pyx"; +static char __pyx_k_84[] = "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx"; +static char __pyx_k_87[] = "_datetime_from_string"; +static char __pyx_k_98[] = "BinaryIterWrapper(iterobj)\n \n BinaryIterWrapper behaves like IterWrapper, except the strings yielded from\n the iterable are treated as bytes instead of text strings.\n "; +static char __pyx_k_99[] = "BinaryFileWrapper(fileobj, chunksize=8192, doclose=False)\n \n BinaryFileWrapper behaves exactly like FileWrapper, except the strings \n yielded from the file object are treated as bytes instead of text strings.\n "; +static char __pyx_k__q[] = "q"; +static char __pyx_k__s[] = "s"; +static char __pyx_k_100[] = "could not initialize mysql"; +static char __pyx_k_102[] = "2.0"; static char __pyx_k__ca[] = "ca"; static char __pyx_k__db[] = "db"; static char __pyx_k__id[] = "id"; static char __pyx_k__io[] = "io"; +static char __pyx_k__ss[] = "ss"; static char __pyx_k__tb[] = "tb"; +static char __pyx_k__tt[] = "tt"; +static char __pyx_k__err[] = "err"; static char __pyx_k__exc[] = "exc"; static char __pyx_k__get[] = "get"; static char __pyx_k__key[] = "key"; +static char __pyx_k__pop[] = "pop"; +static char __pyx_k__ret[] = "ret"; static char __pyx_k__ssl[] = "ssl"; static char __pyx_k__tcp[] = "tcp"; static char __pyx_k__zip[] = "zip"; @@ -1270,6 +1583,7 @@ static char __pyx_k__conn[] = "conn"; static char __pyx_k__date[] = "date"; static char __pyx_k__host[] = "host"; +static char __pyx_k__kind[] = "kind"; static char __pyx_k__next[] = "next"; static char __pyx_k__ping[] = "ping"; static char __pyx_k__pipe[] = "pipe"; @@ -1292,11 +1606,13 @@ static char __pyx_k__qmark[] = "qmark"; static char __pyx_k__query[] = "query"; static char __pyx_k__super[] = "super"; +static char __pyx_k__ticks[] = "ticks"; static char __pyx_k__value[] = "value"; static char __pyx_k__BINARY[] = "BINARY"; static char __pyx_k__Binary[] = "Binary"; static char __pyx_k__NUMBER[] = "NUMBER"; static char __pyx_k__STRING[] = "STRING"; +static char __pyx_k__append[] = "append"; static char __pyx_k__capath[] = "capath"; static char __pyx_k__cipher[] = "cipher"; static char __pyx_k__codecs[] = "codecs"; @@ -1363,6 +1679,7 @@ static char __pyx_k__localtime[] = "localtime"; static char __pyx_k__ValueError[] = "ValueError"; static char __pyx_k____author__[] = "__author__"; +static char __pyx_k____import__[] = "__import__"; static char __pyx_k____module__[] = "__module__"; static char __pyx_k___new_query[] = "_new_query"; static char __pyx_k__connection[] = "connection"; @@ -1382,6 +1699,7 @@ static char __pyx_k__unix_socket[] = "unix_socket"; static char __pyx_k__use_unicode[] = "use_unicode"; static char __pyx_k__UnknownError[] = "UnknownError"; +static char __pyx_k____qualname__[] = "__qualname__"; static char __pyx_k___conversions[] = "_conversions"; static char __pyx_k___do_autoping[] = "_do_autoping"; static char __pyx_k___query_class[] = "_query_class"; @@ -1390,6 +1708,7 @@ static char __pyx_k__init_command[] = "init_command"; static char __pyx_k__local_infile[] = "local_infile"; static char __pyx_k__read_timeout[] = "read_timeout"; +static char __pyx_k__should_raise[] = "should_raise"; static char __pyx_k__string_limit[] = "string_limit"; static char __pyx_k__threadsafety[] = "threadsafety"; static char __pyx_k__DatabaseError[] = "DatabaseError"; @@ -1397,6 +1716,7 @@ static char __pyx_k__InternalError[] = "InternalError"; static char __pyx_k__StopIteration[] = "StopIteration"; static char __pyx_k__TimeFromTicks[] = "TimeFromTicks"; +static char __pyx_k____metaclass__[] = "__metaclass__"; static char __pyx_k___result_class[] = "_result_class"; static char __pyx_k__autoreconnect[] = "autoreconnect"; static char __pyx_k__multi_results[] = "multi_results"; @@ -1407,6 +1727,7 @@ static char __pyx_k__InterfaceError[] = "InterfaceError"; static char __pyx_k___DictResultSet[] = "_DictResultSet"; static char __pyx_k___DictStatement[] = "_DictStatement"; +static char __pyx_k____pyx_vtable__[] = "__pyx_vtable__"; static char __pyx_k___escape_string[] = "_escape_string"; static char __pyx_k___new_statement[] = "_new_statement"; static char __pyx_k__buffer_results[] = "buffer_results"; @@ -1436,49 +1757,53 @@ static char __pyx_k___exception_enum_map[] = "_exception_enum_map"; static char __pyx_k__require_secure_auth[] = "require_secure_auth"; static PyObject *__pyx_kp_u_1; -static PyObject *__pyx_kp_s_10; +static PyObject *__pyx_kp_s_100; +static PyObject *__pyx_kp_s_102; static PyObject *__pyx_kp_s_11; -static PyObject *__pyx_n_s_12; static PyObject *__pyx_kp_s_13; -static PyObject *__pyx_kp_s_15; -static PyObject *__pyx_kp_s_16; -static PyObject *__pyx_kp_s_18; +static PyObject *__pyx_n_s_18; +static PyObject *__pyx_kp_s_19; static PyObject *__pyx_kp_s_2; static PyObject *__pyx_kp_s_21; -static PyObject *__pyx_kp_s_23; -static PyObject *__pyx_kp_s_25; +static PyObject *__pyx_kp_s_22; +static PyObject *__pyx_kp_s_24; static PyObject *__pyx_kp_s_27; static PyObject *__pyx_kp_s_29; static PyObject *__pyx_kp_s_3; static PyObject *__pyx_kp_s_31; static PyObject *__pyx_kp_s_33; -static PyObject *__pyx_kp_s_34; -static PyObject *__pyx_kp_s_36; -static PyObject *__pyx_kp_s_38; +static PyObject *__pyx_kp_s_35; +static PyObject *__pyx_kp_s_37; static PyObject *__pyx_kp_s_39; static PyObject *__pyx_n_s_4; -static PyObject *__pyx_kp_s_41; +static PyObject *__pyx_kp_s_40; static PyObject *__pyx_kp_s_42; static PyObject *__pyx_kp_s_44; -static PyObject *__pyx_kp_s_46; +static PyObject *__pyx_kp_s_45; +static PyObject *__pyx_kp_s_47; static PyObject *__pyx_kp_s_48; static PyObject *__pyx_kp_s_5; -static PyObject *__pyx_kp_s_51; -static PyObject *__pyx_kp_s_53; -static PyObject *__pyx_kp_s_56; -static PyObject *__pyx_kp_s_58; +static PyObject *__pyx_kp_s_50; +static PyObject *__pyx_kp_s_52; +static PyObject *__pyx_kp_s_54; +static PyObject *__pyx_kp_s_57; +static PyObject *__pyx_kp_s_59; static PyObject *__pyx_n_s_6; -static PyObject *__pyx_kp_s_60; -static PyObject *__pyx_kp_s_61; +static PyObject *__pyx_kp_s_62; static PyObject *__pyx_kp_s_64; -static PyObject *__pyx_kp_s_65; -static PyObject *__pyx_n_s_66; +static PyObject *__pyx_kp_s_66; static PyObject *__pyx_kp_s_67; -static PyObject *__pyx_kp_s_68; -static PyObject *__pyx_kp_s_69; static PyObject *__pyx_kp_s_7; +static PyObject *__pyx_kp_s_70; static PyObject *__pyx_kp_s_71; +static PyObject *__pyx_kp_s_74; +static PyObject *__pyx_n_s_76; +static PyObject *__pyx_kp_s_79; +static PyObject *__pyx_kp_s_84; +static PyObject *__pyx_n_s_87; static PyObject *__pyx_kp_s_9; +static PyObject *__pyx_kp_s_98; +static PyObject *__pyx_kp_s_99; static PyObject *__pyx_n_s__BINARY; static PyObject *__pyx_n_s__Binary; static PyObject *__pyx_n_s__BinaryFileWrapper; @@ -1523,10 +1848,14 @@ static PyObject *__pyx_n_s____doc__; static PyObject *__pyx_n_s____enter__; static PyObject *__pyx_n_s____exit__; +static PyObject *__pyx_n_s____import__; static PyObject *__pyx_n_s____init__; static PyObject *__pyx_n_s____main__; +static PyObject *__pyx_n_s____metaclass__; static PyObject *__pyx_n_s____module__; static PyObject *__pyx_n_s____name__; +static PyObject *__pyx_n_s____pyx_vtable__; +static PyObject *__pyx_n_s____qualname__; static PyObject *__pyx_n_s____test__; static PyObject *__pyx_n_s____version__; static PyObject *__pyx_n_s___bitval_from_string; @@ -1545,6 +1874,7 @@ static PyObject *__pyx_n_s___statement_class; static PyObject *__pyx_n_s___time_from_string; static PyObject *__pyx_n_s__apilevel; +static PyObject *__pyx_n_s__append; static PyObject *__pyx_n_s__autoping; static PyObject *__pyx_n_s__autoreconnect; static PyObject *__pyx_n_s__buffer_results; @@ -1582,6 +1912,7 @@ static PyObject *__pyx_n_s__description; static PyObject *__pyx_n_s__doclose; static PyObject *__pyx_n_s__encode; +static PyObject *__pyx_n_s__err; static PyObject *__pyx_n_s__errno; static PyObject *__pyx_n_s__errnos; static PyObject *__pyx_n_s__exc; @@ -1603,6 +1934,7 @@ static PyObject *__pyx_n_s__iterobj; static PyObject *__pyx_n_s__itertools; static PyObject *__pyx_n_s__key; +static PyObject *__pyx_n_s__kind; static PyObject *__pyx_n_s__lastrowid; static PyObject *__pyx_n_s__length; static PyObject *__pyx_n_s__local_infile; @@ -1622,12 +1954,14 @@ static PyObject *__pyx_n_s__ping; static PyObject *__pyx_n_s__pipe; static PyObject *__pyx_n_s__plain_query; +static PyObject *__pyx_n_s__pop; static PyObject *__pyx_n_s__popleft; static PyObject *__pyx_n_s__port; static PyObject *__pyx_n_s__prefetch_rows; static PyObject *__pyx_n_s__prepare; static PyObject *__pyx_n_s__procname; static PyObject *__pyx_n_s__protocol; +static PyObject *__pyx_n_s__q; static PyObject *__pyx_n_s__qmark; static PyObject *__pyx_n_s__query; static PyObject *__pyx_n_s__raise_on_warnings; @@ -1637,12 +1971,16 @@ static PyObject *__pyx_n_s__read_timeout; static PyObject *__pyx_n_s__report_truncation; static PyObject *__pyx_n_s__require_secure_auth; +static PyObject *__pyx_n_s__ret; static PyObject *__pyx_n_s__rollback; static PyObject *__pyx_n_s__rowcount; +static PyObject *__pyx_n_s__s; static PyObject *__pyx_n_s__self; +static PyObject *__pyx_n_s__should_raise; static PyObject *__pyx_n_s__show_table; static PyObject *__pyx_n_s__size; static PyObject *__pyx_n_s__socket; +static PyObject *__pyx_n_s__ss; static PyObject *__pyx_n_s__ssl; static PyObject *__pyx_n_s__stmt; static PyObject *__pyx_n_s__string_limit; @@ -1651,8 +1989,10 @@ static PyObject *__pyx_n_s__tb; static PyObject *__pyx_n_s__tcp; static PyObject *__pyx_n_s__threadsafety; +static PyObject *__pyx_n_s__ticks; static PyObject *__pyx_n_s__time; static PyObject *__pyx_n_s__try_plain_query; +static PyObject *__pyx_n_s__tt; static PyObject *__pyx_n_s__unix_socket; static PyObject *__pyx_n_s__use_unicode; static PyObject *__pyx_n_s__user; @@ -1665,35 +2005,64 @@ static PyObject *__pyx_n_s__zip; static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; +static PyObject *__pyx_int_3; +static PyObject *__pyx_int_6; static PyObject *__pyx_int_neg_1; static PyObject *__pyx_int_63; static PyObject *__pyx_int_8192; -static PyObject *__pyx_k_55; +static PyObject *__pyx_k_61; static PyObject *__pyx_k_tuple_8; -static PyObject *__pyx_k_tuple_14; -static PyObject *__pyx_k_tuple_17; -static PyObject *__pyx_k_tuple_19; +static PyObject *__pyx_k_slice_10; +static PyObject *__pyx_k_slice_12; +static PyObject *__pyx_k_slice_14; +static PyObject *__pyx_k_slice_15; +static PyObject *__pyx_k_slice_16; +static PyObject *__pyx_k_slice_17; static PyObject *__pyx_k_tuple_20; -static PyObject *__pyx_k_tuple_22; -static PyObject *__pyx_k_tuple_24; +static PyObject *__pyx_k_tuple_23; +static PyObject *__pyx_k_tuple_25; static PyObject *__pyx_k_tuple_26; static PyObject *__pyx_k_tuple_28; static PyObject *__pyx_k_tuple_30; static PyObject *__pyx_k_tuple_32; -static PyObject *__pyx_k_tuple_35; -static PyObject *__pyx_k_tuple_40; -static PyObject *__pyx_k_tuple_43; -static PyObject *__pyx_k_tuple_45; -static PyObject *__pyx_k_tuple_47; +static PyObject *__pyx_k_tuple_34; +static PyObject *__pyx_k_tuple_36; +static PyObject *__pyx_k_tuple_38; +static PyObject *__pyx_k_tuple_41; +static PyObject *__pyx_k_tuple_46; static PyObject *__pyx_k_tuple_49; -static PyObject *__pyx_k_tuple_50; -static PyObject *__pyx_k_tuple_52; -static PyObject *__pyx_k_tuple_54; -static PyObject *__pyx_k_tuple_57; -static PyObject *__pyx_k_tuple_59; -static PyObject *__pyx_k_tuple_70; +static PyObject *__pyx_k_tuple_51; +static PyObject *__pyx_k_tuple_53; +static PyObject *__pyx_k_tuple_55; +static PyObject *__pyx_k_tuple_56; +static PyObject *__pyx_k_tuple_58; +static PyObject *__pyx_k_tuple_60; +static PyObject *__pyx_k_tuple_63; +static PyObject *__pyx_k_tuple_65; +static PyObject *__pyx_k_tuple_72; +static PyObject *__pyx_k_tuple_75; +static PyObject *__pyx_k_tuple_77; +static PyObject *__pyx_k_tuple_80; +static PyObject *__pyx_k_tuple_82; +static PyObject *__pyx_k_tuple_85; +static PyObject *__pyx_k_tuple_88; +static PyObject *__pyx_k_tuple_90; +static PyObject *__pyx_k_tuple_92; +static PyObject *__pyx_k_tuple_94; +static PyObject *__pyx_k_tuple_96; +static PyObject *__pyx_k_tuple_101; +static PyObject *__pyx_k_codeobj_73; +static PyObject *__pyx_k_codeobj_78; +static PyObject *__pyx_k_codeobj_81; +static PyObject *__pyx_k_codeobj_83; +static PyObject *__pyx_k_codeobj_86; +static PyObject *__pyx_k_codeobj_89; +static PyObject *__pyx_k_codeobj_91; +static PyObject *__pyx_k_codeobj_93; +static PyObject *__pyx_k_codeobj_95; +static PyObject *__pyx_k_codeobj_97; -/* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":5 +/* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":5 * # duplication of functions. * * cdef inline MYSQL *mysql_real_connect( # <<<<<<<<<<<<<< @@ -1704,9 +2073,9 @@ static CYTHON_INLINE MYSQL *__pyx_f_6oursql_mysql_real_connect(MYSQL *__pyx_v_conn, char *__pyx_v_host, char *__pyx_v_user, char *__pyx_v_passwd, char *__pyx_v_db, unsigned int __pyx_v_port, char *__pyx_v_unix_socket, unsigned long __pyx_v_client_flag) { MYSQL *__pyx_r; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("mysql_real_connect"); + __Pyx_RefNannySetupContext("mysql_real_connect", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":8 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":8 * MYSQL *conn, char *host, char *user, char *passwd, char *db, * unsigned int port, char *unix_socket, unsigned long client_flag): * with nogil: # <<<<<<<<<<<<<< @@ -1715,12 +2084,12 @@ */ { #ifdef WITH_THREAD - PyThreadState *_save = NULL; - #endif + PyThreadState *_save; Py_UNBLOCK_THREADS + #endif /*try:*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":10 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":10 * with nogil: * return _mysql_real_connect(conn, host, user, passwd, db, port, * unix_socket, client_flag) # <<<<<<<<<<<<<< @@ -1731,7 +2100,7 @@ goto __pyx_L3; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":8 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":8 * MYSQL *conn, char *host, char *user, char *passwd, char *db, * unsigned int port, char *unix_socket, unsigned long client_flag): * with nogil: # <<<<<<<<<<<<<< @@ -1743,7 +2112,9 @@ __pyx_why = 0; goto __pyx_L5; __pyx_L3: __pyx_why = 3; goto __pyx_L5; __pyx_L5:; + #ifdef WITH_THREAD Py_BLOCK_THREADS + #endif switch (__pyx_why) { case 3: goto __pyx_L0; } @@ -1756,7 +2127,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":12 +/* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":12 * unix_socket, client_flag) * * cdef inline int mysql_ping(MYSQL *conn): # <<<<<<<<<<<<<< @@ -1767,9 +2138,9 @@ static CYTHON_INLINE int __pyx_f_6oursql_mysql_ping(MYSQL *__pyx_v_conn) { int __pyx_r; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("mysql_ping"); + __Pyx_RefNannySetupContext("mysql_ping", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":13 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":13 * * cdef inline int mysql_ping(MYSQL *conn): * with nogil: # <<<<<<<<<<<<<< @@ -1778,12 +2149,12 @@ */ { #ifdef WITH_THREAD - PyThreadState *_save = NULL; - #endif + PyThreadState *_save; Py_UNBLOCK_THREADS + #endif /*try:*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":14 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":14 * cdef inline int mysql_ping(MYSQL *conn): * with nogil: * return _mysql_ping(conn) # <<<<<<<<<<<<<< @@ -1794,7 +2165,7 @@ goto __pyx_L3; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":13 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":13 * * cdef inline int mysql_ping(MYSQL *conn): * with nogil: # <<<<<<<<<<<<<< @@ -1806,7 +2177,9 @@ __pyx_why = 0; goto __pyx_L5; __pyx_L3: __pyx_why = 3; goto __pyx_L5; __pyx_L5:; + #ifdef WITH_THREAD Py_BLOCK_THREADS + #endif switch (__pyx_why) { case 3: goto __pyx_L0; } @@ -1819,7 +2192,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":16 +/* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":16 * return _mysql_ping(conn) * * cdef inline my_bool mysql_commit(MYSQL *conn): # <<<<<<<<<<<<<< @@ -1830,9 +2203,9 @@ static CYTHON_INLINE my_bool __pyx_f_6oursql_mysql_commit(MYSQL *__pyx_v_conn) { my_bool __pyx_r; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("mysql_commit"); + __Pyx_RefNannySetupContext("mysql_commit", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":17 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":17 * * cdef inline my_bool mysql_commit(MYSQL *conn): * with nogil: # <<<<<<<<<<<<<< @@ -1841,12 +2214,12 @@ */ { #ifdef WITH_THREAD - PyThreadState *_save = NULL; - #endif + PyThreadState *_save; Py_UNBLOCK_THREADS + #endif /*try:*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":18 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":18 * cdef inline my_bool mysql_commit(MYSQL *conn): * with nogil: * return _mysql_commit(conn) # <<<<<<<<<<<<<< @@ -1857,7 +2230,7 @@ goto __pyx_L3; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":17 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":17 * * cdef inline my_bool mysql_commit(MYSQL *conn): * with nogil: # <<<<<<<<<<<<<< @@ -1869,7 +2242,9 @@ __pyx_why = 0; goto __pyx_L5; __pyx_L3: __pyx_why = 3; goto __pyx_L5; __pyx_L5:; + #ifdef WITH_THREAD Py_BLOCK_THREADS + #endif switch (__pyx_why) { case 3: goto __pyx_L0; } @@ -1882,7 +2257,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":20 +/* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":20 * return _mysql_commit(conn) * * cdef inline my_bool mysql_rollback(MYSQL *conn): # <<<<<<<<<<<<<< @@ -1893,9 +2268,9 @@ static CYTHON_INLINE my_bool __pyx_f_6oursql_mysql_rollback(MYSQL *__pyx_v_conn) { my_bool __pyx_r; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("mysql_rollback"); + __Pyx_RefNannySetupContext("mysql_rollback", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":21 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":21 * * cdef inline my_bool mysql_rollback(MYSQL *conn): * with nogil: # <<<<<<<<<<<<<< @@ -1904,12 +2279,12 @@ */ { #ifdef WITH_THREAD - PyThreadState *_save = NULL; - #endif + PyThreadState *_save; Py_UNBLOCK_THREADS + #endif /*try:*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":22 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":22 * cdef inline my_bool mysql_rollback(MYSQL *conn): * with nogil: * return _mysql_rollback(conn) # <<<<<<<<<<<<<< @@ -1920,7 +2295,7 @@ goto __pyx_L3; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":21 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":21 * * cdef inline my_bool mysql_rollback(MYSQL *conn): * with nogil: # <<<<<<<<<<<<<< @@ -1932,7 +2307,9 @@ __pyx_why = 0; goto __pyx_L5; __pyx_L3: __pyx_why = 3; goto __pyx_L5; __pyx_L5:; + #ifdef WITH_THREAD Py_BLOCK_THREADS + #endif switch (__pyx_why) { case 3: goto __pyx_L0; } @@ -1945,7 +2322,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":24 +/* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":24 * return _mysql_rollback(conn) * * cdef inline int mysql_stmt_prepare(MYSQL_STMT *stmt, # <<<<<<<<<<<<<< @@ -1956,9 +2333,9 @@ static CYTHON_INLINE int __pyx_f_6oursql_mysql_stmt_prepare(MYSQL_STMT *__pyx_v_stmt, char *__pyx_v_stmt_str, unsigned long __pyx_v_length) { int __pyx_r; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("mysql_stmt_prepare"); + __Pyx_RefNannySetupContext("mysql_stmt_prepare", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":26 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":26 * cdef inline int mysql_stmt_prepare(MYSQL_STMT *stmt, * char *stmt_str, unsigned long length): * with nogil: # <<<<<<<<<<<<<< @@ -1967,12 +2344,12 @@ */ { #ifdef WITH_THREAD - PyThreadState *_save = NULL; - #endif + PyThreadState *_save; Py_UNBLOCK_THREADS + #endif /*try:*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":27 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":27 * char *stmt_str, unsigned long length): * with nogil: * return _mysql_stmt_prepare(stmt, stmt_str, length) # <<<<<<<<<<<<<< @@ -1983,7 +2360,7 @@ goto __pyx_L3; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":26 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":26 * cdef inline int mysql_stmt_prepare(MYSQL_STMT *stmt, * char *stmt_str, unsigned long length): * with nogil: # <<<<<<<<<<<<<< @@ -1995,7 +2372,9 @@ __pyx_why = 0; goto __pyx_L5; __pyx_L3: __pyx_why = 3; goto __pyx_L5; __pyx_L5:; + #ifdef WITH_THREAD Py_BLOCK_THREADS + #endif switch (__pyx_why) { case 3: goto __pyx_L0; } @@ -2008,7 +2387,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":29 +/* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":29 * return _mysql_stmt_prepare(stmt, stmt_str, length) * * cdef inline int mysql_stmt_execute(MYSQL_STMT *stmt): # <<<<<<<<<<<<<< @@ -2019,9 +2398,9 @@ static CYTHON_INLINE int __pyx_f_6oursql_mysql_stmt_execute(MYSQL_STMT *__pyx_v_stmt) { int __pyx_r; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("mysql_stmt_execute"); + __Pyx_RefNannySetupContext("mysql_stmt_execute", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":30 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":30 * * cdef inline int mysql_stmt_execute(MYSQL_STMT *stmt): * with nogil: # <<<<<<<<<<<<<< @@ -2030,12 +2409,12 @@ */ { #ifdef WITH_THREAD - PyThreadState *_save = NULL; - #endif + PyThreadState *_save; Py_UNBLOCK_THREADS + #endif /*try:*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":31 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":31 * cdef inline int mysql_stmt_execute(MYSQL_STMT *stmt): * with nogil: * return _mysql_stmt_execute(stmt) # <<<<<<<<<<<<<< @@ -2046,7 +2425,7 @@ goto __pyx_L3; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":30 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":30 * * cdef inline int mysql_stmt_execute(MYSQL_STMT *stmt): * with nogil: # <<<<<<<<<<<<<< @@ -2058,7 +2437,9 @@ __pyx_why = 0; goto __pyx_L5; __pyx_L3: __pyx_why = 3; goto __pyx_L5; __pyx_L5:; + #ifdef WITH_THREAD Py_BLOCK_THREADS + #endif switch (__pyx_why) { case 3: goto __pyx_L0; } @@ -2071,7 +2452,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":33 +/* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":33 * return _mysql_stmt_execute(stmt) * * cdef inline int mysql_stmt_fetch(MYSQL_STMT *stmt): # <<<<<<<<<<<<<< @@ -2082,9 +2463,9 @@ static CYTHON_INLINE int __pyx_f_6oursql_mysql_stmt_fetch(MYSQL_STMT *__pyx_v_stmt) { int __pyx_r; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("mysql_stmt_fetch"); + __Pyx_RefNannySetupContext("mysql_stmt_fetch", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":34 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":34 * * cdef inline int mysql_stmt_fetch(MYSQL_STMT *stmt): * with nogil: # <<<<<<<<<<<<<< @@ -2093,12 +2474,12 @@ */ { #ifdef WITH_THREAD - PyThreadState *_save = NULL; - #endif + PyThreadState *_save; Py_UNBLOCK_THREADS + #endif /*try:*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":35 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":35 * cdef inline int mysql_stmt_fetch(MYSQL_STMT *stmt): * with nogil: * return _mysql_stmt_fetch(stmt) # <<<<<<<<<<<<<< @@ -2109,7 +2490,7 @@ goto __pyx_L3; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":34 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":34 * * cdef inline int mysql_stmt_fetch(MYSQL_STMT *stmt): * with nogil: # <<<<<<<<<<<<<< @@ -2121,7 +2502,9 @@ __pyx_why = 0; goto __pyx_L5; __pyx_L3: __pyx_why = 3; goto __pyx_L5; __pyx_L5:; + #ifdef WITH_THREAD Py_BLOCK_THREADS + #endif switch (__pyx_why) { case 3: goto __pyx_L0; } @@ -2134,7 +2517,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":37 +/* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":37 * return _mysql_stmt_fetch(stmt) * * cdef inline my_bool mysql_stmt_send_long_data(MYSQL_STMT *stmt, # <<<<<<<<<<<<<< @@ -2145,9 +2528,9 @@ static CYTHON_INLINE my_bool __pyx_f_6oursql_mysql_stmt_send_long_data(MYSQL_STMT *__pyx_v_stmt, unsigned int __pyx_v_index, char *__pyx_v_data, unsigned long __pyx_v_length) { my_bool __pyx_r; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("mysql_stmt_send_long_data"); + __Pyx_RefNannySetupContext("mysql_stmt_send_long_data", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":39 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":39 * cdef inline my_bool mysql_stmt_send_long_data(MYSQL_STMT *stmt, * unsigned int index, char *data, unsigned long length): * with nogil: # <<<<<<<<<<<<<< @@ -2156,12 +2539,12 @@ */ { #ifdef WITH_THREAD - PyThreadState *_save = NULL; - #endif + PyThreadState *_save; Py_UNBLOCK_THREADS + #endif /*try:*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":40 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":40 * unsigned int index, char *data, unsigned long length): * with nogil: * return _mysql_stmt_send_long_data(stmt, index, data, length) # <<<<<<<<<<<<<< @@ -2172,7 +2555,7 @@ goto __pyx_L3; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":39 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":39 * cdef inline my_bool mysql_stmt_send_long_data(MYSQL_STMT *stmt, * unsigned int index, char *data, unsigned long length): * with nogil: # <<<<<<<<<<<<<< @@ -2184,7 +2567,9 @@ __pyx_why = 0; goto __pyx_L5; __pyx_L3: __pyx_why = 3; goto __pyx_L5; __pyx_L5:; + #ifdef WITH_THREAD Py_BLOCK_THREADS + #endif switch (__pyx_why) { case 3: goto __pyx_L0; } @@ -2197,7 +2582,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":42 +/* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":42 * return _mysql_stmt_send_long_data(stmt, index, data, length) * * cdef inline int mysql_stmt_fetch_column(MYSQL_STMT *stmt, # <<<<<<<<<<<<<< @@ -2208,9 +2593,9 @@ static CYTHON_INLINE int __pyx_f_6oursql_mysql_stmt_fetch_column(MYSQL_STMT *__pyx_v_stmt, MYSQL_BIND *__pyx_v_bind, unsigned int __pyx_v_column, unsigned long __pyx_v_offset) { int __pyx_r; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("mysql_stmt_fetch_column"); + __Pyx_RefNannySetupContext("mysql_stmt_fetch_column", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":44 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":44 * cdef inline int mysql_stmt_fetch_column(MYSQL_STMT *stmt, * MYSQL_BIND *bind, unsigned int column, unsigned long offset): * with nogil: # <<<<<<<<<<<<<< @@ -2219,12 +2604,12 @@ */ { #ifdef WITH_THREAD - PyThreadState *_save = NULL; - #endif + PyThreadState *_save; Py_UNBLOCK_THREADS + #endif /*try:*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":45 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":45 * MYSQL_BIND *bind, unsigned int column, unsigned long offset): * with nogil: * return _mysql_stmt_fetch_column(stmt, bind, column, offset) # <<<<<<<<<<<<<< @@ -2235,7 +2620,7 @@ goto __pyx_L3; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":44 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":44 * cdef inline int mysql_stmt_fetch_column(MYSQL_STMT *stmt, * MYSQL_BIND *bind, unsigned int column, unsigned long offset): * with nogil: # <<<<<<<<<<<<<< @@ -2247,7 +2632,9 @@ __pyx_why = 0; goto __pyx_L5; __pyx_L3: __pyx_why = 3; goto __pyx_L5; __pyx_L5:; + #ifdef WITH_THREAD Py_BLOCK_THREADS + #endif switch (__pyx_why) { case 3: goto __pyx_L0; } @@ -2260,7 +2647,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":47 +/* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":47 * return _mysql_stmt_fetch_column(stmt, bind, column, offset) * * cdef inline int mysql_stmt_store_result(MYSQL_STMT *stmt): # <<<<<<<<<<<<<< @@ -2271,9 +2658,9 @@ static CYTHON_INLINE int __pyx_f_6oursql_mysql_stmt_store_result(MYSQL_STMT *__pyx_v_stmt) { int __pyx_r; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("mysql_stmt_store_result"); + __Pyx_RefNannySetupContext("mysql_stmt_store_result", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":48 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":48 * * cdef inline int mysql_stmt_store_result(MYSQL_STMT *stmt): * with nogil: # <<<<<<<<<<<<<< @@ -2282,12 +2669,12 @@ */ { #ifdef WITH_THREAD - PyThreadState *_save = NULL; - #endif + PyThreadState *_save; Py_UNBLOCK_THREADS + #endif /*try:*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":49 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":49 * cdef inline int mysql_stmt_store_result(MYSQL_STMT *stmt): * with nogil: * return _mysql_stmt_store_result(stmt) # <<<<<<<<<<<<<< @@ -2298,7 +2685,7 @@ goto __pyx_L3; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":48 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":48 * * cdef inline int mysql_stmt_store_result(MYSQL_STMT *stmt): * with nogil: # <<<<<<<<<<<<<< @@ -2310,7 +2697,9 @@ __pyx_why = 0; goto __pyx_L5; __pyx_L3: __pyx_why = 3; goto __pyx_L5; __pyx_L5:; + #ifdef WITH_THREAD Py_BLOCK_THREADS + #endif switch (__pyx_why) { case 3: goto __pyx_L0; } @@ -2323,7 +2712,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":51 +/* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":51 * return _mysql_stmt_store_result(stmt) * * cdef inline int mysql_real_query(MYSQL *conn, char *stmt_str, # <<<<<<<<<<<<<< @@ -2334,9 +2723,9 @@ static CYTHON_INLINE int __pyx_f_6oursql_mysql_real_query(MYSQL *__pyx_v_conn, char *__pyx_v_stmt_str, unsigned long __pyx_v_length) { int __pyx_r; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("mysql_real_query"); + __Pyx_RefNannySetupContext("mysql_real_query", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":53 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":53 * cdef inline int mysql_real_query(MYSQL *conn, char *stmt_str, * unsigned long length): * with nogil: # <<<<<<<<<<<<<< @@ -2345,12 +2734,12 @@ */ { #ifdef WITH_THREAD - PyThreadState *_save = NULL; - #endif + PyThreadState *_save; Py_UNBLOCK_THREADS + #endif /*try:*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":54 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":54 * unsigned long length): * with nogil: * return _mysql_real_query(conn, stmt_str, length) # <<<<<<<<<<<<<< @@ -2361,7 +2750,7 @@ goto __pyx_L3; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":53 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":53 * cdef inline int mysql_real_query(MYSQL *conn, char *stmt_str, * unsigned long length): * with nogil: # <<<<<<<<<<<<<< @@ -2373,7 +2762,9 @@ __pyx_why = 0; goto __pyx_L5; __pyx_L3: __pyx_why = 3; goto __pyx_L5; __pyx_L5:; + #ifdef WITH_THREAD Py_BLOCK_THREADS + #endif switch (__pyx_why) { case 3: goto __pyx_L0; } @@ -2386,7 +2777,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":56 +/* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":56 * return _mysql_real_query(conn, stmt_str, length) * * cdef inline MYSQL_RES *mysql_use_result(MYSQL *conn): # <<<<<<<<<<<<<< @@ -2397,9 +2788,9 @@ static CYTHON_INLINE MYSQL_RES *__pyx_f_6oursql_mysql_use_result(MYSQL *__pyx_v_conn) { MYSQL_RES *__pyx_r; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("mysql_use_result"); + __Pyx_RefNannySetupContext("mysql_use_result", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":57 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":57 * * cdef inline MYSQL_RES *mysql_use_result(MYSQL *conn): * with nogil: # <<<<<<<<<<<<<< @@ -2408,12 +2799,12 @@ */ { #ifdef WITH_THREAD - PyThreadState *_save = NULL; - #endif + PyThreadState *_save; Py_UNBLOCK_THREADS + #endif /*try:*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":58 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":58 * cdef inline MYSQL_RES *mysql_use_result(MYSQL *conn): * with nogil: * return _mysql_use_result(conn) # <<<<<<<<<<<<<< @@ -2424,7 +2815,7 @@ goto __pyx_L3; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":57 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":57 * * cdef inline MYSQL_RES *mysql_use_result(MYSQL *conn): * with nogil: # <<<<<<<<<<<<<< @@ -2436,7 +2827,9 @@ __pyx_why = 0; goto __pyx_L5; __pyx_L3: __pyx_why = 3; goto __pyx_L5; __pyx_L5:; + #ifdef WITH_THREAD Py_BLOCK_THREADS + #endif switch (__pyx_why) { case 3: goto __pyx_L0; } @@ -2449,7 +2842,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":60 +/* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":60 * return _mysql_use_result(conn) * * cdef inline MYSQL_RES *mysql_store_result(MYSQL *conn): # <<<<<<<<<<<<<< @@ -2460,9 +2853,9 @@ static CYTHON_INLINE MYSQL_RES *__pyx_f_6oursql_mysql_store_result(MYSQL *__pyx_v_conn) { MYSQL_RES *__pyx_r; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("mysql_store_result"); + __Pyx_RefNannySetupContext("mysql_store_result", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":61 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":61 * * cdef inline MYSQL_RES *mysql_store_result(MYSQL *conn): * with nogil: # <<<<<<<<<<<<<< @@ -2471,12 +2864,12 @@ */ { #ifdef WITH_THREAD - PyThreadState *_save = NULL; - #endif + PyThreadState *_save; Py_UNBLOCK_THREADS + #endif /*try:*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":62 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":62 * cdef inline MYSQL_RES *mysql_store_result(MYSQL *conn): * with nogil: * return _mysql_store_result(conn) # <<<<<<<<<<<<<< @@ -2487,7 +2880,7 @@ goto __pyx_L3; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":61 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":61 * * cdef inline MYSQL_RES *mysql_store_result(MYSQL *conn): * with nogil: # <<<<<<<<<<<<<< @@ -2499,7 +2892,9 @@ __pyx_why = 0; goto __pyx_L5; __pyx_L3: __pyx_why = 3; goto __pyx_L5; __pyx_L5:; + #ifdef WITH_THREAD Py_BLOCK_THREADS + #endif switch (__pyx_why) { case 3: goto __pyx_L0; } @@ -2512,7 +2907,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":64 +/* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":64 * return _mysql_store_result(conn) * * cdef inline int mysql_next_result(MYSQL *conn): # <<<<<<<<<<<<<< @@ -2523,9 +2918,9 @@ static CYTHON_INLINE int __pyx_f_6oursql_mysql_next_result(MYSQL *__pyx_v_conn) { int __pyx_r; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("mysql_next_result"); + __Pyx_RefNannySetupContext("mysql_next_result", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":65 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":65 * * cdef inline int mysql_next_result(MYSQL *conn): * with nogil: # <<<<<<<<<<<<<< @@ -2534,12 +2929,12 @@ */ { #ifdef WITH_THREAD - PyThreadState *_save = NULL; - #endif + PyThreadState *_save; Py_UNBLOCK_THREADS + #endif /*try:*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":66 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":66 * cdef inline int mysql_next_result(MYSQL *conn): * with nogil: * return _mysql_next_result(conn) # <<<<<<<<<<<<<< @@ -2550,7 +2945,7 @@ goto __pyx_L3; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":65 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":65 * * cdef inline int mysql_next_result(MYSQL *conn): * with nogil: # <<<<<<<<<<<<<< @@ -2562,7 +2957,9 @@ __pyx_why = 0; goto __pyx_L5; __pyx_L3: __pyx_why = 3; goto __pyx_L5; __pyx_L5:; + #ifdef WITH_THREAD Py_BLOCK_THREADS + #endif switch (__pyx_why) { case 3: goto __pyx_L0; } @@ -2575,7 +2972,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":68 +/* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":68 * return _mysql_next_result(conn) * * cdef inline MYSQL_ROW mysql_fetch_row(MYSQL_RES *result): # <<<<<<<<<<<<<< @@ -2586,9 +2983,9 @@ static CYTHON_INLINE MYSQL_ROW __pyx_f_6oursql_mysql_fetch_row(MYSQL_RES *__pyx_v_result) { MYSQL_ROW __pyx_r; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("mysql_fetch_row"); + __Pyx_RefNannySetupContext("mysql_fetch_row", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":69 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":69 * * cdef inline MYSQL_ROW mysql_fetch_row(MYSQL_RES *result): * with nogil: # <<<<<<<<<<<<<< @@ -2596,12 +2993,12 @@ */ { #ifdef WITH_THREAD - PyThreadState *_save = NULL; - #endif + PyThreadState *_save; Py_UNBLOCK_THREADS + #endif /*try:*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":70 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":70 * cdef inline MYSQL_ROW mysql_fetch_row(MYSQL_RES *result): * with nogil: * return _mysql_fetch_row(result) # <<<<<<<<<<<<<< @@ -2610,7 +3007,7 @@ goto __pyx_L3; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/nogil.pyx":69 + /* "/private/tmp/oursql-0.9.3/oursqlx/nogil.pyx":69 * * cdef inline MYSQL_ROW mysql_fetch_row(MYSQL_RES *result): * with nogil: # <<<<<<<<<<<<<< @@ -2621,7 +3018,9 @@ __pyx_why = 0; goto __pyx_L5; __pyx_L3: __pyx_why = 3; goto __pyx_L5; __pyx_L5:; + #ifdef WITH_THREAD Py_BLOCK_THREADS + #endif switch (__pyx_why) { case 3: goto __pyx_L0; } @@ -2634,39 +3033,37 @@ return __pyx_r; } -/* "oursql.pyx":58 - * - * class Error(builtins.Exception): - * def __init__(self, message, errno=None, extra=None): # <<<<<<<<<<<<<< - * super(Error, self).__init__(errno, message, extra) - * self.errno = errno - */ - -static PyObject *__pyx_pf_6oursql_5Error___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_6oursql_5Error___init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pf_6oursql_5Error___init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; -static PyObject *__pyx_pf_6oursql_5Error___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_5Error_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_6oursql_5Error_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_6oursql_5Error_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; +static PyObject *__pyx_pw_6oursql_5Error_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_message = 0; PyObject *__pyx_v_errno = 0; PyObject *__pyx_v_extra = 0; - 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; - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__message,&__pyx_n_s__errno,&__pyx_n_s__extra,0}; - __Pyx_RefNannySetupContext("__init__"); - __pyx_self = __pyx_self; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__message,&__pyx_n_s__errno,&__pyx_n_s__extra,0}; PyObject* values[4] = {0,0,0,0}; - values[2] = ((PyObject *)Py_None); - values[3] = ((PyObject *)Py_None); + + /* "oursql.pyx":58 + * + * class Error(builtins.Exception): + * def __init__(self, message, errno=None, extra=None): # <<<<<<<<<<<<<< + * super(Error, self).__init__(errno, message, extra) + * self.errno = errno + */ + values[2] = ((PyObject *)((PyObject *)Py_None)); + values[3] = ((PyObject *)((PyObject *)Py_None)); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; - switch (PyTuple_GET_SIZE(__pyx_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); @@ -2675,14 +3072,12 @@ default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); - switch (PyTuple_GET_SIZE(__pyx_args)) { + switch (pos_args) { case 0: - values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self); - if (likely(values[0])) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: - values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__message); - if (likely(values[1])) kw_args--; + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__message)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } @@ -2698,7 +3093,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -2723,6 +3118,21 @@ __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6oursql_5Error___init__(__pyx_self, __pyx_v_self, __pyx_v_message, __pyx_v_errno, __pyx_v_extra); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6oursql_5Error___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno, PyObject *__pyx_v_extra) { + 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("__init__", 0); /* "oursql.pyx":59 * class Error(builtins.Exception): @@ -2731,10 +3141,10 @@ * self.errno = errno * self.extra = extra */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__Error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__Error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __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 = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self); @@ -2744,11 +3154,11 @@ __pyx_t_1 = PyObject_Call(__pyx_builtin_super, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __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____init__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s____init__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __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(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_errno); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_errno); __Pyx_GIVEREF(__pyx_v_errno); @@ -2771,7 +3181,7 @@ * self.extra = extra * */ - if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__errno, __pyx_v_errno) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s__errno, __pyx_v_errno) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "oursql.pyx":61 * super(Error, self).__init__(errno, message, extra) @@ -2780,7 +3190,7 @@ * * class InterfaceError(Error): pass */ - if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__extra, __pyx_v_extra) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s__extra, __pyx_v_extra) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -2796,7 +3206,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":1 +/* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":1 * cdef object bytes_maybe_from_encoding(object s, object encoding, # <<<<<<<<<<<<<< * bint allow_none=True): * if s is None and allow_none: @@ -2804,7 +3214,7 @@ static PyObject *__pyx_f_6oursql_bytes_maybe_from_encoding(PyObject *__pyx_v_s, PyObject *__pyx_v_encoding, struct __pyx_opt_args_6oursql_bytes_maybe_from_encoding *__pyx_optional_args) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":2 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":2 * cdef object bytes_maybe_from_encoding(object s, object encoding, * bint allow_none=True): # <<<<<<<<<<<<<< * if s is None and allow_none: @@ -2821,7 +3231,7 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("bytes_maybe_from_encoding"); + __Pyx_RefNannySetupContext("bytes_maybe_from_encoding", 0); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_allow_none = __pyx_optional_args->allow_none; @@ -2829,7 +3239,7 @@ } __Pyx_INCREF(__pyx_v_s); - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":3 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":3 * cdef object bytes_maybe_from_encoding(object s, object encoding, * bint allow_none=True): * if s is None and allow_none: # <<<<<<<<<<<<<< @@ -2837,14 +3247,14 @@ * elif PyUnicode_Check(s): */ __pyx_t_1 = (__pyx_v_s == Py_None); - if (__pyx_t_1) { - __pyx_t_2 = __pyx_v_allow_none; + if ((__pyx_t_1 != 0)) { + __pyx_t_2 = (__pyx_v_allow_none != 0); } else { - __pyx_t_2 = __pyx_t_1; + __pyx_t_2 = (__pyx_t_1 != 0); } if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":4 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":4 * bint allow_none=True): * if s is None and allow_none: * return None # <<<<<<<<<<<<<< @@ -2858,27 +3268,27 @@ goto __pyx_L3; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":5 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":5 * if s is None and allow_none: * return None * elif PyUnicode_Check(s): # <<<<<<<<<<<<<< * s = s.encode(encoding) * return PyBytes_FromObject(s) */ - __pyx_t_2 = PyUnicode_Check(__pyx_v_s); + __pyx_t_2 = (PyUnicode_Check(__pyx_v_s) != 0); if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":6 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":6 * return None * elif PyUnicode_Check(s): * s = s.encode(encoding) # <<<<<<<<<<<<<< * return PyBytes_FromObject(s) * */ - __pyx_t_3 = PyObject_GetAttr(__pyx_v_s, __pyx_n_s__encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s__encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __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[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_encoding); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_encoding); __Pyx_GIVEREF(__pyx_v_encoding); @@ -2893,7 +3303,7 @@ } __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":7 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":7 * elif PyUnicode_Check(s): * s = s.encode(encoding) * return PyBytes_FromObject(s) # <<<<<<<<<<<<<< @@ -2922,7 +3332,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":9 +/* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":9 * return PyBytes_FromObject(s) * * cdef char *bytes_or_null(object s): # <<<<<<<<<<<<<< @@ -2934,9 +3344,10 @@ char *__pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; - __Pyx_RefNannySetupContext("bytes_or_null"); + int __pyx_t_2; + __Pyx_RefNannySetupContext("bytes_or_null", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":10 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":10 * * cdef char *bytes_or_null(object s): * if s is None: # <<<<<<<<<<<<<< @@ -2944,9 +3355,10 @@ * return PyBytes_AS_STRING(s) */ __pyx_t_1 = (__pyx_v_s == Py_None); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":11 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":11 * cdef char *bytes_or_null(object s): * if s is None: * return NULL # <<<<<<<<<<<<<< @@ -2959,7 +3371,7 @@ } __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":12 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":12 * if s is None: * return NULL * return PyBytes_AS_STRING(s) # <<<<<<<<<<<<<< @@ -2975,7 +3387,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":14 +/* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":14 * return PyBytes_AS_STRING(s) * * cdef unsigned long bitval_from_char_p(unsigned char *s, Py_ssize_t length): # <<<<<<<<<<<<<< @@ -2989,9 +3401,9 @@ unsigned long __pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; - __Pyx_RefNannySetupContext("bitval_from_char_p"); + __Pyx_RefNannySetupContext("bitval_from_char_p", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":16 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":16 * cdef unsigned long bitval_from_char_p(unsigned char *s, Py_ssize_t length): * cdef Py_ssize_t i * cdef unsigned long ret = 0 # <<<<<<<<<<<<<< @@ -3000,7 +3412,7 @@ */ __pyx_v_ret = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":17 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":17 * cdef Py_ssize_t i * cdef unsigned long ret = 0 * for 0 <= i < length: # <<<<<<<<<<<<<< @@ -3010,7 +3422,7 @@ __pyx_t_1 = __pyx_v_length; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":18 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":18 * cdef unsigned long ret = 0 * for 0 <= i < length: * ret = (ret << 8) | s[i] # <<<<<<<<<<<<<< @@ -3020,7 +3432,7 @@ __pyx_v_ret = ((__pyx_v_ret << 8) | (__pyx_v_s[__pyx_v_i])); } - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":19 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":19 * for 0 <= i < length: * ret = (ret << 8) | s[i] * return ret # <<<<<<<<<<<<<< @@ -3036,7 +3448,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":21 +/* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":21 * return ret * * cdef object conversion_info_from_res(MYSQL_RES *res, int fields): # <<<<<<<<<<<<<< @@ -3059,9 +3471,9 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("conversion_info_from_res"); + __Pyx_RefNannySetupContext("conversion_info_from_res", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":24 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":24 * cdef int i * cdef MYSQL_FIELD *field * ret = PyList_New(fields) # <<<<<<<<<<<<<< @@ -3073,7 +3485,7 @@ __pyx_v_ret = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":25 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":25 * cdef MYSQL_FIELD *field * ret = PyList_New(fields) * for 0 <= i < fields: # <<<<<<<<<<<<<< @@ -3083,7 +3495,7 @@ __pyx_t_2 = __pyx_v_fields; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":26 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":26 * ret = PyList_New(fields) * for 0 <= i < fields: * field = mysql_fetch_field_direct(res, i) # <<<<<<<<<<<<<< @@ -3092,7 +3504,7 @@ */ __pyx_v_field = mysql_fetch_field_direct(__pyx_v_res, __pyx_v_i); - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":28 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":28 * field = mysql_fetch_field_direct(res, i) * data = ( * field.type, # <<<<<<<<<<<<<< @@ -3102,7 +3514,7 @@ __pyx_t_1 = PyInt_FromLong(__pyx_v_field->type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":29 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":29 * data = ( * field.type, * field.flags, # <<<<<<<<<<<<<< @@ -3112,7 +3524,7 @@ __pyx_t_3 = PyLong_FromUnsignedLong(__pyx_v_field->flags); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":30 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":30 * field.type, * field.flags, * field.charsetnr) # <<<<<<<<<<<<<< @@ -3122,7 +3534,7 @@ __pyx_t_4 = PyLong_FromUnsignedLong(__pyx_v_field->charsetnr); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 30; __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[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); @@ -3133,10 +3545,10 @@ __pyx_t_3 = 0; __pyx_t_4 = 0; __Pyx_XDECREF(((PyObject *)__pyx_v_data)); - __pyx_v_data = __pyx_t_5; + __pyx_v_data = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":31 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":31 * field.flags, * field.charsetnr) * Py_INCREF(data) # <<<<<<<<<<<<<< @@ -3145,7 +3557,7 @@ */ Py_INCREF(((PyObject *)__pyx_v_data)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":32 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":32 * field.charsetnr) * Py_INCREF(data) * PyList_SET_ITEM(ret, i, data) # <<<<<<<<<<<<<< @@ -3155,7 +3567,7 @@ PyList_SET_ITEM(__pyx_v_ret, __pyx_v_i, ((PyObject *)__pyx_v_data)); } - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":33 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":33 * Py_INCREF(data) * PyList_SET_ITEM(ret, i, data) * return ret # <<<<<<<<<<<<<< @@ -3184,7 +3596,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":35 +/* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":35 * return ret * * cdef object description_from_res(Connection conn, MYSQL_RES *res, int fields, # <<<<<<<<<<<<<< @@ -3213,9 +3625,9 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("description_from_res"); + __Pyx_RefNannySetupContext("description_from_res", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":39 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":39 * cdef int i * cdef MYSQL_FIELD *field * ret = PyList_New(fields) # <<<<<<<<<<<<<< @@ -3227,18 +3639,18 @@ __pyx_v_ret = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":41 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":41 * ret = PyList_New(fields) * # Cache the charset. * conn.charset # <<<<<<<<<<<<<< * for 0 <= i < fields: * field = mysql_fetch_field_direct(res, i) */ - __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_conn), __pyx_n_s__charset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_conn), __pyx_n_s__charset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":42 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":42 * # Cache the charset. * conn.charset * for 0 <= i < fields: # <<<<<<<<<<<<<< @@ -3248,7 +3660,7 @@ __pyx_t_2 = __pyx_v_fields; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":43 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":43 * conn.charset * for 0 <= i < fields: * field = mysql_fetch_field_direct(res, i) # <<<<<<<<<<<<<< @@ -3257,7 +3669,7 @@ */ __pyx_v_field = mysql_fetch_field_direct(__pyx_v_res, __pyx_v_i); - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":44 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":44 * for 0 <= i < fields: * field = mysql_fetch_field_direct(res, i) * name = conn._decode_char_p(field.name) # <<<<<<<<<<<<<< @@ -3270,22 +3682,22 @@ __pyx_v_name = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":45 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":45 * field = mysql_fetch_field_direct(res, i) * name = conn._decode_char_p(field.name) * if show_table and field.table[0] != 0: # <<<<<<<<<<<<<< * name = u'%s.%s' % (conn._decode_char_p(field.table), name) * data = ( */ - if (__pyx_v_show_table) { - __pyx_t_3 = ((__pyx_v_field->table[0]) != 0); + if ((__pyx_v_show_table != 0)) { + __pyx_t_3 = (((__pyx_v_field->table[0]) != 0) != 0); __pyx_t_4 = __pyx_t_3; } else { - __pyx_t_4 = __pyx_v_show_table; + __pyx_t_4 = (__pyx_v_show_table != 0); } if (__pyx_t_4) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":46 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":46 * name = conn._decode_char_p(field.name) * if show_table and field.table[0] != 0: * name = u'%s.%s' % (conn._decode_char_p(field.table), name) # <<<<<<<<<<<<<< @@ -3295,7 +3707,7 @@ __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Connection *)__pyx_v_conn->__pyx_vtab)->_decode_char_p(__pyx_v_conn, __pyx_v_field->table); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_name); @@ -3312,7 +3724,7 @@ } __pyx_L5:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":49 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":49 * data = ( * name, * field.type, # <<<<<<<<<<<<<< @@ -3322,7 +3734,7 @@ __pyx_t_1 = PyInt_FromLong(__pyx_v_field->type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":50 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":50 * name, * field.type, * field.max_length, # <<<<<<<<<<<<<< @@ -3332,7 +3744,7 @@ __pyx_t_5 = PyLong_FromUnsignedLong(__pyx_v_field->max_length); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":51 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":51 * field.type, * field.max_length, * field.length, # <<<<<<<<<<<<<< @@ -3342,7 +3754,7 @@ __pyx_t_6 = PyLong_FromUnsignedLong(__pyx_v_field->length); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":52 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":52 * field.max_length, * field.length, * field.length, # <<<<<<<<<<<<<< @@ -3352,7 +3764,7 @@ __pyx_t_7 = PyLong_FromUnsignedLong(__pyx_v_field->length); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":53 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":53 * field.length, * field.length, * field.decimals, # <<<<<<<<<<<<<< @@ -3362,7 +3774,7 @@ __pyx_t_8 = PyLong_FromUnsignedLong(__pyx_v_field->decimals); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":54 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":54 * field.length, * field.decimals, * field.flags & NOT_NULL_FLAG != NOT_NULL_FLAG) # <<<<<<<<<<<<<< @@ -3372,7 +3784,7 @@ __pyx_t_9 = __Pyx_PyBool_FromLong(((__pyx_v_field->flags & NOT_NULL_FLAG) != NOT_NULL_FLAG)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyTuple_New(7); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_10)); + __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); @@ -3395,10 +3807,10 @@ __pyx_t_8 = 0; __pyx_t_9 = 0; __Pyx_XDECREF(((PyObject *)__pyx_v_data)); - __pyx_v_data = __pyx_t_10; + __pyx_v_data = ((PyObject*)__pyx_t_10); __pyx_t_10 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":55 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":55 * field.decimals, * field.flags & NOT_NULL_FLAG != NOT_NULL_FLAG) * Py_INCREF(data) # <<<<<<<<<<<<<< @@ -3407,7 +3819,7 @@ */ Py_INCREF(((PyObject *)__pyx_v_data)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":56 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":56 * field.flags & NOT_NULL_FLAG != NOT_NULL_FLAG) * Py_INCREF(data) * PyList_SET_ITEM(ret, i, data) # <<<<<<<<<<<<<< @@ -3417,7 +3829,7 @@ PyList_SET_ITEM(__pyx_v_ret, __pyx_v_i, ((PyObject *)__pyx_v_data)); } - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":57 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":57 * Py_INCREF(data) * PyList_SET_ITEM(ret, i, data) * return ret # <<<<<<<<<<<<<< @@ -3450,7 +3862,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":60 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_18_DictWhateverMixin_1fetchone(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6oursql_18_DictWhateverMixin_1fetchone(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("fetchone (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_18_DictWhateverMixin_fetchone(((struct __pyx_obj_6oursql__DictWhateverMixin *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":60 * * cdef class _DictWhateverMixin: * def fetchone(self): # <<<<<<<<<<<<<< @@ -3458,8 +3881,7 @@ * if row is None: */ -static PyObject *__pyx_pf_6oursql_18_DictWhateverMixin_fetchone(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pf_6oursql_18_DictWhateverMixin_fetchone(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_6oursql_18_DictWhateverMixin_fetchone(struct __pyx_obj_6oursql__DictWhateverMixin *__pyx_v_self) { PyObject *__pyx_v_row = NULL; PyObject *__pyx_v_ret = NULL; PyObject *__pyx_v_name = NULL; @@ -3469,18 +3891,19 @@ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; - Py_ssize_t __pyx_t_4; - PyObject *(*__pyx_t_5)(PyObject *); - PyObject *__pyx_t_6 = NULL; + int __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *(*__pyx_t_6)(PyObject *); PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; - PyObject *(*__pyx_t_9)(PyObject *); + PyObject *__pyx_t_9 = NULL; + PyObject *(*__pyx_t_10)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("fetchone"); + __Pyx_RefNannySetupContext("fetchone", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":61 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":61 * cdef class _DictWhateverMixin: * def fetchone(self): * row = super(_DictWhateverMixin, self).fetchone() # <<<<<<<<<<<<<< @@ -3488,17 +3911,17 @@ * return None */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_6oursql__DictWhateverMixin))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)__pyx_ptype_6oursql__DictWhateverMixin))); __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_6oursql__DictWhateverMixin))); - __Pyx_INCREF(__pyx_v_self); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self); - __Pyx_GIVEREF(__pyx_v_self); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); __pyx_t_2 = PyObject_Call(__pyx_builtin_super, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 61; __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__fetchone); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__fetchone); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -3507,7 +3930,7 @@ __pyx_v_row = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":62 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":62 * def fetchone(self): * row = super(_DictWhateverMixin, self).fetchone() * if row is None: # <<<<<<<<<<<<<< @@ -3515,9 +3938,10 @@ * ret = {} */ __pyx_t_3 = (__pyx_v_row == Py_None); - if (__pyx_t_3) { + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":63 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":63 * row = super(_DictWhateverMixin, self).fetchone() * if row is None: * return None # <<<<<<<<<<<<<< @@ -3528,11 +3952,11 @@ __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; - goto __pyx_L5; + goto __pyx_L3; } - __pyx_L5:; + __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":64 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":64 * if row is None: * return None * ret = {} # <<<<<<<<<<<<<< @@ -3541,20 +3965,20 @@ */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __pyx_v_ret = __pyx_t_2; + __pyx_v_ret = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":65 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":65 * return None * ret = {} * for name, value in zip(self.column_names, row): # <<<<<<<<<<<<<< * if name in ret: * if ret[name] != value: */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__column_names); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__column_names); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_row); @@ -3565,23 +3989,31 @@ __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__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_4 = 0; - __pyx_t_5 = NULL; + __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; + __pyx_t_6 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; + __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { - if (PyList_CheckExact(__pyx_t_1)) { - if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break; - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; - } else if (PyTuple_CheckExact(__pyx_t_1)) { - if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break; - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; + if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_1)) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_1)) { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif } else { - __pyx_t_2 = __pyx_t_5(__pyx_t_1); + __pyx_t_2 = __pyx_t_6(__pyx_t_1); if (unlikely(!__pyx_t_2)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); @@ -3593,67 +4025,74 @@ } 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[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { - if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) { - if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2); - else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence)); - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } - __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); } else { - if (unlikely(PyList_GET_SIZE(sequence) != 2)) { - if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2); - else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence)); - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } - __pyx_t_6 = PyList_GET_ITEM(sequence, 0); - __pyx_t_7 = PyList_GET_ITEM(sequence, 1); + __pyx_t_7 = PyList_GET_ITEM(sequence, 0); + __pyx_t_8 = PyList_GET_ITEM(sequence, 1); } - __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + #else + __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } else { + } else + { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; - index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L8_unpacking_failed; - __Pyx_GOTREF(__pyx_t_6); - index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L8_unpacking_failed; + __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; + index = 0; __pyx_t_7 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - goto __pyx_L9_unpacking_done; - __pyx_L8_unpacking_failed:; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear(); - if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index); + index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed; + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = NULL; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L7_unpacking_done; + __pyx_L6_unpacking_failed:; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_10 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_L9_unpacking_done:; + __pyx_L7_unpacking_done:; } __Pyx_XDECREF(__pyx_v_name); - __pyx_v_name = __pyx_t_6; - __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_v_value); - __pyx_v_value = __pyx_t_7; + __pyx_v_name = __pyx_t_7; __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_v_value); + __pyx_v_value = __pyx_t_8; + __pyx_t_8 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":66 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":66 * ret = {} * for name, value in zip(self.column_names, row): * if name in ret: # <<<<<<<<<<<<<< * if ret[name] != value: * raise ProgrammingError('column "%s" appears more than once' */ - if (unlikely(((PyObject *)__pyx_v_ret) == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } - __pyx_t_3 = ((PyDict_Contains(((PyObject *)__pyx_v_ret), __pyx_v_name))); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = (__Pyx_PyDict_Contains(__pyx_v_name, ((PyObject *)__pyx_v_ret), Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":67 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":67 * for name, value in zip(self.column_names, row): * if name in ret: * if ret[name] != value: # <<<<<<<<<<<<<< @@ -3662,24 +4101,23 @@ */ __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_ret), __pyx_v_name); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_v_value, Py_NE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = PyObject_RichCompare(__pyx_t_2, __pyx_v_value, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_3) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":68 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":68 * if name in ret: * if ret[name] != value: * raise ProgrammingError('column "%s" appears more than once' # <<<<<<<<<<<<<< * ' in output' % name) * else: */ - __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":69 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":69 * if ret[name] != value: * raise ProgrammingError('column "%s" appears more than once' * ' in output' % name) # <<<<<<<<<<<<<< @@ -3688,26 +4126,26 @@ */ __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_2), __pyx_v_name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); - PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_2)); + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L11; + goto __pyx_L9; } - __pyx_L11:; - goto __pyx_L10; + __pyx_L9:; + goto __pyx_L8; } /*else*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":71 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":71 * ' in output' % name) * else: * ret[name] = value # <<<<<<<<<<<<<< @@ -3716,11 +4154,11 @@ */ if (PyDict_SetItem(((PyObject *)__pyx_v_ret), __pyx_v_name, __pyx_v_value) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_L10:; + __pyx_L8:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":72 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":72 * else: * ret[name] = value * return ret # <<<<<<<<<<<<<< @@ -3737,9 +4175,9 @@ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("oursql._DictWhateverMixin.fetchone", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -3752,7 +4190,32 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":85 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_1_exception_from_errno(PyObject *__pyx_self, PyObject *__pyx_arg_err); /*proto*/ +static PyMethodDef __pyx_mdef_6oursql_1_exception_from_errno = {__Pyx_NAMESTR("_exception_from_errno"), (PyCFunction)__pyx_pw_6oursql_1_exception_from_errno, METH_O, __Pyx_DOCSTR(0)}; +static PyObject *__pyx_pw_6oursql_1_exception_from_errno(PyObject *__pyx_self, PyObject *__pyx_arg_err) { + int __pyx_v_err; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_exception_from_errno (wrapper)", 0); + assert(__pyx_arg_err); { + __pyx_v_err = __Pyx_PyInt_AsInt(__pyx_arg_err); if (unlikely((__pyx_v_err == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("oursql._exception_from_errno", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6oursql__exception_from_errno(__pyx_self, ((int)__pyx_v_err)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":85 * _oursqlx_UnknownError: UnknownError, * } * def _exception_from_errno(int err): # <<<<<<<<<<<<<< @@ -3760,10 +4223,7 @@ * */ -static PyObject *__pyx_pf_6oursql__exception_from_errno(PyObject *__pyx_self, PyObject *__pyx_arg_err); /*proto*/ -static PyMethodDef __pyx_mdef_6oursql__exception_from_errno = {__Pyx_NAMESTR("_exception_from_errno"), (PyCFunction)__pyx_pf_6oursql__exception_from_errno, METH_O, __Pyx_DOCSTR(0)}; -static PyObject *__pyx_pf_6oursql__exception_from_errno(PyObject *__pyx_self, PyObject *__pyx_arg_err) { - int __pyx_v_err; +static PyObject *__pyx_pf_6oursql__exception_from_errno(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_err) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -3772,19 +4232,9 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_exception_from_errno"); - __pyx_self = __pyx_self; - assert(__pyx_arg_err); { - __pyx_v_err = __Pyx_PyInt_AsInt(__pyx_arg_err); if (unlikely((__pyx_v_err == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L3_error:; - __Pyx_AddTraceback("oursql._exception_from_errno", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; + __Pyx_RefNannySetupContext("_exception_from_errno", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":86 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":86 * } * def _exception_from_errno(int err): * return _exception_enum_map[_oursqlx_exc_from_errno(err)] # <<<<<<<<<<<<<< @@ -3792,7 +4242,7 @@ * def _do_warnings_query(Connection conn not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___exception_enum_map); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___exception_enum_map); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromLong(_oursqlx_exc_from_errno(__pyx_v_err)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -3818,7 +4268,27 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":88 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_3_do_warnings_query(PyObject *__pyx_self, PyObject *__pyx_v_conn); /*proto*/ +static PyMethodDef __pyx_mdef_6oursql_3_do_warnings_query = {__Pyx_NAMESTR("_do_warnings_query"), (PyCFunction)__pyx_pw_6oursql_3_do_warnings_query, METH_O, __Pyx_DOCSTR(0)}; +static PyObject *__pyx_pw_6oursql_3_do_warnings_query(PyObject *__pyx_self, PyObject *__pyx_v_conn) { + CYTHON_UNUSED int __pyx_lineno = 0; + CYTHON_UNUSED const char *__pyx_filename = NULL; + CYTHON_UNUSED int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_do_warnings_query (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_conn), __pyx_ptype_6oursql_Connection, 0, "conn", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6oursql_2_do_warnings_query(__pyx_self, ((struct __pyx_obj_6oursql_Connection *)__pyx_v_conn)); + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":88 * return _exception_enum_map[_oursqlx_exc_from_errno(err)] * * def _do_warnings_query(Connection conn not None): # <<<<<<<<<<<<<< @@ -3826,9 +4296,7 @@ * q = _Query(conn, 'SHOW WARNINGS') */ -static PyObject *__pyx_pf_6oursql_1_do_warnings_query(PyObject *__pyx_self, PyObject *__pyx_v_conn); /*proto*/ -static PyMethodDef __pyx_mdef_6oursql_1_do_warnings_query = {__Pyx_NAMESTR("_do_warnings_query"), (PyCFunction)__pyx_pf_6oursql_1_do_warnings_query, METH_O, __Pyx_DOCSTR(0)}; -static PyObject *__pyx_pf_6oursql_1_do_warnings_query(PyObject *__pyx_self, PyObject *__pyx_v_conn) { +static PyObject *__pyx_pf_6oursql_2_do_warnings_query(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_6oursql_Connection *__pyx_v_conn) { int __pyx_v_should_raise; struct __pyx_obj_6oursql__Query *__pyx_v_q = NULL; PyObject *__pyx_v_ret = NULL; @@ -3851,11 +4319,9 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_do_warnings_query"); - __pyx_self = __pyx_self; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_conn), __pyx_ptype_6oursql_Connection, 0, "conn", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_RefNannySetupContext("_do_warnings_query", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":89 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":89 * * def _do_warnings_query(Connection conn not None): * cdef int should_raise = False # <<<<<<<<<<<<<< @@ -3864,7 +4330,7 @@ */ __pyx_v_should_raise = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":90 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":90 * def _do_warnings_query(Connection conn not None): * cdef int should_raise = False * q = _Query(conn, 'SHOW WARNINGS') # <<<<<<<<<<<<<< @@ -3872,10 +4338,10 @@ * for kind, err, message in q: */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __Pyx_INCREF(__pyx_v_conn); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_conn); - __Pyx_GIVEREF(__pyx_v_conn); + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)__pyx_v_conn)); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_conn)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_conn)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_3)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_kp_s_3)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3)); @@ -3885,7 +4351,7 @@ __pyx_v_q = ((struct __pyx_obj_6oursql__Query *)__pyx_t_2); __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":91 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":91 * cdef int should_raise = False * q = _Query(conn, 'SHOW WARNINGS') * ret = [] # <<<<<<<<<<<<<< @@ -3893,11 +4359,11 @@ * if kind == 'Note': */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __pyx_v_ret = __pyx_t_2; + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_ret = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":92 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":92 * q = _Query(conn, 'SHOW WARNINGS') * ret = [] * for kind, err, message in q: # <<<<<<<<<<<<<< @@ -3913,12 +4379,20 @@ __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; } for (;;) { - if (PyList_CheckExact(__pyx_t_2)) { + if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_2)) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; - } else if (PyTuple_CheckExact(__pyx_t_2)) { + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif } else { __pyx_t_1 = __pyx_t_4(__pyx_t_2); if (unlikely(!__pyx_t_1)) { @@ -3932,21 +4406,22 @@ } if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; + #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[1]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { - if (unlikely(PyTuple_GET_SIZE(sequence) != 3)) { - if (PyTuple_GET_SIZE(sequence) > 3) __Pyx_RaiseTooManyValuesError(3); - else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence)); - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); } else { - if (unlikely(PyList_GET_SIZE(sequence) != 3)) { - if (PyList_GET_SIZE(sequence) > 3) __Pyx_RaiseTooManyValuesError(3); - else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence)); - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_6 = PyList_GET_ITEM(sequence, 1); __pyx_t_7 = PyList_GET_ITEM(sequence, 2); @@ -3954,28 +4429,38 @@ __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); + #else + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else { + } else + { Py_ssize_t index = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_L7_unpacking_failed; + index = 0; __pyx_t_5 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L7_unpacking_failed; + index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - index = 2; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L7_unpacking_failed; + index = 2; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - goto __pyx_L8_unpacking_done; - __pyx_L7_unpacking_failed:; + goto __pyx_L6_unpacking_done; + __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear(); - if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index); + __pyx_t_9 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_L8_unpacking_done:; + __pyx_L6_unpacking_done:; } __Pyx_XDECREF(__pyx_v_kind); __pyx_v_kind = __pyx_t_5; @@ -3987,55 +4472,59 @@ __pyx_v_message = __pyx_t_7; __pyx_t_7 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":93 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":93 * ret = [] * for kind, err, message in q: * if kind == 'Note': # <<<<<<<<<<<<<< * kind = Note * elif kind == 'Warning': */ - __pyx_t_10 = __Pyx_PyString_Equals(__pyx_v_kind, ((PyObject *)__pyx_n_s__Note), Py_EQ); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_v_kind, ((PyObject *)__pyx_n_s__Note), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_10) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":94 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":94 * for kind, err, message in q: * if kind == 'Note': * kind = Note # <<<<<<<<<<<<<< * elif kind == 'Warning': * kind = Warning */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__Note); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__Note); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_v_kind); __pyx_v_kind = __pyx_t_1; __pyx_t_1 = 0; - goto __pyx_L9; + goto __pyx_L7; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":95 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":95 * if kind == 'Note': * kind = Note * elif kind == 'Warning': # <<<<<<<<<<<<<< * kind = Warning * should_raise = True */ - __pyx_t_10 = __Pyx_PyString_Equals(__pyx_v_kind, ((PyObject *)__pyx_n_s__Warning), Py_EQ); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_v_kind, ((PyObject *)__pyx_n_s__Warning), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_10) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":96 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":96 * kind = Note * elif kind == 'Warning': * kind = Warning # <<<<<<<<<<<<<< * should_raise = True * elif kind == 'Error': */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__Warning); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__Warning); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_v_kind); __pyx_v_kind = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":97 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":97 * elif kind == 'Warning': * kind = Warning * should_raise = True # <<<<<<<<<<<<<< @@ -4043,30 +4532,32 @@ * kind = _exception_from_errno(err) */ __pyx_v_should_raise = 1; - goto __pyx_L9; + goto __pyx_L7; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":98 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":98 * kind = Warning * should_raise = True * elif kind == 'Error': # <<<<<<<<<<<<<< * kind = _exception_from_errno(err) * should_raise = True */ - __pyx_t_10 = __Pyx_PyString_Equals(__pyx_v_kind, ((PyObject *)__pyx_n_s__Error), Py_EQ); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_v_kind, ((PyObject *)__pyx_n_s__Error), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_10) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":99 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":99 * should_raise = True * elif kind == 'Error': * kind = _exception_from_errno(err) # <<<<<<<<<<<<<< * should_raise = True * else: */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 99; __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[1]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_7)); + __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_err); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_err); __Pyx_GIVEREF(__pyx_v_err); @@ -4078,7 +4569,7 @@ __pyx_v_kind = __pyx_t_6; __pyx_t_6 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":100 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":100 * elif kind == 'Error': * kind = _exception_from_errno(err) * should_raise = True # <<<<<<<<<<<<<< @@ -4086,23 +4577,23 @@ * raise InterfaceError('unknown kind of warning: %r' % kind) */ __pyx_v_should_raise = 1; - goto __pyx_L9; + goto __pyx_L7; } /*else*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":102 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":102 * should_raise = True * else: * raise InterfaceError('unknown kind of warning: %r' % kind) # <<<<<<<<<<<<<< * ret.append((kind, (message, err))) * if should_raise and conn.raise_on_warnings: */ - __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__InterfaceError); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__InterfaceError); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_5), __pyx_v_kind); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_7)); __Pyx_GIVEREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; @@ -4114,20 +4605,17 @@ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_L9:; + __pyx_L7:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":103 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":103 * else: * raise InterfaceError('unknown kind of warning: %r' % kind) * ret.append((kind, (message, err))) # <<<<<<<<<<<<<< * if should_raise and conn.raise_on_warnings: * raise CollatedWarningsError('query caused warnings', extra=ret) */ - if (unlikely(((PyObject *)__pyx_v_ret) == Py_None)) { - PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_7)); + __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_message); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_message); __Pyx_GIVEREF(__pyx_v_message); @@ -4135,55 +4623,55 @@ PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_err); __Pyx_GIVEREF(__pyx_v_err); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_kind); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_kind); __Pyx_GIVEREF(__pyx_v_kind); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_t_7)); __Pyx_GIVEREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; - __pyx_t_11 = PyList_Append(__pyx_v_ret, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ret, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":104 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":104 * raise InterfaceError('unknown kind of warning: %r' % kind) * ret.append((kind, (message, err))) * if should_raise and conn.raise_on_warnings: # <<<<<<<<<<<<<< * raise CollatedWarningsError('query caused warnings', extra=ret) * return ret */ - if (__pyx_v_should_raise) { - __pyx_t_10 = ((struct __pyx_obj_6oursql_Connection *)__pyx_v_conn)->raise_on_warnings; + if ((__pyx_v_should_raise != 0)) { + __pyx_t_10 = (__pyx_v_conn->raise_on_warnings != 0); } else { - __pyx_t_10 = __pyx_v_should_raise; + __pyx_t_10 = (__pyx_v_should_raise != 0); } if (__pyx_t_10) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":105 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":105 * ret.append((kind, (message, err))) * if should_raise and conn.raise_on_warnings: * raise CollatedWarningsError('query caused warnings', extra=ret) # <<<<<<<<<<<<<< * return ret */ - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__extra), ((PyObject *)__pyx_v_ret)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_7 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_k_tuple_8), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_8), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L10; + goto __pyx_L8; } - __pyx_L10:; + __pyx_L8:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":106 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":106 * if should_raise and conn.raise_on_warnings: * raise CollatedWarningsError('query caused warnings', extra=ret) * return ret # <<<<<<<<<<<<<< @@ -4215,7 +4703,19 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":3 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_5_bitval_from_string(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/ +static PyMethodDef __pyx_mdef_6oursql_5_bitval_from_string = {__Pyx_NAMESTR("_bitval_from_string"), (PyCFunction)__pyx_pw_6oursql_5_bitval_from_string, METH_O, __Pyx_DOCSTR(0)}; +static PyObject *__pyx_pw_6oursql_5_bitval_from_string(PyObject *__pyx_self, PyObject *__pyx_v_s) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_bitval_from_string (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_4_bitval_from_string(__pyx_self, ((PyObject *)__pyx_v_s)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":3 * import decimal, datetime, time * * def _bitval_from_string(s): # <<<<<<<<<<<<<< @@ -4223,9 +4723,7 @@ * cdef unsigned char *ss */ -static PyObject *__pyx_pf_6oursql_2_bitval_from_string(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/ -static PyMethodDef __pyx_mdef_6oursql_2_bitval_from_string = {__Pyx_NAMESTR("_bitval_from_string"), (PyCFunction)__pyx_pf_6oursql_2_bitval_from_string, METH_O, __Pyx_DOCSTR(0)}; -static PyObject *__pyx_pf_6oursql_2_bitval_from_string(PyObject *__pyx_self, PyObject *__pyx_v_s) { +static PyObject *__pyx_pf_6oursql_4_bitval_from_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s) { Py_ssize_t __pyx_v_length; unsigned char *__pyx_v_ss; PyObject *__pyx_r = NULL; @@ -4235,10 +4733,9 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_bitval_from_string"); - __pyx_self = __pyx_self; + __Pyx_RefNannySetupContext("_bitval_from_string", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":6 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":6 * cdef Py_ssize_t length * cdef unsigned char *ss * PyBytes_AsStringAndSize(s, &ss, &length) # <<<<<<<<<<<<<< @@ -4247,7 +4744,7 @@ */ __pyx_t_1 = PyBytes_AsStringAndSize(__pyx_v_s, ((char **)(&__pyx_v_ss)), (&__pyx_v_length)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":7 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":7 * cdef unsigned char *ss * PyBytes_AsStringAndSize(s, &ss, &length) * return bitval_from_char_p(ss, length) # <<<<<<<<<<<<<< @@ -4273,7 +4770,19 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":9 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_7_datetime_from_string(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/ +static PyMethodDef __pyx_mdef_6oursql_7_datetime_from_string = {__Pyx_NAMESTR("_datetime_from_string"), (PyCFunction)__pyx_pw_6oursql_7_datetime_from_string, METH_O, __Pyx_DOCSTR(0)}; +static PyObject *__pyx_pw_6oursql_7_datetime_from_string(PyObject *__pyx_self, PyObject *__pyx_v_s) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_datetime_from_string (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6_datetime_from_string(__pyx_self, ((PyObject *)__pyx_v_s)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":9 * return bitval_from_char_p(ss, length) * * def _datetime_from_string(s): # <<<<<<<<<<<<<< @@ -4281,9 +4790,7 @@ * return datetime.datetime(*tt[:6]) */ -static PyObject *__pyx_pf_6oursql_3_datetime_from_string(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/ -static PyMethodDef __pyx_mdef_6oursql_3_datetime_from_string = {__Pyx_NAMESTR("_datetime_from_string"), (PyCFunction)__pyx_pf_6oursql_3_datetime_from_string, METH_O, __Pyx_DOCSTR(0)}; -static PyObject *__pyx_pf_6oursql_3_datetime_from_string(PyObject *__pyx_self, PyObject *__pyx_v_s) { +static PyObject *__pyx_pf_6oursql_6_datetime_from_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s) { PyObject *__pyx_v_tt = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -4293,23 +4800,22 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_datetime_from_string"); - __pyx_self = __pyx_self; + __Pyx_RefNannySetupContext("_datetime_from_string", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":10 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":10 * * def _datetime_from_string(s): * tt = time.strptime(s, '%Y-%m-%d %H:%M:%S') # <<<<<<<<<<<<<< * return datetime.datetime(*tt[:6]) * */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__strptime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__strptime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 10; __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(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_s); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_s); __Pyx_GIVEREF(__pyx_v_s); @@ -4323,7 +4829,7 @@ __pyx_v_tt = __pyx_t_3; __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":11 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":11 * def _datetime_from_string(s): * tt = time.strptime(s, '%Y-%m-%d %H:%M:%S') * return datetime.datetime(*tt[:6]) # <<<<<<<<<<<<<< @@ -4331,12 +4837,12 @@ * def _date_from_string(s): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__datetime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PySequence_GetSlice(__pyx_v_tt, 0, 6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_tt, 0, 6, NULL, NULL, &__pyx_k_slice_10, 0, 1, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); @@ -4364,7 +4870,19 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":13 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_9_date_from_string(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/ +static PyMethodDef __pyx_mdef_6oursql_9_date_from_string = {__Pyx_NAMESTR("_date_from_string"), (PyCFunction)__pyx_pw_6oursql_9_date_from_string, METH_O, __Pyx_DOCSTR(0)}; +static PyObject *__pyx_pw_6oursql_9_date_from_string(PyObject *__pyx_self, PyObject *__pyx_v_s) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_date_from_string (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_8_date_from_string(__pyx_self, ((PyObject *)__pyx_v_s)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":13 * return datetime.datetime(*tt[:6]) * * def _date_from_string(s): # <<<<<<<<<<<<<< @@ -4372,9 +4890,7 @@ * return datetime.date(*tt[:3]) */ -static PyObject *__pyx_pf_6oursql_4_date_from_string(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/ -static PyMethodDef __pyx_mdef_6oursql_4_date_from_string = {__Pyx_NAMESTR("_date_from_string"), (PyCFunction)__pyx_pf_6oursql_4_date_from_string, METH_O, __Pyx_DOCSTR(0)}; -static PyObject *__pyx_pf_6oursql_4_date_from_string(PyObject *__pyx_self, PyObject *__pyx_v_s) { +static PyObject *__pyx_pf_6oursql_8_date_from_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s) { PyObject *__pyx_v_tt = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -4384,29 +4900,28 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_date_from_string"); - __pyx_self = __pyx_self; + __Pyx_RefNannySetupContext("_date_from_string", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":14 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":14 * * def _date_from_string(s): * tt = time.strptime(s, '%Y-%m-%d') # <<<<<<<<<<<<<< * return datetime.date(*tt[:3]) * */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__strptime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__strptime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 14; __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(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_s); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_s); __Pyx_GIVEREF(__pyx_v_s); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_10)); - PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_kp_s_10)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_10)); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_11)); + PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_kp_s_11)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11)); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -4414,7 +4929,7 @@ __pyx_v_tt = __pyx_t_3; __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":15 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":15 * def _date_from_string(s): * tt = time.strptime(s, '%Y-%m-%d') * return datetime.date(*tt[:3]) # <<<<<<<<<<<<<< @@ -4422,12 +4937,12 @@ * def _time_from_string(s): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__datetime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__date); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__date); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PySequence_GetSlice(__pyx_v_tt, 0, 3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_tt, 0, 3, NULL, NULL, &__pyx_k_slice_12, 0, 1, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); @@ -4455,7 +4970,19 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":17 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_11_time_from_string(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/ +static PyMethodDef __pyx_mdef_6oursql_11_time_from_string = {__Pyx_NAMESTR("_time_from_string"), (PyCFunction)__pyx_pw_6oursql_11_time_from_string, METH_O, __Pyx_DOCSTR(0)}; +static PyObject *__pyx_pw_6oursql_11_time_from_string(PyObject *__pyx_self, PyObject *__pyx_v_s) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_time_from_string (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_time_from_string(__pyx_self, ((PyObject *)__pyx_v_s)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":17 * return datetime.date(*tt[:3]) * * def _time_from_string(s): # <<<<<<<<<<<<<< @@ -4463,9 +4990,7 @@ * return datetime.time(*tt[3:6]) */ -static PyObject *__pyx_pf_6oursql_5_time_from_string(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/ -static PyMethodDef __pyx_mdef_6oursql_5_time_from_string = {__Pyx_NAMESTR("_time_from_string"), (PyCFunction)__pyx_pf_6oursql_5_time_from_string, METH_O, __Pyx_DOCSTR(0)}; -static PyObject *__pyx_pf_6oursql_5_time_from_string(PyObject *__pyx_self, PyObject *__pyx_v_s) { +static PyObject *__pyx_pf_6oursql_10_time_from_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s) { PyObject *__pyx_v_tt = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -4475,29 +5000,28 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_time_from_string"); - __pyx_self = __pyx_self; + __Pyx_RefNannySetupContext("_time_from_string", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":18 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":18 * * def _time_from_string(s): * tt = time.strptime(s, '%H:%M:%S') # <<<<<<<<<<<<<< * return datetime.time(*tt[3:6]) * */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__strptime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__strptime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 18; __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(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_s); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_s); __Pyx_GIVEREF(__pyx_v_s); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_11)); - PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_kp_s_11)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11)); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_13)); + PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_kp_s_13)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_13)); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -4505,7 +5029,7 @@ __pyx_v_tt = __pyx_t_3; __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":19 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":19 * def _time_from_string(s): * tt = time.strptime(s, '%H:%M:%S') * return datetime.time(*tt[3:6]) # <<<<<<<<<<<<<< @@ -4513,12 +5037,12 @@ * _conversions = { */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__datetime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PySequence_GetSlice(__pyx_v_tt, 3, 6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_tt, 3, 6, NULL, NULL, &__pyx_k_slice_14, 1, 1, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); @@ -4546,7 +5070,20 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":55 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_13TimestampFromTicks(PyObject *__pyx_self, PyObject *__pyx_v_ticks); /*proto*/ +static char __pyx_doc_6oursql_12TimestampFromTicks[] = "TimestampFromTicks(ticks) -> Timestamp.\n \n Convert a time in seconds since the epoch into a Timestamp.\n "; +static PyMethodDef __pyx_mdef_6oursql_13TimestampFromTicks = {__Pyx_NAMESTR("TimestampFromTicks"), (PyCFunction)__pyx_pw_6oursql_13TimestampFromTicks, METH_O, __Pyx_DOCSTR(__pyx_doc_6oursql_12TimestampFromTicks)}; +static PyObject *__pyx_pw_6oursql_13TimestampFromTicks(PyObject *__pyx_self, PyObject *__pyx_v_ticks) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("TimestampFromTicks (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_12TimestampFromTicks(__pyx_self, ((PyObject *)__pyx_v_ticks)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":55 * Binary = bytes * * def TimestampFromTicks(ticks): # <<<<<<<<<<<<<< @@ -4554,10 +5091,7 @@ * */ -static PyObject *__pyx_pf_6oursql_6TimestampFromTicks(PyObject *__pyx_self, PyObject *__pyx_v_ticks); /*proto*/ -static char __pyx_doc_6oursql_6TimestampFromTicks[] = "TimestampFromTicks(ticks) -> Timestamp.\n \n Convert a time in seconds since the epoch into a Timestamp.\n "; -static PyMethodDef __pyx_mdef_6oursql_6TimestampFromTicks = {__Pyx_NAMESTR("TimestampFromTicks"), (PyCFunction)__pyx_pf_6oursql_6TimestampFromTicks, METH_O, __Pyx_DOCSTR(__pyx_doc_6oursql_6TimestampFromTicks)}; -static PyObject *__pyx_pf_6oursql_6TimestampFromTicks(PyObject *__pyx_self, PyObject *__pyx_v_ticks) { +static PyObject *__pyx_pf_6oursql_12TimestampFromTicks(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ticks) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -4567,10 +5101,9 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("TimestampFromTicks"); - __pyx_self = __pyx_self; + __Pyx_RefNannySetupContext("TimestampFromTicks", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":60 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":60 * Convert a time in seconds since the epoch into a Timestamp. * """ * return Timestamp(*time.localtime(ticks)[:6]) # <<<<<<<<<<<<<< @@ -4578,15 +5111,15 @@ * def DateFromTicks(ticks): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__Timestamp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__Timestamp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__localtime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__localtime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_ticks); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ticks); __Pyx_GIVEREF(__pyx_v_ticks); @@ -4594,7 +5127,7 @@ __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_t_4, 0, 6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_4, 0, 6, NULL, NULL, &__pyx_k_slice_15, 0, 1, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -4623,7 +5156,20 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":62 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_15DateFromTicks(PyObject *__pyx_self, PyObject *__pyx_v_ticks); /*proto*/ +static char __pyx_doc_6oursql_14DateFromTicks[] = "DateFromTicks(ticks) -> Date.\n \n Convert a time in seconds since the epoch into a Date.\n "; +static PyMethodDef __pyx_mdef_6oursql_15DateFromTicks = {__Pyx_NAMESTR("DateFromTicks"), (PyCFunction)__pyx_pw_6oursql_15DateFromTicks, METH_O, __Pyx_DOCSTR(__pyx_doc_6oursql_14DateFromTicks)}; +static PyObject *__pyx_pw_6oursql_15DateFromTicks(PyObject *__pyx_self, PyObject *__pyx_v_ticks) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("DateFromTicks (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_14DateFromTicks(__pyx_self, ((PyObject *)__pyx_v_ticks)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":62 * return Timestamp(*time.localtime(ticks)[:6]) * * def DateFromTicks(ticks): # <<<<<<<<<<<<<< @@ -4631,10 +5177,7 @@ * */ -static PyObject *__pyx_pf_6oursql_7DateFromTicks(PyObject *__pyx_self, PyObject *__pyx_v_ticks); /*proto*/ -static char __pyx_doc_6oursql_7DateFromTicks[] = "DateFromTicks(ticks) -> Date.\n \n Convert a time in seconds since the epoch into a Date.\n "; -static PyMethodDef __pyx_mdef_6oursql_7DateFromTicks = {__Pyx_NAMESTR("DateFromTicks"), (PyCFunction)__pyx_pf_6oursql_7DateFromTicks, METH_O, __Pyx_DOCSTR(__pyx_doc_6oursql_7DateFromTicks)}; -static PyObject *__pyx_pf_6oursql_7DateFromTicks(PyObject *__pyx_self, PyObject *__pyx_v_ticks) { +static PyObject *__pyx_pf_6oursql_14DateFromTicks(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ticks) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -4644,10 +5187,9 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("DateFromTicks"); - __pyx_self = __pyx_self; + __Pyx_RefNannySetupContext("DateFromTicks", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":67 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":67 * Convert a time in seconds since the epoch into a Date. * """ * return Date(*time.localtime(ticks)[:3]) # <<<<<<<<<<<<<< @@ -4655,15 +5197,15 @@ * def TimeFromTicks(ticks): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__Date); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__Date); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__localtime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__localtime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_ticks); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ticks); __Pyx_GIVEREF(__pyx_v_ticks); @@ -4671,7 +5213,7 @@ __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_t_4, 0, 3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_4, 0, 3, NULL, NULL, &__pyx_k_slice_16, 0, 1, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -4700,7 +5242,20 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":69 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_17TimeFromTicks(PyObject *__pyx_self, PyObject *__pyx_v_ticks); /*proto*/ +static char __pyx_doc_6oursql_16TimeFromTicks[] = "TimeFromTicks(ticks) -> Time.\n \n Convert a time in seconds since the epoch into a Time.\n "; +static PyMethodDef __pyx_mdef_6oursql_17TimeFromTicks = {__Pyx_NAMESTR("TimeFromTicks"), (PyCFunction)__pyx_pw_6oursql_17TimeFromTicks, METH_O, __Pyx_DOCSTR(__pyx_doc_6oursql_16TimeFromTicks)}; +static PyObject *__pyx_pw_6oursql_17TimeFromTicks(PyObject *__pyx_self, PyObject *__pyx_v_ticks) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("TimeFromTicks (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_16TimeFromTicks(__pyx_self, ((PyObject *)__pyx_v_ticks)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":69 * return Date(*time.localtime(ticks)[:3]) * * def TimeFromTicks(ticks): # <<<<<<<<<<<<<< @@ -4708,10 +5263,7 @@ * */ -static PyObject *__pyx_pf_6oursql_8TimeFromTicks(PyObject *__pyx_self, PyObject *__pyx_v_ticks); /*proto*/ -static char __pyx_doc_6oursql_8TimeFromTicks[] = "TimeFromTicks(ticks) -> Time.\n \n Convert a time in seconds since the epoch into a Time.\n "; -static PyMethodDef __pyx_mdef_6oursql_8TimeFromTicks = {__Pyx_NAMESTR("TimeFromTicks"), (PyCFunction)__pyx_pf_6oursql_8TimeFromTicks, METH_O, __Pyx_DOCSTR(__pyx_doc_6oursql_8TimeFromTicks)}; -static PyObject *__pyx_pf_6oursql_8TimeFromTicks(PyObject *__pyx_self, PyObject *__pyx_v_ticks) { +static PyObject *__pyx_pf_6oursql_16TimeFromTicks(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ticks) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -4721,24 +5273,23 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("TimeFromTicks"); - __pyx_self = __pyx_self; + __Pyx_RefNannySetupContext("TimeFromTicks", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":74 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":74 * Convert a time in seconds since the epoch into a Time. * """ * return Time(*time.localtime(ticks)[3:6]) # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__Time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__Time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__localtime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__localtime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_ticks); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ticks); __Pyx_GIVEREF(__pyx_v_ticks); @@ -4746,7 +5297,7 @@ __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_t_4, 3, 6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_4, 3, 6, NULL, NULL, &__pyx_k_slice_17, 1, 1, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -4775,16 +5326,9 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":76 - * cdef public object default_cursor - * - * def __cinit__(self, host=None, user=None, passwd=None, *, db=None, # <<<<<<<<<<<<<< - * unsigned int port=0, unix_socket=None, connect_timeout=None, - * read_timeout=None, write_timeout=None, protocol=None, ssl=None, - */ - -static int __pyx_pf_6oursql_10Connection___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_6oursql_10Connection___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +/* Python wrapper */ +static int __pyx_pw_6oursql_10Connection_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6oursql_10Connection_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_host = 0; PyObject *__pyx_v_user = 0; PyObject *__pyx_v_passwd = 0; @@ -4811,33 +5355,32 @@ int __pyx_v_autoping; PyObject *__pyx_v_default_cursor = 0; int __pyx_v_raise_on_warnings; - int __pyx_v_multi_results; - int __pyx_v_multi_statements; + CYTHON_UNUSED int __pyx_v_multi_results; + CYTHON_UNUSED int __pyx_v_multi_statements; int __pyx_v_autoreconnect; - unsigned long __pyx_v_flags; - unsigned int __pyx_v_uint_tmp; - my_bool __pyx_v_bool_tmp; - int __pyx_r; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - unsigned int __pyx_t_5; - int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__host,&__pyx_n_s__user,&__pyx_n_s__passwd,&__pyx_n_s__db,&__pyx_n_s__port,&__pyx_n_s__unix_socket,&__pyx_n_s__connect_timeout,&__pyx_n_s__read_timeout,&__pyx_n_s__write_timeout,&__pyx_n_s__protocol,&__pyx_n_s__ssl,&__pyx_n_s__read_default_file,&__pyx_n_s__read_default_group,&__pyx_n_s__init_command,&__pyx_n_s__charset_dir,&__pyx_n_s_12,&__pyx_n_s__local_infile,&__pyx_n_s__require_secure_auth,&__pyx_n_s__compress,&__pyx_n_s__report_truncation,&__pyx_n_s__found_rows,&__pyx_n_s__use_unicode,&__pyx_n_s__charset,&__pyx_n_s__autoping,&__pyx_n_s__default_cursor,&__pyx_n_s__raise_on_warnings,&__pyx_n_s__multi_results,&__pyx_n_s__multi_statements,&__pyx_n_s__autoreconnect,0}; - __Pyx_RefNannySetupContext("__cinit__"); + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__host,&__pyx_n_s__user,&__pyx_n_s__passwd,&__pyx_n_s__db,&__pyx_n_s__port,&__pyx_n_s__unix_socket,&__pyx_n_s__connect_timeout,&__pyx_n_s__read_timeout,&__pyx_n_s__write_timeout,&__pyx_n_s__protocol,&__pyx_n_s__ssl,&__pyx_n_s__read_default_file,&__pyx_n_s__read_default_group,&__pyx_n_s__init_command,&__pyx_n_s__charset_dir,&__pyx_n_s_18,&__pyx_n_s__local_infile,&__pyx_n_s__require_secure_auth,&__pyx_n_s__compress,&__pyx_n_s__report_truncation,&__pyx_n_s__found_rows,&__pyx_n_s__use_unicode,&__pyx_n_s__charset,&__pyx_n_s__autoping,&__pyx_n_s__default_cursor,&__pyx_n_s__raise_on_warnings,&__pyx_n_s__multi_results,&__pyx_n_s__multi_statements,&__pyx_n_s__autoreconnect,0}; PyObject* values[29] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; + + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":76 + * cdef public object default_cursor + * + * def __cinit__(self, host=None, user=None, passwd=None, *, db=None, # <<<<<<<<<<<<<< + * unsigned int port=0, unix_socket=None, connect_timeout=None, + * read_timeout=None, write_timeout=None, protocol=None, ssl=None, + */ values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); values[3] = ((PyObject *)Py_None); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":77 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":77 * * def __cinit__(self, host=None, user=None, passwd=None, *, db=None, * unsigned int port=0, unix_socket=None, connect_timeout=None, # <<<<<<<<<<<<<< @@ -4847,7 +5390,7 @@ values[5] = ((PyObject *)Py_None); values[6] = ((PyObject *)Py_None); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":78 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":78 * def __cinit__(self, host=None, user=None, passwd=None, *, db=None, * unsigned int port=0, unix_socket=None, connect_timeout=None, * read_timeout=None, write_timeout=None, protocol=None, ssl=None, # <<<<<<<<<<<<<< @@ -4859,7 +5402,7 @@ values[9] = ((PyObject *)Py_None); values[10] = ((PyObject *)Py_None); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":79 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":79 * unsigned int port=0, unix_socket=None, connect_timeout=None, * read_timeout=None, write_timeout=None, protocol=None, ssl=None, * read_default_file=None, read_default_group=None, init_command=None, # <<<<<<<<<<<<<< @@ -4870,7 +5413,7 @@ values[12] = ((PyObject *)Py_None); values[13] = ((PyObject *)Py_None); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":80 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":80 * read_timeout=None, write_timeout=None, protocol=None, ssl=None, * read_default_file=None, read_default_group=None, init_command=None, * charset_dir=None, shared_memory_base_name=None, # <<<<<<<<<<<<<< @@ -4881,7 +5424,7 @@ values[15] = ((PyObject *)Py_None); values[22] = ((PyObject *)__pyx_n_s__utf8); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":84 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":84 * bint compress=False, bint report_truncation=True, * bint found_rows=True, bint use_unicode=True, charset='utf8', * bint autoping=False, default_cursor=None, # <<<<<<<<<<<<<< @@ -4891,7 +5434,8 @@ values[24] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; - switch (PyTuple_GET_SIZE(__pyx_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); @@ -4899,7 +5443,7 @@ default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); - switch (PyTuple_GET_SIZE(__pyx_args)) { + switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__host); @@ -4916,64 +5460,15 @@ if (value) { values[2] = value; kw_args--; } } } - while (kw_args > 0) { - PyObject* value; - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__db); - if (value) { values[3] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__port); - if (value) { values[4] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__unix_socket); - if (value) { values[5] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__connect_timeout); - if (value) { values[6] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__read_timeout); - if (value) { values[7] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__write_timeout); - if (value) { values[8] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__protocol); - if (value) { values[9] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ssl); - if (value) { values[10] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__read_default_file); - if (value) { values[11] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__read_default_group); - if (value) { values[12] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__init_command); - if (value) { values[13] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__charset_dir); - if (value) { values[14] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_12); - if (value) { values[15] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__local_infile); - if (value) { values[16] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__require_secure_auth); - if (value) { values[17] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__compress); - if (value) { values[18] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__report_truncation); - if (value) { values[19] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__found_rows); - if (value) { values[20] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__use_unicode); - if (value) { values[21] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__charset); - if (value) { values[22] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__autoping); - if (value) { values[23] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__default_cursor); - if (value) { values[24] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__raise_on_warnings); - if (value) { values[25] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__multi_results); - if (value) { values[26] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__multi_statements); - if (value) { values[27] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__autoreconnect); - if (value) { values[28] = value; if (!(--kw_args)) break; } - break; + if (kw_args > 0 && likely(kw_args <= 26)) { + Py_ssize_t index; + for (index = 3; index < 29 && kw_args > 0; index++) { + PyObject* value = PyDict_GetItem(__pyx_kwds, *__pyx_pyargnames[index]); + if (value) { values[index] = value; kw_args--; } + } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__cinit__") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -5008,7 +5503,7 @@ __pyx_v_local_infile = __Pyx_PyObject_IsTrue(values[16]); if (unlikely((__pyx_v_local_infile == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":81 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":81 * read_default_file=None, read_default_group=None, init_command=None, * charset_dir=None, shared_memory_base_name=None, * bint local_infile=False, bint require_secure_auth=False, # <<<<<<<<<<<<<< @@ -5026,7 +5521,7 @@ __pyx_v_compress = __Pyx_PyObject_IsTrue(values[18]); if (unlikely((__pyx_v_compress == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":82 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":82 * charset_dir=None, shared_memory_base_name=None, * bint local_infile=False, bint require_secure_auth=False, * bint compress=False, bint report_truncation=True, # <<<<<<<<<<<<<< @@ -5044,7 +5539,7 @@ __pyx_v_found_rows = __Pyx_PyObject_IsTrue(values[20]); if (unlikely((__pyx_v_found_rows == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":83 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":83 * bint local_infile=False, bint require_secure_auth=False, * bint compress=False, bint report_truncation=True, * bint found_rows=True, bint use_unicode=True, charset='utf8', # <<<<<<<<<<<<<< @@ -5063,7 +5558,7 @@ __pyx_v_autoping = __Pyx_PyObject_IsTrue(values[23]); if (unlikely((__pyx_v_autoping == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":84 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":84 * bint compress=False, bint report_truncation=True, * bint found_rows=True, bint use_unicode=True, charset='utf8', * bint autoping=False, default_cursor=None, # <<<<<<<<<<<<<< @@ -5077,7 +5572,7 @@ __pyx_v_raise_on_warnings = __Pyx_PyObject_IsTrue(values[25]); if (unlikely((__pyx_v_raise_on_warnings == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":85 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":85 * bint found_rows=True, bint use_unicode=True, charset='utf8', * bint autoping=False, default_cursor=None, * bint raise_on_warnings=True, bint multi_results=True, # <<<<<<<<<<<<<< @@ -5095,7 +5590,7 @@ __pyx_v_multi_statements = __Pyx_PyObject_IsTrue(values[27]); if (unlikely((__pyx_v_multi_statements == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":86 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":86 * bint autoping=False, default_cursor=None, * bint raise_on_warnings=True, bint multi_results=True, * bint multi_statements=True, bint autoreconnect=False): # <<<<<<<<<<<<<< @@ -5118,6 +5613,37 @@ __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6oursql_10Connection___cinit__(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self), __pyx_v_host, __pyx_v_user, __pyx_v_passwd, __pyx_v_db, __pyx_v_port, __pyx_v_unix_socket, __pyx_v_connect_timeout, __pyx_v_read_timeout, __pyx_v_write_timeout, __pyx_v_protocol, __pyx_v_ssl, __pyx_v_read_default_file, __pyx_v_read_default_group, __pyx_v_init_command, __pyx_v_charset_dir, __pyx_v_shared_memory_base_name, __pyx_v_local_infile, __pyx_v_require_secure_auth, __pyx_v_compress, __pyx_v_report_truncation, __pyx_v_found_rows, __pyx_v_use_unicode, __pyx_v_charset, __pyx_v_autoping, __pyx_v_default_cursor, __pyx_v_raise_on_warnings, __pyx_v_multi_results, __pyx_v_multi_statements, __pyx_v_autoreconnect); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":76 + * cdef public object default_cursor + * + * def __cinit__(self, host=None, user=None, passwd=None, *, db=None, # <<<<<<<<<<<<<< + * unsigned int port=0, unix_socket=None, connect_timeout=None, + * read_timeout=None, write_timeout=None, protocol=None, ssl=None, + */ + +static int __pyx_pf_6oursql_10Connection___cinit__(struct __pyx_obj_6oursql_Connection *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_user, PyObject *__pyx_v_passwd, PyObject *__pyx_v_db, unsigned int __pyx_v_port, PyObject *__pyx_v_unix_socket, PyObject *__pyx_v_connect_timeout, PyObject *__pyx_v_read_timeout, PyObject *__pyx_v_write_timeout, PyObject *__pyx_v_protocol, PyObject *__pyx_v_ssl, PyObject *__pyx_v_read_default_file, PyObject *__pyx_v_read_default_group, PyObject *__pyx_v_init_command, PyObject *__pyx_v_charset_dir, PyObject *__pyx_v_shared_memory_base_name, int __pyx_v_local_infile, int __pyx_v_require_secure_auth, int __pyx_v_compress, int __pyx_v_report_truncation, int __pyx_v_found_rows, int __pyx_v_use_unicode, PyObject *__pyx_v_charset, int __pyx_v_autoping, PyObject *__pyx_v_default_cursor, int __pyx_v_raise_on_warnings, CYTHON_UNUSED int __pyx_v_multi_results, CYTHON_UNUSED int __pyx_v_multi_statements, int __pyx_v_autoreconnect) { + unsigned long __pyx_v_flags; + unsigned int __pyx_v_uint_tmp; + my_bool __pyx_v_bool_tmp; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + unsigned int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); __Pyx_INCREF(__pyx_v_host); __Pyx_INCREF(__pyx_v_user); __Pyx_INCREF(__pyx_v_passwd); @@ -5131,7 +5657,7 @@ __Pyx_INCREF(__pyx_v_charset); __Pyx_INCREF(__pyx_v_default_cursor); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":87 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":87 * bint raise_on_warnings=True, bint multi_results=True, * bint multi_statements=True, bint autoreconnect=False): * cdef unsigned long flags = 0 # <<<<<<<<<<<<<< @@ -5140,16 +5666,17 @@ */ __pyx_v_flags = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":90 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":90 * cdef unsigned int uint_tmp * cdef my_bool bool_tmp * if compress: # <<<<<<<<<<<<<< * flags |= CLIENT_COMPRESS * if found_rows: */ - if (__pyx_v_compress) { + __pyx_t_1 = (__pyx_v_compress != 0); + if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":91 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":91 * cdef my_bool bool_tmp * if compress: * flags |= CLIENT_COMPRESS # <<<<<<<<<<<<<< @@ -5157,20 +5684,21 @@ * flags |= CLIENT_FOUND_ROWS */ __pyx_v_flags = (__pyx_v_flags | CLIENT_COMPRESS); - goto __pyx_L6; + goto __pyx_L3; } - __pyx_L6:; + __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":92 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":92 * if compress: * flags |= CLIENT_COMPRESS * if found_rows: # <<<<<<<<<<<<<< * flags |= CLIENT_FOUND_ROWS * # I'll come back to this later. Dealing with multiple result sets is */ - if (__pyx_v_found_rows) { + __pyx_t_1 = (__pyx_v_found_rows != 0); + if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":93 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":93 * flags |= CLIENT_COMPRESS * if found_rows: * flags |= CLIENT_FOUND_ROWS # <<<<<<<<<<<<<< @@ -5178,182 +5706,183 @@ * # such a pain. */ __pyx_v_flags = (__pyx_v_flags | CLIENT_FOUND_ROWS); - goto __pyx_L7; + goto __pyx_L4; } - __pyx_L7:; + __pyx_L4:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":100 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":100 * #if multi_statements: * # flags |= CLIENT_MULTI_STATEMENTS * self.conn = mysql_init(NULL) # <<<<<<<<<<<<<< * if not self.conn: * raise MemoryError('alloc of conn object failed') */ - ((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn = mysql_init(NULL); + __pyx_v_self->conn = mysql_init(NULL); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":101 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":101 * # flags |= CLIENT_MULTI_STATEMENTS * self.conn = mysql_init(NULL) * if not self.conn: # <<<<<<<<<<<<<< * raise MemoryError('alloc of conn object failed') * if protocol not in _protocol_enum_map: */ - __pyx_t_1 = (!(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn != 0)); + __pyx_t_1 = ((!(__pyx_v_self->conn != 0)) != 0); if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":102 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":102 * self.conn = mysql_init(NULL) * if not self.conn: * raise MemoryError('alloc of conn object failed') # <<<<<<<<<<<<<< * if protocol not in _protocol_enum_map: * raise ProgrammingError('unknown protocol %r' % (protocol,)) */ - __pyx_t_2 = PyObject_Call(__pyx_builtin_MemoryError, ((PyObject *)__pyx_k_tuple_14), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_builtin_MemoryError, ((PyObject *)__pyx_k_tuple_20), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L8; + goto __pyx_L5; } - __pyx_L8:; + __pyx_L5:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":103 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":103 * if not self.conn: * raise MemoryError('alloc of conn object failed') * if protocol not in _protocol_enum_map: # <<<<<<<<<<<<<< * raise ProgrammingError('unknown protocol %r' % (protocol,)) * host = bytes_maybe_from_encoding(host, charset) */ - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s___protocol_enum_map); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s___protocol_enum_map); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = (__Pyx_NegateNonNeg(PySequence_Contains(__pyx_t_2, __pyx_v_protocol))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_protocol, __pyx_t_2, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__pyx_t_1) { + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":104 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":104 * raise MemoryError('alloc of conn object failed') * if protocol not in _protocol_enum_map: * raise ProgrammingError('unknown protocol %r' % (protocol,)) # <<<<<<<<<<<<<< * host = bytes_maybe_from_encoding(host, charset) * user = bytes_maybe_from_encoding(user, charset) */ - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __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[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_protocol); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_protocol); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_protocol); __Pyx_GIVEREF(__pyx_v_protocol); - __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_15), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - __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[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); - __pyx_t_4 = 0; - __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_21), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __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[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); + __pyx_t_5 = 0; + __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __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_Raise(__pyx_t_4, 0, 0, 0); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L9; + goto __pyx_L6; } - __pyx_L9:; + __pyx_L6:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":105 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":105 * if protocol not in _protocol_enum_map: * raise ProgrammingError('unknown protocol %r' % (protocol,)) * host = bytes_maybe_from_encoding(host, charset) # <<<<<<<<<<<<<< * user = bytes_maybe_from_encoding(user, charset) * passwd = bytes_maybe_from_encoding(passwd, charset) */ - __pyx_t_4 = __pyx_f_6oursql_bytes_maybe_from_encoding(__pyx_v_host, __pyx_v_charset, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __pyx_f_6oursql_bytes_maybe_from_encoding(__pyx_v_host, __pyx_v_charset, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_v_host); - __pyx_v_host = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_v_host = __pyx_t_5; + __pyx_t_5 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":106 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":106 * raise ProgrammingError('unknown protocol %r' % (protocol,)) * host = bytes_maybe_from_encoding(host, charset) * user = bytes_maybe_from_encoding(user, charset) # <<<<<<<<<<<<<< * passwd = bytes_maybe_from_encoding(passwd, charset) * db = bytes_maybe_from_encoding(db, charset) */ - __pyx_t_4 = __pyx_f_6oursql_bytes_maybe_from_encoding(__pyx_v_user, __pyx_v_charset, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __pyx_f_6oursql_bytes_maybe_from_encoding(__pyx_v_user, __pyx_v_charset, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_v_user); - __pyx_v_user = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_v_user = __pyx_t_5; + __pyx_t_5 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":107 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":107 * host = bytes_maybe_from_encoding(host, charset) * user = bytes_maybe_from_encoding(user, charset) * passwd = bytes_maybe_from_encoding(passwd, charset) # <<<<<<<<<<<<<< * db = bytes_maybe_from_encoding(db, charset) * unix_socket = bytes_maybe_from_encoding(unix_socket, charset) */ - __pyx_t_4 = __pyx_f_6oursql_bytes_maybe_from_encoding(__pyx_v_passwd, __pyx_v_charset, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __pyx_f_6oursql_bytes_maybe_from_encoding(__pyx_v_passwd, __pyx_v_charset, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_v_passwd); - __pyx_v_passwd = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_v_passwd = __pyx_t_5; + __pyx_t_5 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":108 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":108 * user = bytes_maybe_from_encoding(user, charset) * passwd = bytes_maybe_from_encoding(passwd, charset) * db = bytes_maybe_from_encoding(db, charset) # <<<<<<<<<<<<<< * unix_socket = bytes_maybe_from_encoding(unix_socket, charset) * uint_tmp = _protocol_enum_map[protocol] */ - __pyx_t_4 = __pyx_f_6oursql_bytes_maybe_from_encoding(__pyx_v_db, __pyx_v_charset, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __pyx_f_6oursql_bytes_maybe_from_encoding(__pyx_v_db, __pyx_v_charset, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_v_db); - __pyx_v_db = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_v_db = __pyx_t_5; + __pyx_t_5 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":109 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":109 * passwd = bytes_maybe_from_encoding(passwd, charset) * db = bytes_maybe_from_encoding(db, charset) * unix_socket = bytes_maybe_from_encoding(unix_socket, charset) # <<<<<<<<<<<<<< * uint_tmp = _protocol_enum_map[protocol] * mysql_options(self.conn, MYSQL_OPT_PROTOCOL, &uint_tmp) */ - __pyx_t_4 = __pyx_f_6oursql_bytes_maybe_from_encoding(__pyx_v_unix_socket, __pyx_v_charset, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __pyx_f_6oursql_bytes_maybe_from_encoding(__pyx_v_unix_socket, __pyx_v_charset, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_v_unix_socket); - __pyx_v_unix_socket = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_v_unix_socket = __pyx_t_5; + __pyx_t_5 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":110 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":110 * db = bytes_maybe_from_encoding(db, charset) * unix_socket = bytes_maybe_from_encoding(unix_socket, charset) * uint_tmp = _protocol_enum_map[protocol] # <<<<<<<<<<<<<< * mysql_options(self.conn, MYSQL_OPT_PROTOCOL, &uint_tmp) * bool_tmp = report_truncation */ - __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s___protocol_enum_map); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s___protocol_enum_map); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyObject_GetItem(__pyx_t_5, __pyx_v_protocol); if (!__pyx_t_4) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_GetItem(__pyx_t_4, __pyx_v_protocol); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = __Pyx_PyInt_AsUnsignedInt(__pyx_t_4); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyInt_AsUnsignedInt(__pyx_t_3); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_uint_tmp = __pyx_t_5; + __pyx_v_uint_tmp = __pyx_t_6; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":111 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":111 * unix_socket = bytes_maybe_from_encoding(unix_socket, charset) * uint_tmp = _protocol_enum_map[protocol] * mysql_options(self.conn, MYSQL_OPT_PROTOCOL, &uint_tmp) # <<<<<<<<<<<<<< * bool_tmp = report_truncation * mysql_options(self.conn, */ - mysql_options(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn, MYSQL_OPT_PROTOCOL, ((char *)(&__pyx_v_uint_tmp))); + mysql_options(__pyx_v_self->conn, MYSQL_OPT_PROTOCOL, ((char *)(&__pyx_v_uint_tmp))); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":112 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":112 * uint_tmp = _protocol_enum_map[protocol] * mysql_options(self.conn, MYSQL_OPT_PROTOCOL, &uint_tmp) * bool_tmp = report_truncation # <<<<<<<<<<<<<< @@ -5362,16 +5891,16 @@ */ __pyx_v_bool_tmp = __pyx_v_report_truncation; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":114 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":114 * bool_tmp = report_truncation * mysql_options(self.conn, * MYSQL_REPORT_DATA_TRUNCATION, &bool_tmp) # <<<<<<<<<<<<<< * bool_tmp = require_secure_auth * mysql_options(self.conn, MYSQL_SECURE_AUTH, &bool_tmp) */ - mysql_options(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn, MYSQL_REPORT_DATA_TRUNCATION, ((char *)(&__pyx_v_bool_tmp))); + mysql_options(__pyx_v_self->conn, MYSQL_REPORT_DATA_TRUNCATION, ((char *)(&__pyx_v_bool_tmp))); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":115 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":115 * mysql_options(self.conn, * MYSQL_REPORT_DATA_TRUNCATION, &bool_tmp) * bool_tmp = require_secure_auth # <<<<<<<<<<<<<< @@ -5380,48 +5909,49 @@ */ __pyx_v_bool_tmp = __pyx_v_require_secure_auth; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":116 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":116 * MYSQL_REPORT_DATA_TRUNCATION, &bool_tmp) * bool_tmp = require_secure_auth * mysql_options(self.conn, MYSQL_SECURE_AUTH, &bool_tmp) # <<<<<<<<<<<<<< * if connect_timeout is not None: * uint_tmp = connect_timeout */ - mysql_options(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn, MYSQL_SECURE_AUTH, ((char *)(&__pyx_v_bool_tmp))); + mysql_options(__pyx_v_self->conn, MYSQL_SECURE_AUTH, ((char *)(&__pyx_v_bool_tmp))); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":117 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":117 * bool_tmp = require_secure_auth * mysql_options(self.conn, MYSQL_SECURE_AUTH, &bool_tmp) * if connect_timeout is not None: # <<<<<<<<<<<<<< * uint_tmp = connect_timeout * mysql_options(self.conn, */ - __pyx_t_1 = (__pyx_v_connect_timeout != Py_None); + __pyx_t_3 = (__pyx_v_connect_timeout != Py_None); + __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":118 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":118 * mysql_options(self.conn, MYSQL_SECURE_AUTH, &bool_tmp) * if connect_timeout is not None: * uint_tmp = connect_timeout # <<<<<<<<<<<<<< * mysql_options(self.conn, * MYSQL_OPT_CONNECT_TIMEOUT, &uint_tmp) */ - __pyx_t_5 = __Pyx_PyInt_AsUnsignedInt(__pyx_v_connect_timeout); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_uint_tmp = __pyx_t_5; + __pyx_t_6 = __Pyx_PyInt_AsUnsignedInt(__pyx_v_connect_timeout); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_uint_tmp = __pyx_t_6; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":120 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":120 * uint_tmp = connect_timeout * mysql_options(self.conn, * MYSQL_OPT_CONNECT_TIMEOUT, &uint_tmp) # <<<<<<<<<<<<<< * if read_timeout is not None: * uint_tmp = read_timeout */ - mysql_options(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn, MYSQL_OPT_CONNECT_TIMEOUT, ((char *)(&__pyx_v_uint_tmp))); - goto __pyx_L10; + mysql_options(__pyx_v_self->conn, MYSQL_OPT_CONNECT_TIMEOUT, ((char *)(&__pyx_v_uint_tmp))); + goto __pyx_L7; } - __pyx_L10:; + __pyx_L7:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":121 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":121 * mysql_options(self.conn, * MYSQL_OPT_CONNECT_TIMEOUT, &uint_tmp) * if read_timeout is not None: # <<<<<<<<<<<<<< @@ -5429,63 +5959,65 @@ * mysql_options(self.conn, */ __pyx_t_1 = (__pyx_v_read_timeout != Py_None); - if (__pyx_t_1) { + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":122 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":122 * MYSQL_OPT_CONNECT_TIMEOUT, &uint_tmp) * if read_timeout is not None: * uint_tmp = read_timeout # <<<<<<<<<<<<<< * mysql_options(self.conn, * MYSQL_OPT_READ_TIMEOUT, &uint_tmp) */ - __pyx_t_5 = __Pyx_PyInt_AsUnsignedInt(__pyx_v_read_timeout); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_uint_tmp = __pyx_t_5; + __pyx_t_6 = __Pyx_PyInt_AsUnsignedInt(__pyx_v_read_timeout); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_uint_tmp = __pyx_t_6; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":124 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":124 * uint_tmp = read_timeout * mysql_options(self.conn, * MYSQL_OPT_READ_TIMEOUT, &uint_tmp) # <<<<<<<<<<<<<< * if write_timeout is not None: * uint_tmp = write_timeout */ - mysql_options(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn, MYSQL_OPT_READ_TIMEOUT, ((char *)(&__pyx_v_uint_tmp))); - goto __pyx_L11; + mysql_options(__pyx_v_self->conn, MYSQL_OPT_READ_TIMEOUT, ((char *)(&__pyx_v_uint_tmp))); + goto __pyx_L8; } - __pyx_L11:; + __pyx_L8:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":125 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":125 * mysql_options(self.conn, * MYSQL_OPT_READ_TIMEOUT, &uint_tmp) * if write_timeout is not None: # <<<<<<<<<<<<<< * uint_tmp = write_timeout * mysql_options(self.conn, */ - __pyx_t_1 = (__pyx_v_write_timeout != Py_None); + __pyx_t_3 = (__pyx_v_write_timeout != Py_None); + __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":126 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":126 * MYSQL_OPT_READ_TIMEOUT, &uint_tmp) * if write_timeout is not None: * uint_tmp = write_timeout # <<<<<<<<<<<<<< * mysql_options(self.conn, * MYSQL_OPT_WRITE_TIMEOUT, &uint_tmp) */ - __pyx_t_5 = __Pyx_PyInt_AsUnsignedInt(__pyx_v_write_timeout); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_uint_tmp = __pyx_t_5; + __pyx_t_6 = __Pyx_PyInt_AsUnsignedInt(__pyx_v_write_timeout); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_uint_tmp = __pyx_t_6; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":128 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":128 * uint_tmp = write_timeout * mysql_options(self.conn, * MYSQL_OPT_WRITE_TIMEOUT, &uint_tmp) # <<<<<<<<<<<<<< * if read_default_file: * read_default_file = bytes_maybe_from_encoding( */ - mysql_options(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn, MYSQL_OPT_WRITE_TIMEOUT, ((char *)(&__pyx_v_uint_tmp))); - goto __pyx_L12; + mysql_options(__pyx_v_self->conn, MYSQL_OPT_WRITE_TIMEOUT, ((char *)(&__pyx_v_uint_tmp))); + goto __pyx_L9; } - __pyx_L12:; + __pyx_L9:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":129 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":129 * mysql_options(self.conn, * MYSQL_OPT_WRITE_TIMEOUT, &uint_tmp) * if read_default_file: # <<<<<<<<<<<<<< @@ -5495,32 +6027,32 @@ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_read_default_file); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":131 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":131 * if read_default_file: * read_default_file = bytes_maybe_from_encoding( * read_default_file, charset) # <<<<<<<<<<<<<< * mysql_options(self.conn, * MYSQL_READ_DEFAULT_FILE, bytes_or_null(read_default_file)) */ - __pyx_t_3 = __pyx_f_6oursql_bytes_maybe_from_encoding(__pyx_v_read_default_file, __pyx_v_charset, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __pyx_f_6oursql_bytes_maybe_from_encoding(__pyx_v_read_default_file, __pyx_v_charset, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_v_read_default_file); - __pyx_v_read_default_file = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_v_read_default_file = __pyx_t_4; + __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":133 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":133 * read_default_file, charset) * mysql_options(self.conn, * MYSQL_READ_DEFAULT_FILE, bytes_or_null(read_default_file)) # <<<<<<<<<<<<<< * if read_default_group: * read_default_group = bytes_maybe_from_encoding( */ - mysql_options(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn, MYSQL_READ_DEFAULT_FILE, __pyx_f_6oursql_bytes_or_null(__pyx_v_read_default_file)); - goto __pyx_L13; + mysql_options(__pyx_v_self->conn, MYSQL_READ_DEFAULT_FILE, __pyx_f_6oursql_bytes_or_null(__pyx_v_read_default_file)); + goto __pyx_L10; } - __pyx_L13:; + __pyx_L10:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":134 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":134 * mysql_options(self.conn, * MYSQL_READ_DEFAULT_FILE, bytes_or_null(read_default_file)) * if read_default_group: # <<<<<<<<<<<<<< @@ -5530,32 +6062,32 @@ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_read_default_group); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":136 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":136 * if read_default_group: * read_default_group = bytes_maybe_from_encoding( * read_default_group, charset) # <<<<<<<<<<<<<< * mysql_options(self.conn, * MYSQL_READ_DEFAULT_GROUP, bytes_or_null(read_default_group)) */ - __pyx_t_3 = __pyx_f_6oursql_bytes_maybe_from_encoding(__pyx_v_read_default_group, __pyx_v_charset, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __pyx_f_6oursql_bytes_maybe_from_encoding(__pyx_v_read_default_group, __pyx_v_charset, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_v_read_default_group); - __pyx_v_read_default_group = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_v_read_default_group = __pyx_t_4; + __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":138 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":138 * read_default_group, charset) * mysql_options(self.conn, * MYSQL_READ_DEFAULT_GROUP, bytes_or_null(read_default_group)) # <<<<<<<<<<<<<< * if init_command: * init_command = bytes_maybe_from_encoding(init_command, charset) */ - mysql_options(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn, MYSQL_READ_DEFAULT_GROUP, __pyx_f_6oursql_bytes_or_null(__pyx_v_read_default_group)); - goto __pyx_L14; + mysql_options(__pyx_v_self->conn, MYSQL_READ_DEFAULT_GROUP, __pyx_f_6oursql_bytes_or_null(__pyx_v_read_default_group)); + goto __pyx_L11; } - __pyx_L14:; + __pyx_L11:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":139 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":139 * mysql_options(self.conn, * MYSQL_READ_DEFAULT_GROUP, bytes_or_null(read_default_group)) * if init_command: # <<<<<<<<<<<<<< @@ -5565,32 +6097,32 @@ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_init_command); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":140 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":140 * MYSQL_READ_DEFAULT_GROUP, bytes_or_null(read_default_group)) * if init_command: * init_command = bytes_maybe_from_encoding(init_command, charset) # <<<<<<<<<<<<<< * mysql_options(self.conn, * MYSQL_INIT_COMMAND, bytes_or_null(init_command)) */ - __pyx_t_3 = __pyx_f_6oursql_bytes_maybe_from_encoding(__pyx_v_init_command, __pyx_v_charset, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __pyx_f_6oursql_bytes_maybe_from_encoding(__pyx_v_init_command, __pyx_v_charset, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_v_init_command); - __pyx_v_init_command = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_v_init_command = __pyx_t_4; + __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":142 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":142 * init_command = bytes_maybe_from_encoding(init_command, charset) * mysql_options(self.conn, * MYSQL_INIT_COMMAND, bytes_or_null(init_command)) # <<<<<<<<<<<<<< * if charset_dir: * charset_dir = bytes_maybe_from_encoding(charset_dir, charset) */ - mysql_options(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn, MYSQL_INIT_COMMAND, __pyx_f_6oursql_bytes_or_null(__pyx_v_init_command)); - goto __pyx_L15; + mysql_options(__pyx_v_self->conn, MYSQL_INIT_COMMAND, __pyx_f_6oursql_bytes_or_null(__pyx_v_init_command)); + goto __pyx_L12; } - __pyx_L15:; + __pyx_L12:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":143 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":143 * mysql_options(self.conn, * MYSQL_INIT_COMMAND, bytes_or_null(init_command)) * if charset_dir: # <<<<<<<<<<<<<< @@ -5600,32 +6132,32 @@ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_charset_dir); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":144 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":144 * MYSQL_INIT_COMMAND, bytes_or_null(init_command)) * if charset_dir: * charset_dir = bytes_maybe_from_encoding(charset_dir, charset) # <<<<<<<<<<<<<< * mysql_options(self.conn, * MYSQL_INIT_COMMAND, bytes_or_null(charset_dir)) */ - __pyx_t_3 = __pyx_f_6oursql_bytes_maybe_from_encoding(__pyx_v_charset_dir, __pyx_v_charset, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __pyx_f_6oursql_bytes_maybe_from_encoding(__pyx_v_charset_dir, __pyx_v_charset, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_v_charset_dir); - __pyx_v_charset_dir = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_v_charset_dir = __pyx_t_4; + __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":146 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":146 * charset_dir = bytes_maybe_from_encoding(charset_dir, charset) * mysql_options(self.conn, * MYSQL_INIT_COMMAND, bytes_or_null(charset_dir)) # <<<<<<<<<<<<<< * if shared_memory_base_name: * shared_memory_base_name = bytes_maybe_from_encoding( */ - mysql_options(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn, MYSQL_INIT_COMMAND, __pyx_f_6oursql_bytes_or_null(__pyx_v_charset_dir)); - goto __pyx_L16; + mysql_options(__pyx_v_self->conn, MYSQL_INIT_COMMAND, __pyx_f_6oursql_bytes_or_null(__pyx_v_charset_dir)); + goto __pyx_L13; } - __pyx_L16:; + __pyx_L13:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":147 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":147 * mysql_options(self.conn, * MYSQL_INIT_COMMAND, bytes_or_null(charset_dir)) * if shared_memory_base_name: # <<<<<<<<<<<<<< @@ -5635,53 +6167,54 @@ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_shared_memory_base_name); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":149 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":149 * if shared_memory_base_name: * shared_memory_base_name = bytes_maybe_from_encoding( * shared_memory_base_name, charset) # <<<<<<<<<<<<<< * mysql_options(self.conn, * MYSQL_INIT_COMMAND, bytes_or_null(shared_memory_base_name)) */ - __pyx_t_3 = __pyx_f_6oursql_bytes_maybe_from_encoding(__pyx_v_shared_memory_base_name, __pyx_v_charset, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __pyx_f_6oursql_bytes_maybe_from_encoding(__pyx_v_shared_memory_base_name, __pyx_v_charset, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_v_shared_memory_base_name); - __pyx_v_shared_memory_base_name = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_v_shared_memory_base_name = __pyx_t_4; + __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":151 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":151 * shared_memory_base_name, charset) * mysql_options(self.conn, * MYSQL_INIT_COMMAND, bytes_or_null(shared_memory_base_name)) # <<<<<<<<<<<<<< * if local_infile: * mysql_options(self.conn, MYSQL_OPT_LOCAL_INFILE, NULL) */ - mysql_options(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn, MYSQL_INIT_COMMAND, __pyx_f_6oursql_bytes_or_null(__pyx_v_shared_memory_base_name)); - goto __pyx_L17; + mysql_options(__pyx_v_self->conn, MYSQL_INIT_COMMAND, __pyx_f_6oursql_bytes_or_null(__pyx_v_shared_memory_base_name)); + goto __pyx_L14; } - __pyx_L17:; + __pyx_L14:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":152 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":152 * mysql_options(self.conn, * MYSQL_INIT_COMMAND, bytes_or_null(shared_memory_base_name)) * if local_infile: # <<<<<<<<<<<<<< * mysql_options(self.conn, MYSQL_OPT_LOCAL_INFILE, NULL) * if ssl is not None: */ - if (__pyx_v_local_infile) { + __pyx_t_1 = (__pyx_v_local_infile != 0); + if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":153 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":153 * MYSQL_INIT_COMMAND, bytes_or_null(shared_memory_base_name)) * if local_infile: * mysql_options(self.conn, MYSQL_OPT_LOCAL_INFILE, NULL) # <<<<<<<<<<<<<< * if ssl is not None: * self._setup_ssl_options(charset, **ssl) */ - mysql_options(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn, MYSQL_OPT_LOCAL_INFILE, NULL); - goto __pyx_L18; + mysql_options(__pyx_v_self->conn, MYSQL_OPT_LOCAL_INFILE, NULL); + goto __pyx_L15; } - __pyx_L18:; + __pyx_L15:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":154 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":154 * if local_infile: * mysql_options(self.conn, MYSQL_OPT_LOCAL_INFILE, NULL) * if ssl is not None: # <<<<<<<<<<<<<< @@ -5689,98 +6222,113 @@ * if charset is not None: */ __pyx_t_1 = (__pyx_v_ssl != Py_None); - if (__pyx_t_1) { + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":155 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":155 * mysql_options(self.conn, MYSQL_OPT_LOCAL_INFILE, NULL) * if ssl is not None: * self._setup_ssl_options(charset, **ssl) # <<<<<<<<<<<<<< * if charset is not None: * charset = PyUnicode_AsUTF8String(charset) */ - __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___setup_ssl_options); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 155; __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[2]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s___setup_ssl_options); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_charset); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_charset); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_charset); __Pyx_GIVEREF(__pyx_v_charset); - __pyx_t_2 = __Pyx_PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_4), __pyx_v_ssl); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 155; __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_DECREF(__pyx_t_2); __pyx_t_2 = 0; - goto __pyx_L19; + if (unlikely(__pyx_v_ssl == Py_None)) { + PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); + {__pyx_filename = __pyx_f[2]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + if (likely(PyDict_Check(__pyx_v_ssl))) { + __pyx_t_2 = __pyx_v_ssl; + __Pyx_INCREF(__pyx_t_2); + } else { + __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_ssl, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + } + __pyx_t_7 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L16; } - __pyx_L19:; + __pyx_L16:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":156 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":156 * if ssl is not None: * self._setup_ssl_options(charset, **ssl) * if charset is not None: # <<<<<<<<<<<<<< * charset = PyUnicode_AsUTF8String(charset) * mysql_options(self.conn, */ - __pyx_t_1 = (__pyx_v_charset != Py_None); + __pyx_t_3 = (__pyx_v_charset != Py_None); + __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":157 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":157 * self._setup_ssl_options(charset, **ssl) * if charset is not None: * charset = PyUnicode_AsUTF8String(charset) # <<<<<<<<<<<<<< * mysql_options(self.conn, * MYSQL_SET_CHARSET_NAME, PyBytes_AS_STRING(charset)) */ - __pyx_t_2 = PyUnicode_AsUTF8String(__pyx_v_charset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = PyUnicode_AsUTF8String(__pyx_v_charset); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_v_charset); - __pyx_v_charset = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_v_charset = __pyx_t_7; + __pyx_t_7 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":159 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":159 * charset = PyUnicode_AsUTF8String(charset) * mysql_options(self.conn, * MYSQL_SET_CHARSET_NAME, PyBytes_AS_STRING(charset)) # <<<<<<<<<<<<<< * if not mysql_real_connect(self.conn, bytes_or_null(host), * bytes_or_null(user), bytes_or_null(passwd), bytes_or_null(db), */ - mysql_options(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn, MYSQL_SET_CHARSET_NAME, PyBytes_AS_STRING(__pyx_v_charset)); - goto __pyx_L20; + mysql_options(__pyx_v_self->conn, MYSQL_SET_CHARSET_NAME, PyBytes_AS_STRING(__pyx_v_charset)); + goto __pyx_L17; } - __pyx_L20:; + __pyx_L17:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":162 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":162 * if not mysql_real_connect(self.conn, bytes_or_null(host), * bytes_or_null(user), bytes_or_null(passwd), bytes_or_null(db), * port, bytes_or_null(unix_socket), flags): # <<<<<<<<<<<<<< * self._raise_error() * if autoreconnect: */ - __pyx_t_1 = (!(__pyx_f_6oursql_mysql_real_connect(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn, __pyx_f_6oursql_bytes_or_null(__pyx_v_host), __pyx_f_6oursql_bytes_or_null(__pyx_v_user), __pyx_f_6oursql_bytes_or_null(__pyx_v_passwd), __pyx_f_6oursql_bytes_or_null(__pyx_v_db), __pyx_v_port, __pyx_f_6oursql_bytes_or_null(__pyx_v_unix_socket), __pyx_v_flags) != 0)); + __pyx_t_1 = ((!(__pyx_f_6oursql_mysql_real_connect(__pyx_v_self->conn, __pyx_f_6oursql_bytes_or_null(__pyx_v_host), __pyx_f_6oursql_bytes_or_null(__pyx_v_user), __pyx_f_6oursql_bytes_or_null(__pyx_v_passwd), __pyx_f_6oursql_bytes_or_null(__pyx_v_db), __pyx_v_port, __pyx_f_6oursql_bytes_or_null(__pyx_v_unix_socket), __pyx_v_flags) != 0)) != 0); if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":163 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":163 * bytes_or_null(user), bytes_or_null(passwd), bytes_or_null(db), * port, bytes_or_null(unix_socket), flags): * self._raise_error() # <<<<<<<<<<<<<< * if autoreconnect: * bool_tmp = True */ - __pyx_t_6 = ((struct __pyx_vtabstruct_6oursql_Connection *)((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->__pyx_vtab)->_raise_error(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L21; + __pyx_t_8 = ((struct __pyx_vtabstruct_6oursql_Connection *)__pyx_v_self->__pyx_vtab)->_raise_error(__pyx_v_self); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L18; } - __pyx_L21:; + __pyx_L18:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":164 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":164 * port, bytes_or_null(unix_socket), flags): * self._raise_error() * if autoreconnect: # <<<<<<<<<<<<<< * bool_tmp = True * mysql_options(self.conn, MYSQL_OPT_RECONNECT, &bool_tmp) */ - if (__pyx_v_autoreconnect) { + __pyx_t_1 = (__pyx_v_autoreconnect != 0); + if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":165 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":165 * self._raise_error() * if autoreconnect: * bool_tmp = True # <<<<<<<<<<<<<< @@ -5789,48 +6337,48 @@ */ __pyx_v_bool_tmp = 1; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":166 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":166 * if autoreconnect: * bool_tmp = True * mysql_options(self.conn, MYSQL_OPT_RECONNECT, &bool_tmp) # <<<<<<<<<<<<<< * self.charset * self.use_unicode = use_unicode */ - mysql_options(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn, MYSQL_OPT_RECONNECT, ((char *)(&__pyx_v_bool_tmp))); - goto __pyx_L22; + mysql_options(__pyx_v_self->conn, MYSQL_OPT_RECONNECT, ((char *)(&__pyx_v_bool_tmp))); + goto __pyx_L19; } - __pyx_L22:; + __pyx_L19:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":167 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":167 * bool_tmp = True * mysql_options(self.conn, MYSQL_OPT_RECONNECT, &bool_tmp) * self.charset # <<<<<<<<<<<<<< * self.use_unicode = use_unicode * self.autoping = autoping */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__charset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__charset); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":168 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":168 * mysql_options(self.conn, MYSQL_OPT_RECONNECT, &bool_tmp) * self.charset * self.use_unicode = use_unicode # <<<<<<<<<<<<<< * self.autoping = autoping * if default_cursor is None: */ - ((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->use_unicode = __pyx_v_use_unicode; + __pyx_v_self->use_unicode = __pyx_v_use_unicode; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":169 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":169 * self.charset * self.use_unicode = use_unicode * self.autoping = autoping # <<<<<<<<<<<<<< * if default_cursor is None: * default_cursor = Cursor */ - ((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->autoping = __pyx_v_autoping; + __pyx_v_self->autoping = __pyx_v_autoping; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":170 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":170 * self.use_unicode = use_unicode * self.autoping = autoping * if default_cursor is None: # <<<<<<<<<<<<<< @@ -5838,9 +6386,10 @@ * self.default_cursor = default_cursor */ __pyx_t_1 = (__pyx_v_default_cursor == Py_None); - if (__pyx_t_1) { + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":171 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":171 * self.autoping = autoping * if default_cursor is None: * default_cursor = Cursor # <<<<<<<<<<<<<< @@ -5850,11 +6399,11 @@ __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_6oursql_Cursor))); __Pyx_DECREF(__pyx_v_default_cursor); __pyx_v_default_cursor = ((PyObject *)((PyObject*)__pyx_ptype_6oursql_Cursor)); - goto __pyx_L23; + goto __pyx_L20; } - __pyx_L23:; + __pyx_L20:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":172 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":172 * if default_cursor is None: * default_cursor = Cursor * self.default_cursor = default_cursor # <<<<<<<<<<<<<< @@ -5863,40 +6412,41 @@ */ __Pyx_INCREF(__pyx_v_default_cursor); __Pyx_GIVEREF(__pyx_v_default_cursor); - __Pyx_GOTREF(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->default_cursor); - __Pyx_DECREF(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->default_cursor); - ((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->default_cursor = __pyx_v_default_cursor; + __Pyx_GOTREF(__pyx_v_self->default_cursor); + __Pyx_DECREF(__pyx_v_self->default_cursor); + __pyx_v_self->default_cursor = __pyx_v_default_cursor; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":173 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":173 * default_cursor = Cursor * self.default_cursor = default_cursor * self.raise_on_warnings = raise_on_warnings # <<<<<<<<<<<<<< * self._context_cursors = [] * */ - ((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->raise_on_warnings = __pyx_v_raise_on_warnings; + __pyx_v_self->raise_on_warnings = __pyx_v_raise_on_warnings; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":174 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":174 * self.default_cursor = default_cursor * self.raise_on_warnings = raise_on_warnings * self._context_cursors = [] # <<<<<<<<<<<<<< * * def _setup_ssl_options(self, charset, *, key=None, cert=None, ca=None, */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); - __Pyx_GOTREF(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->_context_cursors); - __Pyx_DECREF(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->_context_cursors); - ((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->_context_cursors = ((PyObject *)__pyx_t_2); - __pyx_t_2 = 0; + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(((PyObject *)__pyx_t_7)); + __Pyx_GOTREF(__pyx_v_self->_context_cursors); + __Pyx_DECREF(__pyx_v_self->_context_cursors); + __pyx_v_self->_context_cursors = ((PyObject *)__pyx_t_7); + __pyx_t_7 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("oursql.Connection.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -5916,37 +6466,37 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":176 - * self._context_cursors = [] - * - * def _setup_ssl_options(self, charset, *, key=None, cert=None, ca=None, # <<<<<<<<<<<<<< - * capath=None, cipher=None): - * key = bytes_maybe_from_encoding(key, charset) - */ - -static PyObject *__pyx_pf_6oursql_10Connection_1_setup_ssl_options(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pf_6oursql_10Connection_1_setup_ssl_options(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10Connection_3_setup_ssl_options(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6oursql_10Connection_3_setup_ssl_options(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_charset = 0; PyObject *__pyx_v_key = 0; PyObject *__pyx_v_cert = 0; PyObject *__pyx_v_ca = 0; PyObject *__pyx_v_capath = 0; PyObject *__pyx_v_cipher = 0; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__charset,&__pyx_n_s__key,&__pyx_n_s__cert,&__pyx_n_s__ca,&__pyx_n_s__capath,&__pyx_n_s__cipher,0}; - __Pyx_RefNannySetupContext("_setup_ssl_options"); + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_setup_ssl_options (wrapper)", 0); { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__charset,&__pyx_n_s__key,&__pyx_n_s__cert,&__pyx_n_s__ca,&__pyx_n_s__capath,&__pyx_n_s__cipher,0}; PyObject* values[6] = {0,0,0,0,0,0}; + + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":176 + * self._context_cursors = [] + * + * def _setup_ssl_options(self, charset, *, key=None, cert=None, ca=None, # <<<<<<<<<<<<<< + * capath=None, cipher=None): + * key = bytes_maybe_from_encoding(key, charset) + */ values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); values[3] = ((PyObject *)Py_None); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":177 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":177 * * def _setup_ssl_options(self, charset, *, key=None, cert=None, ca=None, * capath=None, cipher=None): # <<<<<<<<<<<<<< @@ -5957,34 +6507,27 @@ values[5] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; - switch (PyTuple_GET_SIZE(__pyx_args)) { + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { 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 (PyTuple_GET_SIZE(__pyx_args)) { + switch (pos_args) { case 0: - values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__charset); - if (likely(values[0])) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__charset)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } - while (kw_args > 0) { - PyObject* value; - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key); - if (value) { values[1] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cert); - if (value) { values[2] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ca); - if (value) { values[3] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__capath); - if (value) { values[4] = value; if (!(--kw_args)) break; } - value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cipher); - if (value) { values[5] = value; if (!(--kw_args)) break; } - break; + if (kw_args > 0 && likely(kw_args <= 5)) { + Py_ssize_t index; + for (index = 1; index < 6 && kw_args > 0; index++) { + PyObject* value = PyDict_GetItem(__pyx_kwds, *__pyx_pyargnames[index]); + if (value) { values[index] = value; kw_args--; } + } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "_setup_ssl_options") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_setup_ssl_options") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -6006,13 +6549,34 @@ __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6oursql_10Connection_2_setup_ssl_options(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self), __pyx_v_charset, __pyx_v_key, __pyx_v_cert, __pyx_v_ca, __pyx_v_capath, __pyx_v_cipher); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":176 + * self._context_cursors = [] + * + * def _setup_ssl_options(self, charset, *, key=None, cert=None, ca=None, # <<<<<<<<<<<<<< + * capath=None, cipher=None): + * key = bytes_maybe_from_encoding(key, charset) + */ + +static PyObject *__pyx_pf_6oursql_10Connection_2_setup_ssl_options(struct __pyx_obj_6oursql_Connection *__pyx_v_self, PyObject *__pyx_v_charset, PyObject *__pyx_v_key, PyObject *__pyx_v_cert, PyObject *__pyx_v_ca, PyObject *__pyx_v_capath, PyObject *__pyx_v_cipher) { + 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("_setup_ssl_options", 0); __Pyx_INCREF(__pyx_v_key); __Pyx_INCREF(__pyx_v_cert); __Pyx_INCREF(__pyx_v_ca); __Pyx_INCREF(__pyx_v_capath); __Pyx_INCREF(__pyx_v_cipher); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":178 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":178 * def _setup_ssl_options(self, charset, *, key=None, cert=None, ca=None, * capath=None, cipher=None): * key = bytes_maybe_from_encoding(key, charset) # <<<<<<<<<<<<<< @@ -6025,7 +6589,7 @@ __pyx_v_key = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":179 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":179 * capath=None, cipher=None): * key = bytes_maybe_from_encoding(key, charset) * cert = bytes_maybe_from_encoding(cert, charset) # <<<<<<<<<<<<<< @@ -6038,7 +6602,7 @@ __pyx_v_cert = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":180 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":180 * key = bytes_maybe_from_encoding(key, charset) * cert = bytes_maybe_from_encoding(cert, charset) * ca = bytes_maybe_from_encoding(ca, charset) # <<<<<<<<<<<<<< @@ -6051,7 +6615,7 @@ __pyx_v_ca = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":181 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":181 * cert = bytes_maybe_from_encoding(cert, charset) * ca = bytes_maybe_from_encoding(ca, charset) * capath = bytes_maybe_from_encoding(capath, charset) # <<<<<<<<<<<<<< @@ -6064,7 +6628,7 @@ __pyx_v_capath = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":182 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":182 * ca = bytes_maybe_from_encoding(ca, charset) * capath = bytes_maybe_from_encoding(capath, charset) * cipher = bytes_maybe_from_encoding(cipher, charset) # <<<<<<<<<<<<<< @@ -6077,14 +6641,14 @@ __pyx_v_cipher = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":184 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":184 * cipher = bytes_maybe_from_encoding(cipher, charset) * mysql_ssl_set(self.conn, bytes_or_null(key), bytes_or_null(cert), * bytes_or_null(ca), bytes_or_null(capath), bytes_or_null(cipher)) # <<<<<<<<<<<<<< * * def close(self): */ - mysql_ssl_set(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn, __pyx_f_6oursql_bytes_or_null(__pyx_v_key), __pyx_f_6oursql_bytes_or_null(__pyx_v_cert), __pyx_f_6oursql_bytes_or_null(__pyx_v_ca), __pyx_f_6oursql_bytes_or_null(__pyx_v_capath), __pyx_f_6oursql_bytes_or_null(__pyx_v_cipher)); + mysql_ssl_set(__pyx_v_self->conn, __pyx_f_6oursql_bytes_or_null(__pyx_v_key), __pyx_f_6oursql_bytes_or_null(__pyx_v_cert), __pyx_f_6oursql_bytes_or_null(__pyx_v_ca), __pyx_f_6oursql_bytes_or_null(__pyx_v_capath), __pyx_f_6oursql_bytes_or_null(__pyx_v_cipher)); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -6103,7 +6667,19 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":186 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10Connection_5close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_6oursql_10Connection_4close[] = "close()\n \n Close the connection. The connection object and all associated cursors\n will become unusable.\n "; +static PyObject *__pyx_pw_6oursql_10Connection_5close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("close (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10Connection_4close(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":186 * bytes_or_null(ca), bytes_or_null(capath), bytes_or_null(cipher)) * * def close(self): # <<<<<<<<<<<<<< @@ -6111,9 +6687,7 @@ * */ -static PyObject *__pyx_pf_6oursql_10Connection_2close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_6oursql_10Connection_2close[] = "close()\n \n Close the connection. The connection object and all associated cursors\n will become unusable.\n "; -static PyObject *__pyx_pf_6oursql_10Connection_2close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_6oursql_10Connection_4close(struct __pyx_obj_6oursql_Connection *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -6122,52 +6696,52 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("close"); + __Pyx_RefNannySetupContext("close", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":192 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":192 * will become unusable. * """ * if self.conn: # <<<<<<<<<<<<<< * self.rollback() * mysql_close(self.conn) */ - __pyx_t_1 = (((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn != 0); + __pyx_t_1 = (__pyx_v_self->conn != 0); if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":193 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":193 * """ * if self.conn: * self.rollback() # <<<<<<<<<<<<<< * mysql_close(self.conn) * self.conn = NULL */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__rollback); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__rollback); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":194 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":194 * if self.conn: * self.rollback() * mysql_close(self.conn) # <<<<<<<<<<<<<< * self.conn = NULL * */ - mysql_close(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn); + mysql_close(__pyx_v_self->conn); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":195 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":195 * self.rollback() * mysql_close(self.conn) * self.conn = NULL # <<<<<<<<<<<<<< * * def __dealloc__(self): */ - ((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn = NULL; - goto __pyx_L5; + __pyx_v_self->conn = NULL; + goto __pyx_L3; } - __pyx_L5:; + __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -6182,7 +6756,16 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":197 +/* Python wrapper */ +static void __pyx_pw_6oursql_10Connection_7__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_6oursql_10Connection_7__dealloc__(PyObject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_pf_6oursql_10Connection_6__dealloc__(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":197 * self.conn = NULL * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -6190,47 +6773,46 @@ * mysql_close(self.conn) */ -static void __pyx_pf_6oursql_10Connection_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pf_6oursql_10Connection_3__dealloc__(PyObject *__pyx_v_self) { +static void __pyx_pf_6oursql_10Connection_6__dealloc__(struct __pyx_obj_6oursql_Connection *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; - __Pyx_RefNannySetupContext("__dealloc__"); + __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":198 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":198 * * def __dealloc__(self): * if self.conn: # <<<<<<<<<<<<<< * mysql_close(self.conn) * self.conn = NULL */ - __pyx_t_1 = (((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn != 0); + __pyx_t_1 = (__pyx_v_self->conn != 0); if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":199 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":199 * def __dealloc__(self): * if self.conn: * mysql_close(self.conn) # <<<<<<<<<<<<<< * self.conn = NULL * */ - mysql_close(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn); + mysql_close(__pyx_v_self->conn); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":200 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":200 * if self.conn: * mysql_close(self.conn) * self.conn = NULL # <<<<<<<<<<<<<< * * cdef int _raise_error(self) except -1: */ - ((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn = NULL; - goto __pyx_L5; + __pyx_v_self->conn = NULL; + goto __pyx_L3; } - __pyx_L5:; + __pyx_L3:; __Pyx_RefNannyFinishContext(); } -/* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":202 +/* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":202 * self.conn = NULL * * cdef int _raise_error(self) except -1: # <<<<<<<<<<<<<< @@ -6249,9 +6831,9 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_raise_error"); + __Pyx_RefNannySetupContext("_raise_error", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":205 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":205 * # _raise_error can only be called internally, so we shouldn't need to * # check for if the connection is closed. * cdef int err = mysql_errno(self.conn) # <<<<<<<<<<<<<< @@ -6260,30 +6842,30 @@ */ __pyx_v_err = mysql_errno(__pyx_v_self->conn); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":206 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":206 * # check for if the connection is closed. * cdef int err = mysql_errno(self.conn) * self.charset # <<<<<<<<<<<<<< * raise _exception_from_errno(err)( * self._decode_char_p(mysql_error(self.conn)), err) */ - __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__charset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__charset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":207 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":207 * cdef int err = mysql_errno(self.conn) * self.charset * raise _exception_from_errno(err)( # <<<<<<<<<<<<<< * self._decode_char_p(mysql_error(self.conn)), err) * */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromLong(__pyx_v_err); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __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[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; @@ -6292,7 +6874,7 @@ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":208 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":208 * self.charset * raise _exception_from_errno(err)( * self._decode_char_p(mysql_error(self.conn)), err) # <<<<<<<<<<<<<< @@ -6304,7 +6886,7 @@ __pyx_t_1 = PyInt_FromLong(__pyx_v_err); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); @@ -6333,7 +6915,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":210 +/* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":210 * self._decode_char_p(mysql_error(self.conn)), err) * * cdef int _check_closed(self) except -1: # <<<<<<<<<<<<<< @@ -6350,28 +6932,28 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_check_closed"); + __Pyx_RefNannySetupContext("_check_closed", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":211 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":211 * * cdef int _check_closed(self) except -1: * if not self.conn: # <<<<<<<<<<<<<< * raise ProgrammingError('connection closed') * */ - __pyx_t_1 = (!(__pyx_v_self->conn != 0)); + __pyx_t_1 = ((!(__pyx_v_self->conn != 0)) != 0); if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":212 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":212 * cdef int _check_closed(self) except -1: * if not self.conn: * raise ProgrammingError('connection closed') # <<<<<<<<<<<<<< * * def ping(self): */ - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_17), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_23), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); @@ -6393,7 +6975,19 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":214 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10Connection_9ping(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_6oursql_10Connection_8ping[] = "ping()\n \n Make sure that the database connection is still open. If not, silently\n reconnect.\n "; +static PyObject *__pyx_pw_6oursql_10Connection_9ping(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ping (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10Connection_8ping(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":214 * raise ProgrammingError('connection closed') * * def ping(self): # <<<<<<<<<<<<<< @@ -6401,47 +6995,46 @@ * */ -static PyObject *__pyx_pf_6oursql_10Connection_4ping(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_6oursql_10Connection_4ping[] = "ping()\n \n Make sure that the database connection is still open. If not, silently\n reconnect.\n "; -static PyObject *__pyx_pf_6oursql_10Connection_4ping(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_6oursql_10Connection_8ping(struct __pyx_obj_6oursql_Connection *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; + int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("ping"); + __Pyx_RefNannySetupContext("ping", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":220 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":220 * reconnect. * """ * self._check_closed() # <<<<<<<<<<<<<< * if mysql_ping(self.conn): * self._raise_error() */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Connection *)((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->__pyx_vtab)->_check_closed(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Connection *)__pyx_v_self->__pyx_vtab)->_check_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":221 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":221 * """ * self._check_closed() * if mysql_ping(self.conn): # <<<<<<<<<<<<<< * self._raise_error() * */ - __pyx_t_1 = __pyx_f_6oursql_mysql_ping(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_f_6oursql_mysql_ping(__pyx_v_self->conn) != 0); + if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":222 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":222 * self._check_closed() * if mysql_ping(self.conn): * self._raise_error() # <<<<<<<<<<<<<< * * def commit(self): */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Connection *)((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->__pyx_vtab)->_raise_error(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L5; + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Connection *)__pyx_v_self->__pyx_vtab)->_raise_error(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L3; } - __pyx_L5:; + __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -6454,7 +7047,19 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":224 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10Connection_11commit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_6oursql_10Connection_10commit[] = "commit()\n \n Commit the current transaction.\n "; +static PyObject *__pyx_pw_6oursql_10Connection_11commit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("commit (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10Connection_10commit(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":224 * self._raise_error() * * def commit(self): # <<<<<<<<<<<<<< @@ -6462,48 +7067,46 @@ * */ -static PyObject *__pyx_pf_6oursql_10Connection_5commit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_6oursql_10Connection_5commit[] = "commit()\n \n Commit the current transaction.\n "; -static PyObject *__pyx_pf_6oursql_10Connection_5commit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_6oursql_10Connection_10commit(struct __pyx_obj_6oursql_Connection *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; - my_bool __pyx_t_2; + int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("commit"); + __Pyx_RefNannySetupContext("commit", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":229 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":229 * Commit the current transaction. * """ * self._check_closed() # <<<<<<<<<<<<<< * if mysql_commit(self.conn): * self._raise_error() */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Connection *)((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->__pyx_vtab)->_check_closed(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Connection *)__pyx_v_self->__pyx_vtab)->_check_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":230 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":230 * """ * self._check_closed() * if mysql_commit(self.conn): # <<<<<<<<<<<<<< * self._raise_error() * */ - __pyx_t_2 = __pyx_f_6oursql_mysql_commit(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn); + __pyx_t_2 = (__pyx_f_6oursql_mysql_commit(__pyx_v_self->conn) != 0); if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":231 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":231 * self._check_closed() * if mysql_commit(self.conn): * self._raise_error() # <<<<<<<<<<<<<< * * def rollback(self): */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Connection *)((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->__pyx_vtab)->_raise_error(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L5; + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Connection *)__pyx_v_self->__pyx_vtab)->_raise_error(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L3; } - __pyx_L5:; + __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -6516,7 +7119,19 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":233 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10Connection_13rollback(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_6oursql_10Connection_12rollback[] = "rollback()\n \n Roll back the current transaction.\n "; +static PyObject *__pyx_pw_6oursql_10Connection_13rollback(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("rollback (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10Connection_12rollback(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":233 * self._raise_error() * * def rollback(self): # <<<<<<<<<<<<<< @@ -6524,48 +7139,46 @@ * */ -static PyObject *__pyx_pf_6oursql_10Connection_6rollback(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_6oursql_10Connection_6rollback[] = "rollback()\n \n Roll back the current transaction.\n "; -static PyObject *__pyx_pf_6oursql_10Connection_6rollback(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_6oursql_10Connection_12rollback(struct __pyx_obj_6oursql_Connection *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; - my_bool __pyx_t_2; + int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("rollback"); + __Pyx_RefNannySetupContext("rollback", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":238 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":238 * Roll back the current transaction. * """ * self._check_closed() # <<<<<<<<<<<<<< * if mysql_rollback(self.conn): * self._raise_error() */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Connection *)((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->__pyx_vtab)->_check_closed(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Connection *)__pyx_v_self->__pyx_vtab)->_check_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":239 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":239 * """ * self._check_closed() * if mysql_rollback(self.conn): # <<<<<<<<<<<<<< * self._raise_error() * */ - __pyx_t_2 = __pyx_f_6oursql_mysql_rollback(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn); + __pyx_t_2 = (__pyx_f_6oursql_mysql_rollback(__pyx_v_self->conn) != 0); if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":240 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":240 * self._check_closed() * if mysql_rollback(self.conn): * self._raise_error() # <<<<<<<<<<<<<< * * property charset: */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Connection *)((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->__pyx_vtab)->_raise_error(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L5; + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Connection *)__pyx_v_self->__pyx_vtab)->_raise_error(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L3; } - __pyx_L5:; + __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -6578,7 +7191,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":249 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10Connection_7charset_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_10Connection_7charset_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10Connection_7charset___get__(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":249 * strings. * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -6586,8 +7210,7 @@ * mysql_character_set_name(self.conn)) */ -static PyObject *__pyx_pf_6oursql_10Connection_7charset___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_10Connection_7charset___get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_10Connection_7charset___get__(struct __pyx_obj_6oursql_Connection *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -6596,19 +7219,19 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":251 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":251 * def __get__(self): * self._charset_bytes = PyBytes_FromString( * mysql_character_set_name(self.conn)) # <<<<<<<<<<<<<< * self._charset = PyUnicode_FromStringAndSize( * PyBytes_AS_STRING(self._charset_bytes), */ - __pyx_t_1 = PyBytes_FromString(mysql_character_set_name(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyBytes_FromString(mysql_character_set_name(__pyx_v_self->conn)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":250 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":250 * """ * def __get__(self): * self._charset_bytes = PyBytes_FromString( # <<<<<<<<<<<<<< @@ -6616,36 +7239,36 @@ * self._charset = PyUnicode_FromStringAndSize( */ __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->_charset_bytes); - __Pyx_DECREF(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->_charset_bytes); - ((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->_charset_bytes = __pyx_t_1; + __Pyx_GOTREF(__pyx_v_self->_charset_bytes); + __Pyx_DECREF(__pyx_v_self->_charset_bytes); + __pyx_v_self->_charset_bytes = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":253 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":253 * mysql_character_set_name(self.conn)) * self._charset = PyUnicode_FromStringAndSize( * PyBytes_AS_STRING(self._charset_bytes), # <<<<<<<<<<<<<< * PyBytes_GET_SIZE(self._charset_bytes)) * return self._charset */ - __pyx_t_1 = ((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->_charset_bytes; + __pyx_t_1 = __pyx_v_self->_charset_bytes; __Pyx_INCREF(__pyx_t_1); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":254 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":254 * self._charset = PyUnicode_FromStringAndSize( * PyBytes_AS_STRING(self._charset_bytes), * PyBytes_GET_SIZE(self._charset_bytes)) # <<<<<<<<<<<<<< * return self._charset * def __set__(self, value): */ - __pyx_t_2 = ((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->_charset_bytes; + __pyx_t_2 = __pyx_v_self->_charset_bytes; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = PyUnicode_FromStringAndSize(PyBytes_AS_STRING(__pyx_t_1), PyBytes_GET_SIZE(__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":252 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":252 * self._charset_bytes = PyBytes_FromString( * mysql_character_set_name(self.conn)) * self._charset = PyUnicode_FromStringAndSize( # <<<<<<<<<<<<<< @@ -6653,12 +7276,12 @@ * PyBytes_GET_SIZE(self._charset_bytes)) */ __Pyx_GIVEREF(__pyx_t_3); - __Pyx_GOTREF(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->_charset); - __Pyx_DECREF(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->_charset); - ((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->_charset = __pyx_t_3; + __Pyx_GOTREF(__pyx_v_self->_charset); + __Pyx_DECREF(__pyx_v_self->_charset); + __pyx_v_self->_charset = __pyx_t_3; __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":255 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":255 * PyBytes_AS_STRING(self._charset_bytes), * PyBytes_GET_SIZE(self._charset_bytes)) * return self._charset # <<<<<<<<<<<<<< @@ -6666,8 +7289,8 @@ * self._check_closed() */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->_charset); - __pyx_r = ((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->_charset; + __Pyx_INCREF(__pyx_v_self->_charset); + __pyx_r = __pyx_v_self->_charset; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -6684,7 +7307,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":256 +/* Python wrapper */ +static int __pyx_pw_6oursql_10Connection_7charset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_6oursql_10Connection_7charset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10Connection_7charset_2__set__(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":256 * PyBytes_GET_SIZE(self._charset_bytes)) * return self._charset * def __set__(self, value): # <<<<<<<<<<<<<< @@ -6692,28 +7326,28 @@ * svalue = PyUnicode_AsUTF8String(value) */ -static int __pyx_pf_6oursql_10Connection_7charset_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ -static int __pyx_pf_6oursql_10Connection_7charset_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { +static int __pyx_pf_6oursql_10Connection_7charset_2__set__(struct __pyx_obj_6oursql_Connection *__pyx_v_self, PyObject *__pyx_v_value) { PyObject *__pyx_v_svalue = NULL; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__set__"); + __Pyx_RefNannySetupContext("__set__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":257 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":257 * return self._charset * def __set__(self, value): * self._check_closed() # <<<<<<<<<<<<<< * svalue = PyUnicode_AsUTF8String(value) * if mysql_set_character_set(self.conn, PyBytes_AS_STRING(svalue)): */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Connection *)((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->__pyx_vtab)->_check_closed(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Connection *)__pyx_v_self->__pyx_vtab)->_check_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":258 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":258 * def __set__(self, value): * self._check_closed() * svalue = PyUnicode_AsUTF8String(value) # <<<<<<<<<<<<<< @@ -6725,29 +7359,29 @@ __pyx_v_svalue = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":259 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":259 * self._check_closed() * svalue = PyUnicode_AsUTF8String(value) * if mysql_set_character_set(self.conn, PyBytes_AS_STRING(svalue)): # <<<<<<<<<<<<<< * self._raise_error() * self._charset_bytes = svalue */ - __pyx_t_1 = mysql_set_character_set(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn, PyBytes_AS_STRING(__pyx_v_svalue)); - if (__pyx_t_1) { + __pyx_t_3 = (mysql_set_character_set(__pyx_v_self->conn, PyBytes_AS_STRING(__pyx_v_svalue)) != 0); + if (__pyx_t_3) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":260 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":260 * svalue = PyUnicode_AsUTF8String(value) * if mysql_set_character_set(self.conn, PyBytes_AS_STRING(svalue)): * self._raise_error() # <<<<<<<<<<<<<< * self._charset_bytes = svalue * self._charset = value */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Connection *)((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->__pyx_vtab)->_raise_error(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L5; + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Connection *)__pyx_v_self->__pyx_vtab)->_raise_error(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L3; } - __pyx_L5:; + __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":261 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":261 * if mysql_set_character_set(self.conn, PyBytes_AS_STRING(svalue)): * self._raise_error() * self._charset_bytes = svalue # <<<<<<<<<<<<<< @@ -6756,11 +7390,11 @@ */ __Pyx_INCREF(__pyx_v_svalue); __Pyx_GIVEREF(__pyx_v_svalue); - __Pyx_GOTREF(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->_charset_bytes); - __Pyx_DECREF(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->_charset_bytes); - ((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->_charset_bytes = __pyx_v_svalue; + __Pyx_GOTREF(__pyx_v_self->_charset_bytes); + __Pyx_DECREF(__pyx_v_self->_charset_bytes); + __pyx_v_self->_charset_bytes = __pyx_v_svalue; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":262 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":262 * self._raise_error() * self._charset_bytes = svalue * self._charset = value # <<<<<<<<<<<<<< @@ -6769,9 +7403,9 @@ */ __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); - __Pyx_GOTREF(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->_charset); - __Pyx_DECREF(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->_charset); - ((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->_charset = __pyx_v_value; + __Pyx_GOTREF(__pyx_v_self->_charset); + __Pyx_DECREF(__pyx_v_self->_charset); + __pyx_v_self->_charset = __pyx_v_value; __pyx_r = 0; goto __pyx_L0; @@ -6785,7 +7419,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":264 +/* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":264 * self._charset = value * * cdef object _decode_char_p(self, const_char *value): # <<<<<<<<<<<<<< @@ -6802,9 +7436,9 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_decode_char_p"); + __Pyx_RefNannySetupContext("_decode_char_p", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":265 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":265 * * cdef object _decode_char_p(self, const_char *value): * cdef Py_ssize_t length = strlen(value) # <<<<<<<<<<<<<< @@ -6813,7 +7447,7 @@ */ __pyx_v_length = strlen(__pyx_v_value); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":266 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":266 * cdef object _decode_char_p(self, const_char *value): * cdef Py_ssize_t length = strlen(value) * return PyUnicode_Decode(value, length, # <<<<<<<<<<<<<< @@ -6822,7 +7456,7 @@ */ __Pyx_XDECREF(__pyx_r); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":267 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":267 * cdef Py_ssize_t length = strlen(value) * return PyUnicode_Decode(value, length, * PyBytes_AS_STRING(self._charset_bytes), "strict") # <<<<<<<<<<<<<< @@ -6851,7 +7485,19 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":269 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10Connection_15warning_count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_6oursql_10Connection_14warning_count[] = "warning_count() -> int\n \n Return the number of warnings caused by the most-previously-executed\n query or statement.\n "; +static PyObject *__pyx_pw_6oursql_10Connection_15warning_count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("warning_count (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10Connection_14warning_count(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":269 * PyBytes_AS_STRING(self._charset_bytes), "strict") * * def warning_count(self): # <<<<<<<<<<<<<< @@ -6859,18 +7505,16 @@ * */ -static PyObject *__pyx_pf_6oursql_10Connection_7warning_count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_6oursql_10Connection_7warning_count[] = "warning_count() -> int\n \n Return the number of warnings caused by the most-previously-executed\n query or statement.\n "; -static PyObject *__pyx_pf_6oursql_10Connection_7warning_count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_6oursql_10Connection_14warning_count(struct __pyx_obj_6oursql_Connection *__pyx_v_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("warning_count"); + __Pyx_RefNannySetupContext("warning_count", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":275 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":275 * query or statement. * """ * return mysql_warning_count(self.conn) # <<<<<<<<<<<<<< @@ -6878,7 +7522,7 @@ * def cursor(self, cursor_class=None, **kwargs): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyLong_FromUnsignedLong(mysql_warning_count(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyLong_FromUnsignedLong(mysql_warning_count(__pyx_v_self->conn)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -6896,44 +7540,42 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":277 - * return mysql_warning_count(self.conn) - * - * def cursor(self, cursor_class=None, **kwargs): # <<<<<<<<<<<<<< - * """cursor([cursor_class,] **cursor_options) -> Cursor. - * - */ - -static PyObject *__pyx_pf_6oursql_10Connection_8cursor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_6oursql_10Connection_8cursor[] = "cursor([cursor_class,] **cursor_options) -> Cursor.\n \n Create a new cursor associated with this connection of the specified \n type. If no cursor class is specified, the 'default_cursor' attribute\n is used as the cursor class. The cursor_options will be forwarded to \n the cursor's initializer; see the documentation for the cursor classes \n for details.\n "; -static PyObject *__pyx_pf_6oursql_10Connection_8cursor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10Connection_17cursor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_6oursql_10Connection_16cursor[] = "cursor([cursor_class,] **cursor_options) -> Cursor.\n \n Create a new cursor associated with this connection of the specified \n type. If no cursor class is specified, the 'default_cursor' attribute\n is used as the cursor class. The cursor_options will be forwarded to \n the cursor's initializer; see the documentation for the cursor classes \n for details.\n "; +static PyObject *__pyx_pw_6oursql_10Connection_17cursor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_cursor_class = 0; PyObject *__pyx_v_kwargs = 0; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cursor_class,0}; - __Pyx_RefNannySetupContext("cursor"); + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("cursor (wrapper)", 0); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cursor_class,0}; PyObject* values[1] = {0}; + + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":277 + * return mysql_warning_count(self.conn) + * + * def cursor(self, cursor_class=None, **kwargs): # <<<<<<<<<<<<<< + * """cursor([cursor_class,] **cursor_options) -> Cursor. + * + */ values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; - switch (PyTuple_GET_SIZE(__pyx_args)) { + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { 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 (PyTuple_GET_SIZE(__pyx_args)) { + switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cursor_class); @@ -6941,7 +7583,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, PyTuple_GET_SIZE(__pyx_args), "cursor") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "cursor") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -6961,18 +7603,37 @@ __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6oursql_10Connection_16cursor(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self), __pyx_v_cursor_class, __pyx_v_kwargs); + __Pyx_XDECREF(__pyx_v_kwargs); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6oursql_10Connection_16cursor(struct __pyx_obj_6oursql_Connection *__pyx_v_self, PyObject *__pyx_v_cursor_class, PyObject *__pyx_v_kwargs) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("cursor", 0); __Pyx_INCREF(__pyx_v_cursor_class); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":286 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":286 * for details. * """ * self._check_closed() # <<<<<<<<<<<<<< * if cursor_class is None: * cursor_class = self.default_cursor */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Connection *)((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->__pyx_vtab)->_check_closed(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Connection *)__pyx_v_self->__pyx_vtab)->_check_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":287 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":287 * """ * self._check_closed() * if cursor_class is None: # <<<<<<<<<<<<<< @@ -6980,23 +7641,26 @@ * return cursor_class(self, **kwargs) */ __pyx_t_2 = (__pyx_v_cursor_class == Py_None); - if (__pyx_t_2) { + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":288 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":288 * self._check_closed() * if cursor_class is None: * cursor_class = self.default_cursor # <<<<<<<<<<<<<< * return cursor_class(self, **kwargs) * */ - __Pyx_INCREF(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->default_cursor); + __pyx_t_4 = __pyx_v_self->default_cursor; + __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(__pyx_v_cursor_class); - __pyx_v_cursor_class = ((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->default_cursor; - goto __pyx_L6; + __pyx_v_cursor_class = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L3; } - __pyx_L6:; + __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":289 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":289 * if cursor_class is None: * cursor_class = self.default_cursor * return cursor_class(self, **kwargs) # <<<<<<<<<<<<<< @@ -7004,34 +7668,48 @@ * property server_info: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - __Pyx_INCREF(__pyx_v_self); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self); - __Pyx_GIVEREF(__pyx_v_self); - __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_v_cursor_class, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_v_kwargs)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); + __pyx_t_5 = ((PyObject *)__pyx_v_kwargs); + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = PyObject_Call(__pyx_v_cursor_class, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 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_6); __Pyx_AddTraceback("oursql.Connection.cursor", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_XDECREF(__pyx_v_cursor_class); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":292 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10Connection_11server_info_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_10Connection_11server_info_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10Connection_11server_info___get__(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":292 * * property server_info: * def __get__(self): # <<<<<<<<<<<<<< @@ -7039,8 +7717,7 @@ * self._check_closed() */ -static PyObject *__pyx_pf_6oursql_10Connection_11server_info___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_10Connection_11server_info___get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_10Connection_11server_info___get__(struct __pyx_obj_6oursql_Connection *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -7048,29 +7725,29 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":294 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":294 * def __get__(self): * cdef const_char *info * self._check_closed() # <<<<<<<<<<<<<< * self.charset * return self._decode_char_p(mysql_get_server_info(self.conn)) */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Connection *)((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->__pyx_vtab)->_check_closed(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Connection *)__pyx_v_self->__pyx_vtab)->_check_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":295 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":295 * cdef const_char *info * self._check_closed() * self.charset # <<<<<<<<<<<<<< * return self._decode_char_p(mysql_get_server_info(self.conn)) * */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__charset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__charset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":296 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":296 * self._check_closed() * self.charset * return self._decode_char_p(mysql_get_server_info(self.conn)) # <<<<<<<<<<<<<< @@ -7078,7 +7755,7 @@ * property ssl_cipher: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = ((struct __pyx_vtabstruct_6oursql_Connection *)((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->__pyx_vtab)->_decode_char_p(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self), mysql_get_server_info(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = ((struct __pyx_vtabstruct_6oursql_Connection *)__pyx_v_self->__pyx_vtab)->_decode_char_p(__pyx_v_self, mysql_get_server_info(__pyx_v_self->conn)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -7096,7 +7773,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":299 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10Connection_10ssl_cipher_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_10Connection_10ssl_cipher_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10Connection_10ssl_cipher___get__(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":299 * * property ssl_cipher: * def __get__(self): # <<<<<<<<<<<<<< @@ -7104,8 +7792,7 @@ * self._check_closed() */ -static PyObject *__pyx_pf_6oursql_10Connection_10ssl_cipher___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_10Connection_10ssl_cipher___get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_10Connection_10ssl_cipher___get__(struct __pyx_obj_6oursql_Connection *__pyx_v_self) { const char *__pyx_v_res; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -7115,37 +7802,37 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":301 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":301 * def __get__(self): * cdef const_char *res * self._check_closed() # <<<<<<<<<<<<<< * res = mysql_get_ssl_cipher(self.conn) * if not res: */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Connection *)((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->__pyx_vtab)->_check_closed(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Connection *)__pyx_v_self->__pyx_vtab)->_check_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":302 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":302 * cdef const_char *res * self._check_closed() * res = mysql_get_ssl_cipher(self.conn) # <<<<<<<<<<<<<< * if not res: * return None */ - __pyx_v_res = mysql_get_ssl_cipher(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn); + __pyx_v_res = mysql_get_ssl_cipher(__pyx_v_self->conn); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":303 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":303 * self._check_closed() * res = mysql_get_ssl_cipher(self.conn) * if not res: # <<<<<<<<<<<<<< * return None * self.charset */ - __pyx_t_2 = (!(__pyx_v_res != 0)); + __pyx_t_2 = ((!(__pyx_v_res != 0)) != 0); if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":304 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":304 * res = mysql_get_ssl_cipher(self.conn) * if not res: * return None # <<<<<<<<<<<<<< @@ -7156,22 +7843,22 @@ __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; - goto __pyx_L5; + goto __pyx_L3; } - __pyx_L5:; + __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":305 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":305 * if not res: * return None * self.charset # <<<<<<<<<<<<<< * return self._decode_char_p(res) * */ - __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__charset); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__charset); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":306 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":306 * return None * self.charset * return self._decode_char_p(res) # <<<<<<<<<<<<<< @@ -7179,7 +7866,7 @@ * # Unless someone is monkeying around with calling __enter__ and __exit__ */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = ((struct __pyx_vtabstruct_6oursql_Connection *)((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->__pyx_vtab)->_decode_char_p(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self), __pyx_v_res); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = ((struct __pyx_vtabstruct_6oursql_Connection *)__pyx_v_self->__pyx_vtab)->_decode_char_p(__pyx_v_self, __pyx_v_res); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -7197,7 +7884,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":310 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10Connection_19__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6oursql_10Connection_19__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10Connection_18__enter__(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":310 * # Unless someone is monkeying around with calling __enter__ and __exit__ * # manually, this approach is the simplest. Yaaay mostly-reentrant code. * def __enter__(self): # <<<<<<<<<<<<<< @@ -7205,8 +7903,7 @@ * self._context_cursors.append(curs) */ -static PyObject *__pyx_pf_6oursql_10Connection_9__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pf_6oursql_10Connection_9__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_6oursql_10Connection_18__enter__(struct __pyx_obj_6oursql_Connection *__pyx_v_self) { PyObject *__pyx_v_curs = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -7215,16 +7912,16 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__enter__"); + __Pyx_RefNannySetupContext("__enter__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":311 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":311 * # manually, this approach is the simplest. Yaaay mostly-reentrant code. * def __enter__(self): * curs = self.cursor() # <<<<<<<<<<<<<< * self._context_cursors.append(curs) * return curs.__enter__() */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__cursor); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__cursor); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 311; __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[2]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -7232,18 +7929,18 @@ __pyx_v_curs = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":312 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":312 * def __enter__(self): * curs = self.cursor() * self._context_cursors.append(curs) # <<<<<<<<<<<<<< * return curs.__enter__() * */ - __pyx_t_2 = __Pyx_PyObject_Append(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->_context_cursors, __pyx_v_curs); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_self->_context_cursors, __pyx_v_curs); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":313 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":313 * curs = self.cursor() * self._context_cursors.append(curs) * return curs.__enter__() # <<<<<<<<<<<<<< @@ -7251,7 +7948,7 @@ * def __exit__(self, exc, value, tb): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyObject_GetAttr(__pyx_v_curs, __pyx_n_s____enter__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_curs, __pyx_n_s____enter__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); @@ -7274,35 +7971,25 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":315 - * return curs.__enter__() - * - * def __exit__(self, exc, value, tb): # <<<<<<<<<<<<<< - * curs = self._context_cursors.pop() - * curs.__exit__(exc, value, tb) - */ - -static PyObject *__pyx_pf_6oursql_10Connection_10__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pf_6oursql_10Connection_10__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10Connection_21__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6oursql_10Connection_21__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_exc = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_v_tb = 0; - PyObject *__pyx_v_curs = 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; - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__exc,&__pyx_n_s__value,&__pyx_n_s__tb,0}; - __Pyx_RefNannySetupContext("__exit__"); + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0); { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__exc,&__pyx_n_s__value,&__pyx_n_s__tb,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; - switch (PyTuple_GET_SIZE(__pyx_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); @@ -7310,26 +7997,23 @@ default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); - switch (PyTuple_GET_SIZE(__pyx_args)) { + switch (pos_args) { case 0: - values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__exc); - if (likely(values[0])) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__exc)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: - values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value); - if (likely(values[1])) kw_args--; + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: - values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tb); - if (likely(values[2])) kw_args--; + if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tb)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__exit__") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -7350,30 +8034,54 @@ __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6oursql_10Connection_20__exit__(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self), __pyx_v_exc, __pyx_v_value, __pyx_v_tb); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":315 + * return curs.__enter__() + * + * def __exit__(self, exc, value, tb): # <<<<<<<<<<<<<< + * curs = self._context_cursors.pop() + * curs.__exit__(exc, value, tb) + */ + +static PyObject *__pyx_pf_6oursql_10Connection_20__exit__(struct __pyx_obj_6oursql_Connection *__pyx_v_self, PyObject *__pyx_v_exc, PyObject *__pyx_v_value, PyObject *__pyx_v_tb) { + PyObject *__pyx_v_curs = 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("__exit__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":316 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":316 * * def __exit__(self, exc, value, tb): * curs = self._context_cursors.pop() # <<<<<<<<<<<<<< * curs.__exit__(exc, value, tb) * */ - __pyx_t_1 = __Pyx_PyObject_Pop(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->_context_cursors); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Pop(__pyx_v_self->_context_cursors); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_curs = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":317 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":317 * def __exit__(self, exc, value, tb): * curs = self._context_cursors.pop() * curs.__exit__(exc, value, tb) # <<<<<<<<<<<<<< * * # FML. */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_curs, __pyx_n_s____exit__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_curs, __pyx_n_s____exit__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_exc); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_exc); __Pyx_GIVEREF(__pyx_v_exc); @@ -7404,7 +8112,19 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":320 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10Connection_23_escape_string(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static char __pyx_doc_6oursql_10Connection_22_escape_string[] = "_escape_string(value) -> str.\n \n A wrapper around mysql_real_escape_string. Takes a bytestring in and \n produces a bytestring out. Please do not every use this unless mysql\n refuses to parameterize a query; oursql has good support for \n parameterization which also works consistently with unicode.\n "; +static PyObject *__pyx_pw_6oursql_10Connection_23_escape_string(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_escape_string (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10Connection_22_escape_string(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":320 * * # FML. * def _escape_string(self, value): # <<<<<<<<<<<<<< @@ -7412,18 +8132,16 @@ * */ -static PyObject *__pyx_pf_6oursql_10Connection_11_escape_string(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ -static char __pyx_doc_6oursql_10Connection_11_escape_string[] = "_escape_string(value) -> str.\n \n A wrapper around mysql_real_escape_string. Takes a bytestring in and \n produces a bytestring out. Please do not every use this unless mysql\n refuses to parameterize a query; oursql has good support for \n parameterization which also works consistently with unicode.\n "; -static PyObject *__pyx_pf_6oursql_10Connection_11_escape_string(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { +static PyObject *__pyx_pf_6oursql_10Connection_22_escape_string(struct __pyx_obj_6oursql_Connection *__pyx_v_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_string"); + __Pyx_RefNannySetupContext("_escape_string", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":328 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":328 * parameterization which also works consistently with unicode. * """ * return _oursqlx_escape_string(self.conn, value) # <<<<<<<<<<<<<< @@ -7431,7 +8149,7 @@ * def _escape_unicode_string(self, value): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = _oursqlx_escape_string(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->conn, __pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = _oursqlx_escape_string(__pyx_v_self->conn, __pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -7449,7 +8167,19 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":330 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10Connection_25_escape_unicode_string(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static char __pyx_doc_6oursql_10Connection_24_escape_unicode_string[] = "_escape_unicode_stirng(value) -> unicode.\n \n _escape_string that takes unicode in and produces unicode out, using\n the connection's charset. As with _escape_string, please do not use \n this function.\n "; +static PyObject *__pyx_pw_6oursql_10Connection_25_escape_unicode_string(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_escape_unicode_string (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10Connection_24_escape_unicode_string(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":330 * return _oursqlx_escape_string(self.conn, value) * * def _escape_unicode_string(self, value): # <<<<<<<<<<<<<< @@ -7457,9 +8187,7 @@ * */ -static PyObject *__pyx_pf_6oursql_10Connection_12_escape_unicode_string(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ -static char __pyx_doc_6oursql_10Connection_12_escape_unicode_string[] = "_escape_unicode_stirng(value) -> unicode.\n \n _escape_string that takes unicode in and produces unicode out, using\n the connection's charset. As with _escape_string, please do not use \n this function.\n "; -static PyObject *__pyx_pf_6oursql_10Connection_12_escape_unicode_string(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { +static PyObject *__pyx_pf_6oursql_10Connection_24_escape_unicode_string(struct __pyx_obj_6oursql_Connection *__pyx_v_self, PyObject *__pyx_v_value) { PyObject *__pyx_v_charset = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -7470,31 +8198,31 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_escape_unicode_string"); + __Pyx_RefNannySetupContext("_escape_unicode_string", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":337 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":337 * this function. * """ * charset = self.charset # <<<<<<<<<<<<<< * return self._escape_string(value.encode(charset)).decode(charset) */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__charset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__charset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_charset = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":338 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":338 * """ * charset = self.charset * return self._escape_string(value.encode(charset)).decode(charset) # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___escape_string); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s___escape_string); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_v_value, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 338; __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[2]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_charset); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_charset); __Pyx_GIVEREF(__pyx_v_charset); @@ -7503,7 +8231,7 @@ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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[2]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; @@ -7511,11 +8239,11 @@ __Pyx_GOTREF(__pyx_t_4); __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_4, __pyx_n_s__decode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__decode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_charset); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_charset); __Pyx_GIVEREF(__pyx_v_charset); @@ -7543,7 +8271,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":73 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10Connection_11use_unicode_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_10Connection_11use_unicode_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10Connection_11use_unicode___get__(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":73 * cdef MYSQL *conn * cdef object _charset, _charset_bytes, _context_cursors * cdef readonly int use_unicode, autoping, raise_on_warnings # <<<<<<<<<<<<<< @@ -7551,17 +8290,16 @@ * */ -static PyObject *__pyx_pf_6oursql_10Connection_11use_unicode___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_10Connection_11use_unicode___get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_10Connection_11use_unicode___get__(struct __pyx_obj_6oursql_Connection *__pyx_v_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("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyInt_FromLong(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->use_unicode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyInt_FromLong(__pyx_v_self->use_unicode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -7579,17 +8317,27 @@ return __pyx_r; } -static PyObject *__pyx_pf_6oursql_10Connection_8autoping___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_10Connection_8autoping___get__(PyObject *__pyx_v_self) { +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10Connection_8autoping_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_10Connection_8autoping_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10Connection_8autoping___get__(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6oursql_10Connection_8autoping___get__(struct __pyx_obj_6oursql_Connection *__pyx_v_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("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyInt_FromLong(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->autoping); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyInt_FromLong(__pyx_v_self->autoping); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -7607,17 +8355,27 @@ return __pyx_r; } -static PyObject *__pyx_pf_6oursql_10Connection_17raise_on_warnings___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_10Connection_17raise_on_warnings___get__(PyObject *__pyx_v_self) { +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10Connection_17raise_on_warnings_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_10Connection_17raise_on_warnings_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10Connection_17raise_on_warnings___get__(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6oursql_10Connection_17raise_on_warnings___get__(struct __pyx_obj_6oursql_Connection *__pyx_v_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("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyInt_FromLong(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->raise_on_warnings); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyInt_FromLong(__pyx_v_self->raise_on_warnings); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -7635,7 +8393,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":74 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10Connection_14default_cursor_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_10Connection_14default_cursor_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10Connection_14default_cursor___get__(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":74 * cdef object _charset, _charset_bytes, _context_cursors * cdef readonly int use_unicode, autoping, raise_on_warnings * cdef public object default_cursor # <<<<<<<<<<<<<< @@ -7643,14 +8412,13 @@ * def __cinit__(self, host=None, user=None, passwd=None, *, db=None, */ -static PyObject *__pyx_pf_6oursql_10Connection_14default_cursor___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_10Connection_14default_cursor___get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_10Connection_14default_cursor___get__(struct __pyx_obj_6oursql_Connection *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->default_cursor); - __pyx_r = ((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->default_cursor; + __Pyx_INCREF(__pyx_v_self->default_cursor); + __pyx_r = __pyx_v_self->default_cursor; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -7660,39 +8428,70 @@ return __pyx_r; } -static int __pyx_pf_6oursql_10Connection_14default_cursor_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ -static int __pyx_pf_6oursql_10Connection_14default_cursor_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { +/* Python wrapper */ +static int __pyx_pw_6oursql_10Connection_14default_cursor_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_6oursql_10Connection_14default_cursor_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10Connection_14default_cursor_2__set__(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6oursql_10Connection_14default_cursor_2__set__(struct __pyx_obj_6oursql_Connection *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__set__"); + __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); - __Pyx_GOTREF(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->default_cursor); - __Pyx_DECREF(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->default_cursor); - ((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->default_cursor = __pyx_v_value; + __Pyx_GOTREF(__pyx_v_self->default_cursor); + __Pyx_DECREF(__pyx_v_self->default_cursor); + __pyx_v_self->default_cursor = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } -static int __pyx_pf_6oursql_10Connection_14default_cursor_2__del__(PyObject *__pyx_v_self); /*proto*/ -static int __pyx_pf_6oursql_10Connection_14default_cursor_2__del__(PyObject *__pyx_v_self) { +/* Python wrapper */ +static int __pyx_pw_6oursql_10Connection_14default_cursor_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_6oursql_10Connection_14default_cursor_5__del__(PyObject *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10Connection_14default_cursor_4__del__(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6oursql_10Connection_14default_cursor_4__del__(struct __pyx_obj_6oursql_Connection *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__del__"); + __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - __Pyx_GOTREF(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->default_cursor); - __Pyx_DECREF(((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->default_cursor); - ((struct __pyx_obj_6oursql_Connection *)__pyx_v_self)->default_cursor = Py_None; + __Pyx_GOTREF(__pyx_v_self->default_cursor); + __Pyx_DECREF(__pyx_v_self->default_cursor); + __pyx_v_self->default_cursor = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":9 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_20_AbstractIterWrapper_1__iter__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_20_AbstractIterWrapper_1__iter__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_20_AbstractIterWrapper___iter__(((struct __pyx_obj_6oursql__AbstractIterWrapper *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":9 * * cdef class _AbstractIterWrapper: * def __iter__(self): # <<<<<<<<<<<<<< @@ -7700,13 +8499,12 @@ * */ -static PyObject *__pyx_pf_6oursql_20_AbstractIterWrapper___iter__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_20_AbstractIterWrapper___iter__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_20_AbstractIterWrapper___iter__(struct __pyx_obj_6oursql__AbstractIterWrapper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__iter__"); + __Pyx_RefNannySetupContext("__iter__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":10 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":10 * cdef class _AbstractIterWrapper: * def __iter__(self): * return self # <<<<<<<<<<<<<< @@ -7714,8 +8512,8 @@ * cdef class _BinaryWhateverMixin: */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_self); - __pyx_r = __pyx_v_self; + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -7725,7 +8523,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":13 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_20_BinaryWhateverMixin_1__next__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_20_BinaryWhateverMixin_1__next__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__next__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_20_BinaryWhateverMixin___next__(((struct __pyx_obj_6oursql__BinaryWhateverMixin *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":13 * * cdef class _BinaryWhateverMixin: * def __next__(self): # <<<<<<<<<<<<<< @@ -7733,8 +8542,7 @@ * return ret */ -static PyObject *__pyx_pf_6oursql_20_BinaryWhateverMixin___next__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_20_BinaryWhateverMixin___next__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_20_BinaryWhateverMixin___next__(struct __pyx_obj_6oursql__BinaryWhateverMixin *__pyx_v_self) { PyObject *__pyx_v_ret = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -7743,29 +8551,29 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__next__"); + __Pyx_RefNannySetupContext("__next__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":14 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":14 * cdef class _BinaryWhateverMixin: * def __next__(self): * ret = super(BinaryFileWrapper, self).next() # <<<<<<<<<<<<<< * return ret * */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__BinaryFileWrapper); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__BinaryFileWrapper); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 14; __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[3]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); - __Pyx_INCREF(__pyx_v_self); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self); - __Pyx_GIVEREF(__pyx_v_self); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_super, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 14; __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__next); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__next); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 14; __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_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -7774,7 +8582,7 @@ __pyx_v_ret = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":15 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":15 * def __next__(self): * ret = super(BinaryFileWrapper, self).next() * return ret # <<<<<<<<<<<<<< @@ -7800,43 +8608,35 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":28 - * cdef object iterobj, nextfunc - * - * def __cinit__(self, iterobj): # <<<<<<<<<<<<<< - * self.iterobj = iter(iterobj) - * self.nextfunc = self.iterobj.next - */ - -static int __pyx_pf_6oursql_11IterWrapper___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_6oursql_11IterWrapper___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +/* Python wrapper */ +static int __pyx_pw_6oursql_11IterWrapper_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6oursql_11IterWrapper_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_iterobj = 0; - int __pyx_r; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__iterobj,0}; - __Pyx_RefNannySetupContext("__cinit__"); + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__iterobj,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; - switch (PyTuple_GET_SIZE(__pyx_args)) { + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { 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 (PyTuple_GET_SIZE(__pyx_args)) { + switch (pos_args) { case 0: - values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__iterobj); - if (likely(values[0])) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__iterobj)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__cinit__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -7853,8 +8653,29 @@ __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6oursql_11IterWrapper___cinit__(((struct __pyx_obj_6oursql_IterWrapper *)__pyx_v_self), __pyx_v_iterobj); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":28 + * cdef object iterobj, nextfunc + * + * def __cinit__(self, iterobj): # <<<<<<<<<<<<<< + * self.iterobj = iter(iterobj) + * self.nextfunc = self.iterobj.next + */ + +static int __pyx_pf_6oursql_11IterWrapper___cinit__(struct __pyx_obj_6oursql_IterWrapper *__pyx_v_self, PyObject *__pyx_v_iterobj) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":29 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":29 * * def __cinit__(self, iterobj): * self.iterobj = iter(iterobj) # <<<<<<<<<<<<<< @@ -7864,24 +8685,24 @@ __pyx_t_1 = PyObject_GetIter(__pyx_v_iterobj); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(((struct __pyx_obj_6oursql_IterWrapper *)__pyx_v_self)->iterobj); - __Pyx_DECREF(((struct __pyx_obj_6oursql_IterWrapper *)__pyx_v_self)->iterobj); - ((struct __pyx_obj_6oursql_IterWrapper *)__pyx_v_self)->iterobj = __pyx_t_1; + __Pyx_GOTREF(__pyx_v_self->iterobj); + __Pyx_DECREF(__pyx_v_self->iterobj); + __pyx_v_self->iterobj = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":30 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":30 * def __cinit__(self, iterobj): * self.iterobj = iter(iterobj) * self.nextfunc = self.iterobj.next # <<<<<<<<<<<<<< * * def __next__(self): */ - __pyx_t_1 = PyObject_GetAttr(((struct __pyx_obj_6oursql_IterWrapper *)__pyx_v_self)->iterobj, __pyx_n_s__next); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->iterobj, __pyx_n_s__next); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(((struct __pyx_obj_6oursql_IterWrapper *)__pyx_v_self)->nextfunc); - __Pyx_DECREF(((struct __pyx_obj_6oursql_IterWrapper *)__pyx_v_self)->nextfunc); - ((struct __pyx_obj_6oursql_IterWrapper *)__pyx_v_self)->nextfunc = __pyx_t_1; + __Pyx_GOTREF(__pyx_v_self->nextfunc); + __Pyx_DECREF(__pyx_v_self->nextfunc); + __pyx_v_self->nextfunc = __pyx_t_1; __pyx_t_1 = 0; __pyx_r = 0; @@ -7895,7 +8716,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":32 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_11IterWrapper_3__next__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_11IterWrapper_3__next__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__next__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_11IterWrapper_2__next__(((struct __pyx_obj_6oursql_IterWrapper *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":32 * self.nextfunc = self.iterobj.next * * def __next__(self): # <<<<<<<<<<<<<< @@ -7903,17 +8735,16 @@ * */ -static PyObject *__pyx_pf_6oursql_11IterWrapper_1__next__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_11IterWrapper_1__next__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_11IterWrapper_2__next__(struct __pyx_obj_6oursql_IterWrapper *__pyx_v_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("__next__"); + __Pyx_RefNannySetupContext("__next__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":33 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":33 * * def __next__(self): * return self.nextfunc() # <<<<<<<<<<<<<< @@ -7921,7 +8752,7 @@ * BinaryIterWrapper = type('BinaryIterWrapper', */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_Call(((struct __pyx_obj_6oursql_IterWrapper *)__pyx_v_self)->nextfunc, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_v_self->nextfunc, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -7939,33 +8770,26 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":59 - * cdef int doclose, done - * - * def __cinit__(self, fileobj, chunksize=8192, bint doclose=False): # <<<<<<<<<<<<<< - * self.fileobj = fileobj - * self.readfunc = fileobj.read - */ - -static int __pyx_pf_6oursql_11FileWrapper___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_6oursql_11FileWrapper___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +/* Python wrapper */ +static int __pyx_pw_6oursql_11FileWrapper_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6oursql_11FileWrapper_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_fileobj = 0; PyObject *__pyx_v_chunksize = 0; int __pyx_v_doclose; - int __pyx_r; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__fileobj,&__pyx_n_s__chunksize,&__pyx_n_s__doclose,0}; - __Pyx_RefNannySetupContext("__cinit__"); + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__fileobj,&__pyx_n_s__chunksize,&__pyx_n_s__doclose,0}; PyObject* values[3] = {0,0,0}; values[1] = ((PyObject *)__pyx_int_8192); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; - switch (PyTuple_GET_SIZE(__pyx_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); @@ -7973,10 +8797,9 @@ default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); - switch (PyTuple_GET_SIZE(__pyx_args)) { + switch (pos_args) { case 0: - values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fileobj); - if (likely(values[0])) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fileobj)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { @@ -7990,7 +8813,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__cinit__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -8006,6 +8829,14 @@ if (values[2]) { __pyx_v_doclose = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_doclose == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { + + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":59 + * cdef int doclose, done + * + * def __cinit__(self, fileobj, chunksize=8192, bint doclose=False): # <<<<<<<<<<<<<< + * self.fileobj = fileobj + * self.readfunc = fileobj.read + */ __pyx_v_doclose = ((int)0); } } @@ -8017,8 +8848,21 @@ __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6oursql_11FileWrapper___cinit__(((struct __pyx_obj_6oursql_FileWrapper *)__pyx_v_self), __pyx_v_fileobj, __pyx_v_chunksize, __pyx_v_doclose); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6oursql_11FileWrapper___cinit__(struct __pyx_obj_6oursql_FileWrapper *__pyx_v_self, PyObject *__pyx_v_fileobj, PyObject *__pyx_v_chunksize, int __pyx_v_doclose) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":60 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":60 * * def __cinit__(self, fileobj, chunksize=8192, bint doclose=False): * self.fileobj = fileobj # <<<<<<<<<<<<<< @@ -8027,26 +8871,26 @@ */ __Pyx_INCREF(__pyx_v_fileobj); __Pyx_GIVEREF(__pyx_v_fileobj); - __Pyx_GOTREF(((struct __pyx_obj_6oursql_FileWrapper *)__pyx_v_self)->fileobj); - __Pyx_DECREF(((struct __pyx_obj_6oursql_FileWrapper *)__pyx_v_self)->fileobj); - ((struct __pyx_obj_6oursql_FileWrapper *)__pyx_v_self)->fileobj = __pyx_v_fileobj; + __Pyx_GOTREF(__pyx_v_self->fileobj); + __Pyx_DECREF(__pyx_v_self->fileobj); + __pyx_v_self->fileobj = __pyx_v_fileobj; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":61 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":61 * def __cinit__(self, fileobj, chunksize=8192, bint doclose=False): * self.fileobj = fileobj * self.readfunc = fileobj.read # <<<<<<<<<<<<<< * self.chunksize = chunksize * self.doclose = doclose */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_fileobj, __pyx_n_s__read); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fileobj, __pyx_n_s__read); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(((struct __pyx_obj_6oursql_FileWrapper *)__pyx_v_self)->readfunc); - __Pyx_DECREF(((struct __pyx_obj_6oursql_FileWrapper *)__pyx_v_self)->readfunc); - ((struct __pyx_obj_6oursql_FileWrapper *)__pyx_v_self)->readfunc = __pyx_t_1; + __Pyx_GOTREF(__pyx_v_self->readfunc); + __Pyx_DECREF(__pyx_v_self->readfunc); + __pyx_v_self->readfunc = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":62 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":62 * self.fileobj = fileobj * self.readfunc = fileobj.read * self.chunksize = chunksize # <<<<<<<<<<<<<< @@ -8055,27 +8899,27 @@ */ __Pyx_INCREF(__pyx_v_chunksize); __Pyx_GIVEREF(__pyx_v_chunksize); - __Pyx_GOTREF(((struct __pyx_obj_6oursql_FileWrapper *)__pyx_v_self)->chunksize); - __Pyx_DECREF(((struct __pyx_obj_6oursql_FileWrapper *)__pyx_v_self)->chunksize); - ((struct __pyx_obj_6oursql_FileWrapper *)__pyx_v_self)->chunksize = __pyx_v_chunksize; + __Pyx_GOTREF(__pyx_v_self->chunksize); + __Pyx_DECREF(__pyx_v_self->chunksize); + __pyx_v_self->chunksize = __pyx_v_chunksize; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":63 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":63 * self.readfunc = fileobj.read * self.chunksize = chunksize * self.doclose = doclose # <<<<<<<<<<<<<< * self.done = False * */ - ((struct __pyx_obj_6oursql_FileWrapper *)__pyx_v_self)->doclose = __pyx_v_doclose; + __pyx_v_self->doclose = __pyx_v_doclose; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":64 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":64 * self.chunksize = chunksize * self.doclose = doclose * self.done = False # <<<<<<<<<<<<<< * * def __next__(self): */ - ((struct __pyx_obj_6oursql_FileWrapper *)__pyx_v_self)->done = 0; + __pyx_v_self->done = 0; __pyx_r = 0; goto __pyx_L0; @@ -8088,7 +8932,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":66 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_11FileWrapper_3__next__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_11FileWrapper_3__next__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__next__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_11FileWrapper_2__next__(((struct __pyx_obj_6oursql_FileWrapper *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":66 * self.done = False * * def __next__(self): # <<<<<<<<<<<<<< @@ -8096,30 +8951,30 @@ * raise StopIteration */ -static PyObject *__pyx_pf_6oursql_11FileWrapper_1__next__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_11FileWrapper_1__next__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_11FileWrapper_2__next__(struct __pyx_obj_6oursql_FileWrapper *__pyx_v_self) { PyObject *__pyx_v_ret = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; + int __pyx_t_1; PyObject *__pyx_t_2 = NULL; - int __pyx_t_3; + PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__next__"); + __Pyx_RefNannySetupContext("__next__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":67 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":67 * * def __next__(self): * if self.done: # <<<<<<<<<<<<<< * raise StopIteration * ret = self.readfunc(self.chunksize) */ - if (((struct __pyx_obj_6oursql_FileWrapper *)__pyx_v_self)->done) { + __pyx_t_1 = (__pyx_v_self->done != 0); + if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":68 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":68 * def __next__(self): * if self.done: * raise StopIteration # <<<<<<<<<<<<<< @@ -8128,75 +8983,76 @@ */ __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L5; + goto __pyx_L3; } - __pyx_L5:; + __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":69 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":69 * if self.done: * raise StopIteration * ret = self.readfunc(self.chunksize) # <<<<<<<<<<<<<< * if not ret: * if self.doclose: */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __Pyx_INCREF(((struct __pyx_obj_6oursql_FileWrapper *)__pyx_v_self)->chunksize); - PyTuple_SET_ITEM(__pyx_t_1, 0, ((struct __pyx_obj_6oursql_FileWrapper *)__pyx_v_self)->chunksize); - __Pyx_GIVEREF(((struct __pyx_obj_6oursql_FileWrapper *)__pyx_v_self)->chunksize); - __pyx_t_2 = PyObject_Call(((struct __pyx_obj_6oursql_FileWrapper *)__pyx_v_self)->readfunc, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_v_ret = __pyx_t_2; - __pyx_t_2 = 0; + __Pyx_INCREF(__pyx_v_self->chunksize); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->chunksize); + __Pyx_GIVEREF(__pyx_v_self->chunksize); + __pyx_t_3 = PyObject_Call(__pyx_v_self->readfunc, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __pyx_v_ret = __pyx_t_3; + __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":70 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":70 * raise StopIteration * ret = self.readfunc(self.chunksize) * if not ret: # <<<<<<<<<<<<<< * if self.doclose: * self.fileobj.close() */ - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_ret); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_4 = (!__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ret); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = ((!__pyx_t_1) != 0); if (__pyx_t_4) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":71 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":71 * ret = self.readfunc(self.chunksize) * if not ret: * if self.doclose: # <<<<<<<<<<<<<< * self.fileobj.close() * self.done = True */ - if (((struct __pyx_obj_6oursql_FileWrapper *)__pyx_v_self)->doclose) { + __pyx_t_4 = (__pyx_v_self->doclose != 0); + if (__pyx_t_4) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":72 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":72 * if not ret: * if self.doclose: * self.fileobj.close() # <<<<<<<<<<<<<< * self.done = True * raise StopIteration */ - __pyx_t_2 = PyObject_GetAttr(((struct __pyx_obj_6oursql_FileWrapper *)__pyx_v_self)->fileobj, __pyx_n_s__close); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->fileobj, __pyx_n_s__close); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L7; + goto __pyx_L5; } - __pyx_L7:; + __pyx_L5:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":73 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":73 * if self.doclose: * self.fileobj.close() * self.done = True # <<<<<<<<<<<<<< * raise StopIteration * return ret */ - ((struct __pyx_obj_6oursql_FileWrapper *)__pyx_v_self)->done = 1; + __pyx_v_self->done = 1; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":74 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":74 * self.fileobj.close() * self.done = True * raise StopIteration # <<<<<<<<<<<<<< @@ -8205,11 +9061,11 @@ */ __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L6; + goto __pyx_L4; } - __pyx_L6:; + __pyx_L4:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":75 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":75 * self.done = True * raise StopIteration * return ret # <<<<<<<<<<<<<< @@ -8224,8 +9080,8 @@ __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("oursql.FileWrapper.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -8235,38 +9091,28 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":101 - * cdef public object warnings - * - * def __cinit__(self, Connection connection not None, # <<<<<<<<<<<<<< - * unsigned long string_limit=0, bint show_table=False, **kwargs): - * self.conn = connection - */ - -static int __pyx_pf_6oursql_10_Statement___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_6oursql_10_Statement___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +/* Python wrapper */ +static int __pyx_pw_6oursql_10_Statement_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6oursql_10_Statement_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_6oursql_Connection *__pyx_v_connection = 0; unsigned long __pyx_v_string_limit; int __pyx_v_show_table; - PyObject *__pyx_v_kwargs = 0; - int __pyx_r; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - my_bool __pyx_t_3; - int __pyx_t_4; + CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__connection,&__pyx_n_s__string_limit,&__pyx_n_s__show_table,0}; - __Pyx_RefNannySetupContext("__cinit__"); + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1; __Pyx_GOTREF(__pyx_v_kwargs); { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__connection,&__pyx_n_s__string_limit,&__pyx_n_s__show_table,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; - switch (PyTuple_GET_SIZE(__pyx_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); @@ -8274,10 +9120,9 @@ default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); - switch (PyTuple_GET_SIZE(__pyx_args)) { + switch (pos_args) { case 0: - values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__connection); - if (likely(values[0])) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__connection)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { @@ -8291,7 +9136,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, PyTuple_GET_SIZE(__pyx_args), "__cinit__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -8312,7 +9157,7 @@ __pyx_v_show_table = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_show_table == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":102 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":102 * * def __cinit__(self, Connection connection not None, * unsigned long string_limit=0, bint show_table=False, **kwargs): # <<<<<<<<<<<<<< @@ -8332,8 +9177,36 @@ return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_connection), __pyx_ptype_6oursql_Connection, 0, "connection", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6oursql_10_Statement___cinit__(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self), __pyx_v_connection, __pyx_v_string_limit, __pyx_v_show_table, __pyx_v_kwargs); + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_kwargs); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":101 + * cdef public object warnings + * + * def __cinit__(self, Connection connection not None, # <<<<<<<<<<<<<< + * unsigned long string_limit=0, bint show_table=False, **kwargs): + * self.conn = connection + */ + +static int __pyx_pf_6oursql_10_Statement___cinit__(struct __pyx_obj_6oursql__Statement *__pyx_v_self, struct __pyx_obj_6oursql_Connection *__pyx_v_connection, unsigned long __pyx_v_string_limit, int __pyx_v_show_table, CYTHON_UNUSED PyObject *__pyx_v_kwargs) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":103 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":103 * def __cinit__(self, Connection connection not None, * unsigned long string_limit=0, bint show_table=False, **kwargs): * self.conn = connection # <<<<<<<<<<<<<< @@ -8342,73 +9215,73 @@ */ __Pyx_INCREF(((PyObject *)__pyx_v_connection)); __Pyx_GIVEREF(((PyObject *)__pyx_v_connection)); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn); - __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn)); - ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn = __pyx_v_connection; + __Pyx_GOTREF(__pyx_v_self->conn); + __Pyx_DECREF(((PyObject *)__pyx_v_self->conn)); + __pyx_v_self->conn = __pyx_v_connection; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":104 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":104 * unsigned long string_limit=0, bint show_table=False, **kwargs): * self.conn = connection * self.stmt = mysql_stmt_init(self.conn.conn) # <<<<<<<<<<<<<< * if not self.stmt: * raise MemoryError('alloc of statement failed') */ - ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->stmt = mysql_stmt_init(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn->conn); + __pyx_v_self->stmt = mysql_stmt_init(__pyx_v_self->conn->conn); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":105 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":105 * self.conn = connection * self.stmt = mysql_stmt_init(self.conn.conn) * if not self.stmt: # <<<<<<<<<<<<<< * raise MemoryError('alloc of statement failed') * self.string_limit = string_limit */ - __pyx_t_1 = (!(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->stmt != 0)); + __pyx_t_1 = ((!(__pyx_v_self->stmt != 0)) != 0); if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":106 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":106 * self.stmt = mysql_stmt_init(self.conn.conn) * if not self.stmt: * raise MemoryError('alloc of statement failed') # <<<<<<<<<<<<<< * self.string_limit = string_limit * self.show_table = show_table */ - __pyx_t_2 = PyObject_Call(__pyx_builtin_MemoryError, ((PyObject *)__pyx_k_tuple_19), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_builtin_MemoryError, ((PyObject *)__pyx_k_tuple_25), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[3]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L6; + goto __pyx_L3; } - __pyx_L6:; + __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":107 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":107 * if not self.stmt: * raise MemoryError('alloc of statement failed') * self.string_limit = string_limit # <<<<<<<<<<<<<< * self.show_table = show_table * self.result_data = NULL */ - ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->string_limit = __pyx_v_string_limit; + __pyx_v_self->string_limit = __pyx_v_string_limit; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":108 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":108 * raise MemoryError('alloc of statement failed') * self.string_limit = string_limit * self.show_table = show_table # <<<<<<<<<<<<<< * self.result_data = NULL * self.warnings = [] */ - ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->show_table = __pyx_v_show_table; + __pyx_v_self->show_table = __pyx_v_show_table; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":109 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":109 * self.string_limit = string_limit * self.show_table = show_table * self.result_data = NULL # <<<<<<<<<<<<<< * self.warnings = [] * self.buffered = self.data_waiting = self.exhausted = False */ - ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->result_data = NULL; + __pyx_v_self->result_data = NULL; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":110 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":110 * self.show_table = show_table * self.result_data = NULL * self.warnings = [] # <<<<<<<<<<<<<< @@ -8416,45 +9289,45 @@ * if _oursqlx_init_stmt_cursor(self.stmt, &self.cursor_type): */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->warnings); - __Pyx_DECREF(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->warnings); - ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->warnings = ((PyObject *)__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->warnings); + __Pyx_DECREF(__pyx_v_self->warnings); + __pyx_v_self->warnings = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":111 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":111 * self.result_data = NULL * self.warnings = [] * self.buffered = self.data_waiting = self.exhausted = False # <<<<<<<<<<<<<< * if _oursqlx_init_stmt_cursor(self.stmt, &self.cursor_type): * self._raise_error() */ - ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->buffered = 0; - ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->data_waiting = 0; - ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->exhausted = 0; + __pyx_v_self->buffered = 0; + __pyx_v_self->data_waiting = 0; + __pyx_v_self->exhausted = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":112 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":112 * self.warnings = [] * self.buffered = self.data_waiting = self.exhausted = False * if _oursqlx_init_stmt_cursor(self.stmt, &self.cursor_type): # <<<<<<<<<<<<<< * self._raise_error() * */ - __pyx_t_3 = _oursqlx_init_stmt_cursor(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->stmt, (&((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->cursor_type)); - if (__pyx_t_3) { + __pyx_t_1 = (_oursqlx_init_stmt_cursor(__pyx_v_self->stmt, (&__pyx_v_self->cursor_type)) != 0); + if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":113 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":113 * self.buffered = self.data_waiting = self.exhausted = False * if _oursqlx_init_stmt_cursor(self.stmt, &self.cursor_type): * self._raise_error() # <<<<<<<<<<<<<< * * def __dealloc__(self): */ - __pyx_t_4 = ((struct __pyx_vtabstruct_6oursql__Statement *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->__pyx_vtab)->_raise_error(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L7; + __pyx_t_3 = ((struct __pyx_vtabstruct_6oursql__Statement *)__pyx_v_self->__pyx_vtab)->_raise_error(__pyx_v_self); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L4; } - __pyx_L7:; + __pyx_L4:; __pyx_r = 0; goto __pyx_L0; @@ -8463,12 +9336,20 @@ __Pyx_AddTraceback("oursql._Statement.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":115 +/* Python wrapper */ +static void __pyx_pw_6oursql_10_Statement_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_6oursql_10_Statement_3__dealloc__(PyObject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_pf_6oursql_10_Statement_2__dealloc__(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":115 * self._raise_error() * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -8476,47 +9357,46 @@ * PyMem_Free(self.result_data) */ -static void __pyx_pf_6oursql_10_Statement_1__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pf_6oursql_10_Statement_1__dealloc__(PyObject *__pyx_v_self) { +static void __pyx_pf_6oursql_10_Statement_2__dealloc__(struct __pyx_obj_6oursql__Statement *__pyx_v_self) { __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("__dealloc__"); + __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":116 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":116 * * def __dealloc__(self): * self.close() # <<<<<<<<<<<<<< * PyMem_Free(self.result_data) * PyMem_Free(self.bind) */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 116; __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[3]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":117 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":117 * def __dealloc__(self): * self.close() * PyMem_Free(self.result_data) # <<<<<<<<<<<<<< * PyMem_Free(self.bind) * */ - PyMem_Free(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->result_data); + PyMem_Free(__pyx_v_self->result_data); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":118 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":118 * self.close() * PyMem_Free(self.result_data) * PyMem_Free(self.bind) # <<<<<<<<<<<<<< * * def close(self): */ - PyMem_Free(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->bind); + PyMem_Free(__pyx_v_self->bind); goto __pyx_L0; __pyx_L1_error:; @@ -8527,7 +9407,18 @@ __Pyx_RefNannyFinishContext(); } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":120 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10_Statement_5close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6oursql_10_Statement_5close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("close (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_Statement_4close(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":120 * PyMem_Free(self.bind) * * def close(self): # <<<<<<<<<<<<<< @@ -8535,43 +9426,42 @@ * mysql_stmt_close(self.stmt) */ -static PyObject *__pyx_pf_6oursql_10_Statement_2close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pf_6oursql_10_Statement_2close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_6oursql_10_Statement_4close(struct __pyx_obj_6oursql__Statement *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; - __Pyx_RefNannySetupContext("close"); + __Pyx_RefNannySetupContext("close", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":121 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":121 * * def close(self): * if self.stmt: # <<<<<<<<<<<<<< * mysql_stmt_close(self.stmt) * self.stmt = NULL */ - __pyx_t_1 = (((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->stmt != 0); + __pyx_t_1 = (__pyx_v_self->stmt != 0); if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":122 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":122 * def close(self): * if self.stmt: * mysql_stmt_close(self.stmt) # <<<<<<<<<<<<<< * self.stmt = NULL * */ - mysql_stmt_close(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->stmt); + mysql_stmt_close(__pyx_v_self->stmt); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":123 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":123 * if self.stmt: * mysql_stmt_close(self.stmt) * self.stmt = NULL # <<<<<<<<<<<<<< * * cdef int _raise_error(self) except -1: */ - ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->stmt = NULL; - goto __pyx_L5; + __pyx_v_self->stmt = NULL; + goto __pyx_L3; } - __pyx_L5:; + __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); @@ -8579,7 +9469,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":125 +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":125 * self.stmt = NULL * * cdef int _raise_error(self) except -1: # <<<<<<<<<<<<<< @@ -8598,9 +9488,9 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_raise_error"); + __Pyx_RefNannySetupContext("_raise_error", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":126 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":126 * * cdef int _raise_error(self) except -1: * cdef int err = mysql_stmt_errno(self.stmt) # <<<<<<<<<<<<<< @@ -8609,30 +9499,30 @@ */ __pyx_v_err = mysql_stmt_errno(__pyx_v_self->stmt); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":129 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":129 * # effect a sideeffect by looking up the charset, required for * # _decode_char_p * self.conn.charset # <<<<<<<<<<<<<< * raise _exception_from_errno(err)( * self.conn._decode_char_p(mysql_stmt_error(self.stmt)), err) */ - __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self->conn), __pyx_n_s__charset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->conn), __pyx_n_s__charset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":130 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":130 * # _decode_char_p * self.conn.charset * raise _exception_from_errno(err)( # <<<<<<<<<<<<<< * self.conn._decode_char_p(mysql_stmt_error(self.stmt)), err) * */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromLong(__pyx_v_err); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __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[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; @@ -8641,7 +9531,7 @@ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":131 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":131 * self.conn.charset * raise _exception_from_errno(err)( * self.conn._decode_char_p(mysql_stmt_error(self.stmt)), err) # <<<<<<<<<<<<<< @@ -8653,7 +9543,7 @@ __pyx_t_1 = PyInt_FromLong(__pyx_v_err); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); @@ -8682,7 +9572,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":133 +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":133 * self.conn._decode_char_p(mysql_stmt_error(self.stmt)), err) * * cdef int _check_closed(self) except -1: # <<<<<<<<<<<<<< @@ -8699,19 +9589,19 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_check_closed"); + __Pyx_RefNannySetupContext("_check_closed", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":134 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":134 * * cdef int _check_closed(self) except -1: * if not self.conn.conn: # <<<<<<<<<<<<<< * if self.stmt: * self.close() */ - __pyx_t_1 = (!(__pyx_v_self->conn->conn != 0)); + __pyx_t_1 = ((!(__pyx_v_self->conn->conn != 0)) != 0); if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":135 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":135 * cdef int _check_closed(self) except -1: * if not self.conn.conn: * if self.stmt: # <<<<<<<<<<<<<< @@ -8721,14 +9611,14 @@ __pyx_t_1 = (__pyx_v_self->stmt != 0); if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":136 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":136 * if not self.conn.conn: * if self.stmt: * self.close() # <<<<<<<<<<<<<< * raise ProgrammingError('connection closed') * if not self.stmt: */ - __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); @@ -8738,16 +9628,16 @@ } __pyx_L4:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":137 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":137 * if self.stmt: * self.close() * raise ProgrammingError('connection closed') # <<<<<<<<<<<<<< * if not self.stmt: * raise ProgrammingError('statement closed') */ - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_20), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_26), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); @@ -8757,26 +9647,26 @@ } __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":138 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":138 * self.close() * raise ProgrammingError('connection closed') * if not self.stmt: # <<<<<<<<<<<<<< * raise ProgrammingError('statement closed') * */ - __pyx_t_1 = (!(__pyx_v_self->stmt != 0)); + __pyx_t_1 = ((!(__pyx_v_self->stmt != 0)) != 0); if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":139 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":139 * raise ProgrammingError('connection closed') * if not self.stmt: * raise ProgrammingError('statement closed') # <<<<<<<<<<<<<< * * property string_limit: */ - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_22), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_28), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); @@ -8798,7 +9688,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":142 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10_Statement_12string_limit_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_10_Statement_12string_limit_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_Statement_12string_limit___get__(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":142 * * property string_limit: * def __get__(self): # <<<<<<<<<<<<<< @@ -8806,17 +9707,16 @@ * */ -static PyObject *__pyx_pf_6oursql_10_Statement_12string_limit___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_10_Statement_12string_limit___get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_10_Statement_12string_limit___get__(struct __pyx_obj_6oursql__Statement *__pyx_v_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("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":143 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":143 * property string_limit: * def __get__(self): * return self.string_limit # <<<<<<<<<<<<<< @@ -8824,7 +9724,7 @@ * def __set__(self, unsigned long value): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyLong_FromUnsignedLong(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->string_limit); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyLong_FromUnsignedLong(__pyx_v_self->string_limit); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -8842,7 +9742,31 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":145 +/* Python wrapper */ +static int __pyx_pw_6oursql_10_Statement_12string_limit_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/ +static int __pyx_pw_6oursql_10_Statement_12string_limit_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) { + unsigned long __pyx_v_value; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + assert(__pyx_arg_value); { + __pyx_v_value = __Pyx_PyInt_AsUnsignedLong(__pyx_arg_value); if (unlikely((__pyx_v_value == (unsigned long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("oursql._Statement.string_limit.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6oursql_10_Statement_12string_limit_2__set__(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self), ((unsigned long)__pyx_v_value)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":145 * return self.string_limit * * def __set__(self, unsigned long value): # <<<<<<<<<<<<<< @@ -8850,9 +9774,7 @@ * raise ValueError('string limit must be >= 0') */ -static int __pyx_pf_6oursql_10_Statement_12string_limit_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/ -static int __pyx_pf_6oursql_10_Statement_12string_limit_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) { - unsigned long __pyx_v_value; +static int __pyx_pf_6oursql_10_Statement_12string_limit_2__set__(struct __pyx_obj_6oursql__Statement *__pyx_v_self, unsigned long __pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -8860,51 +9782,42 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__set__"); - assert(__pyx_arg_value); { - __pyx_v_value = __Pyx_PyInt_AsUnsignedLong(__pyx_arg_value); if (unlikely((__pyx_v_value == (unsigned long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L3_error:; - __Pyx_AddTraceback("oursql._Statement.string_limit.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return -1; - __pyx_L4_argument_unpacking_done:; + __Pyx_RefNannySetupContext("__set__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":146 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":146 * * def __set__(self, unsigned long value): * if value < 0: # <<<<<<<<<<<<<< * raise ValueError('string limit must be >= 0') * self.string_limit = value */ - __pyx_t_1 = (__pyx_v_value < 0); + __pyx_t_1 = ((__pyx_v_value < 0) != 0); if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":147 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":147 * def __set__(self, unsigned long value): * if value < 0: * raise ValueError('string limit must be >= 0') # <<<<<<<<<<<<<< * self.string_limit = value * */ - __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_24), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_30), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[3]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L5; + goto __pyx_L3; } - __pyx_L5:; + __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":148 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":148 * if value < 0: * raise ValueError('string limit must be >= 0') * self.string_limit = value # <<<<<<<<<<<<<< * * def prepare(self, statement): */ - ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->string_limit = __pyx_v_value; + __pyx_v_self->string_limit = __pyx_v_value; __pyx_r = 0; goto __pyx_L0; @@ -8917,7 +9830,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":150 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10_Statement_7prepare(PyObject *__pyx_v_self, PyObject *__pyx_v_statement); /*proto*/ +static PyObject *__pyx_pw_6oursql_10_Statement_7prepare(PyObject *__pyx_v_self, PyObject *__pyx_v_statement) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("prepare (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_Statement_6prepare(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self), ((PyObject *)__pyx_v_statement)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":150 * self.string_limit = value * * def prepare(self, statement): # <<<<<<<<<<<<<< @@ -8925,78 +9849,79 @@ * cdef Py_ssize_t bufsize */ -static PyObject *__pyx_pf_6oursql_10_Statement_3prepare(PyObject *__pyx_v_self, PyObject *__pyx_v_statement); /*proto*/ -static PyObject *__pyx_pf_6oursql_10_Statement_3prepare(PyObject *__pyx_v_self, PyObject *__pyx_v_statement) { +static PyObject *__pyx_pf_6oursql_10_Statement_6prepare(struct __pyx_obj_6oursql__Statement *__pyx_v_self, PyObject *__pyx_v_statement) { char *__pyx_v_buf; Py_ssize_t __pyx_v_bufsize; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; + int __pyx_t_2; PyObject *__pyx_t_3 = NULL; - struct __pyx_opt_args_6oursql_bytes_maybe_from_encoding __pyx_t_4; + PyObject *__pyx_t_4 = NULL; + struct __pyx_opt_args_6oursql_bytes_maybe_from_encoding __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("prepare"); + __Pyx_RefNannySetupContext("prepare", 0); __Pyx_INCREF(__pyx_v_statement); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":153 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":153 * cdef char *buf * cdef Py_ssize_t bufsize * self._check_closed() # <<<<<<<<<<<<<< * if self.data_waiting: * raise ProgrammingError('binding this query would cause rows to ' */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->__pyx_vtab)->_check_closed(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)__pyx_v_self->__pyx_vtab)->_check_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":154 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":154 * cdef Py_ssize_t bufsize * self._check_closed() * if self.data_waiting: # <<<<<<<<<<<<<< * raise ProgrammingError('binding this query would cause rows to ' * 'become unfetchable') */ - if (((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->data_waiting) { + __pyx_t_2 = (__pyx_v_self->data_waiting != 0); + if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":155 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":155 * self._check_closed() * if self.data_waiting: * raise ProgrammingError('binding this query would cause rows to ' # <<<<<<<<<<<<<< * 'become unfetchable') * statement = bytes_maybe_from_encoding( */ - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_26), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_32), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[3]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L5; + goto __pyx_L3; } - __pyx_L5:; + __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":158 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":158 * 'become unfetchable') * statement = bytes_maybe_from_encoding( * statement, self.conn.charset, False) # <<<<<<<<<<<<<< * PyBytes_AsStringAndSize(statement, &buf, &bufsize) * if mysql_stmt_prepare(self.stmt, buf, bufsize): */ - __pyx_t_3 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn), __pyx_n_s__charset); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->conn), __pyx_n_s__charset); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5.__pyx_n = 1; + __pyx_t_5.allow_none = 0; + __pyx_t_3 = __pyx_f_6oursql_bytes_maybe_from_encoding(__pyx_v_statement, __pyx_t_4, &__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4.__pyx_n = 1; - __pyx_t_4.allow_none = 0; - __pyx_t_2 = __pyx_f_6oursql_bytes_maybe_from_encoding(__pyx_v_statement, __pyx_t_3, &__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 157; __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_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_v_statement); - __pyx_v_statement = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_v_statement = __pyx_t_3; + __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":159 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":159 * statement = bytes_maybe_from_encoding( * statement, self.conn.charset, False) * PyBytes_AsStringAndSize(statement, &buf, &bufsize) # <<<<<<<<<<<<<< @@ -9005,42 +9930,42 @@ */ __pyx_t_1 = PyBytes_AsStringAndSize(__pyx_v_statement, (&__pyx_v_buf), (&__pyx_v_bufsize)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":160 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":160 * statement, self.conn.charset, False) * PyBytes_AsStringAndSize(statement, &buf, &bufsize) * if mysql_stmt_prepare(self.stmt, buf, bufsize): # <<<<<<<<<<<<<< * self._raise_error() * self._alloc_buffer() */ - __pyx_t_1 = __pyx_f_6oursql_mysql_stmt_prepare(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->stmt, __pyx_v_buf, __pyx_v_bufsize); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_f_6oursql_mysql_stmt_prepare(__pyx_v_self->stmt, __pyx_v_buf, __pyx_v_bufsize) != 0); + if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":161 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":161 * PyBytes_AsStringAndSize(statement, &buf, &bufsize) * if mysql_stmt_prepare(self.stmt, buf, bufsize): * self._raise_error() # <<<<<<<<<<<<<< * self._alloc_buffer() * */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->__pyx_vtab)->_raise_error(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L6; + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)__pyx_v_self->__pyx_vtab)->_raise_error(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L4; } - __pyx_L6:; + __pyx_L4:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":162 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":162 * if mysql_stmt_prepare(self.stmt, buf, bufsize): * self._raise_error() * self._alloc_buffer() # <<<<<<<<<<<<<< * * cdef int _alloc_buffer(self) except -1: */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->__pyx_vtab)->_alloc_buffer(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)__pyx_v_self->__pyx_vtab)->_alloc_buffer(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("oursql._Statement.prepare", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -9050,7 +9975,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":164 +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":164 * self._alloc_buffer() * * cdef int _alloc_buffer(self) except -1: # <<<<<<<<<<<<<< @@ -9077,9 +10002,9 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_alloc_buffer"); + __Pyx_RefNannySetupContext("_alloc_buffer", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":166 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":166 * cdef int _alloc_buffer(self) except -1: * cdef MYSQL_RES *res * cdef MYSQL_BIND *bind = NULL # <<<<<<<<<<<<<< @@ -9088,7 +10013,7 @@ */ __pyx_v_bind = NULL; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":167 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":167 * cdef MYSQL_RES *res * cdef MYSQL_BIND *bind = NULL * cdef column_output *result_data = NULL # <<<<<<<<<<<<<< @@ -9097,7 +10022,7 @@ */ __pyx_v_result_data = NULL; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":168 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":168 * cdef MYSQL_BIND *bind = NULL * cdef column_output *result_data = NULL * res = mysql_stmt_result_metadata(self.stmt) # <<<<<<<<<<<<<< @@ -9106,7 +10031,7 @@ */ __pyx_v_res = mysql_stmt_result_metadata(__pyx_v_self->stmt); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":179 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":179 * # So! Since we have no reason not to, we free any previously bound * # buffers. * PyMem_Free(self.result_data) # <<<<<<<<<<<<<< @@ -9115,7 +10040,7 @@ */ PyMem_Free(__pyx_v_self->result_data); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":180 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":180 * # buffers. * PyMem_Free(self.result_data) * self.result_data = NULL # <<<<<<<<<<<<<< @@ -9124,17 +10049,17 @@ */ __pyx_v_self->result_data = NULL; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":182 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":182 * self.result_data = NULL * # But if we don't need any buffers, we're done anyway. * if not res: # <<<<<<<<<<<<<< * return 0 * */ - __pyx_t_1 = (!(__pyx_v_res != 0)); + __pyx_t_1 = ((!(__pyx_v_res != 0)) != 0); if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":183 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":183 * # But if we don't need any buffers, we're done anyway. * if not res: * return 0 # <<<<<<<<<<<<<< @@ -9147,7 +10072,7 @@ } __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":185 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":185 * return 0 * * try: # <<<<<<<<<<<<<< @@ -9162,7 +10087,7 @@ __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":187 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":187 * try: * # Otherwise, we (try to) allocate the result buffers. * fields = mysql_num_fields(res) # <<<<<<<<<<<<<< @@ -9174,7 +10099,7 @@ __pyx_v_fields = __pyx_t_5; __pyx_t_5 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":188 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":188 * # Otherwise, we (try to) allocate the result buffers. * fields = mysql_num_fields(res) * bind = PyMem_Malloc(sizeof(MYSQL_BIND) * fields) # <<<<<<<<<<<<<< @@ -9190,24 +10115,24 @@ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_bind = ((MYSQL_BIND *)PyMem_Malloc(__pyx_t_7)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":189 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":189 * fields = mysql_num_fields(res) * bind = PyMem_Malloc(sizeof(MYSQL_BIND) * fields) * if not bind: # <<<<<<<<<<<<<< * raise MemoryError('alloc of result bind structure failed') * memset(bind, 0, sizeof(MYSQL_BIND) * fields) */ - __pyx_t_1 = (!(__pyx_v_bind != 0)); + __pyx_t_1 = ((!(__pyx_v_bind != 0)) != 0); if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":190 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":190 * bind = PyMem_Malloc(sizeof(MYSQL_BIND) * fields) * if not bind: * raise MemoryError('alloc of result bind structure failed') # <<<<<<<<<<<<<< * memset(bind, 0, sizeof(MYSQL_BIND) * fields) * result_data = PyMem_Malloc( */ - __pyx_t_6 = PyObject_Call(__pyx_builtin_MemoryError, ((PyObject *)__pyx_k_tuple_28), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L7_error;} + __pyx_t_6 = PyObject_Call(__pyx_builtin_MemoryError, ((PyObject *)__pyx_k_tuple_34), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -9216,7 +10141,7 @@ } __pyx_L15:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":191 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":191 * if not bind: * raise MemoryError('alloc of result bind structure failed') * memset(bind, 0, sizeof(MYSQL_BIND) * fields) # <<<<<<<<<<<<<< @@ -9232,7 +10157,7 @@ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; memset(__pyx_v_bind, 0, __pyx_t_7); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":193 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":193 * memset(bind, 0, sizeof(MYSQL_BIND) * fields) * result_data = PyMem_Malloc( * sizeof(column_output) * fields) # <<<<<<<<<<<<<< @@ -9248,24 +10173,24 @@ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_result_data = ((struct __pyx_t_6oursql_column_output *)PyMem_Malloc(__pyx_t_7)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":194 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":194 * result_data = PyMem_Malloc( * sizeof(column_output) * fields) * if not result_data: # <<<<<<<<<<<<<< * raise MemoryError('alloc of result buffers failed') * memset(result_data, 0, sizeof(column_output) * fields) */ - __pyx_t_1 = (!(__pyx_v_result_data != 0)); + __pyx_t_1 = ((!(__pyx_v_result_data != 0)) != 0); if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":195 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":195 * sizeof(column_output) * fields) * if not result_data: * raise MemoryError('alloc of result buffers failed') # <<<<<<<<<<<<<< * memset(result_data, 0, sizeof(column_output) * fields) * except: */ - __pyx_t_6 = PyObject_Call(__pyx_builtin_MemoryError, ((PyObject *)__pyx_k_tuple_30), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L7_error;} + __pyx_t_6 = PyObject_Call(__pyx_builtin_MemoryError, ((PyObject *)__pyx_k_tuple_36), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -9274,7 +10199,7 @@ } __pyx_L16:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":196 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":196 * if not result_data: * raise MemoryError('alloc of result buffers failed') * memset(result_data, 0, sizeof(column_output) * fields) # <<<<<<<<<<<<<< @@ -9292,7 +10217,7 @@ } /*else:*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":205 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":205 * else: * # And we only want to save the buffers if there was no failure. * self.bind = bind # <<<<<<<<<<<<<< @@ -9301,7 +10226,7 @@ */ __pyx_v_self->bind = __pyx_v_bind; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":206 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":206 * # And we only want to save the buffers if there was no failure. * self.bind = bind * self.result_data = result_data # <<<<<<<<<<<<<< @@ -9310,7 +10235,7 @@ */ __pyx_v_self->result_data = __pyx_v_result_data; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":207 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":207 * self.bind = bind * self.result_data = result_data * self.result_fields = fields # <<<<<<<<<<<<<< @@ -9328,7 +10253,7 @@ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":197 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":197 * raise MemoryError('alloc of result buffers failed') * memset(result_data, 0, sizeof(column_output) * fields) * except: # <<<<<<<<<<<<<< @@ -9342,7 +10267,7 @@ __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_9); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":200 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":200 * # We only want to free the buffers if there was a failure and we * # can't use 'em. * PyMem_Free(result_data) # <<<<<<<<<<<<<< @@ -9351,7 +10276,7 @@ */ PyMem_Free(__pyx_v_result_data); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":201 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":201 * # can't use 'em. * PyMem_Free(result_data) * PyMem_Free(bind) # <<<<<<<<<<<<<< @@ -9360,7 +10285,7 @@ */ PyMem_Free(__pyx_v_bind); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":202 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":202 * PyMem_Free(result_data) * PyMem_Free(bind) * raise # <<<<<<<<<<<<<< @@ -9393,7 +10318,7 @@ } } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":210 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":210 * finally: * # But in any case, we don't need the result. * mysql_free_result(res) # <<<<<<<<<<<<<< @@ -9443,7 +10368,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":212 +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":212 * mysql_free_result(res) * * cdef int _bind_buffer(self) except -1: # <<<<<<<<<<<<<< @@ -9464,14 +10389,14 @@ MYSQL_BIND *__pyx_t_2; struct __pyx_t_6oursql_column_output *__pyx_t_3; int __pyx_t_4; - my_bool __pyx_t_5; + unsigned int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_bind_buffer"); + __Pyx_RefNannySetupContext("_bind_buffer", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":218 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":218 * cdef column_output *c * cdef unsigned int fields, i * res = mysql_stmt_result_metadata(self.stmt) # <<<<<<<<<<<<<< @@ -9480,7 +10405,7 @@ */ __pyx_v_res = mysql_stmt_result_metadata(__pyx_v_self->stmt); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":220 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":220 * res = mysql_stmt_result_metadata(self.stmt) * * try: # <<<<<<<<<<<<<< @@ -9489,7 +10414,7 @@ */ /*try:*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":222 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":222 * try: * # And now we (try to) set up the result buffers. * fields = mysql_num_fields(res) # <<<<<<<<<<<<<< @@ -9498,7 +10423,7 @@ */ __pyx_v_fields = mysql_num_fields(__pyx_v_res); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":223 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":223 * # And now we (try to) set up the result buffers. * fields = mysql_num_fields(res) * for 0 <= i < fields: # <<<<<<<<<<<<<< @@ -9508,7 +10433,7 @@ __pyx_t_1 = __pyx_v_fields; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":224 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":224 * fields = mysql_num_fields(res) * for 0 <= i < fields: * b, c = &self.bind[i], &self.result_data[i] # <<<<<<<<<<<<<< @@ -9520,7 +10445,7 @@ __pyx_v_b = __pyx_t_2; __pyx_v_c = __pyx_t_3; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":225 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":225 * for 0 <= i < fields: * b, c = &self.bind[i], &self.result_data[i] * field = mysql_fetch_field_direct(res, i) # <<<<<<<<<<<<<< @@ -9529,17 +10454,17 @@ */ __pyx_v_field = mysql_fetch_field_direct(__pyx_v_res, __pyx_v_i); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":226 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":226 * b, c = &self.bind[i], &self.result_data[i] * field = mysql_fetch_field_direct(res, i) * if field.type == MYSQL_TYPE_GEOMETRY: # <<<<<<<<<<<<<< * c.type = b.buffer_type = MYSQL_TYPE_STRING * else: */ - __pyx_t_4 = (__pyx_v_field->type == MYSQL_TYPE_GEOMETRY); + __pyx_t_4 = ((__pyx_v_field->type == MYSQL_TYPE_GEOMETRY) != 0); if (__pyx_t_4) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":227 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":227 * field = mysql_fetch_field_direct(res, i) * if field.type == MYSQL_TYPE_GEOMETRY: * c.type = b.buffer_type = MYSQL_TYPE_STRING # <<<<<<<<<<<<<< @@ -9552,7 +10477,7 @@ } /*else*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":229 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":229 * c.type = b.buffer_type = MYSQL_TYPE_STRING * else: * c.type = b.buffer_type = field.type # <<<<<<<<<<<<<< @@ -9564,16 +10489,17 @@ } __pyx_L8:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":230 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":230 * else: * c.type = b.buffer_type = field.type * c.flags = field.flags # <<<<<<<<<<<<<< * c.is_binary = (field.charsetnr == CS_BINARY) * b.buffer_length = sizeof(column_data) */ - __pyx_v_c->flags = __pyx_v_field->flags; + __pyx_t_5 = __pyx_v_field->flags; + __pyx_v_c->flags = __pyx_t_5; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":231 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":231 * c.type = b.buffer_type = field.type * c.flags = field.flags * c.is_binary = (field.charsetnr == CS_BINARY) # <<<<<<<<<<<<<< @@ -9582,7 +10508,7 @@ */ __pyx_v_c->is_binary = (__pyx_v_field->charsetnr == 63); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":232 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":232 * c.flags = field.flags * c.is_binary = (field.charsetnr == CS_BINARY) * b.buffer_length = sizeof(column_data) # <<<<<<<<<<<<<< @@ -9591,7 +10517,7 @@ */ __pyx_v_b->buffer_length = (sizeof(union __pyx_t_6oursql_column_data)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":233 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":233 * c.is_binary = (field.charsetnr == CS_BINARY) * b.buffer_length = sizeof(column_data) * b.buffer = &c.buf # <<<<<<<<<<<<<< @@ -9600,7 +10526,7 @@ */ __pyx_v_b->buffer = (&__pyx_v_c->buf); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":234 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":234 * b.buffer_length = sizeof(column_data) * b.buffer = &c.buf * b.length = &c.length # <<<<<<<<<<<<<< @@ -9609,7 +10535,7 @@ */ __pyx_v_b->length = (&__pyx_v_c->length); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":235 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":235 * b.buffer = &c.buf * b.length = &c.length * b.is_null = &c.is_null # <<<<<<<<<<<<<< @@ -9618,7 +10544,7 @@ */ __pyx_v_b->is_null = (&__pyx_v_c->is_null); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":236 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":236 * b.length = &c.length * b.is_null = &c.is_null * b.error = &c.error # <<<<<<<<<<<<<< @@ -9627,17 +10553,17 @@ */ __pyx_v_b->error = (&__pyx_v_c->error); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":237 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":237 * b.is_null = &c.is_null * b.error = &c.error * if field.flags & UNSIGNED_NUM_FLAG == UNSIGNED_NUM_FLAG: # <<<<<<<<<<<<<< * b.is_unsigned = True * if mysql_stmt_bind_result(self.stmt, self.bind): */ - __pyx_t_4 = ((__pyx_v_field->flags & __pyx_v_6oursql_UNSIGNED_NUM_FLAG) == __pyx_v_6oursql_UNSIGNED_NUM_FLAG); + __pyx_t_4 = (((__pyx_v_field->flags & __pyx_v_6oursql_UNSIGNED_NUM_FLAG) == __pyx_v_6oursql_UNSIGNED_NUM_FLAG) != 0); if (__pyx_t_4) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":238 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":238 * b.error = &c.error * if field.flags & UNSIGNED_NUM_FLAG == UNSIGNED_NUM_FLAG: * b.is_unsigned = True # <<<<<<<<<<<<<< @@ -9650,17 +10576,17 @@ __pyx_L9:; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":239 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":239 * if field.flags & UNSIGNED_NUM_FLAG == UNSIGNED_NUM_FLAG: * b.is_unsigned = True * if mysql_stmt_bind_result(self.stmt, self.bind): # <<<<<<<<<<<<<< * self._raise_error() * finally: */ - __pyx_t_5 = mysql_stmt_bind_result(__pyx_v_self->stmt, __pyx_v_self->bind); - if (__pyx_t_5) { + __pyx_t_4 = (mysql_stmt_bind_result(__pyx_v_self->stmt, __pyx_v_self->bind) != 0); + if (__pyx_t_4) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":240 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":240 * b.is_unsigned = True * if mysql_stmt_bind_result(self.stmt, self.bind): * self._raise_error() # <<<<<<<<<<<<<< @@ -9673,7 +10599,7 @@ __pyx_L10:; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":243 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":243 * finally: * # And clean up the result data. * mysql_free_result(res) # <<<<<<<<<<<<<< @@ -9716,7 +10642,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":246 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10_Statement_10has_result_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_10_Statement_10has_result_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_Statement_10has_result___get__(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":246 * * property has_result: * def __get__(self): # <<<<<<<<<<<<<< @@ -9724,8 +10661,7 @@ * return self.result_data != NULL */ -static PyObject *__pyx_pf_6oursql_10_Statement_10has_result___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_10_Statement_10has_result___get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_10_Statement_10has_result___get__(struct __pyx_obj_6oursql__Statement *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -9733,18 +10669,18 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":247 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":247 * property has_result: * def __get__(self): * self._check_closed() # <<<<<<<<<<<<<< * return self.result_data != NULL * */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->__pyx_vtab)->_check_closed(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)__pyx_v_self->__pyx_vtab)->_check_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":248 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":248 * def __get__(self): * self._check_closed() * return self.result_data != NULL # <<<<<<<<<<<<<< @@ -9752,7 +10688,7 @@ * property description: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyBool_FromLong((((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->result_data != NULL)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_self->result_data != NULL)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -9770,7 +10706,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":251 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10_Statement_11description_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_10_Statement_11description_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_Statement_11description___get__(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":251 * * property description: * def __get__(self): # <<<<<<<<<<<<<< @@ -9778,8 +10725,7 @@ * self._check_closed() */ -static PyObject *__pyx_pf_6oursql_10_Statement_11description___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_10_Statement_11description___get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_10_Statement_11description___get__(struct __pyx_obj_6oursql__Statement *__pyx_v_self) { MYSQL_RES *__pyx_v_res; PyObject *__pyx_v_ret = NULL; PyObject *__pyx_r = NULL; @@ -9791,28 +10737,28 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":253 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":253 * def __get__(self): * cdef MYSQL_RES *res * self._check_closed() # <<<<<<<<<<<<<< * if not self.result_data: * return None */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->__pyx_vtab)->_check_closed(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)__pyx_v_self->__pyx_vtab)->_check_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":254 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":254 * cdef MYSQL_RES *res * self._check_closed() * if not self.result_data: # <<<<<<<<<<<<<< * return None * res = mysql_stmt_result_metadata(self.stmt) */ - __pyx_t_2 = (!(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->result_data != 0)); + __pyx_t_2 = ((!(__pyx_v_self->result_data != 0)) != 0); if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":255 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":255 * self._check_closed() * if not self.result_data: * return None # <<<<<<<<<<<<<< @@ -9823,39 +10769,39 @@ __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; - goto __pyx_L5; + goto __pyx_L3; } - __pyx_L5:; + __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":256 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":256 * if not self.result_data: * return None * res = mysql_stmt_result_metadata(self.stmt) # <<<<<<<<<<<<<< * if not res: * self.result_data = NULL */ - __pyx_v_res = mysql_stmt_result_metadata(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->stmt); + __pyx_v_res = mysql_stmt_result_metadata(__pyx_v_self->stmt); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":257 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":257 * return None * res = mysql_stmt_result_metadata(self.stmt) * if not res: # <<<<<<<<<<<<<< * self.result_data = NULL * return */ - __pyx_t_2 = (!(__pyx_v_res != 0)); + __pyx_t_2 = ((!(__pyx_v_res != 0)) != 0); if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":258 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":258 * res = mysql_stmt_result_metadata(self.stmt) * if not res: * self.result_data = NULL # <<<<<<<<<<<<<< * return * try: */ - ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->result_data = NULL; + __pyx_v_self->result_data = NULL; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":259 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":259 * if not res: * self.result_data = NULL * return # <<<<<<<<<<<<<< @@ -9865,11 +10811,11 @@ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - goto __pyx_L6; + goto __pyx_L4; } - __pyx_L6:; + __pyx_L4:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":260 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":260 * self.result_data = NULL * return * try: # <<<<<<<<<<<<<< @@ -9878,23 +10824,23 @@ */ /*try:*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":262 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":262 * try: * ret = description_from_res( * self.conn, res, self.result_fields, self.show_table) # <<<<<<<<<<<<<< * finally: * mysql_free_result(res) */ - __pyx_t_3 = ((PyObject *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn); + __pyx_t_3 = ((PyObject *)__pyx_v_self->conn); __Pyx_INCREF(__pyx_t_3); - __pyx_t_4 = __pyx_f_6oursql_description_from_res(((struct __pyx_obj_6oursql_Connection *)__pyx_t_3), __pyx_v_res, ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->result_fields, ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->show_table); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L8;} + __pyx_t_4 = __pyx_f_6oursql_description_from_res(((struct __pyx_obj_6oursql_Connection *)__pyx_t_3), __pyx_v_res, __pyx_v_self->result_fields, __pyx_v_self->show_table); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L6;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_ret = __pyx_t_4; __pyx_t_4 = 0; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":264 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":264 * self.conn, res, self.result_fields, self.show_table) * finally: * mysql_free_result(res) # <<<<<<<<<<<<<< @@ -9906,16 +10852,16 @@ PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb; int __pyx_exc_lineno; __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0; - __pyx_why = 0; goto __pyx_L9; - __pyx_L8: { + __pyx_why = 0; goto __pyx_L7; + __pyx_L6: { __pyx_why = 4; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb); __pyx_exc_lineno = __pyx_lineno; - goto __pyx_L9; + goto __pyx_L7; } - __pyx_L9:; + __pyx_L7:; mysql_free_result(__pyx_v_res); switch (__pyx_why) { case 4: { @@ -9929,7 +10875,7 @@ } } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":265 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":265 * finally: * mysql_free_result(res) * return ret # <<<<<<<<<<<<<< @@ -9955,7 +10901,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":268 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10_Statement_12column_names_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_10_Statement_12column_names_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_Statement_12column_names___get__(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":268 * * property column_names: * def __get__(self): # <<<<<<<<<<<<<< @@ -9963,36 +10920,36 @@ * if desc is None: */ -static PyObject *__pyx_pf_6oursql_10_Statement_12column_names___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_10_Statement_12column_names___get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_10_Statement_12column_names___get__(struct __pyx_obj_6oursql__Statement *__pyx_v_self) { PyObject *__pyx_v_desc = NULL; PyObject *__pyx_v_x = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - Py_ssize_t __pyx_t_4; - PyObject *(*__pyx_t_5)(PyObject *); - PyObject *__pyx_t_6 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + PyObject *(*__pyx_t_6)(PyObject *); + PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":269 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":269 * property column_names: * def __get__(self): * desc = self.description # <<<<<<<<<<<<<< * if desc is None: * return None */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__description); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__description); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_desc = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":270 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":270 * def __get__(self): * desc = self.description * if desc is None: # <<<<<<<<<<<<<< @@ -10000,9 +10957,10 @@ * return [x[0] for x in desc] */ __pyx_t_2 = (__pyx_v_desc == Py_None); - if (__pyx_t_2) { + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":271 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":271 * desc = self.description * if desc is None: * return None # <<<<<<<<<<<<<< @@ -10013,11 +10971,11 @@ __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; - goto __pyx_L5; + goto __pyx_L3; } - __pyx_L5:; + __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":272 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":272 * if desc is None: * return None * return [x[0] for x in desc] # <<<<<<<<<<<<<< @@ -10026,53 +10984,60 @@ */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); if (PyList_CheckExact(__pyx_v_desc) || PyTuple_CheckExact(__pyx_v_desc)) { - __pyx_t_3 = __pyx_v_desc; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; - __pyx_t_5 = NULL; + __pyx_t_4 = __pyx_v_desc; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; + __pyx_t_6 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_desc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; + __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_desc); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; } for (;;) { - if (PyList_CheckExact(__pyx_t_3)) { - if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; - } else if (PyTuple_CheckExact(__pyx_t_3)) { - if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; + if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_4)) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_4)) { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif } else { - __pyx_t_6 = __pyx_t_5(__pyx_t_3); - if (unlikely(!__pyx_t_6)) { + __pyx_t_7 = __pyx_t_6(__pyx_t_4); + if (unlikely(!__pyx_t_7)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[3]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } - __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); } __Pyx_XDECREF(__pyx_v_x); - __pyx_v_x = __pyx_t_6; - __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_x, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); - if (unlikely(PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_x = __pyx_t_7; + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_x, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_7) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_INCREF(((PyObject *)__pyx_t_1)); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = ((PyObject *)__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __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_3); - __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("oursql._Statement.column_names.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -10083,7 +11048,23 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":274 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10_Statement_9execute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6oursql_10_Statement_9execute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_parameters = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("execute (wrapper)", 0); + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "execute", 0))) return NULL; + __Pyx_INCREF(__pyx_args); + __pyx_v_parameters = __pyx_args; + __pyx_r = __pyx_pf_6oursql_10_Statement_8execute(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self), __pyx_v_parameters); + __Pyx_XDECREF(__pyx_v_parameters); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":274 * return [x[0] for x in desc] * * def execute(self, *parameters): # <<<<<<<<<<<<<< @@ -10091,9 +11072,7 @@ * cdef void *long_buffer */ -static PyObject *__pyx_pf_6oursql_10_Statement_4execute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pf_6oursql_10_Statement_4execute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_parameters = 0; +static PyObject *__pyx_pf_6oursql_10_Statement_8execute(struct __pyx_obj_6oursql__Statement *__pyx_v_self, PyObject *__pyx_v_parameters) { char *__pyx_v_buf; void *__pyx_v_long_buffer; MYSQL_BIND *__pyx_v_bind; @@ -10111,31 +11090,28 @@ PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; + int __pyx_t_2; PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; + PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; MYSQL_BIND *__pyx_t_8; union __pyx_t_6oursql_column_data *__pyx_t_9; int __pyx_t_10; - unsigned PY_LONG_LONG __pyx_t_11; - PY_LONG_LONG __pyx_t_12; - my_bool __pyx_t_13; - PyObject *__pyx_t_14 = NULL; - PyObject *(*__pyx_t_15)(PyObject *); - Py_ssize_t __pyx_t_16; + int __pyx_t_11; + Py_ssize_t __pyx_t_12; + unsigned PY_LONG_LONG __pyx_t_13; + PY_LONG_LONG __pyx_t_14; + PyObject *__pyx_t_15 = NULL; + PyObject *(*__pyx_t_16)(PyObject *); PyObject *(*__pyx_t_17)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("execute"); - if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "execute", 0))) return NULL; - __Pyx_INCREF(__pyx_args); - __pyx_v_parameters = __pyx_args; + __Pyx_RefNannySetupContext("execute", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":275 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":275 * * def execute(self, *parameters): * cdef char *buf = NULL # <<<<<<<<<<<<<< @@ -10144,7 +11120,7 @@ */ __pyx_v_buf = NULL; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":277 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":277 * cdef char *buf = NULL * cdef void *long_buffer * cdef MYSQL_BIND *bind = NULL, *b # <<<<<<<<<<<<<< @@ -10153,44 +11129,45 @@ */ __pyx_v_bind = NULL; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":280 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":280 * cdef column_data *column, *c * cdef Py_ssize_t i, n_params, stmt_params, long_buffer_size * self._check_closed() # <<<<<<<<<<<<<< * if self.data_waiting: * raise ProgrammingError('executing this query would cause rows to ' */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->__pyx_vtab)->_check_closed(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)__pyx_v_self->__pyx_vtab)->_check_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":281 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":281 * cdef Py_ssize_t i, n_params, stmt_params, long_buffer_size * self._check_closed() * if self.data_waiting: # <<<<<<<<<<<<<< * raise ProgrammingError('executing this query would cause rows to ' * 'become unfetchable') */ - if (((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->data_waiting) { + __pyx_t_2 = (__pyx_v_self->data_waiting != 0); + if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":282 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":282 * self._check_closed() * if self.data_waiting: * raise ProgrammingError('executing this query would cause rows to ' # <<<<<<<<<<<<<< * 'become unfetchable') * n_params = PyTuple_GET_SIZE(parameters) */ - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_32), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_38), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[3]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L5; + goto __pyx_L3; } - __pyx_L5:; + __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":284 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":284 * raise ProgrammingError('executing this query would cause rows to ' * 'become unfetchable') * n_params = PyTuple_GET_SIZE(parameters) # <<<<<<<<<<<<<< @@ -10199,74 +11176,74 @@ */ __pyx_v_n_params = PyTuple_GET_SIZE(((PyObject *)__pyx_v_parameters)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":285 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":285 * 'become unfetchable') * n_params = PyTuple_GET_SIZE(parameters) * stmt_params = mysql_stmt_param_count(self.stmt) # <<<<<<<<<<<<<< * if stmt_params != n_params: * raise ProgrammingError('%d parameters expected, %d given' % ( */ - __pyx_v_stmt_params = mysql_stmt_param_count(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->stmt); + __pyx_v_stmt_params = mysql_stmt_param_count(__pyx_v_self->stmt); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":286 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":286 * n_params = PyTuple_GET_SIZE(parameters) * stmt_params = mysql_stmt_param_count(self.stmt) * if stmt_params != n_params: # <<<<<<<<<<<<<< * raise ProgrammingError('%d parameters expected, %d given' % ( * stmt_params, n_params)) */ - __pyx_t_4 = (__pyx_v_stmt_params != __pyx_v_n_params); - if (__pyx_t_4) { + __pyx_t_2 = ((__pyx_v_stmt_params != __pyx_v_n_params) != 0); + if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":287 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":287 * stmt_params = mysql_stmt_param_count(self.stmt) * if stmt_params != n_params: * raise ProgrammingError('%d parameters expected, %d given' % ( # <<<<<<<<<<<<<< * stmt_params, n_params)) * long_strings = [] */ - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":288 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":288 * if stmt_params != n_params: * raise ProgrammingError('%d parameters expected, %d given' % ( * stmt_params, n_params)) # <<<<<<<<<<<<<< * long_strings = [] * # So we don't have temporary values cleaned up before they're used. */ - __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_stmt_params); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_stmt_params); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_n_params); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); - __pyx_t_2 = 0; + __pyx_t_3 = 0; __pyx_t_5 = 0; - __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_33), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_39), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[3]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L6; + goto __pyx_L4; } - __pyx_L6:; + __pyx_L4:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":289 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":289 * raise ProgrammingError('%d parameters expected, %d given' % ( * stmt_params, n_params)) * long_strings = [] # <<<<<<<<<<<<<< @@ -10274,11 +11251,11 @@ * temp_strings = [] */ __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); - __pyx_v_long_strings = __pyx_t_5; + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_long_strings = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":291 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":291 * long_strings = [] * # So we don't have temporary values cleaned up before they're used. * temp_strings = [] # <<<<<<<<<<<<<< @@ -10286,11 +11263,11 @@ * if n_params > 0: */ __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); - __pyx_v_temp_strings = __pyx_t_5; + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_temp_strings = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":292 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":292 * # So we don't have temporary values cleaned up before they're used. * temp_strings = [] * try: # <<<<<<<<<<<<<< @@ -10299,17 +11276,17 @@ */ /*try:*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":293 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":293 * temp_strings = [] * try: * if n_params > 0: # <<<<<<<<<<<<<< * buf = PyMem_Malloc( * (sizeof(MYSQL_BIND) + sizeof(column_data)) * n_params) */ - __pyx_t_4 = (__pyx_v_n_params > 0); - if (__pyx_t_4) { + __pyx_t_2 = ((__pyx_v_n_params > 0) != 0); + if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":295 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":295 * if n_params > 0: * buf = PyMem_Malloc( * (sizeof(MYSQL_BIND) + sizeof(column_data)) * n_params) # <<<<<<<<<<<<<< @@ -10318,33 +11295,33 @@ */ __pyx_v_buf = ((char *)PyMem_Malloc((((sizeof(MYSQL_BIND)) + (sizeof(union __pyx_t_6oursql_column_data))) * __pyx_v_n_params))); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":296 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":296 * buf = PyMem_Malloc( * (sizeof(MYSQL_BIND) + sizeof(column_data)) * n_params) * if not buf: # <<<<<<<<<<<<<< * raise MemoryError('alloc of bind parameters failed') * bind = buf */ - __pyx_t_4 = (!(__pyx_v_buf != 0)); - if (__pyx_t_4) { + __pyx_t_2 = ((!(__pyx_v_buf != 0)) != 0); + if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":297 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":297 * (sizeof(MYSQL_BIND) + sizeof(column_data)) * n_params) * if not buf: * raise MemoryError('alloc of bind parameters failed') # <<<<<<<<<<<<<< * bind = buf * memset(bind, 0, sizeof(MYSQL_BIND) * n_params) */ - __pyx_t_5 = PyObject_Call(__pyx_builtin_MemoryError, ((PyObject *)__pyx_k_tuple_35), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L8;} + __pyx_t_5 = PyObject_Call(__pyx_builtin_MemoryError, ((PyObject *)__pyx_k_tuple_41), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L6;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - {__pyx_filename = __pyx_f[3]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L8;} - goto __pyx_L11; + {__pyx_filename = __pyx_f[3]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L6;} + goto __pyx_L9; } - __pyx_L11:; + __pyx_L9:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":298 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":298 * if not buf: * raise MemoryError('alloc of bind parameters failed') * bind = buf # <<<<<<<<<<<<<< @@ -10353,7 +11330,7 @@ */ __pyx_v_bind = ((MYSQL_BIND *)__pyx_v_buf); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":299 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":299 * raise MemoryError('alloc of bind parameters failed') * bind = buf * memset(bind, 0, sizeof(MYSQL_BIND) * n_params) # <<<<<<<<<<<<<< @@ -10362,7 +11339,7 @@ */ memset(__pyx_v_bind, 0, ((sizeof(MYSQL_BIND)) * __pyx_v_n_params)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":300 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":300 * bind = buf * memset(bind, 0, sizeof(MYSQL_BIND) * n_params) * column = (buf + (sizeof(MYSQL_BIND) * n_params)) # <<<<<<<<<<<<<< @@ -10371,7 +11348,7 @@ */ __pyx_v_column = ((union __pyx_t_6oursql_column_data *)(__pyx_v_buf + ((sizeof(MYSQL_BIND)) * __pyx_v_n_params))); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":301 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":301 * memset(bind, 0, sizeof(MYSQL_BIND) * n_params) * column = (buf + (sizeof(MYSQL_BIND) * n_params)) * memset(column, 0, sizeof(column_data) * n_params) # <<<<<<<<<<<<<< @@ -10380,18 +11357,18 @@ */ memset(__pyx_v_column, 0, ((sizeof(union __pyx_t_6oursql_column_data)) * __pyx_v_n_params)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":303 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":303 * memset(column, 0, sizeof(column_data) * n_params) * # Cache the connection charset. * self.conn.charset # <<<<<<<<<<<<<< * for 0 <= i < n_params: * o = PyTuple_GET_ITEM(parameters, i) */ - __pyx_t_5 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn), __pyx_n_s__charset); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L8;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->conn), __pyx_n_s__charset); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L6;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":304 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":304 * # Cache the connection charset. * self.conn.charset * for 0 <= i < n_params: # <<<<<<<<<<<<<< @@ -10401,20 +11378,20 @@ __pyx_t_7 = __pyx_v_n_params; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":305 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":305 * self.conn.charset * for 0 <= i < n_params: * o = PyTuple_GET_ITEM(parameters, i) # <<<<<<<<<<<<<< * Py_INCREF(o) * b, c = &bind[i], &column[i] */ - __pyx_t_5 = PyTuple_GET_ITEM(((PyObject *)__pyx_v_parameters), __pyx_v_i); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L8;} + __pyx_t_5 = PyTuple_GET_ITEM(((PyObject *)__pyx_v_parameters), __pyx_v_i); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L6;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(__pyx_v_o); __pyx_v_o = __pyx_t_5; __pyx_t_5 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":306 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":306 * for 0 <= i < n_params: * o = PyTuple_GET_ITEM(parameters, i) * Py_INCREF(o) # <<<<<<<<<<<<<< @@ -10423,7 +11400,7 @@ */ Py_INCREF(__pyx_v_o); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":307 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":307 * o = PyTuple_GET_ITEM(parameters, i) * Py_INCREF(o) * b, c = &bind[i], &column[i] # <<<<<<<<<<<<<< @@ -10435,17 +11412,18 @@ __pyx_v_b = __pyx_t_8; __pyx_v_c = __pyx_t_9; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":312 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":312 * # a conversion dict, since this involves some C-level union * # and buffer munging. * if o is None: # <<<<<<<<<<<<<< * b.buffer_type = MYSQL_TYPE_NULL * b.buffer = NULL */ - __pyx_t_4 = (__pyx_v_o == Py_None); - if (__pyx_t_4) { + __pyx_t_2 = (__pyx_v_o == Py_None); + __pyx_t_10 = (__pyx_t_2 != 0); + if (__pyx_t_10) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":313 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":313 * # and buffer munging. * if o is None: * b.buffer_type = MYSQL_TYPE_NULL # <<<<<<<<<<<<<< @@ -10454,7 +11432,7 @@ */ __pyx_v_b->buffer_type = MYSQL_TYPE_NULL; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":314 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":314 * if o is None: * b.buffer_type = MYSQL_TYPE_NULL * b.buffer = NULL # <<<<<<<<<<<<<< @@ -10462,20 +11440,20 @@ * b.buffer_type = MYSQL_TYPE_STRING */ __pyx_v_b->buffer = NULL; - goto __pyx_L14; + goto __pyx_L12; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":315 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":315 * b.buffer_type = MYSQL_TYPE_NULL * b.buffer = NULL * elif PyUnicode_Check(o): # <<<<<<<<<<<<<< * b.buffer_type = MYSQL_TYPE_STRING * if self.conn.use_unicode: */ - __pyx_t_4 = PyUnicode_Check(__pyx_v_o); - if (__pyx_t_4) { + __pyx_t_10 = (PyUnicode_Check(__pyx_v_o) != 0); + if (__pyx_t_10) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":316 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":316 * b.buffer = NULL * elif PyUnicode_Check(o): * b.buffer_type = MYSQL_TYPE_STRING # <<<<<<<<<<<<<< @@ -10484,71 +11462,70 @@ */ __pyx_v_b->buffer_type = MYSQL_TYPE_STRING; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":317 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":317 * elif PyUnicode_Check(o): * b.buffer_type = MYSQL_TYPE_STRING * if self.conn.use_unicode: # <<<<<<<<<<<<<< * o = o.encode(self.conn._charset) * temp_strings.append(o) */ - if (((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn->use_unicode) { + __pyx_t_10 = (__pyx_v_self->conn->use_unicode != 0); + if (__pyx_t_10) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":318 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":318 * b.buffer_type = MYSQL_TYPE_STRING * if self.conn.use_unicode: * o = o.encode(self.conn._charset) # <<<<<<<<<<<<<< * temp_strings.append(o) * PyBytes_AsStringAndSize(o, */ - __pyx_t_5 = PyObject_GetAttr(__pyx_v_o, __pyx_n_s__encode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L8;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_o, __pyx_n_s__encode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L6;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L8;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); - __Pyx_INCREF(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn->_charset); - PyTuple_SET_ITEM(__pyx_t_6, 0, ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn->_charset); - __Pyx_GIVEREF(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn->_charset); - __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L8;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L6;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_v_self->conn->_charset); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_self->conn->_charset); + __Pyx_GIVEREF(__pyx_v_self->conn->_charset); + __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L6;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_v_o); - __pyx_v_o = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_v_o = __pyx_t_4; + __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":319 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":319 * if self.conn.use_unicode: * o = o.encode(self.conn._charset) * temp_strings.append(o) # <<<<<<<<<<<<<< * PyBytes_AsStringAndSize(o, * &b.buffer, &c.st) */ - if (unlikely(((PyObject *)__pyx_v_temp_strings) == Py_None)) { - PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L8;} - } - __pyx_t_10 = PyList_Append(__pyx_v_temp_strings, __pyx_v_o); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L8;} - goto __pyx_L15; + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_temp_strings, __pyx_v_o); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L6;} + goto __pyx_L13; } - __pyx_L15:; + __pyx_L13:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":321 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":321 * temp_strings.append(o) * PyBytes_AsStringAndSize(o, * &b.buffer, &c.st) # <<<<<<<<<<<<<< * c.ul = c.st * b.length = &c.ul */ - __pyx_t_1 = PyBytes_AsStringAndSize(__pyx_v_o, ((char **)(&__pyx_v_b->buffer)), (&__pyx_v_c->st)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L8;} + __pyx_t_1 = PyBytes_AsStringAndSize(__pyx_v_o, ((char **)(&__pyx_v_b->buffer)), (&__pyx_v_c->st)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L6;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":322 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":322 * PyBytes_AsStringAndSize(o, * &b.buffer, &c.st) * c.ul = c.st # <<<<<<<<<<<<<< * b.length = &c.ul * elif PyBytes_Check(o): */ - __pyx_v_c->ul = __pyx_v_c->st; + __pyx_t_12 = __pyx_v_c->st; + __pyx_v_c->ul = __pyx_t_12; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":323 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":323 * &b.buffer, &c.st) * c.ul = c.st * b.length = &c.ul # <<<<<<<<<<<<<< @@ -10556,20 +11533,20 @@ * b.buffer_type = MYSQL_TYPE_STRING */ __pyx_v_b->length = (&__pyx_v_c->ul); - goto __pyx_L14; + goto __pyx_L12; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":324 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":324 * c.ul = c.st * b.length = &c.ul * elif PyBytes_Check(o): # <<<<<<<<<<<<<< * b.buffer_type = MYSQL_TYPE_STRING * PyBytes_AsStringAndSize(o, */ - __pyx_t_1 = PyBytes_Check(__pyx_v_o); - if (__pyx_t_1) { + __pyx_t_10 = (PyBytes_Check(__pyx_v_o) != 0); + if (__pyx_t_10) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":325 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":325 * b.length = &c.ul * elif PyBytes_Check(o): * b.buffer_type = MYSQL_TYPE_STRING # <<<<<<<<<<<<<< @@ -10578,25 +11555,26 @@ */ __pyx_v_b->buffer_type = MYSQL_TYPE_STRING; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":327 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":327 * b.buffer_type = MYSQL_TYPE_STRING * PyBytes_AsStringAndSize(o, * &b.buffer, &c.st) # <<<<<<<<<<<<<< * c.ul = c.st * b.length = &c.ul */ - __pyx_t_1 = PyBytes_AsStringAndSize(__pyx_v_o, ((char **)(&__pyx_v_b->buffer)), (&__pyx_v_c->st)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L8;} + __pyx_t_1 = PyBytes_AsStringAndSize(__pyx_v_o, ((char **)(&__pyx_v_b->buffer)), (&__pyx_v_c->st)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L6;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":328 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":328 * PyBytes_AsStringAndSize(o, * &b.buffer, &c.st) * c.ul = c.st # <<<<<<<<<<<<<< * b.length = &c.ul * elif PyInt_Check(o): */ - __pyx_v_c->ul = __pyx_v_c->st; + __pyx_t_12 = __pyx_v_c->st; + __pyx_v_c->ul = __pyx_t_12; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":329 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":329 * &b.buffer, &c.st) * c.ul = c.st * b.length = &c.ul # <<<<<<<<<<<<<< @@ -10604,20 +11582,20 @@ * # MYSQL_TYPE_LONG really takes a C int, not a C long. */ __pyx_v_b->length = (&__pyx_v_c->ul); - goto __pyx_L14; + goto __pyx_L12; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":330 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":330 * c.ul = c.st * b.length = &c.ul * elif PyInt_Check(o): # <<<<<<<<<<<<<< * # MYSQL_TYPE_LONG really takes a C int, not a C long. * # This is necessary for platforms where sizeof(long) > */ - __pyx_t_4 = PyInt_Check(__pyx_v_o); - if (__pyx_t_4) { + __pyx_t_10 = (PyInt_Check(__pyx_v_o) != 0); + if (__pyx_t_10) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":334 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":334 * # This is necessary for platforms where sizeof(long) > * # sizeof(int). * b.buffer_type = MYSQL_TYPE_LONGLONG # <<<<<<<<<<<<<< @@ -10626,7 +11604,7 @@ */ __pyx_v_b->buffer_type = MYSQL_TYPE_LONGLONG; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":335 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":335 * # sizeof(int). * b.buffer_type = MYSQL_TYPE_LONGLONG * c.ll = PyInt_AS_LONG(o) # <<<<<<<<<<<<<< @@ -10635,7 +11613,7 @@ */ __pyx_v_c->ll = PyInt_AS_LONG(__pyx_v_o); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":336 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":336 * b.buffer_type = MYSQL_TYPE_LONGLONG * c.ll = PyInt_AS_LONG(o) * b.buffer = &c.ll # <<<<<<<<<<<<<< @@ -10643,20 +11621,20 @@ * b.buffer_type = MYSQL_TYPE_LONGLONG */ __pyx_v_b->buffer = ((void *)(&__pyx_v_c->ll)); - goto __pyx_L14; + goto __pyx_L12; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":337 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":337 * c.ll = PyInt_AS_LONG(o) * b.buffer = &c.ll * elif PyLong_Check(o): # <<<<<<<<<<<<<< * b.buffer_type = MYSQL_TYPE_LONGLONG * if o >= 0: */ - __pyx_t_4 = PyLong_Check(__pyx_v_o); - if (__pyx_t_4) { + __pyx_t_10 = (PyLong_Check(__pyx_v_o) != 0); + if (__pyx_t_10) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":338 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":338 * b.buffer = &c.ll * elif PyLong_Check(o): * b.buffer_type = MYSQL_TYPE_LONGLONG # <<<<<<<<<<<<<< @@ -10665,30 +11643,29 @@ */ __pyx_v_b->buffer_type = MYSQL_TYPE_LONGLONG; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":339 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":339 * elif PyLong_Check(o): * b.buffer_type = MYSQL_TYPE_LONGLONG * if o >= 0: # <<<<<<<<<<<<<< * c.ull = PyLong_AsUnsignedLongLong(o) * b.buffer = &c.ull */ - __pyx_t_3 = PyObject_RichCompare(__pyx_v_o, __pyx_int_0, Py_GE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L8;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L8;} - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_4) { + __pyx_t_4 = PyObject_RichCompare(__pyx_v_o, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L6;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L6;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_10) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":340 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":340 * b.buffer_type = MYSQL_TYPE_LONGLONG * if o >= 0: * c.ull = PyLong_AsUnsignedLongLong(o) # <<<<<<<<<<<<<< * b.buffer = &c.ull * b.is_unsigned = True */ - __pyx_t_11 = PyLong_AsUnsignedLongLong(__pyx_v_o); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L8;} - __pyx_v_c->ull = __pyx_t_11; + __pyx_t_13 = PyLong_AsUnsignedLongLong(__pyx_v_o); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L6;} + __pyx_v_c->ull = __pyx_t_13; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":341 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":341 * if o >= 0: * c.ull = PyLong_AsUnsignedLongLong(o) * b.buffer = &c.ull # <<<<<<<<<<<<<< @@ -10697,7 +11674,7 @@ */ __pyx_v_b->buffer = ((void *)(&__pyx_v_c->ull)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":342 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":342 * c.ull = PyLong_AsUnsignedLongLong(o) * b.buffer = &c.ull * b.is_unsigned = True # <<<<<<<<<<<<<< @@ -10705,21 +11682,21 @@ * c.ll = PyLong_AsLongLong(o) */ __pyx_v_b->is_unsigned = 1; - goto __pyx_L16; + goto __pyx_L14; } /*else*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":344 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":344 * b.is_unsigned = True * else: * c.ll = PyLong_AsLongLong(o) # <<<<<<<<<<<<<< * b.buffer = &c.ll * elif PyFloat_Check(o): */ - __pyx_t_12 = PyLong_AsLongLong(__pyx_v_o); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L8;} - __pyx_v_c->ll = __pyx_t_12; + __pyx_t_14 = PyLong_AsLongLong(__pyx_v_o); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L6;} + __pyx_v_c->ll = __pyx_t_14; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":345 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":345 * else: * c.ll = PyLong_AsLongLong(o) * b.buffer = &c.ll # <<<<<<<<<<<<<< @@ -10728,21 +11705,21 @@ */ __pyx_v_b->buffer = ((void *)(&__pyx_v_c->ll)); } - __pyx_L16:; - goto __pyx_L14; + __pyx_L14:; + goto __pyx_L12; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":346 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":346 * c.ll = PyLong_AsLongLong(o) * b.buffer = &c.ll * elif PyFloat_Check(o): # <<<<<<<<<<<<<< * b.buffer_type = MYSQL_TYPE_DOUBLE * c.d = PyFloat_AS_DOUBLE(o) */ - __pyx_t_4 = PyFloat_Check(__pyx_v_o); - if (__pyx_t_4) { + __pyx_t_10 = (PyFloat_Check(__pyx_v_o) != 0); + if (__pyx_t_10) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":347 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":347 * b.buffer = &c.ll * elif PyFloat_Check(o): * b.buffer_type = MYSQL_TYPE_DOUBLE # <<<<<<<<<<<<<< @@ -10751,7 +11728,7 @@ */ __pyx_v_b->buffer_type = MYSQL_TYPE_DOUBLE; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":348 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":348 * elif PyFloat_Check(o): * b.buffer_type = MYSQL_TYPE_DOUBLE * c.d = PyFloat_AS_DOUBLE(o) # <<<<<<<<<<<<<< @@ -10760,7 +11737,7 @@ */ __pyx_v_c->d = PyFloat_AS_DOUBLE(__pyx_v_o); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":349 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":349 * b.buffer_type = MYSQL_TYPE_DOUBLE * c.d = PyFloat_AS_DOUBLE(o) * b.buffer = &c.d # <<<<<<<<<<<<<< @@ -10768,20 +11745,20 @@ * b.buffer_type = MYSQL_TYPE_DATETIME */ __pyx_v_b->buffer = ((void *)(&__pyx_v_c->d)); - goto __pyx_L14; + goto __pyx_L12; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":350 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":350 * c.d = PyFloat_AS_DOUBLE(o) * b.buffer = &c.d * elif PyDateTime_Check(o): # <<<<<<<<<<<<<< * b.buffer_type = MYSQL_TYPE_DATETIME * c.t.year = PyDateTime_GET_YEAR(o) */ - __pyx_t_4 = PyDateTime_Check(__pyx_v_o); - if (__pyx_t_4) { + __pyx_t_10 = (PyDateTime_Check(__pyx_v_o) != 0); + if (__pyx_t_10) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":351 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":351 * b.buffer = &c.d * elif PyDateTime_Check(o): * b.buffer_type = MYSQL_TYPE_DATETIME # <<<<<<<<<<<<<< @@ -10790,7 +11767,7 @@ */ __pyx_v_b->buffer_type = MYSQL_TYPE_DATETIME; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":352 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":352 * elif PyDateTime_Check(o): * b.buffer_type = MYSQL_TYPE_DATETIME * c.t.year = PyDateTime_GET_YEAR(o) # <<<<<<<<<<<<<< @@ -10799,7 +11776,7 @@ */ __pyx_v_c->t.year = PyDateTime_GET_YEAR(__pyx_v_o); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":353 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":353 * b.buffer_type = MYSQL_TYPE_DATETIME * c.t.year = PyDateTime_GET_YEAR(o) * c.t.month = PyDateTime_GET_MONTH(o) # <<<<<<<<<<<<<< @@ -10808,7 +11785,7 @@ */ __pyx_v_c->t.month = PyDateTime_GET_MONTH(__pyx_v_o); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":354 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":354 * c.t.year = PyDateTime_GET_YEAR(o) * c.t.month = PyDateTime_GET_MONTH(o) * c.t.day = PyDateTime_GET_DAY(o) # <<<<<<<<<<<<<< @@ -10817,7 +11794,7 @@ */ __pyx_v_c->t.day = PyDateTime_GET_DAY(__pyx_v_o); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":355 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":355 * c.t.month = PyDateTime_GET_MONTH(o) * c.t.day = PyDateTime_GET_DAY(o) * c.t.hour = PyDateTime_DATE_GET_HOUR(o) # <<<<<<<<<<<<<< @@ -10826,7 +11803,7 @@ */ __pyx_v_c->t.hour = PyDateTime_DATE_GET_HOUR(__pyx_v_o); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":356 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":356 * c.t.day = PyDateTime_GET_DAY(o) * c.t.hour = PyDateTime_DATE_GET_HOUR(o) * c.t.minute = PyDateTime_DATE_GET_MINUTE(o) # <<<<<<<<<<<<<< @@ -10835,7 +11812,7 @@ */ __pyx_v_c->t.minute = PyDateTime_DATE_GET_MINUTE(__pyx_v_o); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":357 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":357 * c.t.hour = PyDateTime_DATE_GET_HOUR(o) * c.t.minute = PyDateTime_DATE_GET_MINUTE(o) * c.t.second = PyDateTime_DATE_GET_SECOND(o) # <<<<<<<<<<<<<< @@ -10844,7 +11821,7 @@ */ __pyx_v_c->t.second = PyDateTime_DATE_GET_SECOND(__pyx_v_o); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":358 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":358 * c.t.minute = PyDateTime_DATE_GET_MINUTE(o) * c.t.second = PyDateTime_DATE_GET_SECOND(o) * c.t.second_part = PyDateTime_DATE_GET_MICROSECOND(o) # <<<<<<<<<<<<<< @@ -10853,7 +11830,7 @@ */ __pyx_v_c->t.second_part = PyDateTime_DATE_GET_MICROSECOND(__pyx_v_o); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":359 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":359 * c.t.second = PyDateTime_DATE_GET_SECOND(o) * c.t.second_part = PyDateTime_DATE_GET_MICROSECOND(o) * b.buffer = &c.t # <<<<<<<<<<<<<< @@ -10861,20 +11838,20 @@ * b.buffer_type = MYSQL_TYPE_DATE */ __pyx_v_b->buffer = ((void *)(&__pyx_v_c->t)); - goto __pyx_L14; + goto __pyx_L12; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":360 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":360 * c.t.second_part = PyDateTime_DATE_GET_MICROSECOND(o) * b.buffer = &c.t * elif PyDate_Check(o): # <<<<<<<<<<<<<< * b.buffer_type = MYSQL_TYPE_DATE * c.t.year = PyDateTime_GET_YEAR(o) */ - __pyx_t_4 = PyDate_Check(__pyx_v_o); - if (__pyx_t_4) { + __pyx_t_10 = (PyDate_Check(__pyx_v_o) != 0); + if (__pyx_t_10) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":361 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":361 * b.buffer = &c.t * elif PyDate_Check(o): * b.buffer_type = MYSQL_TYPE_DATE # <<<<<<<<<<<<<< @@ -10883,7 +11860,7 @@ */ __pyx_v_b->buffer_type = MYSQL_TYPE_DATE; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":362 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":362 * elif PyDate_Check(o): * b.buffer_type = MYSQL_TYPE_DATE * c.t.year = PyDateTime_GET_YEAR(o) # <<<<<<<<<<<<<< @@ -10892,7 +11869,7 @@ */ __pyx_v_c->t.year = PyDateTime_GET_YEAR(__pyx_v_o); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":363 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":363 * b.buffer_type = MYSQL_TYPE_DATE * c.t.year = PyDateTime_GET_YEAR(o) * c.t.month = PyDateTime_GET_MONTH(o) # <<<<<<<<<<<<<< @@ -10901,7 +11878,7 @@ */ __pyx_v_c->t.month = PyDateTime_GET_MONTH(__pyx_v_o); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":364 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":364 * c.t.year = PyDateTime_GET_YEAR(o) * c.t.month = PyDateTime_GET_MONTH(o) * c.t.day = PyDateTime_GET_DAY(o) # <<<<<<<<<<<<<< @@ -10910,7 +11887,7 @@ */ __pyx_v_c->t.day = PyDateTime_GET_DAY(__pyx_v_o); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":365 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":365 * c.t.month = PyDateTime_GET_MONTH(o) * c.t.day = PyDateTime_GET_DAY(o) * b.buffer = &c.t # <<<<<<<<<<<<<< @@ -10918,20 +11895,20 @@ * b.buffer_type = MYSQL_TYPE_TIME */ __pyx_v_b->buffer = ((void *)(&__pyx_v_c->t)); - goto __pyx_L14; + goto __pyx_L12; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":366 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":366 * c.t.day = PyDateTime_GET_DAY(o) * b.buffer = &c.t * elif PyTime_Check(o): # <<<<<<<<<<<<<< * b.buffer_type = MYSQL_TYPE_TIME * c.t.hour = PyDateTime_TIME_GET_HOUR(o) */ - __pyx_t_4 = PyTime_Check(__pyx_v_o); - if (__pyx_t_4) { + __pyx_t_10 = (PyTime_Check(__pyx_v_o) != 0); + if (__pyx_t_10) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":367 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":367 * b.buffer = &c.t * elif PyTime_Check(o): * b.buffer_type = MYSQL_TYPE_TIME # <<<<<<<<<<<<<< @@ -10940,7 +11917,7 @@ */ __pyx_v_b->buffer_type = MYSQL_TYPE_TIME; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":368 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":368 * elif PyTime_Check(o): * b.buffer_type = MYSQL_TYPE_TIME * c.t.hour = PyDateTime_TIME_GET_HOUR(o) # <<<<<<<<<<<<<< @@ -10949,7 +11926,7 @@ */ __pyx_v_c->t.hour = PyDateTime_TIME_GET_HOUR(__pyx_v_o); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":369 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":369 * b.buffer_type = MYSQL_TYPE_TIME * c.t.hour = PyDateTime_TIME_GET_HOUR(o) * c.t.minute = PyDateTime_TIME_GET_MINUTE(o) # <<<<<<<<<<<<<< @@ -10958,7 +11935,7 @@ */ __pyx_v_c->t.minute = PyDateTime_TIME_GET_MINUTE(__pyx_v_o); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":370 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":370 * c.t.hour = PyDateTime_TIME_GET_HOUR(o) * c.t.minute = PyDateTime_TIME_GET_MINUTE(o) * c.t.second = PyDateTime_TIME_GET_SECOND(o) # <<<<<<<<<<<<<< @@ -10967,7 +11944,7 @@ */ __pyx_v_c->t.second = PyDateTime_TIME_GET_SECOND(__pyx_v_o); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":371 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":371 * c.t.minute = PyDateTime_TIME_GET_MINUTE(o) * c.t.second = PyDateTime_TIME_GET_SECOND(o) * c.t.second_part = PyDateTime_TIME_GET_MICROSECOND(o) # <<<<<<<<<<<<<< @@ -10976,7 +11953,7 @@ */ __pyx_v_c->t.second_part = PyDateTime_TIME_GET_MICROSECOND(__pyx_v_o); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":372 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":372 * c.t.second = PyDateTime_TIME_GET_SECOND(o) * c.t.second_part = PyDateTime_TIME_GET_MICROSECOND(o) * b.buffer = &c.t # <<<<<<<<<<<<<< @@ -10984,26 +11961,27 @@ * b.buffer_type = MYSQL_TYPE_NEWDECIMAL */ __pyx_v_b->buffer = ((void *)(&__pyx_v_c->t)); - goto __pyx_L14; + goto __pyx_L12; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":373 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":373 * c.t.second_part = PyDateTime_TIME_GET_MICROSECOND(o) * b.buffer = &c.t * elif isinstance(o, decimal.Decimal): # <<<<<<<<<<<<<< * b.buffer_type = MYSQL_TYPE_NEWDECIMAL * o = str(o).encode() */ - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__decimal); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L8;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__Decimal); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L8;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__decimal); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L6;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__Decimal); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L6;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_4 = PyObject_IsInstance(__pyx_v_o, __pyx_t_6); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L8;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_10 = PyObject_IsInstance(__pyx_v_o, __pyx_t_6); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L6;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__pyx_t_4) { + __pyx_t_2 = (__pyx_t_10 != 0); + if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":374 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":374 * b.buffer = &c.t * elif isinstance(o, decimal.Decimal): * b.buffer_type = MYSQL_TYPE_NEWDECIMAL # <<<<<<<<<<<<<< @@ -11012,44 +11990,41 @@ */ __pyx_v_b->buffer_type = MYSQL_TYPE_NEWDECIMAL; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":375 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":375 * elif isinstance(o, decimal.Decimal): * b.buffer_type = MYSQL_TYPE_NEWDECIMAL * o = str(o).encode() # <<<<<<<<<<<<<< * temp_strings.append(o) * b.buffer = PyBytes_AS_STRING(o) */ - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L8;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L6;} + __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_o); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_o); __Pyx_GIVEREF(__pyx_v_o); - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L8;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L6;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__encode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L8;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__encode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L6;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L8;} - __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L6;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_v_o); - __pyx_v_o = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_v_o = __pyx_t_4; + __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":376 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":376 * b.buffer_type = MYSQL_TYPE_NEWDECIMAL * o = str(o).encode() * temp_strings.append(o) # <<<<<<<<<<<<<< * b.buffer = PyBytes_AS_STRING(o) * c.ul = PyBytes_GET_SIZE(o) */ - if (unlikely(((PyObject *)__pyx_v_temp_strings) == Py_None)) { - PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L8;} - } - __pyx_t_10 = PyList_Append(__pyx_v_temp_strings, __pyx_v_o); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L8;} + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_temp_strings, __pyx_v_o); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L6;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":377 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":377 * o = str(o).encode() * temp_strings.append(o) * b.buffer = PyBytes_AS_STRING(o) # <<<<<<<<<<<<<< @@ -11058,7 +12033,7 @@ */ __pyx_v_b->buffer = PyBytes_AS_STRING(__pyx_v_o); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":378 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":378 * temp_strings.append(o) * b.buffer = PyBytes_AS_STRING(o) * c.ul = PyBytes_GET_SIZE(o) # <<<<<<<<<<<<<< @@ -11067,7 +12042,7 @@ */ __pyx_v_c->ul = PyBytes_GET_SIZE(__pyx_v_o); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":379 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":379 * b.buffer = PyBytes_AS_STRING(o) * c.ul = PyBytes_GET_SIZE(o) * b.length = &c.ul # <<<<<<<<<<<<<< @@ -11075,23 +12050,21 @@ * b.buffer_type = MYSQL_TYPE_STRING */ __pyx_v_b->length = (&__pyx_v_c->ul); - goto __pyx_L14; + goto __pyx_L12; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":380 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":380 * c.ul = PyBytes_GET_SIZE(o) * b.length = &c.ul * elif isinstance(o, _AbstractIterWrapper): # <<<<<<<<<<<<<< * b.buffer_type = MYSQL_TYPE_STRING * b.length = &c.ul */ - __pyx_t_3 = ((PyObject *)((PyObject*)__pyx_ptype_6oursql__AbstractIterWrapper)); - __Pyx_INCREF(__pyx_t_3); - __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_o, __pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_4) { + __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_o, ((PyObject*)__pyx_ptype_6oursql__AbstractIterWrapper)); + __pyx_t_10 = (__pyx_t_2 != 0); + if (__pyx_t_10) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":381 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":381 * b.length = &c.ul * elif isinstance(o, _AbstractIterWrapper): * b.buffer_type = MYSQL_TYPE_STRING # <<<<<<<<<<<<<< @@ -11100,7 +12073,7 @@ */ __pyx_v_b->buffer_type = MYSQL_TYPE_STRING; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":382 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":382 * elif isinstance(o, _AbstractIterWrapper): * b.buffer_type = MYSQL_TYPE_STRING * b.length = &c.ul # <<<<<<<<<<<<<< @@ -11109,148 +12082,155 @@ */ __pyx_v_b->length = (&__pyx_v_c->ul); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":383 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":383 * b.buffer_type = MYSQL_TYPE_STRING * b.length = &c.ul * long_strings.append((i, o)) # <<<<<<<<<<<<<< * else: * raise TypeError('cannot bind %r object' % o.__class__) */ - if (unlikely(((PyObject *)__pyx_v_long_strings) == Py_None)) { - PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L8;} - } - __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L8;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L8;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L6;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L6;} + __Pyx_GOTREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_o); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_o); __Pyx_GIVEREF(__pyx_v_o); - __pyx_t_3 = 0; - __pyx_t_10 = PyList_Append(__pyx_v_long_strings, ((PyObject *)__pyx_t_6)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L8;} + __pyx_t_4 = 0; + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_long_strings, ((PyObject *)__pyx_t_6)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L6;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; - goto __pyx_L14; + goto __pyx_L12; } /*else*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":385 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":385 * long_strings.append((i, o)) * else: * raise TypeError('cannot bind %r object' % o.__class__) # <<<<<<<<<<<<<< * if mysql_stmt_bind_param(self.stmt, bind): * self._raise_error() */ - __pyx_t_6 = PyObject_GetAttr(__pyx_v_o, __pyx_n_s____class__); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L8;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_o, __pyx_n_s____class__); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L6;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_36), __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L8;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_42), __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L6;} + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L8;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); - PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_3)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); - __pyx_t_3 = 0; - __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L8;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L6;} + __Pyx_GOTREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); + __pyx_t_4 = 0; + __pyx_t_4 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L6;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; - __Pyx_Raise(__pyx_t_3, 0, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - {__pyx_filename = __pyx_f[3]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L8;} + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + {__pyx_filename = __pyx_f[3]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L6;} } - __pyx_L14:; + __pyx_L12:; } - goto __pyx_L10; + goto __pyx_L8; } - __pyx_L10:; + __pyx_L8:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":386 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":386 * else: * raise TypeError('cannot bind %r object' % o.__class__) * if mysql_stmt_bind_param(self.stmt, bind): # <<<<<<<<<<<<<< * self._raise_error() * for i, o in long_strings: */ - __pyx_t_13 = mysql_stmt_bind_param(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->stmt, __pyx_v_bind); - if (__pyx_t_13) { + __pyx_t_10 = (mysql_stmt_bind_param(__pyx_v_self->stmt, __pyx_v_bind) != 0); + if (__pyx_t_10) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":387 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":387 * raise TypeError('cannot bind %r object' % o.__class__) * if mysql_stmt_bind_param(self.stmt, bind): * self._raise_error() # <<<<<<<<<<<<<< * for i, o in long_strings: * for s in o: */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->__pyx_vtab)->_raise_error(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L8;} - goto __pyx_L17; + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)__pyx_v_self->__pyx_vtab)->_raise_error(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L6;} + goto __pyx_L15; } - __pyx_L17:; + __pyx_L15:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":388 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":388 * if mysql_stmt_bind_param(self.stmt, bind): * self._raise_error() * for i, o in long_strings: # <<<<<<<<<<<<<< * for s in o: * if self.conn.use_unicode: */ - if (unlikely(((PyObject *)__pyx_v_long_strings) == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L8;} - } - __pyx_t_3 = ((PyObject *)__pyx_v_long_strings); __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; + __pyx_t_4 = ((PyObject *)__pyx_v_long_strings); __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0; for (;;) { - if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break; - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L6;} + #else + __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L6;} + #endif 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[3]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L6;} + } + #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { - if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) { - if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2); - else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence)); - {__pyx_filename = __pyx_f[3]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L8;} - } __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { - if (unlikely(PyList_GET_SIZE(sequence) != 2)) { - if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2); - else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence)); - {__pyx_filename = __pyx_f[3]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L8;} - } __pyx_t_5 = PyList_GET_ITEM(sequence, 0); - __pyx_t_2 = PyList_GET_ITEM(sequence, 1); + __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_5); - __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + #else + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L6;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L6;} + __Pyx_GOTREF(__pyx_t_3); + #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { + } else + { Py_ssize_t index = -1; - __pyx_t_14 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L8;} - __Pyx_GOTREF(__pyx_t_14); + __pyx_t_15 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L6;} + __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_15 = Py_TYPE(__pyx_t_14)->tp_iternext; - index = 0; __pyx_t_5 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_5)) goto __pyx_L20_unpacking_failed; + __pyx_t_16 = Py_TYPE(__pyx_t_15)->tp_iternext; + index = 0; __pyx_t_5 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_5)) goto __pyx_L18_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - index = 1; __pyx_t_2 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_2)) goto __pyx_L20_unpacking_failed; - __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 2) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L8;} - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - goto __pyx_L21_unpacking_done; - __pyx_L20_unpacking_failed:; - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear(); - if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[3]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L8;} - __pyx_L21_unpacking_done:; + index = 1; __pyx_t_3 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_3)) goto __pyx_L18_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_15), 2) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L6;} + __pyx_t_16 = NULL; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + goto __pyx_L19_unpacking_done; + __pyx_L18_unpacking_failed:; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_t_16 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + {__pyx_filename = __pyx_f[3]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L6;} + __pyx_L19_unpacking_done:; } - __pyx_t_16 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_16 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L8;} + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L6;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_v_i = __pyx_t_16; + __pyx_v_i = __pyx_t_12; __Pyx_XDECREF(__pyx_v_o); - __pyx_v_o = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_v_o = __pyx_t_3; + __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":389 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":389 * self._raise_error() * for i, o in long_strings: * for s in o: # <<<<<<<<<<<<<< @@ -11258,231 +12238,240 @@ * s = s.encode(self.conn._charset) */ if (PyList_CheckExact(__pyx_v_o) || PyTuple_CheckExact(__pyx_v_o)) { - __pyx_t_6 = __pyx_v_o; __Pyx_INCREF(__pyx_t_6); __pyx_t_16 = 0; + __pyx_t_6 = __pyx_v_o; __Pyx_INCREF(__pyx_t_6); __pyx_t_12 = 0; __pyx_t_17 = NULL; } else { - __pyx_t_16 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L8;} + __pyx_t_12 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L6;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_17 = Py_TYPE(__pyx_t_6)->tp_iternext; } for (;;) { - if (PyList_CheckExact(__pyx_t_6)) { - if (__pyx_t_16 >= PyList_GET_SIZE(__pyx_t_6)) break; - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_16); __Pyx_INCREF(__pyx_t_2); __pyx_t_16++; - } else if (PyTuple_CheckExact(__pyx_t_6)) { - if (__pyx_t_16 >= PyTuple_GET_SIZE(__pyx_t_6)) break; - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_16); __Pyx_INCREF(__pyx_t_2); __pyx_t_16++; + if (!__pyx_t_17 && PyList_CheckExact(__pyx_t_6)) { + if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_6)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_12); __Pyx_INCREF(__pyx_t_3); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L6;} + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L6;} + #endif + } else if (!__pyx_t_17 && PyTuple_CheckExact(__pyx_t_6)) { + if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_6)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_12); __Pyx_INCREF(__pyx_t_3); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L6;} + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L6;} + #endif } else { - __pyx_t_2 = __pyx_t_17(__pyx_t_6); - if (unlikely(!__pyx_t_2)) { + __pyx_t_3 = __pyx_t_17(__pyx_t_6); + if (unlikely(!__pyx_t_3)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[3]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L8;} + else {__pyx_filename = __pyx_f[3]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L6;} } break; } - __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF(__pyx_v_s); - __pyx_v_s = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_v_s = __pyx_t_3; + __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":390 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":390 * for i, o in long_strings: * for s in o: * if self.conn.use_unicode: # <<<<<<<<<<<<<< * s = s.encode(self.conn._charset) * PyBytes_AsStringAndSize(s, */ - if (((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn->use_unicode) { + __pyx_t_10 = (__pyx_v_self->conn->use_unicode != 0); + if (__pyx_t_10) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":391 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":391 * for s in o: * if self.conn.use_unicode: * s = s.encode(self.conn._charset) # <<<<<<<<<<<<<< * PyBytes_AsStringAndSize(s, * &long_buffer, &long_buffer_size) */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_s, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L8;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L8;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); - __Pyx_INCREF(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn->_charset); - PyTuple_SET_ITEM(__pyx_t_5, 0, ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn->_charset); - __Pyx_GIVEREF(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn->_charset); - __pyx_t_14 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L8;} - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s__encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L6;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L6;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_self->conn->_charset); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self->conn->_charset); + __Pyx_GIVEREF(__pyx_v_self->conn->_charset); + __pyx_t_15 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L6;} + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_v_s); - __pyx_v_s = __pyx_t_14; - __pyx_t_14 = 0; - goto __pyx_L24; + __pyx_v_s = __pyx_t_15; + __pyx_t_15 = 0; + goto __pyx_L22; } - __pyx_L24:; + __pyx_L22:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":393 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":393 * s = s.encode(self.conn._charset) * PyBytes_AsStringAndSize(s, * &long_buffer, &long_buffer_size) # <<<<<<<<<<<<<< * if mysql_stmt_send_long_data(self.stmt, i, * long_buffer, long_buffer_size): */ - __pyx_t_1 = PyBytes_AsStringAndSize(__pyx_v_s, ((char **)(&__pyx_v_long_buffer)), (&__pyx_v_long_buffer_size)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L8;} + __pyx_t_1 = PyBytes_AsStringAndSize(__pyx_v_s, ((char **)(&__pyx_v_long_buffer)), (&__pyx_v_long_buffer_size)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L6;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":395 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":395 * &long_buffer, &long_buffer_size) * if mysql_stmt_send_long_data(self.stmt, i, * long_buffer, long_buffer_size): # <<<<<<<<<<<<<< * self._raise_error() * if mysql_stmt_execute(self.stmt): */ - __pyx_t_13 = __pyx_f_6oursql_mysql_stmt_send_long_data(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->stmt, __pyx_v_i, ((char *)__pyx_v_long_buffer), __pyx_v_long_buffer_size); - if (__pyx_t_13) { + __pyx_t_10 = (__pyx_f_6oursql_mysql_stmt_send_long_data(__pyx_v_self->stmt, __pyx_v_i, ((char *)__pyx_v_long_buffer), __pyx_v_long_buffer_size) != 0); + if (__pyx_t_10) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":396 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":396 * if mysql_stmt_send_long_data(self.stmt, i, * long_buffer, long_buffer_size): * self._raise_error() # <<<<<<<<<<<<<< * if mysql_stmt_execute(self.stmt): * self._raise_error() */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->__pyx_vtab)->_raise_error(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L8;} - goto __pyx_L25; + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)__pyx_v_self->__pyx_vtab)->_raise_error(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L6;} + goto __pyx_L23; } - __pyx_L25:; + __pyx_L23:; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":397 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":397 * long_buffer, long_buffer_size): * self._raise_error() * if mysql_stmt_execute(self.stmt): # <<<<<<<<<<<<<< * self._raise_error() * if _oursqlx_stmt_cursor_prefetch(self.stmt, &self.buffered): */ - __pyx_t_1 = __pyx_f_6oursql_mysql_stmt_execute(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->stmt); - if (__pyx_t_1) { + __pyx_t_10 = (__pyx_f_6oursql_mysql_stmt_execute(__pyx_v_self->stmt) != 0); + if (__pyx_t_10) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":398 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":398 * self._raise_error() * if mysql_stmt_execute(self.stmt): * self._raise_error() # <<<<<<<<<<<<<< * if _oursqlx_stmt_cursor_prefetch(self.stmt, &self.buffered): * self._raise_error() */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->__pyx_vtab)->_raise_error(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L8;} - goto __pyx_L26; + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)__pyx_v_self->__pyx_vtab)->_raise_error(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L6;} + goto __pyx_L24; } - __pyx_L26:; + __pyx_L24:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":399 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":399 * if mysql_stmt_execute(self.stmt): * self._raise_error() * if _oursqlx_stmt_cursor_prefetch(self.stmt, &self.buffered): # <<<<<<<<<<<<<< * self._raise_error() * self.exhausted = False */ - __pyx_t_1 = _oursqlx_stmt_cursor_prefetch(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->stmt, (&((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->buffered)); - if (__pyx_t_1) { + __pyx_t_10 = (_oursqlx_stmt_cursor_prefetch(__pyx_v_self->stmt, (&__pyx_v_self->buffered)) != 0); + if (__pyx_t_10) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":400 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":400 * self._raise_error() * if _oursqlx_stmt_cursor_prefetch(self.stmt, &self.buffered): * self._raise_error() # <<<<<<<<<<<<<< * self.exhausted = False * if self.result_data: */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->__pyx_vtab)->_raise_error(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L8;} - goto __pyx_L27; + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)__pyx_v_self->__pyx_vtab)->_raise_error(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L6;} + goto __pyx_L25; } - __pyx_L27:; + __pyx_L25:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":401 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":401 * if _oursqlx_stmt_cursor_prefetch(self.stmt, &self.buffered): * self._raise_error() * self.exhausted = False # <<<<<<<<<<<<<< * if self.result_data: * self.data_waiting = True */ - ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->exhausted = 0; + __pyx_v_self->exhausted = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":402 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":402 * self._raise_error() * self.exhausted = False * if self.result_data: # <<<<<<<<<<<<<< * self.data_waiting = True * if self.conn.warning_count(): */ - __pyx_t_4 = (((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->result_data != 0); - if (__pyx_t_4) { + __pyx_t_10 = (__pyx_v_self->result_data != 0); + if (__pyx_t_10) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":403 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":403 * self.exhausted = False * if self.result_data: * self.data_waiting = True # <<<<<<<<<<<<<< * if self.conn.warning_count(): * self.warnings.extend(_do_warnings_query(self.conn)) */ - ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->data_waiting = 1; - goto __pyx_L28; + __pyx_v_self->data_waiting = 1; + goto __pyx_L26; } - __pyx_L28:; + __pyx_L26:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":404 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":404 * if self.result_data: * self.data_waiting = True * if self.conn.warning_count(): # <<<<<<<<<<<<<< * self.warnings.extend(_do_warnings_query(self.conn)) * finally: */ - __pyx_t_3 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn), __pyx_n_s__warning_count); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L8;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L8;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->conn), __pyx_n_s__warning_count); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L6;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L6;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L8;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L6;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__pyx_t_4) { + if (__pyx_t_10) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":405 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":405 * self.data_waiting = True * if self.conn.warning_count(): * self.warnings.extend(_do_warnings_query(self.conn)) # <<<<<<<<<<<<<< * finally: * PyMem_Free(buf) */ - __pyx_t_6 = PyObject_GetAttr(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->warnings, __pyx_n_s__extend); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L8;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->warnings, __pyx_n_s__extend); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L6;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s___do_warnings_query); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L8;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L8;} - __Pyx_GOTREF(((PyObject *)__pyx_t_14)); - __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn)); - PyTuple_SET_ITEM(__pyx_t_14, 0, ((PyObject *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn)); - __Pyx_GIVEREF(((PyObject *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn)); - __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L8;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s___do_warnings_query); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L6;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L6;} + __Pyx_GOTREF(__pyx_t_15); + __Pyx_INCREF(((PyObject *)__pyx_v_self->conn)); + PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_v_self->conn)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self->conn)); + __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L6;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0; - __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L8;} - __Pyx_GOTREF(((PyObject *)__pyx_t_14)); - PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0; + __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L6;} + __Pyx_GOTREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L8;} + __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L6;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - goto __pyx_L29; + goto __pyx_L27; } - __pyx_L29:; + __pyx_L27:; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":407 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":407 * self.warnings.extend(_do_warnings_query(self.conn)) * finally: * PyMem_Free(buf) # <<<<<<<<<<<<<< @@ -11494,19 +12483,19 @@ PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb; int __pyx_exc_lineno; __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0; - __pyx_why = 0; goto __pyx_L9; - __pyx_L8: { + __pyx_why = 0; goto __pyx_L7; + __pyx_L6: { __pyx_why = 4; - __Pyx_XDECREF(__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_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb); __pyx_exc_lineno = __pyx_lineno; - goto __pyx_L9; + goto __pyx_L7; } - __pyx_L9:; + __pyx_L7:; PyMem_Free(__pyx_v_buf); switch (__pyx_why) { case 4: { @@ -11523,15 +12512,14 @@ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __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_14); + __Pyx_XDECREF(__pyx_t_15); __Pyx_AddTraceback("oursql._Statement.execute", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_XDECREF(__pyx_v_parameters); __Pyx_XDECREF(__pyx_v_long_strings); __Pyx_XDECREF(__pyx_v_temp_strings); __Pyx_XDECREF(__pyx_v_o); @@ -11541,7 +12529,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":409 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10_Statement_11fetchone(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6oursql_10_Statement_11fetchone(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("fetchone (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_Statement_10fetchone(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":409 * PyMem_Free(buf) * * def fetchone(self): # <<<<<<<<<<<<<< @@ -11549,8 +12548,7 @@ * cdef column_output *c */ -static PyObject *__pyx_pf_6oursql_10_Statement_5fetchone(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pf_6oursql_10_Statement_5fetchone(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_6oursql_10_Statement_10fetchone(struct __pyx_obj_6oursql__Statement *__pyx_v_self) { MYSQL_BIND __pyx_v_b_tryagain; struct __pyx_t_6oursql_column_output *__pyx_v_c; union __pyx_t_6oursql_column_data *__pyx_v_d; @@ -11563,44 +12561,43 @@ int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; - my_bool __pyx_t_4; - PyObject *__pyx_t_5 = NULL; - unsigned int __pyx_t_6; - enum enum_field_types __pyx_t_7; - int __pyx_t_8; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + int __pyx_t_6; + unsigned long __pyx_t_7; + PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("fetchone"); + __Pyx_RefNannySetupContext("fetchone", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":416 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":416 * cdef int result * cdef uint64_t u * self._check_closed() # <<<<<<<<<<<<<< * if not self.result_data or self.exhausted: * return None */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->__pyx_vtab)->_check_closed(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)__pyx_v_self->__pyx_vtab)->_check_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":417 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":417 * cdef uint64_t u * self._check_closed() * if not self.result_data or self.exhausted: # <<<<<<<<<<<<<< * return None * elif self.result_data: */ - __pyx_t_2 = (!(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->result_data != 0)); + __pyx_t_2 = (!(__pyx_v_self->result_data != 0)); if (!__pyx_t_2) { - __pyx_t_3 = ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->exhausted; + __pyx_t_3 = (__pyx_v_self->exhausted != 0); } else { __pyx_t_3 = __pyx_t_2; } if (__pyx_t_3) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":418 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":418 * self._check_closed() * if not self.result_data or self.exhausted: * return None # <<<<<<<<<<<<<< @@ -11611,122 +12608,122 @@ __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; - goto __pyx_L5; + goto __pyx_L3; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":419 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":419 * if not self.result_data or self.exhausted: * return None * elif self.result_data: # <<<<<<<<<<<<<< * self._bind_buffer() * result = mysql_stmt_fetch(self.stmt) */ - __pyx_t_3 = (((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->result_data != 0); + __pyx_t_3 = (__pyx_v_self->result_data != 0); if (__pyx_t_3) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":420 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":420 * return None * elif self.result_data: * self._bind_buffer() # <<<<<<<<<<<<<< * result = mysql_stmt_fetch(self.stmt) * self.fetched += 1 */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->__pyx_vtab)->_bind_buffer(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L5; + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)__pyx_v_self->__pyx_vtab)->_bind_buffer(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L3; } - __pyx_L5:; + __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":421 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":421 * elif self.result_data: * self._bind_buffer() * result = mysql_stmt_fetch(self.stmt) # <<<<<<<<<<<<<< * self.fetched += 1 * if result == 1: */ - __pyx_v_result = __pyx_f_6oursql_mysql_stmt_fetch(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->stmt); + __pyx_v_result = __pyx_f_6oursql_mysql_stmt_fetch(__pyx_v_self->stmt); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":422 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":422 * self._bind_buffer() * result = mysql_stmt_fetch(self.stmt) * self.fetched += 1 # <<<<<<<<<<<<<< * if result == 1: * self._raise_error() */ - ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->fetched = (((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->fetched + 1); + __pyx_v_self->fetched = (__pyx_v_self->fetched + 1); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":423 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":423 * result = mysql_stmt_fetch(self.stmt) * self.fetched += 1 * if result == 1: # <<<<<<<<<<<<<< * self._raise_error() * elif result == MYSQL_NO_DATA: */ - __pyx_t_3 = (__pyx_v_result == 1); + __pyx_t_3 = ((__pyx_v_result == 1) != 0); if (__pyx_t_3) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":424 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":424 * self.fetched += 1 * if result == 1: * self._raise_error() # <<<<<<<<<<<<<< * elif result == MYSQL_NO_DATA: * if mysql_stmt_free_result(self.stmt): */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->__pyx_vtab)->_raise_error(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L6; + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)__pyx_v_self->__pyx_vtab)->_raise_error(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L4; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":425 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":425 * if result == 1: * self._raise_error() * elif result == MYSQL_NO_DATA: # <<<<<<<<<<<<<< * if mysql_stmt_free_result(self.stmt): * self._raise_error() */ - __pyx_t_3 = (__pyx_v_result == MYSQL_NO_DATA); + __pyx_t_3 = ((__pyx_v_result == MYSQL_NO_DATA) != 0); if (__pyx_t_3) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":426 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":426 * self._raise_error() * elif result == MYSQL_NO_DATA: * if mysql_stmt_free_result(self.stmt): # <<<<<<<<<<<<<< * self._raise_error() * self.buffered = self.data_waiting = False */ - __pyx_t_4 = mysql_stmt_free_result(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->stmt); - if (__pyx_t_4) { + __pyx_t_3 = (mysql_stmt_free_result(__pyx_v_self->stmt) != 0); + if (__pyx_t_3) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":427 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":427 * elif result == MYSQL_NO_DATA: * if mysql_stmt_free_result(self.stmt): * self._raise_error() # <<<<<<<<<<<<<< * self.buffered = self.data_waiting = False * self.exhausted = True */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->__pyx_vtab)->_raise_error(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L7; + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)__pyx_v_self->__pyx_vtab)->_raise_error(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L5; } - __pyx_L7:; + __pyx_L5:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":428 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":428 * if mysql_stmt_free_result(self.stmt): * self._raise_error() * self.buffered = self.data_waiting = False # <<<<<<<<<<<<<< * self.exhausted = True * return None */ - ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->buffered = 0; - ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->data_waiting = 0; + __pyx_v_self->buffered = 0; + __pyx_v_self->data_waiting = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":429 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":429 * self._raise_error() * self.buffered = self.data_waiting = False * self.exhausted = True # <<<<<<<<<<<<<< * return None * if self.result_fields == 0: */ - ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->exhausted = 1; + __pyx_v_self->exhausted = 1; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":430 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":430 * self.buffered = self.data_waiting = False * self.exhausted = True * return None # <<<<<<<<<<<<<< @@ -11737,21 +12734,21 @@ __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; - goto __pyx_L6; + goto __pyx_L4; } - __pyx_L6:; + __pyx_L4:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":431 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":431 * self.exhausted = True * return None * if self.result_fields == 0: # <<<<<<<<<<<<<< * return () * ret = PyTuple_New(self.result_fields) */ - __pyx_t_3 = (((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->result_fields == 0); + __pyx_t_3 = ((__pyx_v_self->result_fields == 0) != 0); if (__pyx_t_3) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":432 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":432 * return None * if self.result_fields == 0: * return () # <<<<<<<<<<<<<< @@ -11762,53 +12759,53 @@ __Pyx_INCREF(((PyObject *)__pyx_empty_tuple)); __pyx_r = ((PyObject *)__pyx_empty_tuple); goto __pyx_L0; - goto __pyx_L8; + goto __pyx_L6; } - __pyx_L8:; + __pyx_L6:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":433 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":433 * if self.result_fields == 0: * return () * ret = PyTuple_New(self.result_fields) # <<<<<<<<<<<<<< * # Cache the connection charset. * self.conn.charset */ - __pyx_t_5 = PyTuple_New(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->result_fields); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); - __pyx_v_ret = __pyx_t_5; - __pyx_t_5 = 0; + __pyx_t_4 = PyTuple_New(__pyx_v_self->result_fields); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_ret = __pyx_t_4; + __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":435 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":435 * ret = PyTuple_New(self.result_fields) * # Cache the connection charset. * self.conn.charset # <<<<<<<<<<<<<< * for 0 <= i < self.result_fields: * c = &self.result_data[i] */ - __pyx_t_5 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn), __pyx_n_s__charset); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->conn), __pyx_n_s__charset); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":436 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":436 * # Cache the connection charset. * self.conn.charset * for 0 <= i < self.result_fields: # <<<<<<<<<<<<<< * c = &self.result_data[i] * d = &c.buf */ - __pyx_t_6 = ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->result_fields; - for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) { + __pyx_t_5 = __pyx_v_self->result_fields; + for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":437 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":437 * self.conn.charset * for 0 <= i < self.result_fields: * c = &self.result_data[i] # <<<<<<<<<<<<<< * d = &c.buf * if c.is_null: */ - __pyx_v_c = (&(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->result_data[__pyx_v_i])); + __pyx_v_c = (&(__pyx_v_self->result_data[__pyx_v_i])); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":438 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":438 * for 0 <= i < self.result_fields: * c = &self.result_data[i] * d = &c.buf # <<<<<<<<<<<<<< @@ -11817,16 +12814,17 @@ */ __pyx_v_d = (&__pyx_v_c->buf); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":439 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":439 * c = &self.result_data[i] * d = &c.buf * if c.is_null: # <<<<<<<<<<<<<< * val = None * elif c.type in (MYSQL_TYPE_STRING, MYSQL_TYPE_BLOB, */ - if (__pyx_v_c->is_null) { + __pyx_t_3 = (__pyx_v_c->is_null != 0); + if (__pyx_t_3) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":440 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":440 * d = &c.buf * if c.is_null: * val = None # <<<<<<<<<<<<<< @@ -11836,42 +12834,46 @@ __Pyx_INCREF(Py_None); __Pyx_XDECREF(__pyx_v_val); __pyx_v_val = Py_None; - goto __pyx_L11; + goto __pyx_L9; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":441 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":441 * if c.is_null: * val = None * elif c.type in (MYSQL_TYPE_STRING, MYSQL_TYPE_BLOB, # <<<<<<<<<<<<<< * MYSQL_TYPE_VAR_STRING): * # Oh string handling. */ - __pyx_t_7 = __pyx_v_c->type; - __pyx_t_3 = ((int)(__pyx_t_7 == MYSQL_TYPE_STRING)); - if (!__pyx_t_3) { - __pyx_t_2 = ((int)(__pyx_t_7 == MYSQL_TYPE_BLOB)); - __pyx_t_8 = __pyx_t_2; - } else { - __pyx_t_8 = __pyx_t_3; - } - if (!__pyx_t_8) { + switch (__pyx_v_c->type) { + case MYSQL_TYPE_STRING: + case MYSQL_TYPE_BLOB: - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":442 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":442 * val = None * elif c.type in (MYSQL_TYPE_STRING, MYSQL_TYPE_BLOB, * MYSQL_TYPE_VAR_STRING): # <<<<<<<<<<<<<< * # Oh string handling. * val = None */ - __pyx_t_3 = ((int)(__pyx_t_7 == MYSQL_TYPE_VAR_STRING)); - __pyx_t_2 = __pyx_t_3; - } else { - __pyx_t_2 = __pyx_t_8; + case MYSQL_TYPE_VAR_STRING: + + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":441 + * if c.is_null: + * val = None + * elif c.type in (MYSQL_TYPE_STRING, MYSQL_TYPE_BLOB, # <<<<<<<<<<<<<< + * MYSQL_TYPE_VAR_STRING): + * # Oh string handling. + */ + __pyx_t_3 = 1; + break; + default: + __pyx_t_3 = 0; + break; } - __pyx_t_8 = __pyx_t_2; - if (__pyx_t_8) { + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":444 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":444 * MYSQL_TYPE_VAR_STRING): * # Oh string handling. * val = None # <<<<<<<<<<<<<< @@ -11882,82 +12884,82 @@ __Pyx_XDECREF(__pyx_v_val); __pyx_v_val = Py_None; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":447 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":447 * # If the string wasn't too long to fit in our minimal buffer, * # then we can just copy it out of the buffer. * if not c.error: # <<<<<<<<<<<<<< * val = PyBytes_FromStringAndSize(&d.c, c.length) * # If we already have all the results stored clientside, or we */ - __pyx_t_8 = (!__pyx_v_c->error); - if (__pyx_t_8) { + __pyx_t_2 = ((!(__pyx_v_c->error != 0)) != 0); + if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":448 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":448 * # then we can just copy it out of the buffer. * if not c.error: * val = PyBytes_FromStringAndSize(&d.c, c.length) # <<<<<<<<<<<<<< * # If we already have all the results stored clientside, or we * # don't care about strings being too long, or we *do* care */ - __pyx_t_5 = PyBytes_FromStringAndSize((&__pyx_v_d->c), __pyx_v_c->length); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyBytes_FromStringAndSize((&__pyx_v_d->c), __pyx_v_c->length); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_v_val); - __pyx_v_val = __pyx_t_5; - __pyx_t_5 = 0; - goto __pyx_L12; + __pyx_v_val = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L10; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":452 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":452 * # don't care about strings being too long, or we *do* care * # about strings being too long and it's not too long... * elif (self.buffered # <<<<<<<<<<<<<< * or not self.string_limit * or c.length <= self.string_limit): */ - if (!((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->buffered) { + if (!(__pyx_v_self->buffered != 0)) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":453 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":453 * # about strings being too long and it's not too long... * elif (self.buffered * or not self.string_limit # <<<<<<<<<<<<<< * or c.length <= self.string_limit): * # First, allocate a string of the necessary length. */ - __pyx_t_8 = (!((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->string_limit); - if (!__pyx_t_8) { + __pyx_t_2 = (!(__pyx_v_self->string_limit != 0)); + if (!__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":454 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":454 * elif (self.buffered * or not self.string_limit * or c.length <= self.string_limit): # <<<<<<<<<<<<<< * # First, allocate a string of the necessary length. * val = PyBytes_FromStringAndSize(NULL, c.length) */ - __pyx_t_2 = (__pyx_v_c->length <= ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->string_limit); - __pyx_t_3 = __pyx_t_2; + __pyx_t_3 = (__pyx_v_c->length <= __pyx_v_self->string_limit); + __pyx_t_6 = __pyx_t_3; } else { - __pyx_t_3 = __pyx_t_8; + __pyx_t_6 = __pyx_t_2; } - __pyx_t_8 = __pyx_t_3; + __pyx_t_2 = __pyx_t_6; } else { - __pyx_t_8 = ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->buffered; + __pyx_t_2 = (__pyx_v_self->buffered != 0); } - if (__pyx_t_8) { + if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":456 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":456 * or c.length <= self.string_limit): * # First, allocate a string of the necessary length. * val = PyBytes_FromStringAndSize(NULL, c.length) # <<<<<<<<<<<<<< * # Then, fill up a MYSQL_BIND that will fetch into the * # aforementioned string. */ - __pyx_t_5 = PyBytes_FromStringAndSize(NULL, __pyx_v_c->length); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyBytes_FromStringAndSize(NULL, __pyx_v_c->length); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_v_val); - __pyx_v_val = __pyx_t_5; - __pyx_t_5 = 0; + __pyx_v_val = __pyx_t_4; + __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":459 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":459 * # Then, fill up a MYSQL_BIND that will fetch into the * # aforementioned string. * memset(&b_tryagain, 0, sizeof(MYSQL_BIND)) # <<<<<<<<<<<<<< @@ -11966,7 +12968,7 @@ */ memset((&__pyx_v_b_tryagain), 0, (sizeof(MYSQL_BIND))); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":460 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":460 * # aforementioned string. * memset(&b_tryagain, 0, sizeof(MYSQL_BIND)) * b_tryagain.buffer_type = MYSQL_TYPE_BLOB # <<<<<<<<<<<<<< @@ -11975,16 +12977,17 @@ */ __pyx_v_b_tryagain.buffer_type = MYSQL_TYPE_BLOB; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":461 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":461 * memset(&b_tryagain, 0, sizeof(MYSQL_BIND)) * b_tryagain.buffer_type = MYSQL_TYPE_BLOB * b_tryagain.buffer_length = c.length # <<<<<<<<<<<<<< * b_tryagain.buffer = PyBytes_AS_STRING(val) * # This means that if there is still a truncation error for */ - __pyx_v_b_tryagain.buffer_length = __pyx_v_c->length; + __pyx_t_7 = __pyx_v_c->length; + __pyx_v_b_tryagain.buffer_length = __pyx_t_7; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":462 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":462 * b_tryagain.buffer_type = MYSQL_TYPE_BLOB * b_tryagain.buffer_length = c.length * b_tryagain.buffer = PyBytes_AS_STRING(val) # <<<<<<<<<<<<<< @@ -11993,7 +12996,7 @@ */ __pyx_v_b_tryagain.buffer = PyBytes_AS_STRING(__pyx_v_val); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":466 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":466 * # whatever reason, something later in the function will * # complain. * b_tryagain.error = &c.error # <<<<<<<<<<<<<< @@ -12002,80 +13005,82 @@ */ __pyx_v_b_tryagain.error = (&__pyx_v_c->error); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":468 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":468 * b_tryagain.error = &c.error * # Aaand fetch it. * if mysql_stmt_fetch_column(self.stmt, &b_tryagain, i, 0): # <<<<<<<<<<<<<< * self._raise_error() * # But, if we care about the length of the string, we need to */ - __pyx_t_1 = __pyx_f_6oursql_mysql_stmt_fetch_column(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->stmt, (&__pyx_v_b_tryagain), __pyx_v_i, 0); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_f_6oursql_mysql_stmt_fetch_column(__pyx_v_self->stmt, (&__pyx_v_b_tryagain), __pyx_v_i, 0) != 0); + if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":469 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":469 * # Aaand fetch it. * if mysql_stmt_fetch_column(self.stmt, &b_tryagain, i, 0): * self._raise_error() # <<<<<<<<<<<<<< * # But, if we care about the length of the string, we need to * # make sure we have a consistent API. */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->__pyx_vtab)->_raise_error(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L13; + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)__pyx_v_self->__pyx_vtab)->_raise_error(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L11; } - __pyx_L13:; - goto __pyx_L12; + __pyx_L11:; + goto __pyx_L10; } - __pyx_L12:; + __pyx_L10:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":472 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":472 * # But, if we care about the length of the string, we need to * # make sure we have a consistent API. * if self.string_limit: # <<<<<<<<<<<<<< * # At this point, if 'val' still isn't set, it means we * # should stream it from the database. */ - if (((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->string_limit) { + __pyx_t_2 = (__pyx_v_self->string_limit != 0); + if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":475 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":475 * # At this point, if 'val' still isn't set, it means we * # should stream it from the database. * if val is None: # <<<<<<<<<<<<<< * val = _ResultStringStream(self, i, c.length) * c.error = False */ - __pyx_t_8 = (__pyx_v_val == Py_None); - if (__pyx_t_8) { + __pyx_t_2 = (__pyx_v_val == Py_None); + __pyx_t_6 = (__pyx_t_2 != 0); + if (__pyx_t_6) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":476 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":476 * # should stream it from the database. * if val is None: * val = _ResultStringStream(self, i, c.length) # <<<<<<<<<<<<<< * c.error = False * # Since _ResultStringStream has a file-like interface, we */ - __pyx_t_5 = PyLong_FromUnsignedLong(__pyx_v_i); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_9 = PyLong_FromUnsignedLong(__pyx_v_c->length); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_10)); - __Pyx_INCREF(__pyx_v_self); - PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_self); - __Pyx_GIVEREF(__pyx_v_self); - PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_5); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_9); - __Pyx_GIVEREF(__pyx_t_9); - __pyx_t_5 = 0; - __pyx_t_9 = 0; - __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6oursql__ResultStringStream)), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyLong_FromUnsignedLong(__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = PyLong_FromUnsignedLong(__pyx_v_c->length); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_self)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_8); + __pyx_t_4 = 0; + __pyx_t_8 = 0; + __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6oursql__ResultStringStream)), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_v_val); - __pyx_v_val = __pyx_t_9; - __pyx_t_9 = 0; + __pyx_v_val = __pyx_t_8; + __pyx_t_8 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":477 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":477 * if val is None: * val = _ResultStringStream(self, i, c.length) * c.error = False # <<<<<<<<<<<<<< @@ -12083,242 +13088,255 @@ * # make sure that everything passed back has a file-like */ __pyx_v_c->error = 0; - goto __pyx_L15; + goto __pyx_L13; } /*else*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":482 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":482 * # interface. * else: * val = io.BytesIO(val) # <<<<<<<<<<<<<< * # And if we're decoding unicode, decode unicode in a * # streaming fashion! */ - __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__io); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__io); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__BytesIO); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__BytesIO); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_9)); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_val); - PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_val); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); - __pyx_t_5 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; + __pyx_t_4 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_v_val); - __pyx_v_val = __pyx_t_5; - __pyx_t_5 = 0; + __pyx_v_val = __pyx_t_4; + __pyx_t_4 = 0; } - __pyx_L15:; + __pyx_L13:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":485 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":485 * # And if we're decoding unicode, decode unicode in a * # streaming fashion! * if self.conn.use_unicode and not c.is_binary: # <<<<<<<<<<<<<< * val = codecs.getreader(self.conn._charset)(val) * else: */ - if (((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn->use_unicode) { - __pyx_t_8 = (!__pyx_v_c->is_binary); - __pyx_t_3 = __pyx_t_8; + if ((__pyx_v_self->conn->use_unicode != 0)) { + __pyx_t_6 = (!(__pyx_v_c->is_binary != 0)); + __pyx_t_2 = __pyx_t_6; } else { - __pyx_t_3 = ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn->use_unicode; + __pyx_t_2 = (__pyx_v_self->conn->use_unicode != 0); } - if (__pyx_t_3) { + if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":486 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":486 * # streaming fashion! * if self.conn.use_unicode and not c.is_binary: * val = codecs.getreader(self.conn._charset)(val) # <<<<<<<<<<<<<< * else: * # At this point, 'val' should be a string read in from the */ - __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__codecs); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_9 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__getreader); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__codecs); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__getreader); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_self->conn->_charset); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->conn->_charset); + __Pyx_GIVEREF(__pyx_v_self->conn->_charset); + __pyx_t_9 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); - __Pyx_INCREF(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn->_charset); - PyTuple_SET_ITEM(__pyx_t_5, 0, ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn->_charset); - __Pyx_GIVEREF(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn->_charset); - __pyx_t_10 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __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[3]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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[3]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_val); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_val); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); - __pyx_t_9 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __pyx_t_8 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_v_val); - __pyx_v_val = __pyx_t_9; - __pyx_t_9 = 0; - goto __pyx_L16; + __pyx_v_val = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L14; } - __pyx_L16:; - goto __pyx_L14; + __pyx_L14:; + goto __pyx_L12; } /*else*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":491 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":491 * # database since there's no possibility of streaming. If * # we're handling unicode, decode it. * if self.conn.use_unicode and not c.is_binary: # <<<<<<<<<<<<<< * val = val.decode(self.conn._charset) * elif c.type in (MYSQL_TYPE_DECIMAL, MYSQL_TYPE_NEWDECIMAL): */ - if (((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn->use_unicode) { - __pyx_t_3 = (!__pyx_v_c->is_binary); - __pyx_t_8 = __pyx_t_3; + if ((__pyx_v_self->conn->use_unicode != 0)) { + __pyx_t_2 = (!(__pyx_v_c->is_binary != 0)); + __pyx_t_6 = __pyx_t_2; } else { - __pyx_t_8 = ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn->use_unicode; + __pyx_t_6 = (__pyx_v_self->conn->use_unicode != 0); } - if (__pyx_t_8) { + if (__pyx_t_6) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":492 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":492 * # we're handling unicode, decode it. * if self.conn.use_unicode and not c.is_binary: * val = val.decode(self.conn._charset) # <<<<<<<<<<<<<< * elif c.type in (MYSQL_TYPE_DECIMAL, MYSQL_TYPE_NEWDECIMAL): * val = decimal.Decimal( */ - __pyx_t_9 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__decode); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__decode); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_self->conn->_charset); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->conn->_charset); + __Pyx_GIVEREF(__pyx_v_self->conn->_charset); + __pyx_t_9 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); - __Pyx_INCREF(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn->_charset); - PyTuple_SET_ITEM(__pyx_t_5, 0, ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn->_charset); - __Pyx_GIVEREF(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn->_charset); - __pyx_t_10 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_v_val); - __pyx_v_val = __pyx_t_10; - __pyx_t_10 = 0; - goto __pyx_L17; + __pyx_v_val = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L15; } - __pyx_L17:; + __pyx_L15:; } - __pyx_L14:; - goto __pyx_L11; + __pyx_L12:; + goto __pyx_L9; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":493 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":493 * if self.conn.use_unicode and not c.is_binary: * val = val.decode(self.conn._charset) * elif c.type in (MYSQL_TYPE_DECIMAL, MYSQL_TYPE_NEWDECIMAL): # <<<<<<<<<<<<<< * val = decimal.Decimal( * PyBytes_FromStringAndSize(d.dec, c.length).decode(self.conn._charset)) */ - __pyx_t_7 = __pyx_v_c->type; - __pyx_t_8 = ((int)(__pyx_t_7 == MYSQL_TYPE_DECIMAL)); - if (!__pyx_t_8) { - __pyx_t_3 = ((int)(__pyx_t_7 == MYSQL_TYPE_NEWDECIMAL)); - __pyx_t_2 = __pyx_t_3; - } else { - __pyx_t_2 = __pyx_t_8; + switch (__pyx_v_c->type) { + case MYSQL_TYPE_DECIMAL: + case MYSQL_TYPE_NEWDECIMAL: + __pyx_t_6 = 1; + break; + default: + __pyx_t_6 = 0; + break; } - __pyx_t_8 = __pyx_t_2; - if (__pyx_t_8) { + __pyx_t_2 = (__pyx_t_6 != 0); + if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":494 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":494 * val = val.decode(self.conn._charset) * elif c.type in (MYSQL_TYPE_DECIMAL, MYSQL_TYPE_NEWDECIMAL): * val = decimal.Decimal( # <<<<<<<<<<<<<< * PyBytes_FromStringAndSize(d.dec, c.length).decode(self.conn._charset)) * # Sometimes mysql likes to give back invalid data instead of doing */ - __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__decimal); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_5 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__Decimal); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__decimal); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s__Decimal); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":495 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":495 * elif c.type in (MYSQL_TYPE_DECIMAL, MYSQL_TYPE_NEWDECIMAL): * val = decimal.Decimal( * PyBytes_FromStringAndSize(d.dec, c.length).decode(self.conn._charset)) # <<<<<<<<<<<<<< * # Sometimes mysql likes to give back invalid data instead of doing * # anything sensible. */ - __pyx_t_10 = PyBytes_FromStringAndSize(__pyx_v_d->dec, __pyx_v_c->length); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_9 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__decode); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PyBytes_FromStringAndSize(__pyx_v_d->dec, __pyx_v_c->length); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_10)); - __Pyx_INCREF(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn->_charset); - PyTuple_SET_ITEM(__pyx_t_10, 0, ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn->_charset); - __Pyx_GIVEREF(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->conn->_charset); - __pyx_t_11 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s__decode); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; - __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_10)); - PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11); - __Pyx_GIVEREF(__pyx_t_11); - __pyx_t_11 = 0; - __pyx_t_11 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_INCREF(__pyx_v_self->conn->_charset); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_self->conn->_charset); + __Pyx_GIVEREF(__pyx_v_self->conn->_charset); + __pyx_t_10 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + __pyx_t_10 = 0; + __pyx_t_10 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_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_XDECREF(__pyx_v_val); - __pyx_v_val = __pyx_t_11; - __pyx_t_11 = 0; - goto __pyx_L11; + __pyx_v_val = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L9; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":498 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":498 * # Sometimes mysql likes to give back invalid data instead of doing * # anything sensible. * elif c.type in (MYSQL_TYPE_DATETIME, MYSQL_TYPE_TIMESTAMP, # <<<<<<<<<<<<<< * MYSQL_TYPE_DATE) and d.t.year == 0: * val = None */ - __pyx_t_7 = __pyx_v_c->type; - __pyx_t_8 = ((int)(__pyx_t_7 == MYSQL_TYPE_DATETIME)); - if (!__pyx_t_8) { - __pyx_t_2 = ((int)(__pyx_t_7 == MYSQL_TYPE_TIMESTAMP)); - __pyx_t_3 = __pyx_t_2; - } else { - __pyx_t_3 = __pyx_t_8; + switch (__pyx_v_c->type) { + case MYSQL_TYPE_DATETIME: + case MYSQL_TYPE_TIMESTAMP: + + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":499 + * # anything sensible. + * elif c.type in (MYSQL_TYPE_DATETIME, MYSQL_TYPE_TIMESTAMP, + * MYSQL_TYPE_DATE) and d.t.year == 0: # <<<<<<<<<<<<<< + * val = None + * elif c.type in (MYSQL_TYPE_DATETIME, MYSQL_TYPE_TIMESTAMP): + */ + case MYSQL_TYPE_DATE: + + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":498 + * # Sometimes mysql likes to give back invalid data instead of doing + * # anything sensible. + * elif c.type in (MYSQL_TYPE_DATETIME, MYSQL_TYPE_TIMESTAMP, # <<<<<<<<<<<<<< + * MYSQL_TYPE_DATE) and d.t.year == 0: + * val = None + */ + __pyx_t_2 = 1; + break; + default: + __pyx_t_2 = 0; + break; } - if (!__pyx_t_3) { + __pyx_t_6 = (__pyx_t_2 != 0); + if (__pyx_t_6) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":499 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":499 * # anything sensible. * elif c.type in (MYSQL_TYPE_DATETIME, MYSQL_TYPE_TIMESTAMP, * MYSQL_TYPE_DATE) and d.t.year == 0: # <<<<<<<<<<<<<< * val = None * elif c.type in (MYSQL_TYPE_DATETIME, MYSQL_TYPE_TIMESTAMP): */ - __pyx_t_8 = ((int)(__pyx_t_7 == MYSQL_TYPE_DATE)); - __pyx_t_2 = __pyx_t_8; + __pyx_t_2 = ((__pyx_v_d->t.year == 0) != 0); + __pyx_t_3 = __pyx_t_2; } else { - __pyx_t_2 = __pyx_t_3; + __pyx_t_3 = __pyx_t_6; } - __pyx_t_3 = __pyx_t_2; if (__pyx_t_3) { - __pyx_t_2 = (__pyx_v_d->t.year == 0); - __pyx_t_8 = __pyx_t_2; - } else { - __pyx_t_8 = __pyx_t_3; - } - if (__pyx_t_8) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":500 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":500 * elif c.type in (MYSQL_TYPE_DATETIME, MYSQL_TYPE_TIMESTAMP, * MYSQL_TYPE_DATE) and d.t.year == 0: * val = None # <<<<<<<<<<<<<< @@ -12328,481 +13346,485 @@ __Pyx_INCREF(Py_None); __Pyx_XDECREF(__pyx_v_val); __pyx_v_val = Py_None; - goto __pyx_L11; + goto __pyx_L9; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":501 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":501 * MYSQL_TYPE_DATE) and d.t.year == 0: * val = None * elif c.type in (MYSQL_TYPE_DATETIME, MYSQL_TYPE_TIMESTAMP): # <<<<<<<<<<<<<< * val = PyDateTime_FromDateAndTime(d.t.year, d.t.month, d.t.day, * d.t.hour, d.t.minute, d.t.second, d.t.second_part) */ - __pyx_t_7 = __pyx_v_c->type; - __pyx_t_8 = ((int)(__pyx_t_7 == MYSQL_TYPE_DATETIME)); - if (!__pyx_t_8) { - __pyx_t_3 = ((int)(__pyx_t_7 == MYSQL_TYPE_TIMESTAMP)); - __pyx_t_2 = __pyx_t_3; - } else { - __pyx_t_2 = __pyx_t_8; + switch (__pyx_v_c->type) { + case MYSQL_TYPE_DATETIME: + case MYSQL_TYPE_TIMESTAMP: + __pyx_t_3 = 1; + break; + default: + __pyx_t_3 = 0; + break; } - __pyx_t_8 = __pyx_t_2; - if (__pyx_t_8) { + __pyx_t_6 = (__pyx_t_3 != 0); + if (__pyx_t_6) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":503 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":503 * elif c.type in (MYSQL_TYPE_DATETIME, MYSQL_TYPE_TIMESTAMP): * val = PyDateTime_FromDateAndTime(d.t.year, d.t.month, d.t.day, * d.t.hour, d.t.minute, d.t.second, d.t.second_part) # <<<<<<<<<<<<<< * elif c.type == MYSQL_TYPE_DATE: * val = PyDate_FromDate(d.t.year, d.t.month, d.t.day) */ - __pyx_t_11 = PyDateTime_FromDateAndTime(__pyx_v_d->t.year, __pyx_v_d->t.month, __pyx_v_d->t.day, __pyx_v_d->t.hour, __pyx_v_d->t.minute, __pyx_v_d->t.second, __pyx_v_d->t.second_part); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = PyDateTime_FromDateAndTime(__pyx_v_d->t.year, __pyx_v_d->t.month, __pyx_v_d->t.day, __pyx_v_d->t.hour, __pyx_v_d->t.minute, __pyx_v_d->t.second, __pyx_v_d->t.second_part); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF(__pyx_v_val); - __pyx_v_val = __pyx_t_11; - __pyx_t_11 = 0; - goto __pyx_L11; + __pyx_v_val = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L9; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":504 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":504 * val = PyDateTime_FromDateAndTime(d.t.year, d.t.month, d.t.day, * d.t.hour, d.t.minute, d.t.second, d.t.second_part) * elif c.type == MYSQL_TYPE_DATE: # <<<<<<<<<<<<<< * val = PyDate_FromDate(d.t.year, d.t.month, d.t.day) * elif c.type == MYSQL_TYPE_TIME: */ - __pyx_t_8 = (__pyx_v_c->type == MYSQL_TYPE_DATE); - if (__pyx_t_8) { + __pyx_t_6 = ((__pyx_v_c->type == MYSQL_TYPE_DATE) != 0); + if (__pyx_t_6) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":505 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":505 * d.t.hour, d.t.minute, d.t.second, d.t.second_part) * elif c.type == MYSQL_TYPE_DATE: * val = PyDate_FromDate(d.t.year, d.t.month, d.t.day) # <<<<<<<<<<<<<< * elif c.type == MYSQL_TYPE_TIME: * val = PyTime_FromTime( */ - __pyx_t_11 = PyDate_FromDate(__pyx_v_d->t.year, __pyx_v_d->t.month, __pyx_v_d->t.day); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = PyDate_FromDate(__pyx_v_d->t.year, __pyx_v_d->t.month, __pyx_v_d->t.day); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF(__pyx_v_val); - __pyx_v_val = __pyx_t_11; - __pyx_t_11 = 0; - goto __pyx_L11; + __pyx_v_val = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L9; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":506 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":506 * elif c.type == MYSQL_TYPE_DATE: * val = PyDate_FromDate(d.t.year, d.t.month, d.t.day) * elif c.type == MYSQL_TYPE_TIME: # <<<<<<<<<<<<<< * val = PyTime_FromTime( * d.t.hour, d.t.minute, d.t.second, d.t.second_part) */ - __pyx_t_8 = (__pyx_v_c->type == MYSQL_TYPE_TIME); - if (__pyx_t_8) { + __pyx_t_6 = ((__pyx_v_c->type == MYSQL_TYPE_TIME) != 0); + if (__pyx_t_6) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":508 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":508 * elif c.type == MYSQL_TYPE_TIME: * val = PyTime_FromTime( * d.t.hour, d.t.minute, d.t.second, d.t.second_part) # <<<<<<<<<<<<<< * elif c.type == MYSQL_TYPE_TINY: * if c.flags & UNSIGNED_FLAG == UNSIGNED_FLAG: */ - __pyx_t_11 = PyTime_FromTime(__pyx_v_d->t.hour, __pyx_v_d->t.minute, __pyx_v_d->t.second, __pyx_v_d->t.second_part); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = PyTime_FromTime(__pyx_v_d->t.hour, __pyx_v_d->t.minute, __pyx_v_d->t.second, __pyx_v_d->t.second_part); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF(__pyx_v_val); - __pyx_v_val = __pyx_t_11; - __pyx_t_11 = 0; - goto __pyx_L11; + __pyx_v_val = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L9; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":509 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":509 * val = PyTime_FromTime( * d.t.hour, d.t.minute, d.t.second, d.t.second_part) * elif c.type == MYSQL_TYPE_TINY: # <<<<<<<<<<<<<< * if c.flags & UNSIGNED_FLAG == UNSIGNED_FLAG: * val = PyLong_FromUnsignedLong(d.u8) */ - __pyx_t_8 = (__pyx_v_c->type == MYSQL_TYPE_TINY); - if (__pyx_t_8) { + __pyx_t_6 = ((__pyx_v_c->type == MYSQL_TYPE_TINY) != 0); + if (__pyx_t_6) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":510 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":510 * d.t.hour, d.t.minute, d.t.second, d.t.second_part) * elif c.type == MYSQL_TYPE_TINY: * if c.flags & UNSIGNED_FLAG == UNSIGNED_FLAG: # <<<<<<<<<<<<<< * val = PyLong_FromUnsignedLong(d.u8) * else: */ - __pyx_t_8 = ((__pyx_v_c->flags & UNSIGNED_FLAG) == UNSIGNED_FLAG); - if (__pyx_t_8) { + __pyx_t_6 = (((__pyx_v_c->flags & UNSIGNED_FLAG) == UNSIGNED_FLAG) != 0); + if (__pyx_t_6) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":511 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":511 * elif c.type == MYSQL_TYPE_TINY: * if c.flags & UNSIGNED_FLAG == UNSIGNED_FLAG: * val = PyLong_FromUnsignedLong(d.u8) # <<<<<<<<<<<<<< * else: * val = PyLong_FromLong(d.s8) */ - __pyx_t_11 = PyLong_FromUnsignedLong(__pyx_v_d->u8); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = PyLong_FromUnsignedLong(__pyx_v_d->u8); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF(__pyx_v_val); - __pyx_v_val = __pyx_t_11; - __pyx_t_11 = 0; - goto __pyx_L18; + __pyx_v_val = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L16; } /*else*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":513 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":513 * val = PyLong_FromUnsignedLong(d.u8) * else: * val = PyLong_FromLong(d.s8) # <<<<<<<<<<<<<< * elif c.type in (MYSQL_TYPE_SHORT, MYSQL_TYPE_YEAR): * if c.flags & UNSIGNED_FLAG == UNSIGNED_FLAG: */ - __pyx_t_11 = PyLong_FromLong(__pyx_v_d->s8); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = PyLong_FromLong(__pyx_v_d->s8); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF(__pyx_v_val); - __pyx_v_val = __pyx_t_11; - __pyx_t_11 = 0; + __pyx_v_val = __pyx_t_10; + __pyx_t_10 = 0; } - __pyx_L18:; - goto __pyx_L11; + __pyx_L16:; + goto __pyx_L9; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":514 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":514 * else: * val = PyLong_FromLong(d.s8) * elif c.type in (MYSQL_TYPE_SHORT, MYSQL_TYPE_YEAR): # <<<<<<<<<<<<<< * if c.flags & UNSIGNED_FLAG == UNSIGNED_FLAG: * val = PyLong_FromUnsignedLong(d.u16) */ - __pyx_t_7 = __pyx_v_c->type; - __pyx_t_8 = ((int)(__pyx_t_7 == MYSQL_TYPE_SHORT)); - if (!__pyx_t_8) { - __pyx_t_2 = ((int)(__pyx_t_7 == MYSQL_TYPE_YEAR)); - __pyx_t_3 = __pyx_t_2; - } else { - __pyx_t_3 = __pyx_t_8; + switch (__pyx_v_c->type) { + case MYSQL_TYPE_SHORT: + case MYSQL_TYPE_YEAR: + __pyx_t_6 = 1; + break; + default: + __pyx_t_6 = 0; + break; } - __pyx_t_8 = __pyx_t_3; - if (__pyx_t_8) { + __pyx_t_3 = (__pyx_t_6 != 0); + if (__pyx_t_3) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":515 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":515 * val = PyLong_FromLong(d.s8) * elif c.type in (MYSQL_TYPE_SHORT, MYSQL_TYPE_YEAR): * if c.flags & UNSIGNED_FLAG == UNSIGNED_FLAG: # <<<<<<<<<<<<<< * val = PyLong_FromUnsignedLong(d.u16) * else: */ - __pyx_t_8 = ((__pyx_v_c->flags & UNSIGNED_FLAG) == UNSIGNED_FLAG); - if (__pyx_t_8) { + __pyx_t_3 = (((__pyx_v_c->flags & UNSIGNED_FLAG) == UNSIGNED_FLAG) != 0); + if (__pyx_t_3) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":516 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":516 * elif c.type in (MYSQL_TYPE_SHORT, MYSQL_TYPE_YEAR): * if c.flags & UNSIGNED_FLAG == UNSIGNED_FLAG: * val = PyLong_FromUnsignedLong(d.u16) # <<<<<<<<<<<<<< * else: * val = PyLong_FromLong(d.s16) */ - __pyx_t_11 = PyLong_FromUnsignedLong(__pyx_v_d->u16); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = PyLong_FromUnsignedLong(__pyx_v_d->u16); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF(__pyx_v_val); - __pyx_v_val = __pyx_t_11; - __pyx_t_11 = 0; - goto __pyx_L19; + __pyx_v_val = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L17; } /*else*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":518 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":518 * val = PyLong_FromUnsignedLong(d.u16) * else: * val = PyLong_FromLong(d.s16) # <<<<<<<<<<<<<< * elif c.type in (MYSQL_TYPE_LONG, MYSQL_TYPE_INT24): * if c.flags & UNSIGNED_FLAG == UNSIGNED_FLAG: */ - __pyx_t_11 = PyLong_FromLong(__pyx_v_d->s16); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = PyLong_FromLong(__pyx_v_d->s16); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF(__pyx_v_val); - __pyx_v_val = __pyx_t_11; - __pyx_t_11 = 0; + __pyx_v_val = __pyx_t_10; + __pyx_t_10 = 0; } - __pyx_L19:; - goto __pyx_L11; + __pyx_L17:; + goto __pyx_L9; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":519 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":519 * else: * val = PyLong_FromLong(d.s16) * elif c.type in (MYSQL_TYPE_LONG, MYSQL_TYPE_INT24): # <<<<<<<<<<<<<< * if c.flags & UNSIGNED_FLAG == UNSIGNED_FLAG: * val = PyLong_FromUnsignedLong(d.u32) */ - __pyx_t_7 = __pyx_v_c->type; - __pyx_t_8 = ((int)(__pyx_t_7 == MYSQL_TYPE_LONG)); - if (!__pyx_t_8) { - __pyx_t_3 = ((int)(__pyx_t_7 == MYSQL_TYPE_INT24)); - __pyx_t_2 = __pyx_t_3; - } else { - __pyx_t_2 = __pyx_t_8; + switch (__pyx_v_c->type) { + case MYSQL_TYPE_LONG: + case MYSQL_TYPE_INT24: + __pyx_t_3 = 1; + break; + default: + __pyx_t_3 = 0; + break; } - __pyx_t_8 = __pyx_t_2; - if (__pyx_t_8) { + __pyx_t_6 = (__pyx_t_3 != 0); + if (__pyx_t_6) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":520 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":520 * val = PyLong_FromLong(d.s16) * elif c.type in (MYSQL_TYPE_LONG, MYSQL_TYPE_INT24): * if c.flags & UNSIGNED_FLAG == UNSIGNED_FLAG: # <<<<<<<<<<<<<< * val = PyLong_FromUnsignedLong(d.u32) * else: */ - __pyx_t_8 = ((__pyx_v_c->flags & UNSIGNED_FLAG) == UNSIGNED_FLAG); - if (__pyx_t_8) { + __pyx_t_6 = (((__pyx_v_c->flags & UNSIGNED_FLAG) == UNSIGNED_FLAG) != 0); + if (__pyx_t_6) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":521 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":521 * elif c.type in (MYSQL_TYPE_LONG, MYSQL_TYPE_INT24): * if c.flags & UNSIGNED_FLAG == UNSIGNED_FLAG: * val = PyLong_FromUnsignedLong(d.u32) # <<<<<<<<<<<<<< * else: * val = PyLong_FromLong(d.s32) */ - __pyx_t_11 = PyLong_FromUnsignedLong(__pyx_v_d->u32); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = PyLong_FromUnsignedLong(__pyx_v_d->u32); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF(__pyx_v_val); - __pyx_v_val = __pyx_t_11; - __pyx_t_11 = 0; - goto __pyx_L20; + __pyx_v_val = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L18; } /*else*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":523 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":523 * val = PyLong_FromUnsignedLong(d.u32) * else: * val = PyLong_FromLong(d.s32) # <<<<<<<<<<<<<< * elif c.type == MYSQL_TYPE_LONGLONG: * if c.flags & UNSIGNED_FLAG == UNSIGNED_FLAG: */ - __pyx_t_11 = PyLong_FromLong(__pyx_v_d->s32); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = PyLong_FromLong(__pyx_v_d->s32); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF(__pyx_v_val); - __pyx_v_val = __pyx_t_11; - __pyx_t_11 = 0; + __pyx_v_val = __pyx_t_10; + __pyx_t_10 = 0; } - __pyx_L20:; - goto __pyx_L11; + __pyx_L18:; + goto __pyx_L9; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":524 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":524 * else: * val = PyLong_FromLong(d.s32) * elif c.type == MYSQL_TYPE_LONGLONG: # <<<<<<<<<<<<<< * if c.flags & UNSIGNED_FLAG == UNSIGNED_FLAG: * val = PyLong_FromUnsignedLongLong(d.u64) */ - __pyx_t_8 = (__pyx_v_c->type == MYSQL_TYPE_LONGLONG); - if (__pyx_t_8) { + __pyx_t_6 = ((__pyx_v_c->type == MYSQL_TYPE_LONGLONG) != 0); + if (__pyx_t_6) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":525 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":525 * val = PyLong_FromLong(d.s32) * elif c.type == MYSQL_TYPE_LONGLONG: * if c.flags & UNSIGNED_FLAG == UNSIGNED_FLAG: # <<<<<<<<<<<<<< * val = PyLong_FromUnsignedLongLong(d.u64) * else: */ - __pyx_t_8 = ((__pyx_v_c->flags & UNSIGNED_FLAG) == UNSIGNED_FLAG); - if (__pyx_t_8) { + __pyx_t_6 = (((__pyx_v_c->flags & UNSIGNED_FLAG) == UNSIGNED_FLAG) != 0); + if (__pyx_t_6) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":526 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":526 * elif c.type == MYSQL_TYPE_LONGLONG: * if c.flags & UNSIGNED_FLAG == UNSIGNED_FLAG: * val = PyLong_FromUnsignedLongLong(d.u64) # <<<<<<<<<<<<<< * else: * val = PyLong_FromLongLong(d.s64) */ - __pyx_t_11 = PyLong_FromUnsignedLongLong(__pyx_v_d->u64); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = PyLong_FromUnsignedLongLong(__pyx_v_d->u64); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF(__pyx_v_val); - __pyx_v_val = __pyx_t_11; - __pyx_t_11 = 0; - goto __pyx_L21; + __pyx_v_val = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L19; } /*else*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":528 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":528 * val = PyLong_FromUnsignedLongLong(d.u64) * else: * val = PyLong_FromLongLong(d.s64) # <<<<<<<<<<<<<< * elif c.type == MYSQL_TYPE_FLOAT: * val = d.f */ - __pyx_t_11 = PyLong_FromLongLong(__pyx_v_d->s64); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = PyLong_FromLongLong(__pyx_v_d->s64); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF(__pyx_v_val); - __pyx_v_val = __pyx_t_11; - __pyx_t_11 = 0; + __pyx_v_val = __pyx_t_10; + __pyx_t_10 = 0; } - __pyx_L21:; - goto __pyx_L11; + __pyx_L19:; + goto __pyx_L9; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":529 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":529 * else: * val = PyLong_FromLongLong(d.s64) * elif c.type == MYSQL_TYPE_FLOAT: # <<<<<<<<<<<<<< * val = d.f * elif c.type == MYSQL_TYPE_DOUBLE: */ - __pyx_t_8 = (__pyx_v_c->type == MYSQL_TYPE_FLOAT); - if (__pyx_t_8) { + __pyx_t_6 = ((__pyx_v_c->type == MYSQL_TYPE_FLOAT) != 0); + if (__pyx_t_6) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":530 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":530 * val = PyLong_FromLongLong(d.s64) * elif c.type == MYSQL_TYPE_FLOAT: * val = d.f # <<<<<<<<<<<<<< * elif c.type == MYSQL_TYPE_DOUBLE: * val = d.d */ - __pyx_t_11 = PyFloat_FromDouble(__pyx_v_d->f); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = PyFloat_FromDouble(__pyx_v_d->f); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF(__pyx_v_val); - __pyx_v_val = __pyx_t_11; - __pyx_t_11 = 0; - goto __pyx_L11; + __pyx_v_val = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L9; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":531 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":531 * elif c.type == MYSQL_TYPE_FLOAT: * val = d.f * elif c.type == MYSQL_TYPE_DOUBLE: # <<<<<<<<<<<<<< * val = d.d * elif c.type == MYSQL_TYPE_BIT: */ - __pyx_t_8 = (__pyx_v_c->type == MYSQL_TYPE_DOUBLE); - if (__pyx_t_8) { + __pyx_t_6 = ((__pyx_v_c->type == MYSQL_TYPE_DOUBLE) != 0); + if (__pyx_t_6) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":532 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":532 * val = d.f * elif c.type == MYSQL_TYPE_DOUBLE: * val = d.d # <<<<<<<<<<<<<< * elif c.type == MYSQL_TYPE_BIT: * # Bitfields column come variable-length and always in big- */ - __pyx_t_11 = PyFloat_FromDouble(__pyx_v_d->d); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = PyFloat_FromDouble(__pyx_v_d->d); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF(__pyx_v_val); - __pyx_v_val = __pyx_t_11; - __pyx_t_11 = 0; - goto __pyx_L11; + __pyx_v_val = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L9; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":533 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":533 * elif c.type == MYSQL_TYPE_DOUBLE: * val = d.d * elif c.type == MYSQL_TYPE_BIT: # <<<<<<<<<<<<<< * # Bitfields column come variable-length and always in big- * # endian format. Convert it to an int instead of passing back */ - __pyx_t_8 = (__pyx_v_c->type == MYSQL_TYPE_BIT); - if (__pyx_t_8) { + __pyx_t_6 = ((__pyx_v_c->type == MYSQL_TYPE_BIT) != 0); + if (__pyx_t_6) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":538 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":538 * # a string that people would probably be converting to ints * # anyway. * val = bitval_from_char_p(&d.c, c.length) # <<<<<<<<<<<<<< * else: * val = PyBytes_FromStringAndSize(&d.c, c.length) */ - __pyx_t_11 = PyLong_FromUnsignedLong(__pyx_f_6oursql_bitval_from_char_p(((unsigned char *)(&__pyx_v_d->c)), __pyx_v_c->length)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = PyLong_FromUnsignedLong(__pyx_f_6oursql_bitval_from_char_p(((unsigned char *)(&__pyx_v_d->c)), __pyx_v_c->length)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF(__pyx_v_val); - __pyx_v_val = __pyx_t_11; - __pyx_t_11 = 0; - goto __pyx_L11; + __pyx_v_val = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L9; } /*else*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":540 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":540 * val = bitval_from_char_p(&d.c, c.length) * else: * val = PyBytes_FromStringAndSize(&d.c, c.length) # <<<<<<<<<<<<<< * PyErr_WarnEx(Warning, "unknown column returned as string", 1) * if c.error: */ - __pyx_t_11 = PyBytes_FromStringAndSize((&__pyx_v_d->c), __pyx_v_c->length); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = PyBytes_FromStringAndSize((&__pyx_v_d->c), __pyx_v_c->length); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF(__pyx_v_val); - __pyx_v_val = __pyx_t_11; - __pyx_t_11 = 0; + __pyx_v_val = __pyx_t_10; + __pyx_t_10 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":541 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":541 * else: * val = PyBytes_FromStringAndSize(&d.c, c.length) * PyErr_WarnEx(Warning, "unknown column returned as string", 1) # <<<<<<<<<<<<<< * if c.error: * # This *shouldn't* ever happen. */ - __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__Warning); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_11); - __pyx_t_1 = PyErr_WarnEx(__pyx_t_11, __pyx_k_37, 1); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s__Warning); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_1 = PyErr_WarnEx(__pyx_t_10, __pyx_k_43, 1); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } - __pyx_L11:; + __pyx_L9:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":542 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":542 * val = PyBytes_FromStringAndSize(&d.c, c.length) * PyErr_WarnEx(Warning, "unknown column returned as string", 1) * if c.error: # <<<<<<<<<<<<<< * # This *shouldn't* ever happen. * raise InterfaceError('truncated column %d, type %d' % ( */ - if (__pyx_v_c->error) { + __pyx_t_6 = (__pyx_v_c->error != 0); + if (__pyx_t_6) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":544 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":544 * if c.error: * # This *shouldn't* ever happen. * raise InterfaceError('truncated column %d, type %d' % ( # <<<<<<<<<<<<<< * i, c.type)) * Py_INCREF(val) */ - __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__InterfaceError); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s__InterfaceError); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":545 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":545 * # This *shouldn't* ever happen. * raise InterfaceError('truncated column %d, type %d' % ( * i, c.type)) # <<<<<<<<<<<<<< * Py_INCREF(val) * PyTuple_SET_ITEM(ret, i, val) */ - __pyx_t_10 = PyLong_FromUnsignedLong(__pyx_v_i); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_5 = PyInt_FromLong(__pyx_v_c->type); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_9)); - PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); - __Pyx_GIVEREF(__pyx_t_10); - PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_5); - __Pyx_GIVEREF(__pyx_t_5); - __pyx_t_10 = 0; - __pyx_t_5 = 0; - __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_38), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); - __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; - __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_9)); - PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_5)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); - __pyx_t_5 = 0; - __pyx_t_5 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; - __Pyx_Raise(__pyx_t_5, 0, 0, 0); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_9 = PyLong_FromUnsignedLong(__pyx_v_i); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = PyInt_FromLong(__pyx_v_c->type); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_9 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_44), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __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[3]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); + __pyx_t_4 = 0; + __pyx_t_4 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[3]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L22; + goto __pyx_L20; } - __pyx_L22:; + __pyx_L20:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":546 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":546 * raise InterfaceError('truncated column %d, type %d' % ( * i, c.type)) * Py_INCREF(val) # <<<<<<<<<<<<<< @@ -12811,7 +13833,7 @@ */ Py_INCREF(__pyx_v_val); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":547 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":547 * i, c.type)) * Py_INCREF(val) * PyTuple_SET_ITEM(ret, i, val) # <<<<<<<<<<<<<< @@ -12821,7 +13843,7 @@ PyTuple_SET_ITEM(__pyx_v_ret, __pyx_v_i, __pyx_v_val); } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":548 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":548 * Py_INCREF(val) * PyTuple_SET_ITEM(ret, i, val) * return ret # <<<<<<<<<<<<<< @@ -12836,10 +13858,10 @@ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); - __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("oursql._Statement.fetchone", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -12850,7 +13872,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":550 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10_Statement_13fetchall(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6oursql_10_Statement_13fetchall(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("fetchall (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_Statement_12fetchall(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":550 * return ret * * def fetchall(self): # <<<<<<<<<<<<<< @@ -12858,8 +13891,7 @@ * self.buffer_results() */ -static PyObject *__pyx_pf_6oursql_10_Statement_6fetchall(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pf_6oursql_10_Statement_6fetchall(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_6oursql_10_Statement_12fetchall(struct __pyx_obj_6oursql__Statement *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -12867,23 +13899,23 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("fetchall"); + __Pyx_RefNannySetupContext("fetchall", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":552 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":552 * def fetchall(self): * # buffer_results() calls _check_closed() * self.buffer_results() # <<<<<<<<<<<<<< * return PySequence_List(self) * */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__buffer_results); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__buffer_results); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 552; __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[3]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":553 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":553 * # buffer_results() calls _check_closed() * self.buffer_results() * return PySequence_List(self) # <<<<<<<<<<<<<< @@ -12891,7 +13923,7 @@ * def buffer_results(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PySequence_List(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -12910,7 +13942,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":555 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10_Statement_15buffer_results(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6oursql_10_Statement_15buffer_results(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("buffer_results (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_Statement_14buffer_results(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":555 * return PySequence_List(self) * * def buffer_results(self): # <<<<<<<<<<<<<< @@ -12918,8 +13961,7 @@ * if not self.buffered: */ -static PyObject *__pyx_pf_6oursql_10_Statement_7buffer_results(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pf_6oursql_10_Statement_7buffer_results(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_6oursql_10_Statement_14buffer_results(struct __pyx_obj_6oursql__Statement *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -12927,60 +13969,60 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("buffer_results"); + __Pyx_RefNannySetupContext("buffer_results", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":556 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":556 * * def buffer_results(self): * self._check_closed() # <<<<<<<<<<<<<< * if not self.buffered: * if mysql_stmt_store_result(self.stmt): */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->__pyx_vtab)->_check_closed(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)__pyx_v_self->__pyx_vtab)->_check_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":557 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":557 * def buffer_results(self): * self._check_closed() * if not self.buffered: # <<<<<<<<<<<<<< * if mysql_stmt_store_result(self.stmt): * self._raise_error() */ - __pyx_t_2 = (!((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->buffered); + __pyx_t_2 = ((!(__pyx_v_self->buffered != 0)) != 0); if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":558 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":558 * self._check_closed() * if not self.buffered: * if mysql_stmt_store_result(self.stmt): # <<<<<<<<<<<<<< * self._raise_error() * self.buffered = True */ - __pyx_t_1 = __pyx_f_6oursql_mysql_stmt_store_result(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->stmt); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_f_6oursql_mysql_stmt_store_result(__pyx_v_self->stmt) != 0); + if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":559 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":559 * if not self.buffered: * if mysql_stmt_store_result(self.stmt): * self._raise_error() # <<<<<<<<<<<<<< * self.buffered = True * */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->__pyx_vtab)->_raise_error(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L6; + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)__pyx_v_self->__pyx_vtab)->_raise_error(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L4; } - __pyx_L6:; + __pyx_L4:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":560 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":560 * if mysql_stmt_store_result(self.stmt): * self._raise_error() * self.buffered = True # <<<<<<<<<<<<<< * * def nextset(self): */ - ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->buffered = 1; - goto __pyx_L5; + __pyx_v_self->buffered = 1; + goto __pyx_L3; } - __pyx_L5:; + __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -12993,7 +14035,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":562 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10_Statement_17nextset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6oursql_10_Statement_17nextset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nextset (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_Statement_16nextset(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":562 * self.buffered = True * * def nextset(self): # <<<<<<<<<<<<<< @@ -13001,17 +14054,16 @@ * */ -static PyObject *__pyx_pf_6oursql_10_Statement_8nextset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pf_6oursql_10_Statement_8nextset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_6oursql_10_Statement_16nextset(CYTHON_UNUSED struct __pyx_obj_6oursql__Statement *__pyx_v_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("nextset"); + __Pyx_RefNannySetupContext("nextset", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":563 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":563 * * def nextset(self): * return False # <<<<<<<<<<<<<< @@ -13037,7 +14089,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":565 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10_Statement_19__iter__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_10_Statement_19__iter__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_Statement_18__iter__(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":565 * return False * * def __iter__(self): # <<<<<<<<<<<<<< @@ -13045,29 +14108,27 @@ * return PyCallIter_New(self.fetchone, None) */ -static PyObject *__pyx_pf_6oursql_10_Statement_9__iter__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_10_Statement_9__iter__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_10_Statement_18__iter__(struct __pyx_obj_6oursql__Statement *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; 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("__iter__"); + __Pyx_RefNannySetupContext("__iter__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":566 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":566 * * def __iter__(self): * self._check_closed() # <<<<<<<<<<<<<< * return PyCallIter_New(self.fetchone, None) * */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->__pyx_vtab)->_check_closed(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)__pyx_v_self->__pyx_vtab)->_check_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":567 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":567 * def __iter__(self): * self._check_closed() * return PyCallIter_New(self.fetchone, None) # <<<<<<<<<<<<<< @@ -13075,16 +14136,13 @@ * property rowcount: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__fetchone); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__fetchone); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = Py_None; - __Pyx_INCREF(__pyx_t_3); - __pyx_t_4 = PyCallIter_New(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyCallIter_New(__pyx_t_2, Py_None); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -13092,7 +14150,6 @@ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("oursql._Statement.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -13101,7 +14158,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":570 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10_Statement_8rowcount_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_10_Statement_8rowcount_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_Statement_8rowcount___get__(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":570 * * property rowcount: * def __get__(self): # <<<<<<<<<<<<<< @@ -13109,8 +14177,7 @@ * self._check_closed() */ -static PyObject *__pyx_pf_6oursql_10_Statement_8rowcount___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_10_Statement_8rowcount___get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_10_Statement_8rowcount___get__(struct __pyx_obj_6oursql__Statement *__pyx_v_self) { my_ulonglong __pyx_v_res; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -13120,37 +14187,37 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":572 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":572 * def __get__(self): * cdef my_ulonglong res * self._check_closed() # <<<<<<<<<<<<<< * res = mysql_stmt_affected_rows(self.stmt) * if res == ull_negone: */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->__pyx_vtab)->_check_closed(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)__pyx_v_self->__pyx_vtab)->_check_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":573 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":573 * cdef my_ulonglong res * self._check_closed() * res = mysql_stmt_affected_rows(self.stmt) # <<<<<<<<<<<<<< * if res == ull_negone: * return -1 */ - __pyx_v_res = mysql_stmt_affected_rows(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->stmt); + __pyx_v_res = mysql_stmt_affected_rows(__pyx_v_self->stmt); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":574 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":574 * self._check_closed() * res = mysql_stmt_affected_rows(self.stmt) * if res == ull_negone: # <<<<<<<<<<<<<< * return -1 * else: */ - __pyx_t_2 = (__pyx_v_res == __pyx_v_6oursql_ull_negone); + __pyx_t_2 = ((__pyx_v_res == __pyx_v_6oursql_ull_negone) != 0); if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":575 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":575 * res = mysql_stmt_affected_rows(self.stmt) * if res == ull_negone: * return -1 # <<<<<<<<<<<<<< @@ -13161,11 +14228,11 @@ __Pyx_INCREF(__pyx_int_neg_1); __pyx_r = __pyx_int_neg_1; goto __pyx_L0; - goto __pyx_L5; + goto __pyx_L3; } /*else*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":577 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":577 * return -1 * else: * return res # <<<<<<<<<<<<<< @@ -13179,7 +14246,7 @@ __pyx_t_3 = 0; goto __pyx_L0; } - __pyx_L5:; + __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -13193,7 +14260,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":580 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10_Statement_9lastrowid_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_10_Statement_9lastrowid_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_Statement_9lastrowid___get__(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":580 * * property lastrowid: * def __get__(self): # <<<<<<<<<<<<<< @@ -13201,8 +14279,7 @@ * self._check_closed() */ -static PyObject *__pyx_pf_6oursql_10_Statement_9lastrowid___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_10_Statement_9lastrowid___get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_10_Statement_9lastrowid___get__(struct __pyx_obj_6oursql__Statement *__pyx_v_self) { my_ulonglong __pyx_v_res; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -13212,37 +14289,37 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":582 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":582 * def __get__(self): * cdef my_ulonglong res * self._check_closed() # <<<<<<<<<<<<<< * res = mysql_stmt_insert_id(self.stmt) * if res == 0: */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->__pyx_vtab)->_check_closed(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)__pyx_v_self->__pyx_vtab)->_check_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":583 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":583 * cdef my_ulonglong res * self._check_closed() * res = mysql_stmt_insert_id(self.stmt) # <<<<<<<<<<<<<< * if res == 0: * return None */ - __pyx_v_res = mysql_stmt_insert_id(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->stmt); + __pyx_v_res = mysql_stmt_insert_id(__pyx_v_self->stmt); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":584 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":584 * self._check_closed() * res = mysql_stmt_insert_id(self.stmt) * if res == 0: # <<<<<<<<<<<<<< * return None * else: */ - __pyx_t_2 = (__pyx_v_res == 0); + __pyx_t_2 = ((__pyx_v_res == 0) != 0); if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":585 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":585 * res = mysql_stmt_insert_id(self.stmt) * if res == 0: * return None # <<<<<<<<<<<<<< @@ -13253,11 +14330,11 @@ __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; - goto __pyx_L5; + goto __pyx_L3; } /*else*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":587 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":587 * return None * else: * return res # <<<<<<<<<<<<<< @@ -13271,7 +14348,7 @@ __pyx_t_3 = 0; goto __pyx_L0; } - __pyx_L5:; + __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -13285,7 +14362,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":590 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10_Statement_13prefetch_rows_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_10_Statement_13prefetch_rows_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_Statement_13prefetch_rows___get__(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":590 * * property prefetch_rows: * def __get__(self): # <<<<<<<<<<<<<< @@ -13293,17 +14381,16 @@ * */ -static PyObject *__pyx_pf_6oursql_10_Statement_13prefetch_rows___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_10_Statement_13prefetch_rows___get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_10_Statement_13prefetch_rows___get__(struct __pyx_obj_6oursql__Statement *__pyx_v_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("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":591 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":591 * property prefetch_rows: * def __get__(self): * return self._prefetch_rows # <<<<<<<<<<<<<< @@ -13311,7 +14398,7 @@ * def __set__(self, unsigned long value): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyLong_FromUnsignedLong(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->_prefetch_rows); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyLong_FromUnsignedLong(__pyx_v_self->_prefetch_rows); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -13329,7 +14416,31 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":593 +/* Python wrapper */ +static int __pyx_pw_6oursql_10_Statement_13prefetch_rows_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/ +static int __pyx_pw_6oursql_10_Statement_13prefetch_rows_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) { + unsigned long __pyx_v_value; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + assert(__pyx_arg_value); { + __pyx_v_value = __Pyx_PyInt_AsUnsignedLong(__pyx_arg_value); if (unlikely((__pyx_v_value == (unsigned long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("oursql._Statement.prefetch_rows.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6oursql_10_Statement_13prefetch_rows_2__set__(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self), ((unsigned long)__pyx_v_value)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":593 * return self._prefetch_rows * * def __set__(self, unsigned long value): # <<<<<<<<<<<<<< @@ -13337,85 +14448,73 @@ * raise ValueError('must prefetch at least 1 row') */ -static int __pyx_pf_6oursql_10_Statement_13prefetch_rows_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/ -static int __pyx_pf_6oursql_10_Statement_13prefetch_rows_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) { - unsigned long __pyx_v_value; +static int __pyx_pf_6oursql_10_Statement_13prefetch_rows_2__set__(struct __pyx_obj_6oursql__Statement *__pyx_v_self, unsigned long __pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; - my_bool __pyx_t_3; - int __pyx_t_4; + int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__set__"); - assert(__pyx_arg_value); { - __pyx_v_value = __Pyx_PyInt_AsUnsignedLong(__pyx_arg_value); if (unlikely((__pyx_v_value == (unsigned long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L3_error:; - __Pyx_AddTraceback("oursql._Statement.prefetch_rows.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return -1; - __pyx_L4_argument_unpacking_done:; + __Pyx_RefNannySetupContext("__set__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":594 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":594 * * def __set__(self, unsigned long value): * if value < 1: # <<<<<<<<<<<<<< * raise ValueError('must prefetch at least 1 row') * self._prefetch_rows = value */ - __pyx_t_1 = (__pyx_v_value < 1); + __pyx_t_1 = ((__pyx_v_value < 1) != 0); if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":595 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":595 * def __set__(self, unsigned long value): * if value < 1: * raise ValueError('must prefetch at least 1 row') # <<<<<<<<<<<<<< * self._prefetch_rows = value * if _oursqlx_stmt_set_prefetch_rows(self.stmt, */ - __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_40), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_46), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[3]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L5; + goto __pyx_L3; } - __pyx_L5:; + __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":596 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":596 * if value < 1: * raise ValueError('must prefetch at least 1 row') * self._prefetch_rows = value # <<<<<<<<<<<<<< * if _oursqlx_stmt_set_prefetch_rows(self.stmt, * &self._prefetch_rows): */ - ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->_prefetch_rows = __pyx_v_value; + __pyx_v_self->_prefetch_rows = __pyx_v_value; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":598 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":598 * self._prefetch_rows = value * if _oursqlx_stmt_set_prefetch_rows(self.stmt, * &self._prefetch_rows): # <<<<<<<<<<<<<< * self._raise_error() * */ - __pyx_t_3 = _oursqlx_stmt_set_prefetch_rows(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->stmt, (&((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->_prefetch_rows)); - if (__pyx_t_3) { + __pyx_t_1 = (_oursqlx_stmt_set_prefetch_rows(__pyx_v_self->stmt, (&__pyx_v_self->_prefetch_rows)) != 0); + if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":599 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":599 * if _oursqlx_stmt_set_prefetch_rows(self.stmt, * &self._prefetch_rows): * self._raise_error() # <<<<<<<<<<<<<< * * _DictStatement = type('_DictStatement', (_DictWhateverMixin, _Statement), */ - __pyx_t_4 = ((struct __pyx_vtabstruct_6oursql__Statement *)((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->__pyx_vtab)->_raise_error(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L6; + __pyx_t_3 = ((struct __pyx_vtabstruct_6oursql__Statement *)__pyx_v_self->__pyx_vtab)->_raise_error(__pyx_v_self); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L4; } - __pyx_L6:; + __pyx_L4:; __pyx_r = 0; goto __pyx_L0; @@ -13428,7 +14527,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":99 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10_Statement_8warnings_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_10_Statement_8warnings_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_Statement_8warnings___get__(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":99 * cdef int buffered, data_waiting, show_table, exhausted * cdef Connection conn * cdef public object warnings # <<<<<<<<<<<<<< @@ -13436,14 +14546,13 @@ * def __cinit__(self, Connection connection not None, */ -static PyObject *__pyx_pf_6oursql_10_Statement_8warnings___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_10_Statement_8warnings___get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_10_Statement_8warnings___get__(struct __pyx_obj_6oursql__Statement *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->warnings); - __pyx_r = ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->warnings; + __Pyx_INCREF(__pyx_v_self->warnings); + __pyx_r = __pyx_v_self->warnings; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -13453,63 +14562,77 @@ return __pyx_r; } -static int __pyx_pf_6oursql_10_Statement_8warnings_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ -static int __pyx_pf_6oursql_10_Statement_8warnings_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { +/* Python wrapper */ +static int __pyx_pw_6oursql_10_Statement_8warnings_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_6oursql_10_Statement_8warnings_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_Statement_8warnings_2__set__(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6oursql_10_Statement_8warnings_2__set__(struct __pyx_obj_6oursql__Statement *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__set__"); + __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->warnings); - __Pyx_DECREF(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->warnings); - ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->warnings = __pyx_v_value; + __Pyx_GOTREF(__pyx_v_self->warnings); + __Pyx_DECREF(__pyx_v_self->warnings); + __pyx_v_self->warnings = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } -static int __pyx_pf_6oursql_10_Statement_8warnings_2__del__(PyObject *__pyx_v_self); /*proto*/ -static int __pyx_pf_6oursql_10_Statement_8warnings_2__del__(PyObject *__pyx_v_self) { +/* Python wrapper */ +static int __pyx_pw_6oursql_10_Statement_8warnings_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_6oursql_10_Statement_8warnings_5__del__(PyObject *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_Statement_8warnings_4__del__(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6oursql_10_Statement_8warnings_4__del__(struct __pyx_obj_6oursql__Statement *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__del__"); + __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->warnings); - __Pyx_DECREF(((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->warnings); - ((struct __pyx_obj_6oursql__Statement *)__pyx_v_self)->warnings = Py_None; + __Pyx_GOTREF(__pyx_v_self->warnings); + __Pyx_DECREF(__pyx_v_self->warnings); + __pyx_v_self->warnings = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":620 - * cdef int done - * - * def __cinit__(self, _Statement stmt not None, unsigned int index, # <<<<<<<<<<<<<< - * unsigned int length): - * self.stmt = stmt - */ - -static int __pyx_pf_6oursql_19_ResultStringStream___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_6oursql_19_ResultStringStream___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +/* Python wrapper */ +static int __pyx_pw_6oursql_19_ResultStringStream_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6oursql_19_ResultStringStream_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_6oursql__Statement *__pyx_v_stmt = 0; unsigned int __pyx_v_index; unsigned int __pyx_v_length; - int __pyx_r; - __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__stmt,&__pyx_n_s__index,&__pyx_n_s__length,0}; - __Pyx_RefNannySetupContext("__cinit__"); + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__stmt,&__pyx_n_s__index,&__pyx_n_s__length,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; - switch (PyTuple_GET_SIZE(__pyx_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); @@ -13517,26 +14640,23 @@ default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); - switch (PyTuple_GET_SIZE(__pyx_args)) { + switch (pos_args) { case 0: - values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stmt); - if (likely(values[0])) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stmt)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: - values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index); - if (likely(values[1])) kw_args--; + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: - values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__length); - if (likely(values[2])) kw_args--; + if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__length)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__cinit__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -13558,8 +14678,30 @@ return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stmt), __pyx_ptype_6oursql__Statement, 0, "stmt", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6oursql_19_ResultStringStream___cinit__(((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self), __pyx_v_stmt, __pyx_v_index, __pyx_v_length); + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":620 + * cdef int done + * + * def __cinit__(self, _Statement stmt not None, unsigned int index, # <<<<<<<<<<<<<< + * unsigned int length): + * self.stmt = stmt + */ + +static int __pyx_pf_6oursql_19_ResultStringStream___cinit__(struct __pyx_obj_6oursql__ResultStringStream *__pyx_v_self, struct __pyx_obj_6oursql__Statement *__pyx_v_stmt, unsigned int __pyx_v_index, unsigned int __pyx_v_length) { + int __pyx_r; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":622 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":622 * def __cinit__(self, _Statement stmt not None, unsigned int index, * unsigned int length): * self.stmt = stmt # <<<<<<<<<<<<<< @@ -13568,130 +14710,112 @@ */ __Pyx_INCREF(((PyObject *)__pyx_v_stmt)); __Pyx_GIVEREF(((PyObject *)__pyx_v_stmt)); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->stmt); - __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->stmt)); - ((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->stmt = __pyx_v_stmt; + __Pyx_GOTREF(__pyx_v_self->stmt); + __Pyx_DECREF(((PyObject *)__pyx_v_self->stmt)); + __pyx_v_self->stmt = __pyx_v_stmt; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":623 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":623 * unsigned int length): * self.stmt = stmt * self.stmt_fetched = stmt.fetched # <<<<<<<<<<<<<< * self.index = index * self.length = length */ - ((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->stmt_fetched = __pyx_v_stmt->fetched; + __pyx_t_1 = __pyx_v_stmt->fetched; + __pyx_v_self->stmt_fetched = __pyx_t_1; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":624 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":624 * self.stmt = stmt * self.stmt_fetched = stmt.fetched * self.index = index # <<<<<<<<<<<<<< * self.length = length * self.offset = 0 */ - ((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->index = __pyx_v_index; + __pyx_v_self->index = __pyx_v_index; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":625 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":625 * self.stmt_fetched = stmt.fetched * self.index = index * self.length = length # <<<<<<<<<<<<<< * self.offset = 0 * memset(&self.bind, 0, sizeof(MYSQL_BIND)) */ - ((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->length = __pyx_v_length; + __pyx_v_self->length = __pyx_v_length; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":626 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":626 * self.index = index * self.length = length * self.offset = 0 # <<<<<<<<<<<<<< * memset(&self.bind, 0, sizeof(MYSQL_BIND)) * self.bind.buffer_type = MYSQL_TYPE_BLOB */ - ((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->offset = 0; + __pyx_v_self->offset = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":627 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":627 * self.length = length * self.offset = 0 * memset(&self.bind, 0, sizeof(MYSQL_BIND)) # <<<<<<<<<<<<<< * self.bind.buffer_type = MYSQL_TYPE_BLOB * self.bind.length = &self.length */ - memset((&((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->bind), 0, (sizeof(MYSQL_BIND))); + memset((&__pyx_v_self->bind), 0, (sizeof(MYSQL_BIND))); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":628 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":628 * self.offset = 0 * memset(&self.bind, 0, sizeof(MYSQL_BIND)) * self.bind.buffer_type = MYSQL_TYPE_BLOB # <<<<<<<<<<<<<< * self.bind.length = &self.length * self.done = False */ - ((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->bind.buffer_type = MYSQL_TYPE_BLOB; + __pyx_v_self->bind.buffer_type = MYSQL_TYPE_BLOB; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":629 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":629 * memset(&self.bind, 0, sizeof(MYSQL_BIND)) * self.bind.buffer_type = MYSQL_TYPE_BLOB * self.bind.length = &self.length # <<<<<<<<<<<<<< * self.done = False * */ - ((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->bind.length = (&((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->length); + __pyx_v_self->bind.length = (&__pyx_v_self->length); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":630 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":630 * self.bind.buffer_type = MYSQL_TYPE_BLOB * self.bind.length = &self.length * self.done = False # <<<<<<<<<<<<<< * * def read(self, Py_ssize_t size=-1): */ - ((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->done = 0; + __pyx_v_self->done = 0; __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("oursql._ResultStringStream.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":632 - * self.done = False - * - * def read(self, Py_ssize_t size=-1): # <<<<<<<<<<<<<< - * """read(size=-1) -> str - * - */ - -static PyObject *__pyx_pf_6oursql_19_ResultStringStream_1read(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_6oursql_19_ResultStringStream_1read[] = "read(size=-1) -> str\n \n Read some bytes from the database. Reading -1 bytes will attempt to \n fetch all remaining bytes.\n "; -static PyObject *__pyx_pf_6oursql_19_ResultStringStream_1read(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_19_ResultStringStream_3read(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_6oursql_19_ResultStringStream_2read[] = "read(size=-1) -> str\n \n Read some bytes from the database. Reading -1 bytes will attempt to \n fetch all remaining bytes.\n "; +static PyObject *__pyx_pw_6oursql_19_ResultStringStream_3read(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { Py_ssize_t __pyx_v_size; - Py_ssize_t __pyx_v_left; - PyObject *__pyx_v_ret = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; - int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size,0}; - __Pyx_RefNannySetupContext("read"); + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("read (wrapper)", 0); { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; - switch (PyTuple_GET_SIZE(__pyx_args)) { + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { 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 (PyTuple_GET_SIZE(__pyx_args)) { + switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size); @@ -13699,7 +14823,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "read") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -13722,17 +14846,46 @@ __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6oursql_19_ResultStringStream_2read(((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self), __pyx_v_size); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":632 + * self.done = False + * + * def read(self, Py_ssize_t size=-1): # <<<<<<<<<<<<<< + * """read(size=-1) -> str + * + */ + +static PyObject *__pyx_pf_6oursql_19_ResultStringStream_2read(struct __pyx_obj_6oursql__ResultStringStream *__pyx_v_self, Py_ssize_t __pyx_v_size) { + Py_ssize_t __pyx_v_left; + PyObject *__pyx_v_ret = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":639 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":639 * """ * cdef Py_ssize_t left * if self.done: # <<<<<<<<<<<<<< * return '' * self.stmt._check_closed() */ - if (((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->done) { + __pyx_t_1 = (__pyx_v_self->done != 0); + if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":640 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":640 * cdef Py_ssize_t left * if self.done: * return '' # <<<<<<<<<<<<<< @@ -13740,77 +14893,77 @@ * if self.stmt.fetched != self.stmt_fetched: */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_41)); - __pyx_r = ((PyObject *)__pyx_kp_s_41); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_47)); + __pyx_r = ((PyObject *)__pyx_kp_s_47); goto __pyx_L0; - goto __pyx_L6; + goto __pyx_L3; } - __pyx_L6:; + __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":641 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":641 * if self.done: * return '' * self.stmt._check_closed() # <<<<<<<<<<<<<< * if self.stmt.fetched != self.stmt_fetched: * raise ProgrammingError('row no longer available from database') */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->stmt->__pyx_vtab)->_check_closed(((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->stmt); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = ((struct __pyx_vtabstruct_6oursql__Statement *)__pyx_v_self->stmt->__pyx_vtab)->_check_closed(__pyx_v_self->stmt); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":642 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":642 * return '' * self.stmt._check_closed() * if self.stmt.fetched != self.stmt_fetched: # <<<<<<<<<<<<<< * raise ProgrammingError('row no longer available from database') * left = self.length - self.offset */ - __pyx_t_2 = (((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->stmt->fetched != ((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->stmt_fetched); - if (__pyx_t_2) { + __pyx_t_1 = ((__pyx_v_self->stmt->fetched != __pyx_v_self->stmt_fetched) != 0); + if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":643 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":643 * self.stmt._check_closed() * if self.stmt.fetched != self.stmt_fetched: * raise ProgrammingError('row no longer available from database') # <<<<<<<<<<<<<< * left = self.length - self.offset * if size == -1 or size > left: */ - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_43), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_49), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[3]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L7; + goto __pyx_L4; } - __pyx_L7:; + __pyx_L4:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":644 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":644 * if self.stmt.fetched != self.stmt_fetched: * raise ProgrammingError('row no longer available from database') * left = self.length - self.offset # <<<<<<<<<<<<<< * if size == -1 or size > left: * size = left */ - __pyx_v_left = (((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->length - ((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->offset); + __pyx_v_left = (__pyx_v_self->length - __pyx_v_self->offset); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":645 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":645 * raise ProgrammingError('row no longer available from database') * left = self.length - self.offset * if size == -1 or size > left: # <<<<<<<<<<<<<< * size = left * elif size < 0: */ - __pyx_t_2 = (__pyx_v_size == -1); - if (!__pyx_t_2) { - __pyx_t_5 = (__pyx_v_size > __pyx_v_left); + __pyx_t_1 = ((__pyx_v_size == -1) != 0); + if (!__pyx_t_1) { + __pyx_t_5 = ((__pyx_v_size > __pyx_v_left) != 0); __pyx_t_6 = __pyx_t_5; } else { - __pyx_t_6 = __pyx_t_2; + __pyx_t_6 = __pyx_t_1; } if (__pyx_t_6) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":646 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":646 * left = self.length - self.offset * if size == -1 or size > left: * size = left # <<<<<<<<<<<<<< @@ -13818,36 +14971,36 @@ * raise ValueError("can't read negative bytes") */ __pyx_v_size = __pyx_v_left; - goto __pyx_L8; + goto __pyx_L5; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":647 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":647 * if size == -1 or size > left: * size = left * elif size < 0: # <<<<<<<<<<<<<< * raise ValueError("can't read negative bytes") * ret = PyBytes_FromStringAndSize(NULL, size) */ - __pyx_t_6 = (__pyx_v_size < 0); + __pyx_t_6 = ((__pyx_v_size < 0) != 0); if (__pyx_t_6) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":648 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":648 * size = left * elif size < 0: * raise ValueError("can't read negative bytes") # <<<<<<<<<<<<<< * ret = PyBytes_FromStringAndSize(NULL, size) * self.bind.buffer_length = size */ - __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_45), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_51), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[3]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L8; + goto __pyx_L5; } - __pyx_L8:; + __pyx_L5:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":649 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":649 * elif size < 0: * raise ValueError("can't read negative bytes") * ret = PyBytes_FromStringAndSize(NULL, size) # <<<<<<<<<<<<<< @@ -13859,65 +15012,65 @@ __pyx_v_ret = __pyx_t_4; __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":650 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":650 * raise ValueError("can't read negative bytes") * ret = PyBytes_FromStringAndSize(NULL, size) * self.bind.buffer_length = size # <<<<<<<<<<<<<< * self.bind.buffer = PyBytes_AS_STRING(ret) * if mysql_stmt_fetch_column(self.stmt.stmt, */ - ((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->bind.buffer_length = __pyx_v_size; + __pyx_v_self->bind.buffer_length = __pyx_v_size; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":651 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":651 * ret = PyBytes_FromStringAndSize(NULL, size) * self.bind.buffer_length = size * self.bind.buffer = PyBytes_AS_STRING(ret) # <<<<<<<<<<<<<< * if mysql_stmt_fetch_column(self.stmt.stmt, * &self.bind, self.index, self.offset): */ - ((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->bind.buffer = PyBytes_AS_STRING(__pyx_v_ret); + __pyx_v_self->bind.buffer = PyBytes_AS_STRING(__pyx_v_ret); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":653 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":653 * self.bind.buffer = PyBytes_AS_STRING(ret) * if mysql_stmt_fetch_column(self.stmt.stmt, * &self.bind, self.index, self.offset): # <<<<<<<<<<<<<< * self.stmt._raise_error() * self.offset += size */ - __pyx_t_1 = __pyx_f_6oursql_mysql_stmt_fetch_column(((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->stmt->stmt, (&((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->bind), ((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->index, ((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->offset); - if (__pyx_t_1) { + __pyx_t_6 = (__pyx_f_6oursql_mysql_stmt_fetch_column(__pyx_v_self->stmt->stmt, (&__pyx_v_self->bind), __pyx_v_self->index, __pyx_v_self->offset) != 0); + if (__pyx_t_6) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":654 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":654 * if mysql_stmt_fetch_column(self.stmt.stmt, * &self.bind, self.index, self.offset): * self.stmt._raise_error() # <<<<<<<<<<<<<< * self.offset += size * left = self.length - self.offset */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Statement *)((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->stmt->__pyx_vtab)->_raise_error(((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->stmt); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L9; + __pyx_t_2 = ((struct __pyx_vtabstruct_6oursql__Statement *)__pyx_v_self->stmt->__pyx_vtab)->_raise_error(__pyx_v_self->stmt); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L6; } - __pyx_L9:; + __pyx_L6:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":655 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":655 * &self.bind, self.index, self.offset): * self.stmt._raise_error() * self.offset += size # <<<<<<<<<<<<<< * left = self.length - self.offset * assert left >= 0, 'size remaining should be >= 0' */ - ((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->offset = (((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->offset + __pyx_v_size); + __pyx_v_self->offset = (__pyx_v_self->offset + __pyx_v_size); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":656 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":656 * self.stmt._raise_error() * self.offset += size * left = self.length - self.offset # <<<<<<<<<<<<<< * assert left >= 0, 'size remaining should be >= 0' * if left == 0: */ - __pyx_v_left = (((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->length - ((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->offset); + __pyx_v_left = (__pyx_v_self->length - __pyx_v_self->offset); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":657 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":657 * self.offset += size * left = self.length - self.offset * assert left >= 0, 'size remaining should be >= 0' # <<<<<<<<<<<<<< @@ -13925,34 +15078,34 @@ * self.done = True */ #ifndef CYTHON_WITHOUT_ASSERTIONS - if (unlikely(!(__pyx_v_left >= 0))) { - PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_46)); + if (unlikely(!((__pyx_v_left >= 0) != 0))) { + PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_52)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":658 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":658 * left = self.length - self.offset * assert left >= 0, 'size remaining should be >= 0' * if left == 0: # <<<<<<<<<<<<<< * self.done = True * return ret */ - __pyx_t_6 = (__pyx_v_left == 0); + __pyx_t_6 = ((__pyx_v_left == 0) != 0); if (__pyx_t_6) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":659 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":659 * assert left >= 0, 'size remaining should be >= 0' * if left == 0: * self.done = True # <<<<<<<<<<<<<< * return ret */ - ((struct __pyx_obj_6oursql__ResultStringStream *)__pyx_v_self)->done = 1; - goto __pyx_L10; + __pyx_v_self->done = 1; + goto __pyx_L7; } - __pyx_L10:; + __pyx_L7:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":660 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":660 * if left == 0: * self.done = True * return ret # <<<<<<<<<<<<<< @@ -13976,54 +15129,36 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":21 - * conversions_dict = _conversions - * - * def __cinit__(self, Connection conn not None, bint show_table=False, # <<<<<<<<<<<<<< - * **kwargs): - * cdef my_ulonglong res - */ - -static int __pyx_pf_6oursql_10_ResultSet___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_6oursql_10_ResultSet___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +/* Python wrapper */ +static int __pyx_pw_6oursql_10_ResultSet_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6oursql_10_ResultSet_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_6oursql_Connection *__pyx_v_conn = 0; - int __pyx_v_show_table; - PyObject *__pyx_v_kwargs = 0; - my_ulonglong __pyx_v_res; - PyObject *__pyx_v_d = NULL; - int __pyx_r; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - int __pyx_t_2; - int __pyx_t_3; - int __pyx_t_4; - PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - Py_ssize_t __pyx_t_7; - PyObject *(*__pyx_t_8)(PyObject *); - PyObject *__pyx_t_9 = NULL; + CYTHON_UNUSED int __pyx_v_show_table; + CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__conn,&__pyx_n_s__show_table,0}; - __Pyx_RefNannySetupContext("__cinit__"); + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1; __Pyx_GOTREF(__pyx_v_kwargs); { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__conn,&__pyx_n_s__show_table,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; - switch (PyTuple_GET_SIZE(__pyx_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 (PyTuple_GET_SIZE(__pyx_args)) { + switch (pos_args) { case 0: - values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__conn); - if (likely(values[0])) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__conn)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { @@ -14032,7 +15167,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, PyTuple_GET_SIZE(__pyx_args), "__cinit__") < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -14046,6 +15181,14 @@ if (values[1]) { __pyx_v_show_table = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_show_table == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { + + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":21 + * conversions_dict = _conversions + * + * def __cinit__(self, Connection conn not None, bint show_table=False, # <<<<<<<<<<<<<< + * **kwargs): + * cdef my_ulonglong res + */ __pyx_v_show_table = ((int)0); } } @@ -14059,8 +15202,36 @@ return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_conn), __pyx_ptype_6oursql_Connection, 0, "conn", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6oursql_10_ResultSet___cinit__(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self), __pyx_v_conn, __pyx_v_show_table, __pyx_v_kwargs); + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_kwargs); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6oursql_10_ResultSet___cinit__(struct __pyx_obj_6oursql__ResultSet *__pyx_v_self, struct __pyx_obj_6oursql_Connection *__pyx_v_conn, CYTHON_UNUSED int __pyx_v_show_table, CYTHON_UNUSED PyObject *__pyx_v_kwargs) { + my_ulonglong __pyx_v_res; + PyObject *__pyx_v_d = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + Py_ssize_t __pyx_t_7; + PyObject *(*__pyx_t_8)(PyObject *); + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":24 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":24 * **kwargs): * cdef my_ulonglong res * conn._check_closed() # <<<<<<<<<<<<<< @@ -14069,7 +15240,7 @@ */ __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Connection *)__pyx_v_conn->__pyx_vtab)->_check_closed(__pyx_v_conn); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":25 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":25 * cdef my_ulonglong res * conn._check_closed() * self.conn = conn # <<<<<<<<<<<<<< @@ -14078,76 +15249,76 @@ */ __Pyx_INCREF(((PyObject *)__pyx_v_conn)); __Pyx_GIVEREF(((PyObject *)__pyx_v_conn)); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->conn); - __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->conn)); - ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->conn = __pyx_v_conn; + __Pyx_GOTREF(__pyx_v_self->conn); + __Pyx_DECREF(((PyObject *)__pyx_v_self->conn)); + __pyx_v_self->conn = __pyx_v_conn; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":26 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":26 * conn._check_closed() * self.conn = conn * self.fields = mysql_field_count(self.conn.conn) # <<<<<<<<<<<<<< * self.res = mysql_store_result(self.conn.conn) * if not self.res and self.fields != 0: */ - ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->fields = mysql_field_count(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->conn->conn); + __pyx_v_self->fields = mysql_field_count(__pyx_v_self->conn->conn); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":27 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":27 * self.conn = conn * self.fields = mysql_field_count(self.conn.conn) * self.res = mysql_store_result(self.conn.conn) # <<<<<<<<<<<<<< * if not self.res and self.fields != 0: * self._raise_error() */ - ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->res = __pyx_f_6oursql_mysql_store_result(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->conn->conn); + __pyx_v_self->res = __pyx_f_6oursql_mysql_store_result(__pyx_v_self->conn->conn); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":28 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":28 * self.fields = mysql_field_count(self.conn.conn) * self.res = mysql_store_result(self.conn.conn) * if not self.res and self.fields != 0: # <<<<<<<<<<<<<< * self._raise_error() * */ - __pyx_t_2 = (!(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->res != 0)); + __pyx_t_2 = ((!(__pyx_v_self->res != 0)) != 0); if (__pyx_t_2) { - __pyx_t_3 = (((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->fields != 0); + __pyx_t_3 = ((__pyx_v_self->fields != 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":29 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":29 * self.res = mysql_store_result(self.conn.conn) * if not self.res and self.fields != 0: * self._raise_error() # <<<<<<<<<<<<<< * * res = mysql_affected_rows(self.conn.conn) */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__ResultSet *)((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->__pyx_vtab)->_raise_error(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L6; + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__ResultSet *)__pyx_v_self->__pyx_vtab)->_raise_error(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L3; } - __pyx_L6:; + __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":31 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":31 * self._raise_error() * * res = mysql_affected_rows(self.conn.conn) # <<<<<<<<<<<<<< * if res == ull_negone: * self.rowcount = -1 */ - __pyx_v_res = mysql_affected_rows(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->conn->conn); + __pyx_v_res = mysql_affected_rows(__pyx_v_self->conn->conn); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":32 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":32 * * res = mysql_affected_rows(self.conn.conn) * if res == ull_negone: # <<<<<<<<<<<<<< * self.rowcount = -1 * else: */ - __pyx_t_4 = (__pyx_v_res == __pyx_v_6oursql_ull_negone); + __pyx_t_4 = ((__pyx_v_res == __pyx_v_6oursql_ull_negone) != 0); if (__pyx_t_4) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":33 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":33 * res = mysql_affected_rows(self.conn.conn) * if res == ull_negone: * self.rowcount = -1 # <<<<<<<<<<<<<< @@ -14156,14 +15327,14 @@ */ __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->rowcount); - __Pyx_DECREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->rowcount); - ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->rowcount = __pyx_int_neg_1; - goto __pyx_L7; + __Pyx_GOTREF(__pyx_v_self->rowcount); + __Pyx_DECREF(__pyx_v_self->rowcount); + __pyx_v_self->rowcount = __pyx_int_neg_1; + goto __pyx_L4; } /*else*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":35 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":35 * self.rowcount = -1 * else: * self.rowcount = res # <<<<<<<<<<<<<< @@ -14173,33 +15344,33 @@ __pyx_t_5 = __Pyx_PyInt_to_py_my_ulonglong(__pyx_v_res); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->rowcount); - __Pyx_DECREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->rowcount); - ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->rowcount = __pyx_t_5; + __Pyx_GOTREF(__pyx_v_self->rowcount); + __Pyx_DECREF(__pyx_v_self->rowcount); + __pyx_v_self->rowcount = __pyx_t_5; __pyx_t_5 = 0; } - __pyx_L7:; + __pyx_L4:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":36 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":36 * else: * self.rowcount = res * res = mysql_insert_id(self.conn.conn) # <<<<<<<<<<<<<< * if res == 0: * self.lastrowid = None */ - __pyx_v_res = mysql_insert_id(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->conn->conn); + __pyx_v_res = mysql_insert_id(__pyx_v_self->conn->conn); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":37 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":37 * self.rowcount = res * res = mysql_insert_id(self.conn.conn) * if res == 0: # <<<<<<<<<<<<<< * self.lastrowid = None * else: */ - __pyx_t_4 = (__pyx_v_res == 0); + __pyx_t_4 = ((__pyx_v_res == 0) != 0); if (__pyx_t_4) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":38 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":38 * res = mysql_insert_id(self.conn.conn) * if res == 0: * self.lastrowid = None # <<<<<<<<<<<<<< @@ -14208,14 +15379,14 @@ */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->lastrowid); - __Pyx_DECREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->lastrowid); - ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->lastrowid = Py_None; - goto __pyx_L8; + __Pyx_GOTREF(__pyx_v_self->lastrowid); + __Pyx_DECREF(__pyx_v_self->lastrowid); + __pyx_v_self->lastrowid = Py_None; + goto __pyx_L5; } /*else*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":40 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":40 * self.lastrowid = None * else: * self.lastrowid = res # <<<<<<<<<<<<<< @@ -14225,33 +15396,34 @@ __pyx_t_5 = __Pyx_PyInt_to_py_my_ulonglong(__pyx_v_res); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->lastrowid); - __Pyx_DECREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->lastrowid); - ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->lastrowid = __pyx_t_5; + __Pyx_GOTREF(__pyx_v_self->lastrowid); + __Pyx_DECREF(__pyx_v_self->lastrowid); + __pyx_v_self->lastrowid = __pyx_t_5; __pyx_t_5 = 0; } - __pyx_L8:; + __pyx_L5:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":42 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":42 * self.lastrowid = res * * if self.fields: # <<<<<<<<<<<<<< * self.description = description_from_res( * conn, self.res, self.fields, self.show_table) */ - if (((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->fields) { + __pyx_t_4 = (__pyx_v_self->fields != 0); + if (__pyx_t_4) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":44 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":44 * if self.fields: * self.description = description_from_res( * conn, self.res, self.fields, self.show_table) # <<<<<<<<<<<<<< * self.conversion_info = conversion_info_from_res( * self.res, self.fields) */ - __pyx_t_5 = __pyx_f_6oursql_description_from_res(__pyx_v_conn, ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->res, ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->fields, ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->show_table); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_f_6oursql_description_from_res(__pyx_v_conn, __pyx_v_self->res, __pyx_v_self->fields, __pyx_v_self->show_table); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":43 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":43 * * if self.fields: * self.description = description_from_res( # <<<<<<<<<<<<<< @@ -14259,22 +15431,22 @@ * self.conversion_info = conversion_info_from_res( */ __Pyx_GIVEREF(__pyx_t_5); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->description); - __Pyx_DECREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->description); - ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->description = __pyx_t_5; + __Pyx_GOTREF(__pyx_v_self->description); + __Pyx_DECREF(__pyx_v_self->description); + __pyx_v_self->description = __pyx_t_5; __pyx_t_5 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":46 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":46 * conn, self.res, self.fields, self.show_table) * self.conversion_info = conversion_info_from_res( * self.res, self.fields) # <<<<<<<<<<<<<< * self.column_names = [d[0] for d in self.description] * else: */ - __pyx_t_5 = __pyx_f_6oursql_conversion_info_from_res(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->res, ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->fields); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_f_6oursql_conversion_info_from_res(__pyx_v_self->res, __pyx_v_self->fields); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":45 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":45 * self.description = description_from_res( * conn, self.res, self.fields, self.show_table) * self.conversion_info = conversion_info_from_res( # <<<<<<<<<<<<<< @@ -14282,12 +15454,12 @@ * self.column_names = [d[0] for d in self.description] */ __Pyx_GIVEREF(__pyx_t_5); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->conversion_info); - __Pyx_DECREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->conversion_info); - ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->conversion_info = __pyx_t_5; + __Pyx_GOTREF(__pyx_v_self->conversion_info); + __Pyx_DECREF(__pyx_v_self->conversion_info); + __pyx_v_self->conversion_info = __pyx_t_5; __pyx_t_5 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":47 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":47 * self.conversion_info = conversion_info_from_res( * self.res, self.fields) * self.column_names = [d[0] for d in self.description] # <<<<<<<<<<<<<< @@ -14295,22 +15467,30 @@ * self.description = self.column_names = None */ __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); - if (PyList_CheckExact(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->description) || PyTuple_CheckExact(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->description)) { - __pyx_t_6 = ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->description; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + if (PyList_CheckExact(__pyx_v_self->description) || PyTuple_CheckExact(__pyx_v_self->description)) { + __pyx_t_6 = __pyx_v_self->description; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->description); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_self->description); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; } for (;;) { - if (PyList_CheckExact(__pyx_t_6)) { + if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_6)) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)) break; - __pyx_t_9 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; - } else if (PyTuple_CheckExact(__pyx_t_6)) { + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_9 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_6)) { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)) break; - __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif } else { __pyx_t_9 = __pyx_t_8(__pyx_t_6); if (unlikely(!__pyx_t_9)) { @@ -14325,23 +15505,22 @@ __Pyx_XDECREF(__pyx_v_d); __pyx_v_d = __pyx_t_9; __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_d, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_d, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_9) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); - if (unlikely(PyList_Append(__pyx_t_5, (PyObject*)__pyx_t_9))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_9))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_INCREF(((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->column_names); - __Pyx_DECREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->column_names); - ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->column_names = ((PyObject *)__pyx_t_5); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; - goto __pyx_L9; + __Pyx_GOTREF(__pyx_v_self->column_names); + __Pyx_DECREF(__pyx_v_self->column_names); + __pyx_v_self->column_names = ((PyObject *)__pyx_t_5); + __pyx_t_5 = 0; + goto __pyx_L6; } /*else*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":49 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":49 * self.column_names = [d[0] for d in self.description] * else: * self.description = self.column_names = None # <<<<<<<<<<<<<< @@ -14350,25 +15529,25 @@ */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->description); - __Pyx_DECREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->description); - ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->description = Py_None; + __Pyx_GOTREF(__pyx_v_self->description); + __Pyx_DECREF(__pyx_v_self->description); + __pyx_v_self->description = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->column_names); - __Pyx_DECREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->column_names); - ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->column_names = Py_None; + __Pyx_GOTREF(__pyx_v_self->column_names); + __Pyx_DECREF(__pyx_v_self->column_names); + __pyx_v_self->column_names = Py_None; } - __pyx_L9:; + __pyx_L6:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":51 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":51 * self.description = self.column_names = None * * if self.conn.warning_count(): # <<<<<<<<<<<<<< * self.warnings = _do_warnings_query(self.conn) * else: */ - __pyx_t_5 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->conn), __pyx_n_s__warning_count); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->conn), __pyx_n_s__warning_count); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); @@ -14377,34 +15556,34 @@ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_4) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":52 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":52 * * if self.conn.warning_count(): * self.warnings = _do_warnings_query(self.conn) # <<<<<<<<<<<<<< * else: * self.warnings = [] */ - __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s___do_warnings_query); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s___do_warnings_query); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); - __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->conn)); - PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->conn)); - __Pyx_GIVEREF(((PyObject *)((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->conn)); + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(((PyObject *)__pyx_v_self->conn)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_self->conn)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self->conn)); __pyx_t_9 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_9); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->warnings); - __Pyx_DECREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->warnings); - ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->warnings = __pyx_t_9; + __Pyx_GOTREF(__pyx_v_self->warnings); + __Pyx_DECREF(__pyx_v_self->warnings); + __pyx_v_self->warnings = __pyx_t_9; __pyx_t_9 = 0; - goto __pyx_L12; + goto __pyx_L9; } /*else*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":54 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":54 * self.warnings = _do_warnings_query(self.conn) * else: * self.warnings = [] # <<<<<<<<<<<<<< @@ -14412,14 +15591,14 @@ * def __dealloc__(self): */ __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_9)); + __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(((PyObject *)__pyx_t_9)); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->warnings); - __Pyx_DECREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->warnings); - ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->warnings = ((PyObject *)__pyx_t_9); + __Pyx_GOTREF(__pyx_v_self->warnings); + __Pyx_DECREF(__pyx_v_self->warnings); + __pyx_v_self->warnings = ((PyObject *)__pyx_t_9); __pyx_t_9 = 0; } - __pyx_L12:; + __pyx_L9:; __pyx_r = 0; goto __pyx_L0; @@ -14430,13 +15609,21 @@ __Pyx_AddTraceback("oursql._ResultSet.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_XDECREF(__pyx_v_d); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":56 +/* Python wrapper */ +static void __pyx_pw_6oursql_10_ResultSet_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_6oursql_10_ResultSet_3__dealloc__(PyObject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_pf_6oursql_10_ResultSet_2__dealloc__(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":56 * self.warnings = [] * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -14444,24 +15631,23 @@ * */ -static void __pyx_pf_6oursql_10_ResultSet_1__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pf_6oursql_10_ResultSet_1__dealloc__(PyObject *__pyx_v_self) { +static void __pyx_pf_6oursql_10_ResultSet_2__dealloc__(struct __pyx_obj_6oursql__ResultSet *__pyx_v_self) { __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("__dealloc__"); + __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":57 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":57 * * def __dealloc__(self): * self.close() # <<<<<<<<<<<<<< * * def close(self): */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 57; __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[5]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -14477,7 +15663,18 @@ __Pyx_RefNannyFinishContext(); } -/* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":59 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10_ResultSet_5close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6oursql_10_ResultSet_5close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("close (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_ResultSet_4close(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":59 * self.close() * * def close(self): # <<<<<<<<<<<<<< @@ -14485,43 +15682,42 @@ * mysql_free_result(self.res) */ -static PyObject *__pyx_pf_6oursql_10_ResultSet_2close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pf_6oursql_10_ResultSet_2close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_6oursql_10_ResultSet_4close(struct __pyx_obj_6oursql__ResultSet *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; - __Pyx_RefNannySetupContext("close"); + __Pyx_RefNannySetupContext("close", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":60 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":60 * * def close(self): * if self.res: # <<<<<<<<<<<<<< * mysql_free_result(self.res) * self.res = NULL */ - __pyx_t_1 = (((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->res != 0); + __pyx_t_1 = (__pyx_v_self->res != 0); if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":61 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":61 * def close(self): * if self.res: * mysql_free_result(self.res) # <<<<<<<<<<<<<< * self.res = NULL * */ - mysql_free_result(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->res); + mysql_free_result(__pyx_v_self->res); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":62 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":62 * if self.res: * mysql_free_result(self.res) * self.res = NULL # <<<<<<<<<<<<<< * * cdef int _raise_error(self) except -1: */ - ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->res = NULL; - goto __pyx_L5; + __pyx_v_self->res = NULL; + goto __pyx_L3; } - __pyx_L5:; + __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); @@ -14529,7 +15725,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":64 +/* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":64 * self.res = NULL * * cdef int _raise_error(self) except -1: # <<<<<<<<<<<<<< @@ -14544,9 +15740,9 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_raise_error"); + __Pyx_RefNannySetupContext("_raise_error", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":65 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":65 * * cdef int _raise_error(self) except -1: * return self.conn._raise_error() # <<<<<<<<<<<<<< @@ -14567,7 +15763,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":67 +/* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":67 * return self.conn._raise_error() * * cdef int _check_closed(self) except -1: # <<<<<<<<<<<<<< @@ -14584,19 +15780,19 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_check_closed"); + __Pyx_RefNannySetupContext("_check_closed", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":68 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":68 * * cdef int _check_closed(self) except -1: * if not self.conn.conn: # <<<<<<<<<<<<<< * if self.res: * self.close() */ - __pyx_t_1 = (!(__pyx_v_self->conn->conn != 0)); + __pyx_t_1 = ((!(__pyx_v_self->conn->conn != 0)) != 0); if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":69 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":69 * cdef int _check_closed(self) except -1: * if not self.conn.conn: * if self.res: # <<<<<<<<<<<<<< @@ -14606,14 +15802,14 @@ __pyx_t_1 = (__pyx_v_self->res != 0); if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":70 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":70 * if not self.conn.conn: * if self.res: * self.close() # <<<<<<<<<<<<<< * raise ProgrammingError('connection closed') * if not self.res: */ - __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); @@ -14623,16 +15819,16 @@ } __pyx_L4:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":71 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":71 * if self.res: * self.close() * raise ProgrammingError('connection closed') # <<<<<<<<<<<<<< * if not self.res: * raise ProgrammingError('query closed') */ - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_47), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_53), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); @@ -14642,26 +15838,26 @@ } __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":72 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":72 * self.close() * raise ProgrammingError('connection closed') * if not self.res: # <<<<<<<<<<<<<< * raise ProgrammingError('query closed') * */ - __pyx_t_1 = (!(__pyx_v_self->res != 0)); + __pyx_t_1 = ((!(__pyx_v_self->res != 0)) != 0); if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":73 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":73 * raise ProgrammingError('connection closed') * if not self.res: * raise ProgrammingError('query closed') # <<<<<<<<<<<<<< * * property has_result: */ - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_49), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_55), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); @@ -14683,7 +15879,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":76 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10_ResultSet_10has_result_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_10_ResultSet_10has_result_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_ResultSet_10has_result___get__(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":76 * * property has_result: * def __get__(self): # <<<<<<<<<<<<<< @@ -14691,17 +15898,16 @@ * */ -static PyObject *__pyx_pf_6oursql_10_ResultSet_10has_result___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_10_ResultSet_10has_result___get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_10_ResultSet_10has_result___get__(struct __pyx_obj_6oursql__ResultSet *__pyx_v_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("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":77 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":77 * property has_result: * def __get__(self): * return self.fields != 0 # <<<<<<<<<<<<<< @@ -14709,7 +15915,7 @@ * def fetchone(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong((((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->fields != 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->fields != 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -14727,7 +15933,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":79 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10_ResultSet_7fetchone(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6oursql_10_ResultSet_7fetchone(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("fetchone (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_ResultSet_6fetchone(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":79 * return self.fields != 0 * * def fetchone(self): # <<<<<<<<<<<<<< @@ -14735,15 +15952,14 @@ * cdef unsigned int i */ -static PyObject *__pyx_pf_6oursql_10_ResultSet_3fetchone(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pf_6oursql_10_ResultSet_3fetchone(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_6oursql_10_ResultSet_6fetchone(struct __pyx_obj_6oursql__ResultSet *__pyx_v_self) { MYSQL_ROW __pyx_v_row; unsigned int __pyx_v_i; unsigned long *__pyx_v_lengths; PyObject *__pyx_v_ret = NULL; PyObject *__pyx_v_d = NULL; PyObject *__pyx_v_field_type = NULL; - PyObject *__pyx_v_flags = NULL; + CYTHON_UNUSED PyObject *__pyx_v_flags = NULL; PyObject *__pyx_v_charsetnr = NULL; PyObject *__pyx_v_converter = NULL; PyObject *__pyx_r = NULL; @@ -14761,37 +15977,37 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("fetchone"); + __Pyx_RefNannySetupContext("fetchone", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":83 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":83 * cdef unsigned int i * cdef unsigned long *lengths * self._check_closed() # <<<<<<<<<<<<<< * row = mysql_fetch_row(self.res) * if not row: */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__ResultSet *)((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->__pyx_vtab)->_check_closed(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__ResultSet *)__pyx_v_self->__pyx_vtab)->_check_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":84 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":84 * cdef unsigned long *lengths * self._check_closed() * row = mysql_fetch_row(self.res) # <<<<<<<<<<<<<< * if not row: * return None */ - __pyx_v_row = __pyx_f_6oursql_mysql_fetch_row(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->res); + __pyx_v_row = __pyx_f_6oursql_mysql_fetch_row(__pyx_v_self->res); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":85 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":85 * self._check_closed() * row = mysql_fetch_row(self.res) * if not row: # <<<<<<<<<<<<<< * return None * lengths = mysql_fetch_lengths(self.res) */ - __pyx_t_2 = (!(__pyx_v_row != 0)); + __pyx_t_2 = ((!(__pyx_v_row != 0)) != 0); if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":86 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":86 * row = mysql_fetch_row(self.res) * if not row: * return None # <<<<<<<<<<<<<< @@ -14802,85 +16018,85 @@ __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; - goto __pyx_L5; + goto __pyx_L3; } - __pyx_L5:; + __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":87 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":87 * if not row: * return None * lengths = mysql_fetch_lengths(self.res) # <<<<<<<<<<<<<< * if not lengths: * self._raise_error() */ - __pyx_v_lengths = mysql_fetch_lengths(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->res); + __pyx_v_lengths = mysql_fetch_lengths(__pyx_v_self->res); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":88 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":88 * return None * lengths = mysql_fetch_lengths(self.res) * if not lengths: # <<<<<<<<<<<<<< * self._raise_error() * ret = PyTuple_New(self.fields) */ - __pyx_t_2 = (!(__pyx_v_lengths != 0)); + __pyx_t_2 = ((!(__pyx_v_lengths != 0)) != 0); if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":89 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":89 * lengths = mysql_fetch_lengths(self.res) * if not lengths: * self._raise_error() # <<<<<<<<<<<<<< * ret = PyTuple_New(self.fields) * # Cache the connection charset. */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__ResultSet *)((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->__pyx_vtab)->_raise_error(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L6; + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__ResultSet *)__pyx_v_self->__pyx_vtab)->_raise_error(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L4; } - __pyx_L6:; + __pyx_L4:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":90 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":90 * if not lengths: * self._raise_error() * ret = PyTuple_New(self.fields) # <<<<<<<<<<<<<< * # Cache the connection charset. * self.conn.charset */ - __pyx_t_3 = PyTuple_New(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->fields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(__pyx_v_self->fields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_ret = __pyx_t_3; __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":92 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":92 * ret = PyTuple_New(self.fields) * # Cache the connection charset. * self.conn.charset # <<<<<<<<<<<<<< * for 0 <= i < self.fields: * if not row[i]: */ - __pyx_t_3 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->conn), __pyx_n_s__charset); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->conn), __pyx_n_s__charset); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":93 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":93 * # Cache the connection charset. * self.conn.charset * for 0 <= i < self.fields: # <<<<<<<<<<<<<< * if not row[i]: * d = None */ - __pyx_t_4 = ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->fields; + __pyx_t_4 = __pyx_v_self->fields; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":94 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":94 * self.conn.charset * for 0 <= i < self.fields: * if not row[i]: # <<<<<<<<<<<<<< * d = None * else: */ - __pyx_t_2 = (!((__pyx_v_row[__pyx_v_i]) != 0)); + __pyx_t_2 = ((!((__pyx_v_row[__pyx_v_i]) != 0)) != 0); if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":95 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":95 * for 0 <= i < self.fields: * if not row[i]: * d = None # <<<<<<<<<<<<<< @@ -14890,11 +16106,11 @@ __Pyx_INCREF(Py_None); __Pyx_XDECREF(__pyx_v_d); __pyx_v_d = Py_None; - goto __pyx_L9; + goto __pyx_L7; } /*else*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":97 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":97 * d = None * else: * d = PyBytes_FromStringAndSize(row[i], lengths[i]) # <<<<<<<<<<<<<< @@ -14907,32 +16123,33 @@ __pyx_v_d = __pyx_t_3; __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":98 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":98 * else: * d = PyBytes_FromStringAndSize(row[i], lengths[i]) * field_type, flags, charsetnr = self.conversion_info[i] # <<<<<<<<<<<<<< * converter = self.conversions_dict.get(field_type) * if converter: */ - __pyx_t_3 = __Pyx_GetItemInt(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->conversion_info, __pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->conversion_info, __pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; + #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[5]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { - if (unlikely(PyTuple_GET_SIZE(sequence) != 3)) { - if (PyTuple_GET_SIZE(sequence) > 3) __Pyx_RaiseTooManyValuesError(3); - else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence)); - {__pyx_filename = __pyx_f[5]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); } else { - if (unlikely(PyList_GET_SIZE(sequence) != 3)) { - if (PyList_GET_SIZE(sequence) > 3) __Pyx_RaiseTooManyValuesError(3); - else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence)); - {__pyx_filename = __pyx_f[5]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_6 = PyList_GET_ITEM(sequence, 1); __pyx_t_7 = PyList_GET_ITEM(sequence, 2); @@ -14940,28 +16157,38 @@ __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); + #else + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { + } else + { Py_ssize_t index = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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_L10_unpacking_failed; + index = 0; __pyx_t_5 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_5)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L10_unpacking_failed; + index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - index = 2; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L10_unpacking_failed; + index = 2; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - goto __pyx_L11_unpacking_done; - __pyx_L10_unpacking_failed:; + goto __pyx_L9_unpacking_done; + __pyx_L8_unpacking_failed:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear(); - if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index); + __pyx_t_9 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_L11_unpacking_done:; + __pyx_L9_unpacking_done:; } __Pyx_XDECREF(__pyx_v_field_type); __pyx_v_field_type = __pyx_t_5; @@ -14973,20 +16200,20 @@ __pyx_v_charsetnr = __pyx_t_7; __pyx_t_7 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":99 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":99 * d = PyBytes_FromStringAndSize(row[i], lengths[i]) * field_type, flags, charsetnr = self.conversion_info[i] * converter = self.conversions_dict.get(field_type) # <<<<<<<<<<<<<< * if converter: * d = converter(d) */ - __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__conversions_dict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__conversions_dict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__get); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__get); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_field_type); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_field_type); __Pyx_GIVEREF(__pyx_v_field_type); @@ -14998,7 +16225,7 @@ __pyx_v_converter = __pyx_t_6; __pyx_t_6 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":100 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":100 * field_type, flags, charsetnr = self.conversion_info[i] * converter = self.conversions_dict.get(field_type) * if converter: # <<<<<<<<<<<<<< @@ -15008,7 +16235,7 @@ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_converter); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":101 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":101 * converter = self.conversions_dict.get(field_type) * if converter: * d = converter(d) # <<<<<<<<<<<<<< @@ -15016,7 +16243,7 @@ * d = d.decode(self.conn._charset) */ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_d); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_d); __Pyx_GIVEREF(__pyx_v_d); @@ -15026,41 +16253,40 @@ __Pyx_DECREF(__pyx_v_d); __pyx_v_d = __pyx_t_3; __pyx_t_3 = 0; - goto __pyx_L12; + goto __pyx_L10; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":102 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":102 * if converter: * d = converter(d) * elif self.conn.use_unicode and charsetnr != CS_BINARY: # <<<<<<<<<<<<<< * d = d.decode(self.conn._charset) * Py_INCREF(d) */ - if (((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->conn->use_unicode) { - __pyx_t_3 = PyObject_RichCompare(__pyx_v_charsetnr, __pyx_int_63, Py_NE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + if ((__pyx_v_self->conn->use_unicode != 0)) { + __pyx_t_3 = PyObject_RichCompare(__pyx_v_charsetnr, __pyx_int_63, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_10 = __pyx_t_2; } else { - __pyx_t_10 = ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->conn->use_unicode; + __pyx_t_10 = (__pyx_v_self->conn->use_unicode != 0); } if (__pyx_t_10) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":103 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":103 * d = converter(d) * elif self.conn.use_unicode and charsetnr != CS_BINARY: * d = d.decode(self.conn._charset) # <<<<<<<<<<<<<< * Py_INCREF(d) * PyTuple_SET_ITEM(ret, i, d) */ - __pyx_t_3 = PyObject_GetAttr(__pyx_v_d, __pyx_n_s__decode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s__decode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); - __Pyx_INCREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->conn->_charset); - PyTuple_SET_ITEM(__pyx_t_6, 0, ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->conn->_charset); - __Pyx_GIVEREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->conn->_charset); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_v_self->conn->_charset); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_self->conn->_charset); + __Pyx_GIVEREF(__pyx_v_self->conn->_charset); __pyx_t_7 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -15068,13 +16294,13 @@ __Pyx_DECREF(__pyx_v_d); __pyx_v_d = __pyx_t_7; __pyx_t_7 = 0; - goto __pyx_L12; + goto __pyx_L10; } - __pyx_L12:; + __pyx_L10:; } - __pyx_L9:; + __pyx_L7:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":104 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":104 * elif self.conn.use_unicode and charsetnr != CS_BINARY: * d = d.decode(self.conn._charset) * Py_INCREF(d) # <<<<<<<<<<<<<< @@ -15083,7 +16309,7 @@ */ Py_INCREF(__pyx_v_d); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":105 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":105 * d = d.decode(self.conn._charset) * Py_INCREF(d) * PyTuple_SET_ITEM(ret, i, d) # <<<<<<<<<<<<<< @@ -15093,7 +16319,7 @@ PyTuple_SET_ITEM(__pyx_v_ret, __pyx_v_i, __pyx_v_d); } - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":106 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":106 * Py_INCREF(d) * PyTuple_SET_ITEM(ret, i, d) * return ret # <<<<<<<<<<<<<< @@ -15127,7 +16353,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":108 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10_ResultSet_9fetchall(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6oursql_10_ResultSet_9fetchall(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("fetchall (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_ResultSet_8fetchall(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":108 * return ret * * def fetchall(self): # <<<<<<<<<<<<<< @@ -15135,8 +16372,7 @@ * return PySequence_List(self) */ -static PyObject *__pyx_pf_6oursql_10_ResultSet_4fetchall(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pf_6oursql_10_ResultSet_4fetchall(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_6oursql_10_ResultSet_8fetchall(struct __pyx_obj_6oursql__ResultSet *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -15144,18 +16380,18 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("fetchall"); + __Pyx_RefNannySetupContext("fetchall", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":109 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":109 * * def fetchall(self): * self._check_closed() # <<<<<<<<<<<<<< * return PySequence_List(self) * */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__ResultSet *)((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->__pyx_vtab)->_check_closed(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__ResultSet *)__pyx_v_self->__pyx_vtab)->_check_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":110 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":110 * def fetchall(self): * self._check_closed() * return PySequence_List(self) # <<<<<<<<<<<<<< @@ -15163,7 +16399,7 @@ * def __iter__(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PySequence_List(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -15181,7 +16417,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":112 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10_ResultSet_11__iter__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_10_ResultSet_11__iter__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_ResultSet_10__iter__(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":112 * return PySequence_List(self) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -15189,29 +16436,27 @@ * return PyCallIter_New(self.fetchone, None) */ -static PyObject *__pyx_pf_6oursql_10_ResultSet_5__iter__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_10_ResultSet_5__iter__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_10_ResultSet_10__iter__(struct __pyx_obj_6oursql__ResultSet *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; 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("__iter__"); + __Pyx_RefNannySetupContext("__iter__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":113 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":113 * * def __iter__(self): * self._check_closed() # <<<<<<<<<<<<<< * return PyCallIter_New(self.fetchone, None) * */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__ResultSet *)((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->__pyx_vtab)->_check_closed(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__ResultSet *)__pyx_v_self->__pyx_vtab)->_check_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":114 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":114 * def __iter__(self): * self._check_closed() * return PyCallIter_New(self.fetchone, None) # <<<<<<<<<<<<<< @@ -15219,16 +16464,13 @@ * cdef class _Query: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__fetchone); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__fetchone); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = Py_None; - __Pyx_INCREF(__pyx_t_3); - __pyx_t_4 = PyCallIter_New(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyCallIter_New(__pyx_t_2, Py_None); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -15236,7 +16478,6 @@ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("oursql._ResultSet.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -15245,7 +16486,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":15 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10_ResultSet_8rowcount_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_10_ResultSet_8rowcount_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_ResultSet_8rowcount___get__(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":15 * cdef unsigned int fields * cdef object conversion_info * cdef readonly object rowcount, lastrowid, description, column_names # <<<<<<<<<<<<<< @@ -15253,14 +16505,13 @@ * cdef int show_table */ -static PyObject *__pyx_pf_6oursql_10_ResultSet_8rowcount___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_10_ResultSet_8rowcount___get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_10_ResultSet_8rowcount___get__(struct __pyx_obj_6oursql__ResultSet *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->rowcount); - __pyx_r = ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->rowcount; + __Pyx_INCREF(__pyx_v_self->rowcount); + __pyx_r = __pyx_v_self->rowcount; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -15270,14 +16521,24 @@ return __pyx_r; } -static PyObject *__pyx_pf_6oursql_10_ResultSet_9lastrowid___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_10_ResultSet_9lastrowid___get__(PyObject *__pyx_v_self) { +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10_ResultSet_9lastrowid_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_10_ResultSet_9lastrowid_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_ResultSet_9lastrowid___get__(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6oursql_10_ResultSet_9lastrowid___get__(struct __pyx_obj_6oursql__ResultSet *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->lastrowid); - __pyx_r = ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->lastrowid; + __Pyx_INCREF(__pyx_v_self->lastrowid); + __pyx_r = __pyx_v_self->lastrowid; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -15287,14 +16548,24 @@ return __pyx_r; } -static PyObject *__pyx_pf_6oursql_10_ResultSet_11description___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_10_ResultSet_11description___get__(PyObject *__pyx_v_self) { +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10_ResultSet_11description_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_10_ResultSet_11description_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_ResultSet_11description___get__(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6oursql_10_ResultSet_11description___get__(struct __pyx_obj_6oursql__ResultSet *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->description); - __pyx_r = ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->description; + __Pyx_INCREF(__pyx_v_self->description); + __pyx_r = __pyx_v_self->description; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -15304,14 +16575,24 @@ return __pyx_r; } -static PyObject *__pyx_pf_6oursql_10_ResultSet_12column_names___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_10_ResultSet_12column_names___get__(PyObject *__pyx_v_self) { +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10_ResultSet_12column_names_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_10_ResultSet_12column_names_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_ResultSet_12column_names___get__(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6oursql_10_ResultSet_12column_names___get__(struct __pyx_obj_6oursql__ResultSet *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->column_names); - __pyx_r = ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->column_names; + __Pyx_INCREF(__pyx_v_self->column_names); + __pyx_r = __pyx_v_self->column_names; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -15321,7 +16602,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":16 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_10_ResultSet_8warnings_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_10_ResultSet_8warnings_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_ResultSet_8warnings___get__(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":16 * cdef object conversion_info * cdef readonly object rowcount, lastrowid, description, column_names * cdef public object warnings # <<<<<<<<<<<<<< @@ -15329,14 +16621,13 @@ * */ -static PyObject *__pyx_pf_6oursql_10_ResultSet_8warnings___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_10_ResultSet_8warnings___get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_10_ResultSet_8warnings___get__(struct __pyx_obj_6oursql__ResultSet *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->warnings); - __pyx_r = ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->warnings; + __Pyx_INCREF(__pyx_v_self->warnings); + __pyx_r = __pyx_v_self->warnings; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -15346,65 +16637,71 @@ return __pyx_r; } -static int __pyx_pf_6oursql_10_ResultSet_8warnings_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ -static int __pyx_pf_6oursql_10_ResultSet_8warnings_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { +/* Python wrapper */ +static int __pyx_pw_6oursql_10_ResultSet_8warnings_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_6oursql_10_ResultSet_8warnings_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_ResultSet_8warnings_2__set__(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6oursql_10_ResultSet_8warnings_2__set__(struct __pyx_obj_6oursql__ResultSet *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__set__"); + __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->warnings); - __Pyx_DECREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->warnings); - ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->warnings = __pyx_v_value; + __Pyx_GOTREF(__pyx_v_self->warnings); + __Pyx_DECREF(__pyx_v_self->warnings); + __pyx_v_self->warnings = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } -static int __pyx_pf_6oursql_10_ResultSet_8warnings_2__del__(PyObject *__pyx_v_self); /*proto*/ -static int __pyx_pf_6oursql_10_ResultSet_8warnings_2__del__(PyObject *__pyx_v_self) { +/* Python wrapper */ +static int __pyx_pw_6oursql_10_ResultSet_8warnings_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_6oursql_10_ResultSet_8warnings_5__del__(PyObject *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_10_ResultSet_8warnings_4__del__(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6oursql_10_ResultSet_8warnings_4__del__(struct __pyx_obj_6oursql__ResultSet *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__del__"); + __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->warnings); - __Pyx_DECREF(((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->warnings); - ((struct __pyx_obj_6oursql__ResultSet *)__pyx_v_self)->warnings = Py_None; + __Pyx_GOTREF(__pyx_v_self->warnings); + __Pyx_DECREF(__pyx_v_self->warnings); + __pyx_v_self->warnings = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":128 - * cdef readonly object rowcount, lastrowid, description, warnings, has_result - * - * def __cinit__(self, Connection conn not None, query, *a, **kw): # <<<<<<<<<<<<<< - * cdef char *qstr - * cdef Py_ssize_t qlen - */ - -static int __pyx_pf_6oursql_6_Query___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_6oursql_6_Query___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +/* Python wrapper */ +static int __pyx_pw_6oursql_6_Query_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6oursql_6_Query_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_6oursql_Connection *__pyx_v_conn = 0; PyObject *__pyx_v_query = 0; PyObject *__pyx_v_a = 0; PyObject *__pyx_v_kw = 0; - char *__pyx_v_qstr; - Py_ssize_t __pyx_v_qlen; - int __pyx_r; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - struct __pyx_opt_args_6oursql_bytes_maybe_from_encoding __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__conn,&__pyx_n_s__query,0}; - __Pyx_RefNannySetupContext("__cinit__"); + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); __pyx_v_kw = PyDict_New(); if (unlikely(!__pyx_v_kw)) return -1; __Pyx_GOTREF(__pyx_v_kw); if (PyTuple_GET_SIZE(__pyx_args) > 2) { @@ -15419,30 +16716,30 @@ __pyx_v_a = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); } { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__conn,&__pyx_n_s__query,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; - switch (PyTuple_GET_SIZE(__pyx_args)) { + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { default: case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; } kw_args = PyDict_Size(__pyx_kwds); - switch (PyTuple_GET_SIZE(__pyx_args)) { + switch (pos_args) { case 0: - values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__conn); - if (likely(values[0])) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__conn)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: - values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__query); - if (likely(values[1])) kw_args--; + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__query)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 2, 1); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - const Py_ssize_t used_pos_args = (PyTuple_GET_SIZE(__pyx_args) < 2) ? PyTuple_GET_SIZE(__pyx_args) : 2; + const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kw, values, used_pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) < 2) { @@ -15464,39 +16761,72 @@ __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - __Pyx_INCREF(__pyx_v_query); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_conn), __pyx_ptype_6oursql_Connection, 0, "conn", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6oursql_6_Query___cinit__(((struct __pyx_obj_6oursql__Query *)__pyx_v_self), __pyx_v_conn, __pyx_v_query, __pyx_v_a, __pyx_v_kw); + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_a); + __Pyx_XDECREF(__pyx_v_kw); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":131 +/* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":128 + * cdef readonly object rowcount, lastrowid, description, warnings, has_result + * + * def __cinit__(self, Connection conn not None, query, *a, **kw): # <<<<<<<<<<<<<< * cdef char *qstr * cdef Py_ssize_t qlen - * conn._check_closed() # <<<<<<<<<<<<<< - * self.conn = conn - * query = bytes_maybe_from_encoding(query, self.conn.charset, False) */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Connection *)__pyx_v_conn->__pyx_vtab)->_check_closed(__pyx_v_conn); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":132 - * cdef Py_ssize_t qlen - * conn._check_closed() - * self.conn = conn # <<<<<<<<<<<<<< - * query = bytes_maybe_from_encoding(query, self.conn.charset, False) - * PyBytes_AsStringAndSize(query, &qstr, &qlen) - */ - __Pyx_INCREF(((PyObject *)__pyx_v_conn)); +static int __pyx_pf_6oursql_6_Query___cinit__(struct __pyx_obj_6oursql__Query *__pyx_v_self, struct __pyx_obj_6oursql_Connection *__pyx_v_conn, PyObject *__pyx_v_query, PyObject *__pyx_v_a, PyObject *__pyx_v_kw) { + char *__pyx_v_qstr; + Py_ssize_t __pyx_v_qlen; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + struct __pyx_opt_args_6oursql_bytes_maybe_from_encoding __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); + __Pyx_INCREF(__pyx_v_query); + + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":131 + * cdef char *qstr + * cdef Py_ssize_t qlen + * conn._check_closed() # <<<<<<<<<<<<<< + * self.conn = conn + * query = bytes_maybe_from_encoding(query, self.conn.charset, False) + */ + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Connection *)__pyx_v_conn->__pyx_vtab)->_check_closed(__pyx_v_conn); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":132 + * cdef Py_ssize_t qlen + * conn._check_closed() + * self.conn = conn # <<<<<<<<<<<<<< + * query = bytes_maybe_from_encoding(query, self.conn.charset, False) + * PyBytes_AsStringAndSize(query, &qstr, &qlen) + */ + __Pyx_INCREF(((PyObject *)__pyx_v_conn)); __Pyx_GIVEREF(((PyObject *)__pyx_v_conn)); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->conn); - __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->conn)); - ((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->conn = __pyx_v_conn; + __Pyx_GOTREF(__pyx_v_self->conn); + __Pyx_DECREF(((PyObject *)__pyx_v_self->conn)); + __pyx_v_self->conn = __pyx_v_conn; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":133 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":133 * conn._check_closed() * self.conn = conn * query = bytes_maybe_from_encoding(query, self.conn.charset, False) # <<<<<<<<<<<<<< * PyBytes_AsStringAndSize(query, &qstr, &qlen) * if mysql_real_query(self.conn.conn, qstr, qlen): */ - __pyx_t_2 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->conn), __pyx_n_s__charset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->conn), __pyx_n_s__charset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4.__pyx_n = 1; __pyx_t_4.allow_none = 0; @@ -15507,7 +16837,7 @@ __pyx_v_query = __pyx_t_3; __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":134 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":134 * self.conn = conn * query = bytes_maybe_from_encoding(query, self.conn.charset, False) * PyBytes_AsStringAndSize(query, &qstr, &qlen) # <<<<<<<<<<<<<< @@ -15516,29 +16846,29 @@ */ __pyx_t_1 = PyBytes_AsStringAndSize(__pyx_v_query, (&__pyx_v_qstr), (&__pyx_v_qlen)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":135 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":135 * query = bytes_maybe_from_encoding(query, self.conn.charset, False) * PyBytes_AsStringAndSize(query, &qstr, &qlen) * if mysql_real_query(self.conn.conn, qstr, qlen): # <<<<<<<<<<<<<< * self._raise_error() * self.res_a, self.res_kw = a, kw */ - __pyx_t_1 = __pyx_f_6oursql_mysql_real_query(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->conn->conn, __pyx_v_qstr, __pyx_v_qlen); - if (__pyx_t_1) { + __pyx_t_5 = (__pyx_f_6oursql_mysql_real_query(__pyx_v_self->conn->conn, __pyx_v_qstr, __pyx_v_qlen) != 0); + if (__pyx_t_5) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":136 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":136 * PyBytes_AsStringAndSize(query, &qstr, &qlen) * if mysql_real_query(self.conn.conn, qstr, qlen): * self._raise_error() # <<<<<<<<<<<<<< * self.res_a, self.res_kw = a, kw * self.warnings = [] */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Query *)((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->__pyx_vtab)->_raise_error(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L6; + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql__Query *)__pyx_v_self->__pyx_vtab)->_raise_error(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L3; } - __pyx_L6:; + __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":137 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":137 * if mysql_real_query(self.conn.conn, qstr, qlen): * self._raise_error() * self.res_a, self.res_kw = a, kw # <<<<<<<<<<<<<< @@ -15550,17 +16880,17 @@ __pyx_t_2 = ((PyObject *)__pyx_v_kw); __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->res_a); - __Pyx_DECREF(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->res_a); - ((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->res_a = __pyx_t_3; + __Pyx_GOTREF(__pyx_v_self->res_a); + __Pyx_DECREF(__pyx_v_self->res_a); + __pyx_v_self->res_a = __pyx_t_3; __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_2); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->res_kw); - __Pyx_DECREF(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->res_kw); - ((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->res_kw = __pyx_t_2; + __Pyx_GOTREF(__pyx_v_self->res_kw); + __Pyx_DECREF(__pyx_v_self->res_kw); + __pyx_v_self->res_kw = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":138 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":138 * self._raise_error() * self.res_a, self.res_kw = a, kw * self.warnings = [] # <<<<<<<<<<<<<< @@ -15568,40 +16898,40 @@ * # XXX: support multiple result sets. */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->warnings); - __Pyx_DECREF(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->warnings); - ((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->warnings = ((PyObject *)__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->warnings); + __Pyx_DECREF(__pyx_v_self->warnings); + __pyx_v_self->warnings = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":139 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":139 * self.res_a, self.res_kw = a, kw * self.warnings = [] * self.new_result() # <<<<<<<<<<<<<< * # XXX: support multiple result sets. * self.has_result = self.result.has_result */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__new_result); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__new_result); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":141 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":141 * self.new_result() * # XXX: support multiple result sets. * self.has_result = self.result.has_result # <<<<<<<<<<<<<< * * _result_class = _ResultSet */ - __pyx_t_3 = PyObject_GetAttr(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->result, __pyx_n_s__has_result); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->result, __pyx_n_s__has_result); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->has_result); - __Pyx_DECREF(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->has_result); - ((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->has_result = __pyx_t_3; + __Pyx_GOTREF(__pyx_v_self->has_result); + __Pyx_DECREF(__pyx_v_self->has_result); + __pyx_v_self->has_result = __pyx_t_3; __pyx_t_3 = 0; __pyx_r = 0; @@ -15612,14 +16942,23 @@ __Pyx_AddTraceback("oursql._Query.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_XDECREF(__pyx_v_a); - __Pyx_XDECREF(__pyx_v_kw); __Pyx_XDECREF(__pyx_v_query); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":144 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6_Query_3new_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6oursql_6_Query_3new_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("new_result (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6_Query_2new_result(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":144 * * _result_class = _ResultSet * def new_result(self): # <<<<<<<<<<<<<< @@ -15627,8 +16966,7 @@ * self.warnings.extend(res.warnings) */ -static PyObject *__pyx_pf_6oursql_6_Query_1new_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pf_6oursql_6_Query_1new_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_6oursql_6_Query_2new_result(struct __pyx_obj_6oursql__Query *__pyx_v_self) { PyObject *__pyx_v_res = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -15639,103 +16977,115 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("new_result"); + __Pyx_RefNannySetupContext("new_result", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":145 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":145 * _result_class = _ResultSet * def new_result(self): * res = self._result_class(self.conn, *self.res_a, **self.res_kw) # <<<<<<<<<<<<<< * self.warnings.extend(res.warnings) * self.rowcount = res.rowcount */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___result_class); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s___result_class); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 145; __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[5]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->conn)); - PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->conn)); - __Pyx_GIVEREF(((PyObject *)((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->conn)); - __pyx_t_3 = PySequence_Tuple(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->res_a); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)__pyx_v_self->conn)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->conn)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self->conn)); + __pyx_t_3 = PySequence_Tuple(__pyx_v_self->res_a); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_4), ((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->res_kw); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + if (unlikely(__pyx_v_self->res_kw == Py_None)) { + PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); + {__pyx_filename = __pyx_f[5]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + if (likely(PyDict_Check(__pyx_v_self->res_kw))) { + __pyx_t_3 = __pyx_v_self->res_kw; + __Pyx_INCREF(__pyx_t_3); + } else { + __pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_self->res_kw, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + } + __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 145; __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_v_res = __pyx_t_3; - __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __pyx_v_res = __pyx_t_2; + __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":146 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":146 * def new_result(self): * res = self._result_class(self.conn, *self.res_a, **self.res_kw) * self.warnings.extend(res.warnings) # <<<<<<<<<<<<<< * self.rowcount = res.rowcount * self.lastrowid = res.lastrowid */ - __pyx_t_3 = PyObject_GetAttr(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->warnings, __pyx_n_s__extend); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->warnings, __pyx_n_s__extend); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s__warnings); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_GetAttr(__pyx_v_res, __pyx_n_s__warnings); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 146; __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(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 146; __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_4)); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":147 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":147 * res = self._result_class(self.conn, *self.res_a, **self.res_kw) * self.warnings.extend(res.warnings) * self.rowcount = res.rowcount # <<<<<<<<<<<<<< * self.lastrowid = res.lastrowid * self.description = res.description */ - __pyx_t_4 = PyObject_GetAttr(__pyx_v_res, __pyx_n_s__rowcount); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->rowcount); - __Pyx_DECREF(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->rowcount); - ((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->rowcount = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s__rowcount); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_self->rowcount); + __Pyx_DECREF(__pyx_v_self->rowcount); + __pyx_v_self->rowcount = __pyx_t_3; + __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":148 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":148 * self.warnings.extend(res.warnings) * self.rowcount = res.rowcount * self.lastrowid = res.lastrowid # <<<<<<<<<<<<<< * self.description = res.description * self.result = res */ - __pyx_t_4 = PyObject_GetAttr(__pyx_v_res, __pyx_n_s__lastrowid); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->lastrowid); - __Pyx_DECREF(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->lastrowid); - ((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->lastrowid = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s__lastrowid); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_self->lastrowid); + __Pyx_DECREF(__pyx_v_self->lastrowid); + __pyx_v_self->lastrowid = __pyx_t_3; + __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":149 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":149 * self.rowcount = res.rowcount * self.lastrowid = res.lastrowid * self.description = res.description # <<<<<<<<<<<<<< * self.result = res * */ - __pyx_t_4 = PyObject_GetAttr(__pyx_v_res, __pyx_n_s__description); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->description); - __Pyx_DECREF(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->description); - ((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->description = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s__description); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_self->description); + __Pyx_DECREF(__pyx_v_self->description); + __pyx_v_self->description = __pyx_t_3; + __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":150 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":150 * self.lastrowid = res.lastrowid * self.description = res.description * self.result = res # <<<<<<<<<<<<<< @@ -15744,9 +17094,9 @@ */ __Pyx_INCREF(__pyx_v_res); __Pyx_GIVEREF(__pyx_v_res); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->result); - __Pyx_DECREF(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->result); - ((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->result = __pyx_v_res; + __Pyx_GOTREF(__pyx_v_self->result); + __Pyx_DECREF(__pyx_v_self->result); + __pyx_v_self->result = __pyx_v_res; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -15764,7 +17114,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":152 +/* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":152 * self.result = res * * cdef int _raise_error(self) except -1: # <<<<<<<<<<<<<< @@ -15779,9 +17129,9 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_raise_error"); + __Pyx_RefNannySetupContext("_raise_error", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":153 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":153 * * cdef int _raise_error(self) except -1: * return self.conn._raise_error() # <<<<<<<<<<<<<< @@ -15802,7 +17152,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":155 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6_Query_5nextset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6oursql_6_Query_5nextset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nextset (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6_Query_4nextset(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":155 * return self.conn._raise_error() * * def nextset(self): # <<<<<<<<<<<<<< @@ -15810,17 +17171,16 @@ * # XXX: support multiple result sets. */ -static PyObject *__pyx_pf_6oursql_6_Query_2nextset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pf_6oursql_6_Query_2nextset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_6oursql_6_Query_4nextset(struct __pyx_obj_6oursql__Query *__pyx_v_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("nextset"); + __Pyx_RefNannySetupContext("nextset", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":158 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":158 * cdef int res * # XXX: support multiple result sets. * self.result = None # <<<<<<<<<<<<<< @@ -15829,11 +17189,11 @@ */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->result); - __Pyx_DECREF(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->result); - ((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->result = Py_None; + __Pyx_GOTREF(__pyx_v_self->result); + __Pyx_DECREF(__pyx_v_self->result); + __pyx_v_self->result = Py_None; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":159 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":159 * # XXX: support multiple result sets. * self.result = None * return False # <<<<<<<<<<<<<< @@ -15859,7 +17219,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":174 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6_Query_7fetchone(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6oursql_6_Query_7fetchone(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("fetchone (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6_Query_6fetchone(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":174 * return True * * def fetchone(self): # <<<<<<<<<<<<<< @@ -15867,20 +17238,20 @@ * if self.result.has_result: */ -static PyObject *__pyx_pf_6oursql_6_Query_3fetchone(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pf_6oursql_6_Query_3fetchone(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_6oursql_6_Query_6fetchone(struct __pyx_obj_6oursql__Query *__pyx_v_self) { PyObject *__pyx_v_row = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; + int __pyx_t_2; 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("fetchone"); + __Pyx_RefNannySetupContext("fetchone", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":175 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":175 * * def fetchone(self): * while self.result is not None: # <<<<<<<<<<<<<< @@ -15888,49 +17259,51 @@ * row = self.result.fetchone() */ while (1) { - __pyx_t_1 = (((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->result != Py_None); - if (!__pyx_t_1) break; + __pyx_t_1 = (__pyx_v_self->result != Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) break; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":176 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":176 * def fetchone(self): * while self.result is not None: * if self.result.has_result: # <<<<<<<<<<<<<< * row = self.result.fetchone() * if row is not None: */ - __pyx_t_2 = PyObject_GetAttr(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->result, __pyx_n_s__has_result); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__pyx_t_1) { + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->result, __pyx_n_s__has_result); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_2) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":177 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":177 * while self.result is not None: * if self.result.has_result: * row = self.result.fetchone() # <<<<<<<<<<<<<< * if row is not None: * return row */ - __pyx_t_2 = PyObject_GetAttr(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->result, __pyx_n_s__fetchone); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->result, __pyx_n_s__fetchone); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_v_row); - __pyx_v_row = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_v_row = __pyx_t_4; + __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":178 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":178 * if self.result.has_result: * row = self.result.fetchone() * if row is not None: # <<<<<<<<<<<<<< * return row * self.nextset() */ - __pyx_t_1 = (__pyx_v_row != Py_None); + __pyx_t_2 = (__pyx_v_row != Py_None); + __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":179 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":179 * row = self.result.fetchone() * if row is not None: * return row # <<<<<<<<<<<<<< @@ -15941,29 +17314,29 @@ __Pyx_INCREF(__pyx_v_row); __pyx_r = __pyx_v_row; goto __pyx_L0; - goto __pyx_L8; + goto __pyx_L6; } - __pyx_L8:; - goto __pyx_L7; + __pyx_L6:; + goto __pyx_L5; } - __pyx_L7:; + __pyx_L5:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":180 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":180 * if row is not None: * return row * self.nextset() # <<<<<<<<<<<<<< * return None * */ - __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__nextset); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__nextset); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":181 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":181 * return row * self.nextset() * return None # <<<<<<<<<<<<<< @@ -15978,8 +17351,8 @@ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("oursql._Query.fetchone", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -15989,7 +17362,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":183 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6_Query_9__iter__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_6_Query_9__iter__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6_Query_8__iter__(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":183 * return None * * def __iter__(self): # <<<<<<<<<<<<<< @@ -15997,19 +17381,17 @@ * */ -static PyObject *__pyx_pf_6oursql_6_Query_4__iter__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_6_Query_4__iter__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_6_Query_8__iter__(struct __pyx_obj_6oursql__Query *__pyx_v_self) { 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("__iter__"); + __Pyx_RefNannySetupContext("__iter__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":184 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":184 * * def __iter__(self): * return PyCallIter_New(self.fetchone, None) # <<<<<<<<<<<<<< @@ -16017,16 +17399,13 @@ * def fetchall(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__fetchone); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__fetchone); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = Py_None; - __Pyx_INCREF(__pyx_t_2); - __pyx_t_3 = PyCallIter_New(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyCallIter_New(__pyx_t_1, Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_r = __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); @@ -16034,7 +17413,6 @@ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("oursql._Query.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -16043,7 +17421,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":186 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6_Query_11fetchall(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6oursql_6_Query_11fetchall(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("fetchall (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6_Query_10fetchall(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":186 * return PyCallIter_New(self.fetchone, None) * * def fetchall(self): # <<<<<<<<<<<<<< @@ -16051,17 +17440,16 @@ * */ -static PyObject *__pyx_pf_6oursql_6_Query_5fetchall(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pf_6oursql_6_Query_5fetchall(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_6oursql_6_Query_10fetchall(struct __pyx_obj_6oursql__Query *__pyx_v_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("fetchall"); + __Pyx_RefNannySetupContext("fetchall", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":187 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":187 * * def fetchall(self): * return PySequence_List(self) # <<<<<<<<<<<<<< @@ -16069,7 +17457,7 @@ * # Cython should support multiple inheritance one of these days. */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PySequence_List(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -16087,7 +17475,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":126 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6_Query_8rowcount_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_6_Query_8rowcount_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6_Query_8rowcount___get__(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":126 * cdef Connection conn * cdef object result, res_a, res_kw * cdef readonly object rowcount, lastrowid, description, warnings, has_result # <<<<<<<<<<<<<< @@ -16095,14 +17494,13 @@ * def __cinit__(self, Connection conn not None, query, *a, **kw): */ -static PyObject *__pyx_pf_6oursql_6_Query_8rowcount___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_6_Query_8rowcount___get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_6_Query_8rowcount___get__(struct __pyx_obj_6oursql__Query *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->rowcount); - __pyx_r = ((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->rowcount; + __Pyx_INCREF(__pyx_v_self->rowcount); + __pyx_r = __pyx_v_self->rowcount; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -16112,14 +17510,24 @@ return __pyx_r; } -static PyObject *__pyx_pf_6oursql_6_Query_9lastrowid___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_6_Query_9lastrowid___get__(PyObject *__pyx_v_self) { +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6_Query_9lastrowid_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_6_Query_9lastrowid_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6_Query_9lastrowid___get__(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6oursql_6_Query_9lastrowid___get__(struct __pyx_obj_6oursql__Query *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->lastrowid); - __pyx_r = ((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->lastrowid; + __Pyx_INCREF(__pyx_v_self->lastrowid); + __pyx_r = __pyx_v_self->lastrowid; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -16129,14 +17537,24 @@ return __pyx_r; } -static PyObject *__pyx_pf_6oursql_6_Query_11description___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_6_Query_11description___get__(PyObject *__pyx_v_self) { +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6_Query_11description_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_6_Query_11description_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6_Query_11description___get__(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6oursql_6_Query_11description___get__(struct __pyx_obj_6oursql__Query *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->description); - __pyx_r = ((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->description; + __Pyx_INCREF(__pyx_v_self->description); + __pyx_r = __pyx_v_self->description; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -16146,14 +17564,24 @@ return __pyx_r; } -static PyObject *__pyx_pf_6oursql_6_Query_8warnings___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_6_Query_8warnings___get__(PyObject *__pyx_v_self) { +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6_Query_8warnings_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_6_Query_8warnings_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6_Query_8warnings___get__(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6oursql_6_Query_8warnings___get__(struct __pyx_obj_6oursql__Query *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->warnings); - __pyx_r = ((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->warnings; + __Pyx_INCREF(__pyx_v_self->warnings); + __pyx_r = __pyx_v_self->warnings; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -16163,14 +17591,24 @@ return __pyx_r; } -static PyObject *__pyx_pf_6oursql_6_Query_10has_result___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_6_Query_10has_result___get__(PyObject *__pyx_v_self) { +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6_Query_10has_result_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_6_Query_10has_result_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6_Query_10has_result___get__(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6oursql_6_Query_10has_result___get__(struct __pyx_obj_6oursql__Query *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->has_result); - __pyx_r = ((struct __pyx_obj_6oursql__Query *)__pyx_v_self)->has_result; + __Pyx_INCREF(__pyx_v_self->has_result); + __pyx_r = __pyx_v_self->has_result; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -16180,45 +17618,36 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":38 - * _query_class = _Query - * - * def __cinit__(self, Connection conn not None, bint try_plain_query=True, # <<<<<<<<<<<<<< - * **kwargs): - * self.conn = conn - */ - -static int __pyx_pf_6oursql_6Cursor___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_6oursql_6Cursor___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +/* Python wrapper */ +static int __pyx_pw_6oursql_6Cursor_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6oursql_6Cursor_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_6oursql_Connection *__pyx_v_conn = 0; int __pyx_v_try_plain_query; PyObject *__pyx_v_kwargs = 0; - int __pyx_r; - __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; - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__conn,&__pyx_n_s__try_plain_query,0}; - __Pyx_RefNannySetupContext("__cinit__"); + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1; __Pyx_GOTREF(__pyx_v_kwargs); { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__conn,&__pyx_n_s__try_plain_query,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; - switch (PyTuple_GET_SIZE(__pyx_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 (PyTuple_GET_SIZE(__pyx_args)) { + switch (pos_args) { case 0: - values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__conn); - if (likely(values[0])) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__conn)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { @@ -16227,7 +17656,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, PyTuple_GET_SIZE(__pyx_args), "__cinit__") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -16241,6 +17670,14 @@ if (values[1]) { __pyx_v_try_plain_query = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_try_plain_query == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { + + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":38 + * _query_class = _Query + * + * def __cinit__(self, Connection conn not None, bint try_plain_query=True, # <<<<<<<<<<<<<< + * **kwargs): + * self.conn = conn + */ __pyx_v_try_plain_query = ((int)1); } } @@ -16254,8 +17691,27 @@ return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_conn), __pyx_ptype_6oursql_Connection, 0, "conn", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6oursql_6Cursor___cinit__(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self), __pyx_v_conn, __pyx_v_try_plain_query, __pyx_v_kwargs); + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_kwargs); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6oursql_6Cursor___cinit__(struct __pyx_obj_6oursql_Cursor *__pyx_v_self, struct __pyx_obj_6oursql_Connection *__pyx_v_conn, int __pyx_v_try_plain_query, PyObject *__pyx_v_kwargs) { + int __pyx_r; + __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("__cinit__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":40 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":40 * def __cinit__(self, Connection conn not None, bint try_plain_query=True, * **kwargs): * self.conn = conn # <<<<<<<<<<<<<< @@ -16264,11 +17720,11 @@ */ __Pyx_INCREF(((PyObject *)__pyx_v_conn)); __Pyx_GIVEREF(((PyObject *)__pyx_v_conn)); - __Pyx_GOTREF(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->conn); - __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->conn)); - ((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->conn = __pyx_v_conn; + __Pyx_GOTREF(__pyx_v_self->conn); + __Pyx_DECREF(((PyObject *)__pyx_v_self->conn)); + __pyx_v_self->conn = __pyx_v_conn; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":41 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":41 * **kwargs): * self.conn = conn * self._stmt_kwargs = kwargs # <<<<<<<<<<<<<< @@ -16277,32 +17733,32 @@ */ __Pyx_INCREF(((PyObject *)__pyx_v_kwargs)); __Pyx_GIVEREF(((PyObject *)__pyx_v_kwargs)); - __Pyx_GOTREF(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->_stmt_kwargs); - __Pyx_DECREF(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->_stmt_kwargs); - ((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->_stmt_kwargs = ((PyObject *)__pyx_v_kwargs); + __Pyx_GOTREF(__pyx_v_self->_stmt_kwargs); + __Pyx_DECREF(__pyx_v_self->_stmt_kwargs); + __pyx_v_self->_stmt_kwargs = ((PyObject *)__pyx_v_kwargs); - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":42 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":42 * self.conn = conn * self._stmt_kwargs = kwargs * self._statements = collections.deque() # <<<<<<<<<<<<<< * self.messages = [] * self.closed = False */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__collections); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__collections); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__deque); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__deque); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 42; __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_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->_statements); - __Pyx_DECREF(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->_statements); - ((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->_statements = __pyx_t_1; + __Pyx_GOTREF(__pyx_v_self->_statements); + __Pyx_DECREF(__pyx_v_self->_statements); + __pyx_v_self->_statements = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":43 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":43 * self._stmt_kwargs = kwargs * self._statements = collections.deque() * self.messages = [] # <<<<<<<<<<<<<< @@ -16310,23 +17766,23 @@ * self.rowcount = -1 */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); - __Pyx_GOTREF(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->messages); - __Pyx_DECREF(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->messages); - ((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->messages = ((PyObject *)__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->messages); + __Pyx_DECREF(__pyx_v_self->messages); + __pyx_v_self->messages = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":44 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":44 * self._statements = collections.deque() * self.messages = [] * self.closed = False # <<<<<<<<<<<<<< * self.rowcount = -1 * self.arraysize = 1 */ - ((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->closed = 0; + __pyx_v_self->closed = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":45 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":45 * self.messages = [] * self.closed = False * self.rowcount = -1 # <<<<<<<<<<<<<< @@ -16335,27 +17791,27 @@ */ __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); - __Pyx_GOTREF(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->rowcount); - __Pyx_DECREF(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->rowcount); - ((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->rowcount = __pyx_int_neg_1; + __Pyx_GOTREF(__pyx_v_self->rowcount); + __Pyx_DECREF(__pyx_v_self->rowcount); + __pyx_v_self->rowcount = __pyx_int_neg_1; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":46 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":46 * self.closed = False * self.rowcount = -1 * self.arraysize = 1 # <<<<<<<<<<<<<< * self.try_plain_query = try_plain_query * */ - ((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->arraysize = 1; + __pyx_v_self->arraysize = 1; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":47 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":47 * self.rowcount = -1 * self.arraysize = 1 * self.try_plain_query = try_plain_query # <<<<<<<<<<<<<< * * cdef int _check_closed(self) except -1: */ - ((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->try_plain_query = __pyx_v_try_plain_query; + __pyx_v_self->try_plain_query = __pyx_v_try_plain_query; __pyx_r = 0; goto __pyx_L0; @@ -16365,12 +17821,11 @@ __Pyx_AddTraceback("oursql.Cursor.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":49 +/* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":49 * self.try_plain_query = try_plain_query * * cdef int _check_closed(self) except -1: # <<<<<<<<<<<<<< @@ -16387,28 +17842,28 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_check_closed"); + __Pyx_RefNannySetupContext("_check_closed", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":50 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":50 * * cdef int _check_closed(self) except -1: * if not self.conn.conn: # <<<<<<<<<<<<<< * raise ProgrammingError('connection closed') * if self.closed: */ - __pyx_t_1 = (!(__pyx_v_self->conn->conn != 0)); + __pyx_t_1 = ((!(__pyx_v_self->conn->conn != 0)) != 0); if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":51 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":51 * cdef int _check_closed(self) except -1: * if not self.conn.conn: * raise ProgrammingError('connection closed') # <<<<<<<<<<<<<< * if self.closed: * raise ProgrammingError('cursor closed') */ - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_50), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_56), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); @@ -16418,25 +17873,26 @@ } __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":52 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":52 * if not self.conn.conn: * raise ProgrammingError('connection closed') * if self.closed: # <<<<<<<<<<<<<< * raise ProgrammingError('cursor closed') * */ - if (__pyx_v_self->closed) { + __pyx_t_1 = (__pyx_v_self->closed != 0); + if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":53 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":53 * raise ProgrammingError('connection closed') * if self.closed: * raise ProgrammingError('cursor closed') # <<<<<<<<<<<<<< * * def close(self): */ - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_52), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_58), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); @@ -16458,7 +17914,19 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":55 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6Cursor_3close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_6oursql_6Cursor_2close[] = "close()\n \n Close the cursor and discard the rest of the results. The cursor will\n immediately become unusable.\n "; +static PyObject *__pyx_pw_6oursql_6Cursor_3close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("close (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6Cursor_2close(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":55 * raise ProgrammingError('cursor closed') * * def close(self): # <<<<<<<<<<<<<< @@ -16466,9 +17934,7 @@ * */ -static PyObject *__pyx_pf_6oursql_6Cursor_1close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_6oursql_6Cursor_1close[] = "close()\n \n Close the cursor and discard the rest of the results. The cursor will\n immediately become unusable.\n "; -static PyObject *__pyx_pf_6oursql_6Cursor_1close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_6oursql_6Cursor_2close(struct __pyx_obj_6oursql_Cursor *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -16476,25 +17942,25 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("close"); + __Pyx_RefNannySetupContext("close", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":61 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":61 * immediately become unusable. * """ * self.closed = True # <<<<<<<<<<<<<< * self._statements.clear() * */ - ((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->closed = 1; + __pyx_v_self->closed = 1; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":62 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":62 * """ * self.closed = True * self._statements.clear() # <<<<<<<<<<<<<< * * def _new_statement(self): */ - __pyx_t_1 = PyObject_GetAttr(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->_statements, __pyx_n_s__clear); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_statements, __pyx_n_s__clear); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 62; __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[6]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -16514,7 +17980,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":64 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6Cursor_5_new_statement(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6oursql_6Cursor_5_new_statement(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_new_statement (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6Cursor_4_new_statement(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":64 * self._statements.clear() * * def _new_statement(self): # <<<<<<<<<<<<<< @@ -16522,53 +17999,65 @@ * stmt.prefetch_rows = self.arraysize */ -static PyObject *__pyx_pf_6oursql_6Cursor_2_new_statement(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pf_6oursql_6Cursor_2_new_statement(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_6oursql_6Cursor_4_new_statement(struct __pyx_obj_6oursql_Cursor *__pyx_v_self) { PyObject *__pyx_v_stmt = 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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_new_statement"); + __Pyx_RefNannySetupContext("_new_statement", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":65 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":65 * * def _new_statement(self): * stmt = self._statement_class(self.conn, **self._stmt_kwargs) # <<<<<<<<<<<<<< * stmt.prefetch_rows = self.arraysize * return stmt */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___statement_class); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s___statement_class); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 65; __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[6]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->conn)); - PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->conn)); - __Pyx_GIVEREF(((PyObject *)((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->conn)); - __pyx_t_3 = __Pyx_PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_2), ((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->_stmt_kwargs); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)__pyx_v_self->conn)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->conn)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self->conn)); + if (unlikely(__pyx_v_self->_stmt_kwargs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); + {__pyx_filename = __pyx_f[6]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + if (likely(PyDict_Check(__pyx_v_self->_stmt_kwargs))) { + __pyx_t_3 = __pyx_v_self->_stmt_kwargs; + __Pyx_INCREF(__pyx_t_3); + } else { + __pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_self->_stmt_kwargs, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + } + __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 65; __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_2)); __pyx_t_2 = 0; - __pyx_v_stmt = __pyx_t_3; - __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __pyx_v_stmt = __pyx_t_4; + __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":66 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":66 * def _new_statement(self): * stmt = self._statement_class(self.conn, **self._stmt_kwargs) * stmt.prefetch_rows = self.arraysize # <<<<<<<<<<<<<< * return stmt * */ - __pyx_t_3 = PyLong_FromUnsignedLong(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->arraysize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - if (PyObject_SetAttr(__pyx_v_stmt, __pyx_n_s__prefetch_rows, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = PyLong_FromUnsignedLong(__pyx_v_self->arraysize); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_stmt, __pyx_n_s__prefetch_rows, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":67 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":67 * stmt = self._statement_class(self.conn, **self._stmt_kwargs) * stmt.prefetch_rows = self.arraysize * return stmt # <<<<<<<<<<<<<< @@ -16586,6 +18075,7 @@ __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("oursql.Cursor._new_statement", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -16595,7 +18085,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":69 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6Cursor_7_new_query(PyObject *__pyx_v_self, PyObject *__pyx_v_query); /*proto*/ +static PyObject *__pyx_pw_6oursql_6Cursor_7_new_query(PyObject *__pyx_v_self, PyObject *__pyx_v_query) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_new_query (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6Cursor_6_new_query(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self), ((PyObject *)__pyx_v_query)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":69 * return stmt * * def _new_query(self, query): # <<<<<<<<<<<<<< @@ -16603,19 +18104,19 @@ * */ -static PyObject *__pyx_pf_6oursql_6Cursor_3_new_query(PyObject *__pyx_v_self, PyObject *__pyx_v_query); /*proto*/ -static PyObject *__pyx_pf_6oursql_6Cursor_3_new_query(PyObject *__pyx_v_self, PyObject *__pyx_v_query) { +static PyObject *__pyx_pf_6oursql_6Cursor_6_new_query(struct __pyx_obj_6oursql_Cursor *__pyx_v_self, PyObject *__pyx_v_query) { 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("_new_query"); + __Pyx_RefNannySetupContext("_new_query", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":70 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":70 * * def _new_query(self, query): * return self._query_class(self.conn, query, **self._stmt_kwargs) # <<<<<<<<<<<<<< @@ -16623,22 +18124,34 @@ * def callproc(self, procname, params=()): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___query_class); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s___query_class); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __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[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->conn)); - PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->conn)); - __Pyx_GIVEREF(((PyObject *)((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->conn)); + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)__pyx_v_self->conn)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->conn)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self->conn)); __Pyx_INCREF(__pyx_v_query); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_query); __Pyx_GIVEREF(__pyx_v_query); - __pyx_t_3 = __Pyx_PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_2), ((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->_stmt_kwargs); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + if (unlikely(__pyx_v_self->_stmt_kwargs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); + {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + if (likely(PyDict_Check(__pyx_v_self->_stmt_kwargs))) { + __pyx_t_3 = __pyx_v_self->_stmt_kwargs; + __Pyx_INCREF(__pyx_t_3); + } else { + __pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_self->_stmt_kwargs, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + } + __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __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_2)); __pyx_t_2 = 0; - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -16647,6 +18160,7 @@ __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("oursql.Cursor._new_query", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -16655,44 +18169,43 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":72 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6Cursor_9callproc(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_6oursql_6Cursor_8callproc[] = "callproc(procname, params=())\n \n Supposedly, run a stored procedure. MySQL's C API has no direct call\n for this; you need to execute stored procedures with the CALL statement\n instead. Calling this method always raises an exception.\n "; +static PyObject *__pyx_pw_6oursql_6Cursor_9callproc(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED PyObject *__pyx_v_procname = 0; + CYTHON_UNUSED PyObject *__pyx_v_params = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("callproc (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__procname,&__pyx_n_s__params,0}; + PyObject* values[2] = {0,0}; + + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":72 * return self._query_class(self.conn, query, **self._stmt_kwargs) * * def callproc(self, procname, params=()): # <<<<<<<<<<<<<< * """callproc(procname, params=()) * */ - -static PyObject *__pyx_pf_6oursql_6Cursor_4callproc(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_6oursql_6Cursor_4callproc[] = "callproc(procname, params=())\n \n Supposedly, run a stored procedure. MySQL's C API has no direct call\n for this; you need to execute stored procedures with the CALL statement\n instead. Calling this method always raises an exception.\n "; -static PyObject *__pyx_pf_6oursql_6Cursor_4callproc(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_procname = 0; - PyObject *__pyx_v_params = 0; - 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; - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__procname,&__pyx_n_s__params,0}; - __Pyx_RefNannySetupContext("callproc"); - { - PyObject* values[2] = {0,0}; values[1] = ((PyObject *)__pyx_empty_tuple); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; - switch (PyTuple_GET_SIZE(__pyx_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 (PyTuple_GET_SIZE(__pyx_args)) { + switch (pos_args) { case 0: - values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__procname); - if (likely(values[0])) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__procname)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { @@ -16701,7 +18214,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "callproc") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "callproc") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -16722,17 +18235,31 @@ __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6oursql_6Cursor_8callproc(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self), __pyx_v_procname, __pyx_v_params); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6oursql_6Cursor_8callproc(CYTHON_UNUSED struct __pyx_obj_6oursql_Cursor *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_procname, CYTHON_UNUSED PyObject *__pyx_v_params) { + 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("callproc", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":81 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":81 * # This is slightly irritating, but not too horribly bad. The horribly * # bad part is getting the results from a procedure. * raise NotSupportedError('use the CALL statement with the execute ' # <<<<<<<<<<<<<< * 'method to call stored procedures') * */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__NotSupportedError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__NotSupportedError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_54), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_60), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); @@ -16752,7 +18279,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":84 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6Cursor_11_do_autoping(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6oursql_6Cursor_11_do_autoping(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_do_autoping (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6Cursor_10_do_autoping(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":84 * 'method to call stored procedures') * * def _do_autoping(self): # <<<<<<<<<<<<<< @@ -16760,48 +18298,49 @@ * self.conn.ping() */ -static PyObject *__pyx_pf_6oursql_6Cursor_5_do_autoping(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pf_6oursql_6Cursor_5_do_autoping(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_6oursql_6Cursor_10_do_autoping(struct __pyx_obj_6oursql_Cursor *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; + int __pyx_t_1; 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("_do_autoping"); + __Pyx_RefNannySetupContext("_do_autoping", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":85 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":85 * * def _do_autoping(self): * if self.conn.autoping: # <<<<<<<<<<<<<< * self.conn.ping() * */ - if (((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->conn->autoping) { + __pyx_t_1 = (__pyx_v_self->conn->autoping != 0); + if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":86 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":86 * def _do_autoping(self): * if self.conn.autoping: * self.conn.ping() # <<<<<<<<<<<<<< * * def execute(self, query, params=(), plain_query=False): */ - __pyx_t_1 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->conn), __pyx_n_s__ping); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 86; __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[6]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->conn), __pyx_n_s__ping); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - goto __pyx_L5; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L3; } - __pyx_L5:; + __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_2); + __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("oursql.Cursor._do_autoping", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -16810,49 +18349,36 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":88 - * self.conn.ping() - * - * def execute(self, query, params=(), plain_query=False): # <<<<<<<<<<<<<< - * """execute(query, params=(), plain_query=False) - * - */ - -static PyObject *__pyx_pf_6oursql_6Cursor_6execute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_6oursql_6Cursor_6execute[] = "execute(query, params=(), plain_query=False)\n \n Execute a query. If plain_query is true, run a plain, unparameterized\n query. MySQL cannot parameterize all kinds of statements, which makes\n it sometimes necessary to execute a plain query. If plain_query is true\n and params is true, an exception will be raised as plain queries cannot\n be parameterized.\n "; -static PyObject *__pyx_pf_6oursql_6Cursor_6execute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6Cursor_13execute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_6oursql_6Cursor_12execute[] = "execute(query, params=(), plain_query=False)\n \n Execute a query. If plain_query is true, run a plain, unparameterized\n query. MySQL cannot parameterize all kinds of statements, which makes\n it sometimes necessary to execute a plain query. If plain_query is true\n and params is true, an exception will be raised as plain queries cannot\n be parameterized.\n "; +static PyObject *__pyx_pw_6oursql_6Cursor_13execute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_query = 0; PyObject *__pyx_v_params = 0; PyObject *__pyx_v_plain_query = 0; - PyObject *__pyx_v_stmt = NULL; - PyObject *__pyx_v_e = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - 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 = NULL; - PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; - int __pyx_t_12; - PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__query,&__pyx_n_s__params,&__pyx_n_s__plain_query,0}; - __Pyx_RefNannySetupContext("execute"); + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("execute (wrapper)", 0); { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__query,&__pyx_n_s__params,&__pyx_n_s__plain_query,0}; PyObject* values[3] = {0,0,0}; + + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":88 + * self.conn.ping() + * + * def execute(self, query, params=(), plain_query=False): # <<<<<<<<<<<<<< + * """execute(query, params=(), plain_query=False) + * + */ values[1] = ((PyObject *)__pyx_empty_tuple); - values[2] = __pyx_k_55; + values[2] = __pyx_k_61; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; - switch (PyTuple_GET_SIZE(__pyx_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); @@ -16860,10 +18386,9 @@ default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); - switch (PyTuple_GET_SIZE(__pyx_args)) { + switch (pos_args) { case 0: - values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__query); - if (likely(values[0])) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__query)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { @@ -16877,7 +18402,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "execute") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "execute") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -16900,31 +18425,58 @@ __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6oursql_6Cursor_12execute(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self), __pyx_v_query, __pyx_v_params, __pyx_v_plain_query); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6oursql_6Cursor_12execute(struct __pyx_obj_6oursql_Cursor *__pyx_v_self, PyObject *__pyx_v_query, PyObject *__pyx_v_params, PyObject *__pyx_v_plain_query) { + PyObject *__pyx_v_stmt = NULL; + PyObject *__pyx_v_e = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + 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 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + PyObject *__pyx_t_13 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("execute", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":97 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":97 * be parameterized. * """ * self._check_closed() # <<<<<<<<<<<<<< * self._do_autoping() * # This, on the other hand, is just plain stupid. */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Cursor *)((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->__pyx_vtab)->_check_closed(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Cursor *)__pyx_v_self->__pyx_vtab)->_check_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":98 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":98 * """ * self._check_closed() * self._do_autoping() # <<<<<<<<<<<<<< * # This, on the other hand, is just plain stupid. * if plain_query: */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___do_autoping); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s___do_autoping); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":100 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":100 * self._do_autoping() * # This, on the other hand, is just plain stupid. * if plain_query: # <<<<<<<<<<<<<< @@ -16934,7 +18486,7 @@ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_plain_query); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_4) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":101 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":101 * # This, on the other hand, is just plain stupid. * if plain_query: * if params: # <<<<<<<<<<<<<< @@ -16944,36 +18496,36 @@ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_params); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_4) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":105 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":105 * # worth parameterizing supports the prepared statement API * # anyway, so this shouldn't matter too much. * raise ProgrammingError("can't call execute with both " # <<<<<<<<<<<<<< * "parameters and a plain query") * stmt = self._new_query(query) */ - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_57), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_63), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[6]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L7; + goto __pyx_L4; } - __pyx_L7:; + __pyx_L4:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":107 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":107 * raise ProgrammingError("can't call execute with both " * "parameters and a plain query") * stmt = self._new_query(query) # <<<<<<<<<<<<<< * else: * stmt = self._new_statement() */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___new_query); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s___new_query); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 107; __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[6]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_query); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_query); __Pyx_GIVEREF(__pyx_v_query); @@ -16983,18 +18535,18 @@ __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_stmt = __pyx_t_5; __pyx_t_5 = 0; - goto __pyx_L6; + goto __pyx_L3; } /*else*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":109 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":109 * stmt = self._new_query(query) * else: * stmt = self._new_statement() # <<<<<<<<<<<<<< * try: * stmt.prepare(query) */ - __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___new_statement); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s___new_statement); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); @@ -17002,7 +18554,7 @@ __pyx_v_stmt = __pyx_t_3; __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":110 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":110 * else: * stmt = self._new_statement() * try: # <<<<<<<<<<<<<< @@ -17016,21 +18568,21 @@ __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":111 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":111 * stmt = self._new_statement() * try: * stmt.prepare(query) # <<<<<<<<<<<<<< * except Error, e: * # So, if MySQL refuses to parameterize the query, we optionally */ - __pyx_t_3 = PyObject_GetAttr(__pyx_v_stmt, __pyx_n_s__prepare); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L8_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stmt, __pyx_n_s__prepare); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L8_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_query); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_query); __Pyx_GIVEREF(__pyx_v_query); - __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L8_error;} + __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; @@ -17038,18 +18590,18 @@ } /*else:*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":122 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":122 * raise * else: * stmt.execute(*params) # <<<<<<<<<<<<<< * self._update_fields(stmt) * */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_stmt, __pyx_n_s__execute); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stmt, __pyx_n_s__execute); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = PySequence_Tuple(__pyx_v_params); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} + __pyx_t_5 = PySequence_Tuple(__pyx_v_params); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); - __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} + __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; @@ -17058,57 +18610,56 @@ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - goto __pyx_L15_try_end; - __pyx_L8_error:; + goto __pyx_L12_try_end; + __pyx_L5_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":112 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":112 * try: * stmt.prepare(query) * except Error, e: # <<<<<<<<<<<<<< * # So, if MySQL refuses to parameterize the query, we optionally * # try it again through the stupid query API. This is optional */ - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__Error); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__Error); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyErr_ExceptionMatches(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { __Pyx_AddTraceback("oursql.Cursor.execute", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_5, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_5, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_v_e = __pyx_t_5; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":117 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":117 * # because you can lose state data if this is always done * # implicitly. * if self.try_plain_query and e.errno == ER_UNSUPPORTED_PS: # <<<<<<<<<<<<<< * return self.execute(query, params, plain_query=True) * else: */ - if (((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->try_plain_query) { - __pyx_t_9 = PyObject_GetAttr(__pyx_v_e, __pyx_n_s__errno); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} + if ((__pyx_v_self->try_plain_query != 0)) { + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s__errno); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = PyInt_FromLong(ER_UNSUPPORTED_PS); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} + __pyx_t_10 = PyInt_FromLong(ER_UNSUPPORTED_PS); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = PyObject_RichCompare(__pyx_t_9, __pyx_t_10, Py_EQ); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_11 = PyObject_RichCompare(__pyx_t_9, __pyx_t_10, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = __pyx_t_4; } else { - __pyx_t_12 = ((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->try_plain_query; + __pyx_t_12 = (__pyx_v_self->try_plain_query != 0); } if (__pyx_t_12) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":118 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":118 * # implicitly. * if self.try_plain_query and e.errno == ER_UNSUPPORTED_PS: * return self.execute(query, params, plain_query=True) # <<<<<<<<<<<<<< @@ -17116,23 +18667,23 @@ * raise */ __Pyx_XDECREF(__pyx_r); - __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__execute); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__execute); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_10)); + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} + __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_query); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_query); __Pyx_GIVEREF(__pyx_v_query); __Pyx_INCREF(__pyx_v_params); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_params); __Pyx_GIVEREF(__pyx_v_params); - __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} + __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); - __pyx_t_13 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} + __pyx_t_13 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_13); - if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__plain_query), __pyx_t_13) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} + if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__plain_query), __pyx_t_13) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_13 = PyEval_CallObjectWithKeywords(__pyx_t_11, ((PyObject *)__pyx_t_10), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} + __pyx_t_13 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_10), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; @@ -17142,12 +18693,12 @@ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - goto __pyx_L11_except_return; - goto __pyx_L18; + goto __pyx_L8_except_return; + goto __pyx_L15; } /*else*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":120 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":120 * return self.execute(query, params, plain_query=True) * else: * raise # <<<<<<<<<<<<<< @@ -17159,44 +18710,44 @@ __Pyx_GIVEREF(__pyx_t_2); __Pyx_ErrRestore(__pyx_t_3, __pyx_t_5, __pyx_t_2); __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_t_2 = 0; - {__pyx_filename = __pyx_f[6]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} + {__pyx_filename = __pyx_f[6]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} } - __pyx_L18:; + __pyx_L15:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - goto __pyx_L9_exception_handled; + goto __pyx_L6_exception_handled; } - __pyx_L10_except_error:; + __pyx_L7_except_error:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; - __pyx_L11_except_return:; + __pyx_L8_except_return:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L0; - __pyx_L9_exception_handled:; + __pyx_L6_exception_handled:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); - __pyx_L15_try_end:; + __pyx_L12_try_end:; } } - __pyx_L6:; + __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":123 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":123 * else: * stmt.execute(*params) * self._update_fields(stmt) # <<<<<<<<<<<<<< * * def executemany(self, query, parambatch): */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Cursor *)((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->__pyx_vtab)->_update_fields(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self), __pyx_v_stmt, NULL); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Cursor *)__pyx_v_self->__pyx_vtab)->_update_fields(__pyx_v_self, __pyx_v_stmt, NULL); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -17218,63 +18769,43 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":125 - * self._update_fields(stmt) - * - * def executemany(self, query, parambatch): # <<<<<<<<<<<<<< - * """executemany(query, parambatch) - * - */ - -static PyObject *__pyx_pf_6oursql_6Cursor_7executemany(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_6oursql_6Cursor_7executemany[] = "executemany(query, parambatch)\n \n Execute the same query with different sets of parameters. This is more\n efficient than calling execute many times with the same query.\n "; -static PyObject *__pyx_pf_6oursql_6Cursor_7executemany(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6Cursor_15executemany(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_6oursql_6Cursor_14executemany[] = "executemany(query, parambatch)\n \n Execute the same query with different sets of parameters. This is more\n efficient than calling execute many times with the same query.\n "; +static PyObject *__pyx_pw_6oursql_6Cursor_15executemany(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_query = 0; PyObject *__pyx_v_parambatch = 0; - PyObject *__pyx_v_stmt = NULL; - PyObject *__pyx_v_rowcount = NULL; - PyObject *__pyx_v_params = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - Py_ssize_t __pyx_t_5; - PyObject *(*__pyx_t_6)(PyObject *); - PyObject *__pyx_t_7 = NULL; - int __pyx_t_8; - struct __pyx_opt_args_6oursql_6Cursor__update_fields __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__query,&__pyx_n_s__parambatch,0}; - __Pyx_RefNannySetupContext("executemany"); + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("executemany (wrapper)", 0); { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__query,&__pyx_n_s__parambatch,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; - switch (PyTuple_GET_SIZE(__pyx_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 (PyTuple_GET_SIZE(__pyx_args)) { + switch (pos_args) { case 0: - values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__query); - if (likely(values[0])) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__query)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: - values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__parambatch); - if (likely(values[1])) kw_args--; + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__parambatch)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("executemany", 1, 2, 2, 1); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "executemany") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "executemany") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -17293,38 +18824,70 @@ __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6oursql_6Cursor_14executemany(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self), __pyx_v_query, __pyx_v_parambatch); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":125 + * self._update_fields(stmt) + * + * def executemany(self, query, parambatch): # <<<<<<<<<<<<<< + * """executemany(query, parambatch) + * + */ + +static PyObject *__pyx_pf_6oursql_6Cursor_14executemany(struct __pyx_obj_6oursql_Cursor *__pyx_v_self, PyObject *__pyx_v_query, PyObject *__pyx_v_parambatch) { + PyObject *__pyx_v_stmt = NULL; + PyObject *__pyx_v_rowcount = NULL; + PyObject *__pyx_v_params = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + PyObject *(*__pyx_t_6)(PyObject *); + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + struct __pyx_opt_args_6oursql_6Cursor__update_fields __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("executemany", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":131 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":131 * efficient than calling execute many times with the same query. * """ * self._check_closed() # <<<<<<<<<<<<<< * self._do_autoping() * # No plain queries because they can't be parameterized anyway. */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Cursor *)((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->__pyx_vtab)->_check_closed(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Cursor *)__pyx_v_self->__pyx_vtab)->_check_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":132 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":132 * """ * self._check_closed() * self._do_autoping() # <<<<<<<<<<<<<< * # No plain queries because they can't be parameterized anyway. * stmt = self._new_statement() */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___do_autoping); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s___do_autoping); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":134 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":134 * self._do_autoping() * # No plain queries because they can't be parameterized anyway. * stmt = self._new_statement() # <<<<<<<<<<<<<< * stmt.prepare(query) * rowcount = 0 */ - __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___new_statement); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s___new_statement); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -17332,17 +18895,17 @@ __pyx_v_stmt = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":135 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":135 * # No plain queries because they can't be parameterized anyway. * stmt = self._new_statement() * stmt.prepare(query) # <<<<<<<<<<<<<< * rowcount = 0 * for params in parambatch: */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_stmt, __pyx_n_s__prepare); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stmt, __pyx_n_s__prepare); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 135; __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[6]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_query); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_query); __Pyx_GIVEREF(__pyx_v_query); @@ -17352,7 +18915,7 @@ __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":136 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":136 * stmt = self._new_statement() * stmt.prepare(query) * rowcount = 0 # <<<<<<<<<<<<<< @@ -17362,7 +18925,7 @@ __Pyx_INCREF(__pyx_int_0); __pyx_v_rowcount = __pyx_int_0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":137 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":137 * stmt.prepare(query) * rowcount = 0 * for params in parambatch: # <<<<<<<<<<<<<< @@ -17378,12 +18941,20 @@ __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; } for (;;) { - if (PyList_CheckExact(__pyx_t_4)) { + if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_4)) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; - } else if (PyTuple_CheckExact(__pyx_t_4)) { + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_4)) { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break; - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif } else { __pyx_t_3 = __pyx_t_6(__pyx_t_4); if (unlikely(!__pyx_t_3)) { @@ -17399,14 +18970,14 @@ __pyx_v_params = __pyx_t_3; __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":138 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":138 * rowcount = 0 * for params in parambatch: * stmt.execute(*params) # <<<<<<<<<<<<<< * # There's probably a better way to do this, but whatever. As far as * # I know we should get all values -1 or all values >= 0. */ - __pyx_t_3 = PyObject_GetAttr(__pyx_v_stmt, __pyx_n_s__execute); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stmt, __pyx_n_s__execute); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PySequence_Tuple(__pyx_v_params); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); @@ -17416,14 +18987,14 @@ __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":141 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":141 * # There's probably a better way to do this, but whatever. As far as * # I know we should get all values -1 or all values >= 0. * rowcount += stmt.rowcount # <<<<<<<<<<<<<< * # Whatevs. * if rowcount < 0: */ - __pyx_t_7 = PyObject_GetAttr(__pyx_v_stmt, __pyx_n_s__rowcount); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_stmt, __pyx_n_s__rowcount); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_rowcount, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -17434,20 +19005,19 @@ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":143 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":143 * rowcount += stmt.rowcount * # Whatevs. * if rowcount < 0: # <<<<<<<<<<<<<< * rowcount = -1 * self._update_fields(stmt, rowcount) */ - __pyx_t_4 = PyObject_RichCompare(__pyx_v_rowcount, __pyx_int_0, Py_LT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_rowcount, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_8) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":144 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":144 * # Whatevs. * if rowcount < 0: * rowcount = -1 # <<<<<<<<<<<<<< @@ -17457,11 +19027,11 @@ __Pyx_INCREF(__pyx_int_neg_1); __Pyx_DECREF(__pyx_v_rowcount); __pyx_v_rowcount = __pyx_int_neg_1; - goto __pyx_L8; + goto __pyx_L5; } - __pyx_L8:; + __pyx_L5:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":145 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":145 * if rowcount < 0: * rowcount = -1 * self._update_fields(stmt, rowcount) # <<<<<<<<<<<<<< @@ -17470,7 +19040,7 @@ */ __pyx_t_9.__pyx_n = 1; __pyx_t_9.rowcount = __pyx_v_rowcount; - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Cursor *)((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->__pyx_vtab)->_update_fields(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self), __pyx_v_stmt, &__pyx_t_9); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Cursor *)__pyx_v_self->__pyx_vtab)->_update_fields(__pyx_v_self, __pyx_v_stmt, &__pyx_t_9); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -17490,7 +19060,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":147 +/* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":147 * self._update_fields(stmt, rowcount) * * cdef int _update_fields(self, stmt, rowcount=None) except -1: # <<<<<<<<<<<<<< @@ -17506,29 +19076,30 @@ PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; + int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_update_fields"); + __Pyx_RefNannySetupContext("_update_fields", 0); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_rowcount = __pyx_optional_args->rowcount; } } - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":148 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":148 * * cdef int _update_fields(self, stmt, rowcount=None) except -1: * self.messages.extend(stmt.warnings) # <<<<<<<<<<<<<< * if rowcount is None: * self.rowcount = stmt.rowcount */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->messages, __pyx_n_s__extend); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->messages, __pyx_n_s__extend); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_v_stmt, __pyx_n_s__warnings); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stmt, __pyx_n_s__warnings); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 148; __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[6]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; @@ -17538,7 +19109,7 @@ __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":149 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":149 * cdef int _update_fields(self, stmt, rowcount=None) except -1: * self.messages.extend(stmt.warnings) * if rowcount is None: # <<<<<<<<<<<<<< @@ -17546,16 +19117,17 @@ * else: */ __pyx_t_4 = (__pyx_v_rowcount == Py_None); - if (__pyx_t_4) { + __pyx_t_5 = (__pyx_t_4 != 0); + if (__pyx_t_5) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":150 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":150 * self.messages.extend(stmt.warnings) * if rowcount is None: * self.rowcount = stmt.rowcount # <<<<<<<<<<<<<< * else: * self.rowcount = rowcount */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_stmt, __pyx_n_s__rowcount); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stmt, __pyx_n_s__rowcount); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->rowcount); @@ -17566,7 +19138,7 @@ } /*else*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":152 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":152 * self.rowcount = stmt.rowcount * else: * self.rowcount = rowcount # <<<<<<<<<<<<<< @@ -17581,14 +19153,14 @@ } __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":153 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":153 * else: * self.rowcount = rowcount * self.lastrowid = stmt.lastrowid # <<<<<<<<<<<<<< * self.description = stmt.description * if stmt.has_result: */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_stmt, __pyx_n_s__lastrowid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stmt, __pyx_n_s__lastrowid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->lastrowid); @@ -17596,14 +19168,14 @@ __pyx_v_self->lastrowid = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":154 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":154 * self.rowcount = rowcount * self.lastrowid = stmt.lastrowid * self.description = stmt.description # <<<<<<<<<<<<<< * if stmt.has_result: * self._statements.append(stmt) */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_stmt, __pyx_n_s__description); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stmt, __pyx_n_s__description); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->description); @@ -17611,20 +19183,20 @@ __pyx_v_self->description = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":155 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":155 * self.lastrowid = stmt.lastrowid * self.description = stmt.description * if stmt.has_result: # <<<<<<<<<<<<<< * self._statements.append(stmt) * */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_stmt, __pyx_n_s__has_result); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stmt, __pyx_n_s__has_result); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__pyx_t_4) { + if (__pyx_t_5) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":156 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":156 * self.description = stmt.description * if stmt.has_result: * self._statements.append(stmt) # <<<<<<<<<<<<<< @@ -17651,7 +19223,7 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":158 +/* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":158 * self._statements.append(stmt) * * cdef int _check_statements(self) except -1: # <<<<<<<<<<<<<< @@ -17670,9 +19242,9 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_check_statements"); + __Pyx_RefNannySetupContext("_check_statements", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":159 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":159 * * cdef int _check_statements(self) except -1: * self._check_closed() # <<<<<<<<<<<<<< @@ -17681,7 +19253,7 @@ */ __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Cursor *)__pyx_v_self->__pyx_vtab)->_check_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":160 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":160 * cdef int _check_statements(self) except -1: * self._check_closed() * if not self._statements: # <<<<<<<<<<<<<< @@ -17689,19 +19261,19 @@ * */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->_statements); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_3 = (!__pyx_t_2); + __pyx_t_3 = ((!__pyx_t_2) != 0); if (__pyx_t_3) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":161 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":161 * self._check_closed() * if not self._statements: * raise ProgrammingError('no results available') # <<<<<<<<<<<<<< * * def nextset(self): */ - __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_59), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_65), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); @@ -17723,7 +19295,19 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":163 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6Cursor_17nextset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_6oursql_6Cursor_16nextset[] = "nextset() -> True or None.\n \n Move to the next result set. If there are any result sets left, this\n returns True. Otherwise, None.\n "; +static PyObject *__pyx_pw_6oursql_6Cursor_17nextset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nextset (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6Cursor_16nextset(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":163 * raise ProgrammingError('no results available') * * def nextset(self): # <<<<<<<<<<<<<< @@ -17731,9 +19315,7 @@ * */ -static PyObject *__pyx_pf_6oursql_6Cursor_8nextset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_6oursql_6Cursor_8nextset[] = "nextset() -> True or None.\n \n Move to the next result set. If there are any result sets left, this\n returns True. Otherwise, None.\n "; -static PyObject *__pyx_pf_6oursql_6Cursor_8nextset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_6oursql_6Cursor_16nextset(struct __pyx_obj_6oursql_Cursor *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -17743,27 +19325,27 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("nextset"); + __Pyx_RefNannySetupContext("nextset", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":169 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":169 * returns True. Otherwise, None. * """ * self._check_statements() # <<<<<<<<<<<<<< * if self._statements[0].nextset(): * return True */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Cursor *)((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->__pyx_vtab)->_check_statements(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Cursor *)__pyx_v_self->__pyx_vtab)->_check_statements(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":170 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":170 * """ * self._check_statements() * if self._statements[0].nextset(): # <<<<<<<<<<<<<< * return True * self._statements.popleft() */ - __pyx_t_2 = __Pyx_GetItemInt(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->_statements, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_self->_statements, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__nextset); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nextset); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -17773,7 +19355,7 @@ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":171 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":171 * self._check_statements() * if self._statements[0].nextset(): * return True # <<<<<<<<<<<<<< @@ -17786,25 +19368,25 @@ __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - goto __pyx_L5; + goto __pyx_L3; } - __pyx_L5:; + __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":172 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":172 * if self._statements[0].nextset(): * return True * self._statements.popleft() # <<<<<<<<<<<<<< * # DB-API, you so wacky. * return True if self._statements else None */ - __pyx_t_2 = PyObject_GetAttr(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->_statements, __pyx_n_s__popleft); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_statements, __pyx_n_s__popleft); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":174 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":174 * self._statements.popleft() * # DB-API, you so wacky. * return True if self._statements else None # <<<<<<<<<<<<<< @@ -17812,7 +19394,7 @@ * def fetchone(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_IsTrue(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->_statements); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_statements); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_4) { __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -17839,7 +19421,19 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":176 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6Cursor_19fetchone(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_6oursql_6Cursor_18fetchone[] = "fetchone() -> row.\n \n Fetch one row from the current result set. If the result set was\n exhausted, this returns None. If there were no result sets, a \n ProgrammingError is raised.\n "; +static PyObject *__pyx_pw_6oursql_6Cursor_19fetchone(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("fetchone (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6Cursor_18fetchone(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":176 * return True if self._statements else None * * def fetchone(self): # <<<<<<<<<<<<<< @@ -17847,9 +19441,7 @@ * */ -static PyObject *__pyx_pf_6oursql_6Cursor_9fetchone(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_6oursql_6Cursor_9fetchone[] = "fetchone() -> row.\n \n Fetch one row from the current result set. If the result set was\n exhausted, this returns None. If there were no result sets, a \n ProgrammingError is raised.\n "; -static PyObject *__pyx_pf_6oursql_6Cursor_9fetchone(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_6oursql_6Cursor_18fetchone(struct __pyx_obj_6oursql_Cursor *__pyx_v_self) { PyObject *__pyx_v_ret = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -17857,44 +19449,45 @@ PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; + int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("fetchone"); + __Pyx_RefNannySetupContext("fetchone", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":183 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":183 * ProgrammingError is raised. * """ * self._check_statements() # <<<<<<<<<<<<<< * self._do_autoping() * ret = self._statements[0].fetchone() */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Cursor *)((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->__pyx_vtab)->_check_statements(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Cursor *)__pyx_v_self->__pyx_vtab)->_check_statements(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":184 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":184 * """ * self._check_statements() * self._do_autoping() # <<<<<<<<<<<<<< * ret = self._statements[0].fetchone() * if ret is None: */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___do_autoping); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s___do_autoping); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":185 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":185 * self._check_statements() * self._do_autoping() * ret = self._statements[0].fetchone() # <<<<<<<<<<<<<< * if ret is None: * self.nextset() */ - __pyx_t_3 = __Pyx_GetItemInt(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->_statements, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->_statements, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__fetchone); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__fetchone); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -17903,7 +19496,7 @@ __pyx_v_ret = __pyx_t_3; __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":186 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":186 * self._do_autoping() * ret = self._statements[0].fetchone() * if ret is None: # <<<<<<<<<<<<<< @@ -17911,26 +19504,27 @@ * return ret */ __pyx_t_4 = (__pyx_v_ret == Py_None); - if (__pyx_t_4) { + __pyx_t_5 = (__pyx_t_4 != 0); + if (__pyx_t_5) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":187 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":187 * ret = self._statements[0].fetchone() * if ret is None: * self.nextset() # <<<<<<<<<<<<<< * return ret * */ - __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__nextset); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__nextset); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 187; __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_2); __pyx_t_2 = 0; - goto __pyx_L5; + goto __pyx_L3; } - __pyx_L5:; + __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":188 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":188 * if ret is None: * self.nextset() * return ret # <<<<<<<<<<<<<< @@ -17956,47 +19550,39 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":190 - * return ret - * - * def fetchmany(self, size=None): # <<<<<<<<<<<<<< - * """fetchmany(size=self.arraysize) -> list of rows. - * - */ - -static PyObject *__pyx_pf_6oursql_6Cursor_10fetchmany(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_6oursql_6Cursor_10fetchmany[] = "fetchmany(size=self.arraysize) -> list of rows.\n \n Fetch up to 'size' rows. If there aren't that many rows available in \n the database, this returns as many as were available. If there were no \n result sets, a ProgrammingError is raised.\n "; -static PyObject *__pyx_pf_6oursql_6Cursor_10fetchmany(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6Cursor_21fetchmany(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_6oursql_6Cursor_20fetchmany[] = "fetchmany(size=self.arraysize) -> list of rows.\n \n Fetch up to 'size' rows. If there aren't that many rows available in \n the database, this returns as many as were available. If there were no \n result sets, a ProgrammingError is raised.\n "; +static PyObject *__pyx_pw_6oursql_6Cursor_21fetchmany(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_size = 0; - unsigned int __pyx_v_i; - PyObject *__pyx_v_ret = NULL; - PyObject *__pyx_v_resultset = NULL; - PyObject *__pyx_v_row = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - unsigned int __pyx_t_5; - int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size,0}; - __Pyx_RefNannySetupContext("fetchmany"); + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("fetchmany (wrapper)", 0); { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size,0}; PyObject* values[1] = {0}; + + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":190 + * return ret + * + * def fetchmany(self, size=None): # <<<<<<<<<<<<<< + * """fetchmany(size=self.arraysize) -> list of rows. + * + */ values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; - switch (PyTuple_GET_SIZE(__pyx_args)) { + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { 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 (PyTuple_GET_SIZE(__pyx_args)) { + switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size); @@ -18004,7 +19590,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "fetchmany") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fetchmany") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -18023,32 +19609,55 @@ __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __Pyx_INCREF(__pyx_v_size); + __pyx_r = __pyx_pf_6oursql_6Cursor_20fetchmany(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self), __pyx_v_size); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":198 - * """ - * cdef unsigned int i - * self._check_statements() # <<<<<<<<<<<<<< - * self._do_autoping() +static PyObject *__pyx_pf_6oursql_6Cursor_20fetchmany(struct __pyx_obj_6oursql_Cursor *__pyx_v_self, PyObject *__pyx_v_size) { + unsigned int __pyx_v_i; + PyObject *__pyx_v_ret = NULL; + PyObject *__pyx_v_resultset = NULL; + PyObject *__pyx_v_row = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + unsigned int __pyx_t_6; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("fetchmany", 0); + __Pyx_INCREF(__pyx_v_size); + + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":198 + * """ + * cdef unsigned int i + * self._check_statements() # <<<<<<<<<<<<<< + * self._do_autoping() * if size is None: */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Cursor *)((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->__pyx_vtab)->_check_statements(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Cursor *)__pyx_v_self->__pyx_vtab)->_check_statements(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":199 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":199 * cdef unsigned int i * self._check_statements() * self._do_autoping() # <<<<<<<<<<<<<< * if size is None: * size = self.arraysize */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___do_autoping); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s___do_autoping); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":200 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":200 * self._check_statements() * self._do_autoping() * if size is None: # <<<<<<<<<<<<<< @@ -18056,25 +19665,26 @@ * ret = [] */ __pyx_t_4 = (__pyx_v_size == Py_None); - if (__pyx_t_4) { + __pyx_t_5 = (__pyx_t_4 != 0); + if (__pyx_t_5) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":201 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":201 * self._do_autoping() * if size is None: * size = self.arraysize # <<<<<<<<<<<<<< * ret = [] * resultset = self._statements[0] */ - __pyx_t_3 = PyLong_FromUnsignedLong(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->arraysize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyLong_FromUnsignedLong(__pyx_v_self->arraysize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_v_size); __pyx_v_size = __pyx_t_3; __pyx_t_3 = 0; - goto __pyx_L6; + goto __pyx_L3; } - __pyx_L6:; + __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":202 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":202 * if size is None: * size = self.arraysize * ret = [] # <<<<<<<<<<<<<< @@ -18082,40 +19692,40 @@ * # This is a little bit wacky for DB-API compliance. If there's fewer */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - __pyx_v_ret = __pyx_t_3; + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_ret = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":203 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":203 * size = self.arraysize * ret = [] * resultset = self._statements[0] # <<<<<<<<<<<<<< * # This is a little bit wacky for DB-API compliance. If there's fewer * # rows available than requested, return everything available without */ - __pyx_t_3 = __Pyx_GetItemInt(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->_statements, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->_statements, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_resultset = __pyx_t_3; __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":209 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":209 * # result set at all, *then* switch to the next result set and return an * # empty sequence. * for 0 <= i < size: # <<<<<<<<<<<<<< * row = resultset.fetchone() * if row is None: */ - __pyx_t_5 = __Pyx_PyInt_AsUnsignedInt(__pyx_v_size); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) { + __pyx_t_6 = __Pyx_PyInt_AsUnsignedInt(__pyx_v_size); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":210 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":210 * # empty sequence. * for 0 <= i < size: * row = resultset.fetchone() # <<<<<<<<<<<<<< * if row is None: * if i == 0: */ - __pyx_t_3 = PyObject_GetAttr(__pyx_v_resultset, __pyx_n_s__fetchone); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_resultset, __pyx_n_s__fetchone); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -18124,44 +19734,45 @@ __pyx_v_row = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":211 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":211 * for 0 <= i < size: * row = resultset.fetchone() * if row is None: # <<<<<<<<<<<<<< * if i == 0: * self.nextset() */ - __pyx_t_4 = (__pyx_v_row == Py_None); + __pyx_t_5 = (__pyx_v_row == Py_None); + __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":212 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":212 * row = resultset.fetchone() * if row is None: * if i == 0: # <<<<<<<<<<<<<< * self.nextset() * return ret */ - __pyx_t_4 = (__pyx_v_i == 0); + __pyx_t_4 = ((__pyx_v_i == 0) != 0); if (__pyx_t_4) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":213 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":213 * if row is None: * if i == 0: * self.nextset() # <<<<<<<<<<<<<< * return ret * ret.append(row) */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__nextset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__nextset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - goto __pyx_L10; + goto __pyx_L7; } - __pyx_L10:; + __pyx_L7:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":214 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":214 * if i == 0: * self.nextset() * return ret # <<<<<<<<<<<<<< @@ -18172,24 +19783,21 @@ __Pyx_INCREF(((PyObject *)__pyx_v_ret)); __pyx_r = ((PyObject *)__pyx_v_ret); goto __pyx_L0; - goto __pyx_L9; + goto __pyx_L6; } - __pyx_L9:; + __pyx_L6:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":215 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":215 * self.nextset() * return ret * ret.append(row) # <<<<<<<<<<<<<< * return ret * */ - if (unlikely(((PyObject *)__pyx_v_ret) == Py_None)) { - PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } - __pyx_t_6 = PyList_Append(__pyx_v_ret, __pyx_v_row); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_ret, __pyx_v_row); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":216 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":216 * return ret * ret.append(row) * return ret # <<<<<<<<<<<<<< @@ -18218,7 +19826,19 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":218 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6Cursor_23fetchall(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_6oursql_6Cursor_22fetchall[] = "fetchall() -> list of rows.\n \n Fetch all available rows from the database. If there were no result \n sets, a ProgrammingError is raised.\n "; +static PyObject *__pyx_pw_6oursql_6Cursor_23fetchall(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("fetchall (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6Cursor_22fetchall(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":218 * return ret * * def fetchall(self): # <<<<<<<<<<<<<< @@ -18226,9 +19846,7 @@ * */ -static PyObject *__pyx_pf_6oursql_6Cursor_11fetchall(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_6oursql_6Cursor_11fetchall[] = "fetchall() -> list of rows.\n \n Fetch all available rows from the database. If there were no result \n sets, a ProgrammingError is raised.\n "; -static PyObject *__pyx_pf_6oursql_6Cursor_11fetchall(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_6oursql_6Cursor_22fetchall(struct __pyx_obj_6oursql_Cursor *__pyx_v_self) { PyObject *__pyx_v_ret = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -18240,32 +19858,32 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("fetchall"); + __Pyx_RefNannySetupContext("fetchall", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":224 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":224 * sets, a ProgrammingError is raised. * """ * self._check_statements() # <<<<<<<<<<<<<< * self._do_autoping() * ret = [] */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Cursor *)((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->__pyx_vtab)->_check_statements(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Cursor *)__pyx_v_self->__pyx_vtab)->_check_statements(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":225 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":225 * """ * self._check_statements() * self._do_autoping() # <<<<<<<<<<<<<< * ret = [] * while self._statements: */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___do_autoping); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s___do_autoping); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":226 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":226 * self._check_statements() * self._do_autoping() * ret = [] # <<<<<<<<<<<<<< @@ -18273,11 +19891,11 @@ * ret.extend(self._statements.popleft().fetchall()) */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - __pyx_v_ret = __pyx_t_3; + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_ret = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":227 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":227 * self._do_autoping() * ret = [] * while self._statements: # <<<<<<<<<<<<<< @@ -18285,31 +19903,31 @@ * return ret */ while (1) { - __pyx_t_4 = __Pyx_PyObject_IsTrue(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->_statements); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_statements); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_4) break; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":228 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":228 * ret = [] * while self._statements: * ret.extend(self._statements.popleft().fetchall()) # <<<<<<<<<<<<<< * return ret * */ - __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_ret), __pyx_n_s__extend); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_ret), __pyx_n_s__extend); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyObject_GetAttr(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->_statements, __pyx_n_s__popleft); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_statements, __pyx_n_s__popleft); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__fetchall); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__fetchall); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; @@ -18320,7 +19938,7 @@ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":229 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":229 * while self._statements: * ret.extend(self._statements.popleft().fetchall()) * return ret # <<<<<<<<<<<<<< @@ -18347,7 +19965,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":231 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6Cursor_25__iter__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_6Cursor_25__iter__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6Cursor_24__iter__(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":231 * return ret * * def __iter__(self): # <<<<<<<<<<<<<< @@ -18355,29 +19984,27 @@ * return PyCallIter_New(self.fetchone, None) */ -static PyObject *__pyx_pf_6oursql_6Cursor_12__iter__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_6Cursor_12__iter__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_6Cursor_24__iter__(struct __pyx_obj_6oursql_Cursor *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; 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("__iter__"); + __Pyx_RefNannySetupContext("__iter__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":232 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":232 * * def __iter__(self): * self._check_closed() # <<<<<<<<<<<<<< * return PyCallIter_New(self.fetchone, None) * */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Cursor *)((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->__pyx_vtab)->_check_closed(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_6oursql_Cursor *)__pyx_v_self->__pyx_vtab)->_check_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":233 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":233 * def __iter__(self): * self._check_closed() * return PyCallIter_New(self.fetchone, None) # <<<<<<<<<<<<<< @@ -18385,16 +20012,13 @@ * property connection: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__fetchone); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__fetchone); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = Py_None; - __Pyx_INCREF(__pyx_t_3); - __pyx_t_4 = PyCallIter_New(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyCallIter_New(__pyx_t_2, Py_None); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -18402,7 +20026,6 @@ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("oursql.Cursor.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -18411,7 +20034,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":236 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6Cursor_10connection_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_6Cursor_10connection_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6Cursor_10connection___get__(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":236 * * property connection: * def __get__(self): # <<<<<<<<<<<<<< @@ -18419,13 +20053,12 @@ * */ -static PyObject *__pyx_pf_6oursql_6Cursor_10connection___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_6Cursor_10connection___get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_6Cursor_10connection___get__(struct __pyx_obj_6oursql_Cursor *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":237 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":237 * property connection: * def __get__(self): * return self.conn # <<<<<<<<<<<<<< @@ -18433,8 +20066,8 @@ * def setinputsizes(self, sizes): */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->conn)); - __pyx_r = ((PyObject *)((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->conn); + __Pyx_INCREF(((PyObject *)__pyx_v_self->conn)); + __pyx_r = ((PyObject *)__pyx_v_self->conn); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -18444,7 +20077,19 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":239 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6Cursor_27setinputsizes(PyObject *__pyx_v_self, PyObject *__pyx_v_sizes); /*proto*/ +static char __pyx_doc_6oursql_6Cursor_26setinputsizes[] = "setinputsizes(sizes)\n \n Do nothing; this operation is not supported by oursql.\n "; +static PyObject *__pyx_pw_6oursql_6Cursor_27setinputsizes(PyObject *__pyx_v_self, PyObject *__pyx_v_sizes) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setinputsizes (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6Cursor_26setinputsizes(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self), ((PyObject *)__pyx_v_sizes)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":239 * return self.conn * * def setinputsizes(self, sizes): # <<<<<<<<<<<<<< @@ -18452,12 +20097,10 @@ * */ -static PyObject *__pyx_pf_6oursql_6Cursor_13setinputsizes(PyObject *__pyx_v_self, PyObject *__pyx_v_sizes); /*proto*/ -static char __pyx_doc_6oursql_6Cursor_13setinputsizes[] = "setinputsizes(sizes)\n \n Do nothing; this operation is not supported by oursql.\n "; -static PyObject *__pyx_pf_6oursql_6Cursor_13setinputsizes(PyObject *__pyx_v_self, PyObject *__pyx_v_sizes) { +static PyObject *__pyx_pf_6oursql_6Cursor_26setinputsizes(CYTHON_UNUSED struct __pyx_obj_6oursql_Cursor *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_sizes) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("setinputsizes"); + __Pyx_RefNannySetupContext("setinputsizes", 0); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); @@ -18465,42 +20108,43 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":248 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6Cursor_29setoutputsize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_6oursql_6Cursor_28setoutputsize[] = "setoutputsize(size, column=None)\n \n Do nothing; this operation is not supported by oursql.\n "; +static PyObject *__pyx_pw_6oursql_6Cursor_29setoutputsize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED PyObject *__pyx_v_size = 0; + CYTHON_UNUSED PyObject *__pyx_v_column = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setoutputsize (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size,&__pyx_n_s__column,0}; + PyObject* values[2] = {0,0}; + + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":248 * pass * * def setoutputsize(self, size, column=None): # <<<<<<<<<<<<<< * """setoutputsize(size, column=None) * */ - -static PyObject *__pyx_pf_6oursql_6Cursor_14setoutputsize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_6oursql_6Cursor_14setoutputsize[] = "setoutputsize(size, column=None)\n \n Do nothing; this operation is not supported by oursql.\n "; -static PyObject *__pyx_pf_6oursql_6Cursor_14setoutputsize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_size = 0; - PyObject *__pyx_v_column = 0; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size,&__pyx_n_s__column,0}; - __Pyx_RefNannySetupContext("setoutputsize"); - { - PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; - switch (PyTuple_GET_SIZE(__pyx_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 (PyTuple_GET_SIZE(__pyx_args)) { + switch (pos_args) { case 0: - values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size); - if (likely(values[0])) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { @@ -18509,7 +20153,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "setoutputsize") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setoutputsize") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -18530,6 +20174,15 @@ __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6oursql_6Cursor_28setoutputsize(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self), __pyx_v_size, __pyx_v_column); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6oursql_6Cursor_28setoutputsize(CYTHON_UNUSED struct __pyx_obj_6oursql_Cursor *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_size, CYTHON_UNUSED PyObject *__pyx_v_column) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setoutputsize", 0); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); @@ -18537,7 +20190,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":255 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6Cursor_31__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6oursql_6Cursor_31__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6Cursor_30__enter__(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":255 * pass * * def __enter__(self): # <<<<<<<<<<<<<< @@ -18545,13 +20209,12 @@ * */ -static PyObject *__pyx_pf_6oursql_6Cursor_15__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pf_6oursql_6Cursor_15__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_6oursql_6Cursor_30__enter__(struct __pyx_obj_6oursql_Cursor *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__enter__"); + __Pyx_RefNannySetupContext("__enter__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":256 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":256 * * def __enter__(self): * return self # <<<<<<<<<<<<<< @@ -18559,8 +20222,8 @@ * def __exit__(self, exc, value, tb): */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_self); - __pyx_r = __pyx_v_self; + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -18570,34 +20233,25 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":258 - * return self - * - * def __exit__(self, exc, value, tb): # <<<<<<<<<<<<<< - * if exc: - * self.conn.rollback() - */ - -static PyObject *__pyx_pf_6oursql_6Cursor_16__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pf_6oursql_6Cursor_16__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6Cursor_33__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6oursql_6Cursor_33__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_exc = 0; - PyObject *__pyx_v_value = 0; - PyObject *__pyx_v_tb = 0; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; + CYTHON_UNUSED PyObject *__pyx_v_value = 0; + CYTHON_UNUSED PyObject *__pyx_v_tb = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__exc,&__pyx_n_s__value,&__pyx_n_s__tb,0}; - __Pyx_RefNannySetupContext("__exit__"); + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0); { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__exc,&__pyx_n_s__value,&__pyx_n_s__tb,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; - switch (PyTuple_GET_SIZE(__pyx_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); @@ -18605,26 +20259,23 @@ default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); - switch (PyTuple_GET_SIZE(__pyx_args)) { + switch (pos_args) { case 0: - values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__exc); - if (likely(values[0])) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__exc)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: - values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value); - if (likely(values[1])) kw_args--; + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: - values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tb); - if (likely(values[2])) kw_args--; + if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tb)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__exit__") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -18645,8 +20296,31 @@ __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6oursql_6Cursor_32__exit__(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self), __pyx_v_exc, __pyx_v_value, __pyx_v_tb); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":258 + * return self + * + * def __exit__(self, exc, value, tb): # <<<<<<<<<<<<<< + * if exc: + * self.conn.rollback() + */ + +static PyObject *__pyx_pf_6oursql_6Cursor_32__exit__(struct __pyx_obj_6oursql_Cursor *__pyx_v_self, PyObject *__pyx_v_exc, CYTHON_UNUSED PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_tb) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + 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("__exit__", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":259 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":259 * * def __exit__(self, exc, value, tb): * if exc: # <<<<<<<<<<<<<< @@ -18656,47 +20330,47 @@ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_exc); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":260 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":260 * def __exit__(self, exc, value, tb): * if exc: * self.conn.rollback() # <<<<<<<<<<<<<< * else: * self.conn.commit() */ - __pyx_t_2 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->conn), __pyx_n_s__rollback); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->conn), __pyx_n_s__rollback); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - goto __pyx_L6; + goto __pyx_L3; } /*else*/ { - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":262 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":262 * self.conn.rollback() * else: * self.conn.commit() # <<<<<<<<<<<<<< * self.close() * */ - __pyx_t_3 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->conn), __pyx_n_s__commit); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->conn), __pyx_n_s__commit); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 262; __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_2); __pyx_t_2 = 0; } - __pyx_L6:; + __pyx_L3:; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":263 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":263 * else: * self.conn.commit() * self.close() # <<<<<<<<<<<<<< * * cdef class DictCursor(Cursor): */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__close); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); @@ -18716,7 +20390,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":29 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6Cursor_11_statements_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_6Cursor_11_statements_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6Cursor_11_statements___get__(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":29 * """ * * cdef readonly object _statements, _stmt_kwargs # <<<<<<<<<<<<<< @@ -18724,14 +20409,13 @@ * cdef int closed, try_plain_query */ -static PyObject *__pyx_pf_6oursql_6Cursor_11_statements___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_6Cursor_11_statements___get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_6Cursor_11_statements___get__(struct __pyx_obj_6oursql_Cursor *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->_statements); - __pyx_r = ((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->_statements; + __Pyx_INCREF(__pyx_v_self->_statements); + __pyx_r = __pyx_v_self->_statements; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -18741,14 +20425,24 @@ return __pyx_r; } -static PyObject *__pyx_pf_6oursql_6Cursor_12_stmt_kwargs___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_6Cursor_12_stmt_kwargs___get__(PyObject *__pyx_v_self) { +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6Cursor_12_stmt_kwargs_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_6Cursor_12_stmt_kwargs_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6Cursor_12_stmt_kwargs___get__(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6oursql_6Cursor_12_stmt_kwargs___get__(struct __pyx_obj_6oursql_Cursor *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->_stmt_kwargs); - __pyx_r = ((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->_stmt_kwargs; + __Pyx_INCREF(__pyx_v_self->_stmt_kwargs); + __pyx_r = __pyx_v_self->_stmt_kwargs; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -18758,7 +20452,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":32 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6Cursor_8rowcount_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_6Cursor_8rowcount_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6Cursor_8rowcount___get__(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":32 * cdef Connection conn * cdef int closed, try_plain_query * cdef readonly object rowcount, lastrowid, description, messages # <<<<<<<<<<<<<< @@ -18766,14 +20471,13 @@ * */ -static PyObject *__pyx_pf_6oursql_6Cursor_8rowcount___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_6Cursor_8rowcount___get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_6Cursor_8rowcount___get__(struct __pyx_obj_6oursql_Cursor *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->rowcount); - __pyx_r = ((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->rowcount; + __Pyx_INCREF(__pyx_v_self->rowcount); + __pyx_r = __pyx_v_self->rowcount; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -18783,14 +20487,24 @@ return __pyx_r; } -static PyObject *__pyx_pf_6oursql_6Cursor_9lastrowid___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_6Cursor_9lastrowid___get__(PyObject *__pyx_v_self) { +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6Cursor_9lastrowid_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_6Cursor_9lastrowid_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6Cursor_9lastrowid___get__(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6oursql_6Cursor_9lastrowid___get__(struct __pyx_obj_6oursql_Cursor *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->lastrowid); - __pyx_r = ((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->lastrowid; + __Pyx_INCREF(__pyx_v_self->lastrowid); + __pyx_r = __pyx_v_self->lastrowid; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -18800,14 +20514,24 @@ return __pyx_r; } -static PyObject *__pyx_pf_6oursql_6Cursor_11description___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_6Cursor_11description___get__(PyObject *__pyx_v_self) { +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6Cursor_11description_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_6Cursor_11description_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6Cursor_11description___get__(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6oursql_6Cursor_11description___get__(struct __pyx_obj_6oursql_Cursor *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->description); - __pyx_r = ((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->description; + __Pyx_INCREF(__pyx_v_self->description); + __pyx_r = __pyx_v_self->description; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -18817,14 +20541,24 @@ return __pyx_r; } -static PyObject *__pyx_pf_6oursql_6Cursor_8messages___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_6Cursor_8messages___get__(PyObject *__pyx_v_self) { +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6Cursor_8messages_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_6Cursor_8messages_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6Cursor_8messages___get__(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6oursql_6Cursor_8messages___get__(struct __pyx_obj_6oursql_Cursor *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->messages); - __pyx_r = ((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->messages; + __Pyx_INCREF(__pyx_v_self->messages); + __pyx_r = __pyx_v_self->messages; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -18834,7 +20568,18 @@ return __pyx_r; } -/* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":33 +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_6Cursor_9arraysize_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_6Cursor_9arraysize_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6Cursor_9arraysize___get__(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":33 * cdef int closed, try_plain_query * cdef readonly object rowcount, lastrowid, description, messages * cdef public unsigned long arraysize # <<<<<<<<<<<<<< @@ -18842,17 +20587,16 @@ * _statement_class = _Statement */ -static PyObject *__pyx_pf_6oursql_6Cursor_9arraysize___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_6Cursor_9arraysize___get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_6Cursor_9arraysize___get__(struct __pyx_obj_6oursql_Cursor *__pyx_v_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("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyLong_FromUnsignedLong(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->arraysize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyLong_FromUnsignedLong(__pyx_v_self->arraysize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -18870,17 +20614,27 @@ return __pyx_r; } -static int __pyx_pf_6oursql_6Cursor_9arraysize_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ -static int __pyx_pf_6oursql_6Cursor_9arraysize_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { +/* Python wrapper */ +static int __pyx_pw_6oursql_6Cursor_9arraysize_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_6oursql_6Cursor_9arraysize_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_6Cursor_9arraysize_2__set__(((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6oursql_6Cursor_9arraysize_2__set__(struct __pyx_obj_6oursql_Cursor *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations unsigned long __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__set__"); + __Pyx_RefNannySetupContext("__set__", 0); __pyx_t_1 = __Pyx_PyInt_AsUnsignedLong(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - ((struct __pyx_obj_6oursql_Cursor *)__pyx_v_self)->arraysize = __pyx_t_1; + __pyx_v_self->arraysize = __pyx_t_1; __pyx_r = 0; goto __pyx_L0; @@ -18892,6 +20646,22 @@ return __pyx_r; } +/* Python wrapper */ +static int __pyx_pw_6oursql_16_DBAPITypeObject_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6oursql_16_DBAPITypeObject_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_values = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1; + __Pyx_INCREF(__pyx_args); + __pyx_v_values = __pyx_args; + __pyx_r = __pyx_pf_6oursql_16_DBAPITypeObject___init__(((struct __pyx_obj_6oursql__DBAPITypeObject *)__pyx_v_self), __pyx_v_values); + __Pyx_XDECREF(__pyx_v_values); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + /* "oursql.pyx":101 * cdef readonly object values * @@ -18900,9 +20670,7 @@ * */ -static int __pyx_pf_6oursql_16_DBAPITypeObject___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_6oursql_16_DBAPITypeObject___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_values = 0; +static int __pyx_pf_6oursql_16_DBAPITypeObject___init__(struct __pyx_obj_6oursql__DBAPITypeObject *__pyx_v_self, PyObject *__pyx_v_values) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -18910,10 +20678,7 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__init__"); - if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1; - __Pyx_INCREF(__pyx_args); - __pyx_v_values = __pyx_args; + __Pyx_RefNannySetupContext("__init__", 0); /* "oursql.pyx":102 * @@ -18923,7 +20688,7 @@ * def __richcmp__(self, other, int op): */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); @@ -18931,9 +20696,9 @@ __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); - __Pyx_GOTREF(((struct __pyx_obj_6oursql__DBAPITypeObject *)__pyx_v_self)->values); - __Pyx_DECREF(((struct __pyx_obj_6oursql__DBAPITypeObject *)__pyx_v_self)->values); - ((struct __pyx_obj_6oursql__DBAPITypeObject *)__pyx_v_self)->values = __pyx_t_2; + __Pyx_GOTREF(__pyx_v_self->values); + __Pyx_DECREF(__pyx_v_self->values); + __pyx_v_self->values = __pyx_t_2; __pyx_t_2 = 0; __pyx_r = 0; @@ -18944,7 +20709,17 @@ __Pyx_AddTraceback("oursql._DBAPITypeObject.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_XDECREF(__pyx_v_values); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_16_DBAPITypeObject_3__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/ +static PyObject *__pyx_pw_6oursql_16_DBAPITypeObject_3__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_16_DBAPITypeObject_2__richcmp__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op)); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -18957,8 +20732,7 @@ * return other in self.values */ -static PyObject *__pyx_pf_6oursql_16_DBAPITypeObject_1__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/ -static PyObject *__pyx_pf_6oursql_16_DBAPITypeObject_1__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { +static PyObject *__pyx_pf_6oursql_16_DBAPITypeObject_2__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -18967,7 +20741,7 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__richcmp__"); + __Pyx_RefNannySetupContext("__richcmp__", 0); /* "oursql.pyx":105 * @@ -18976,7 +20750,7 @@ * return other in self.values * elif op == Py_NE: */ - __pyx_t_1 = (__pyx_v_op == Py_EQ); + __pyx_t_1 = ((__pyx_v_op == Py_EQ) != 0); if (__pyx_t_1) { /* "oursql.pyx":106 @@ -18987,16 +20761,16 @@ * return other not in self.values */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = ((PySequence_Contains(__pyx_t_2, __pyx_v_other))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_other, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - goto __pyx_L5; + goto __pyx_L3; } /* "oursql.pyx":107 @@ -19006,7 +20780,7 @@ * return other not in self.values * else: */ - __pyx_t_1 = (__pyx_v_op == Py_NE); + __pyx_t_1 = ((__pyx_v_op == Py_NE) != 0); if (__pyx_t_1) { /* "oursql.pyx":108 @@ -19017,16 +20791,16 @@ * raise TypeError('unorderable types: %r and %r' % ( */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = (__Pyx_NegateNonNeg(PySequence_Contains(__pyx_t_2, __pyx_v_other))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_other, __pyx_t_2, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - goto __pyx_L5; + goto __pyx_L3; } /*else*/ { @@ -19038,18 +20812,18 @@ * def __repr__(self): */ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_self))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(__pyx_v_self))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_self))); __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other))); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)Py_TYPE(__pyx_v_other))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other))); - __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_60), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_66), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_DECREF(((PyObject *)__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 = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; @@ -19060,7 +20834,7 @@ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_L5:; + __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -19075,6 +20849,17 @@ return __pyx_r; } +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_16_DBAPITypeObject_5__repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_16_DBAPITypeObject_5__repr__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_16_DBAPITypeObject_4__repr__(((struct __pyx_obj_6oursql__DBAPITypeObject *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + /* "oursql.pyx":113 * type(self), type(other))) * @@ -19083,8 +20868,7 @@ * self.values, id(self)) */ -static PyObject *__pyx_pf_6oursql_16_DBAPITypeObject_2__repr__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_16_DBAPITypeObject_2__repr__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_16_DBAPITypeObject_4__repr__(struct __pyx_obj_6oursql__DBAPITypeObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -19092,7 +20876,7 @@ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__repr__"); + __Pyx_RefNannySetupContext("__repr__", 0); /* "oursql.pyx":114 * @@ -19111,22 +20895,22 @@ * STRING = _DBAPITypeObject( */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __Pyx_INCREF(__pyx_v_self); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self); - __Pyx_GIVEREF(__pyx_v_self); + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); __pyx_t_2 = PyObject_Call(__pyx_builtin_id, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __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(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __Pyx_INCREF(((struct __pyx_obj_6oursql__DBAPITypeObject *)__pyx_v_self)->values); - PyTuple_SET_ITEM(__pyx_t_1, 0, ((struct __pyx_obj_6oursql__DBAPITypeObject *)__pyx_v_self)->values); - __Pyx_GIVEREF(((struct __pyx_obj_6oursql__DBAPITypeObject *)__pyx_v_self)->values); + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->values); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->values); + __Pyx_GIVEREF(__pyx_v_self->values); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_61), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_67), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = ((PyObject *)__pyx_t_2); @@ -19146,6 +20930,17 @@ return __pyx_r; } +/* Python wrapper */ +static PyObject *__pyx_pw_6oursql_16_DBAPITypeObject_6values_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6oursql_16_DBAPITypeObject_6values_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6oursql_16_DBAPITypeObject_6values___get__(((struct __pyx_obj_6oursql__DBAPITypeObject *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + /* "oursql.pyx":99 * * cdef class _DBAPITypeObject: @@ -19154,14 +20949,13 @@ * def __init__(self, *values): */ -static PyObject *__pyx_pf_6oursql_16_DBAPITypeObject_6values___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_6oursql_16_DBAPITypeObject_6values___get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_6oursql_16_DBAPITypeObject_6values___get__(struct __pyx_obj_6oursql__DBAPITypeObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__"); + __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((struct __pyx_obj_6oursql__DBAPITypeObject *)__pyx_v_self)->values); - __pyx_r = ((struct __pyx_obj_6oursql__DBAPITypeObject *)__pyx_v_self)->values; + __Pyx_INCREF(__pyx_v_self->values); + __pyx_r = __pyx_v_self->values; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -19170,310 +20964,11 @@ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static struct __pyx_vtabstruct_6oursql_Connection __pyx_vtable_6oursql_Connection; -static PyObject *__pyx_tp_new_6oursql_Connection(PyTypeObject *t, PyObject *a, PyObject *k) { - struct __pyx_obj_6oursql_Connection *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; - p = ((struct __pyx_obj_6oursql_Connection *)o); - p->__pyx_vtab = __pyx_vtabptr_6oursql_Connection; - p->__weakref__ = 0; - p->_charset = Py_None; Py_INCREF(Py_None); - p->_charset_bytes = Py_None; Py_INCREF(Py_None); - p->_context_cursors = Py_None; Py_INCREF(Py_None); - p->default_cursor = Py_None; Py_INCREF(Py_None); - if (__pyx_pf_6oursql_10Connection___cinit__(o, a, k) < 0) { - Py_DECREF(o); o = 0; - } - return o; -} - -static void __pyx_tp_dealloc_6oursql_Connection(PyObject *o) { - struct __pyx_obj_6oursql_Connection *p = (struct __pyx_obj_6oursql_Connection *)o; - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); - __pyx_pf_6oursql_10Connection_3__dealloc__(o); - if (PyErr_Occurred()) PyErr_WriteUnraisable(o); - --Py_REFCNT(o); - PyErr_Restore(etype, eval, etb); - } - if (p->__weakref__) PyObject_ClearWeakRefs(o); - Py_XDECREF(p->_charset); - Py_XDECREF(p->_charset_bytes); - Py_XDECREF(p->_context_cursors); - Py_XDECREF(p->default_cursor); - (*Py_TYPE(o)->tp_free)(o); -} - -static int __pyx_tp_traverse_6oursql_Connection(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_6oursql_Connection *p = (struct __pyx_obj_6oursql_Connection *)o; - if (p->_charset) { - e = (*v)(p->_charset, a); if (e) return e; - } - if (p->_charset_bytes) { - e = (*v)(p->_charset_bytes, a); if (e) return e; - } - if (p->_context_cursors) { - e = (*v)(p->_context_cursors, a); if (e) return e; - } - if (p->default_cursor) { - e = (*v)(p->default_cursor, a); if (e) return e; - } - return 0; -} - -static int __pyx_tp_clear_6oursql_Connection(PyObject *o) { - struct __pyx_obj_6oursql_Connection *p = (struct __pyx_obj_6oursql_Connection *)o; - PyObject* tmp; - tmp = ((PyObject*)p->_charset); - p->_charset = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->_charset_bytes); - p->_charset_bytes = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->_context_cursors); - p->_context_cursors = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->default_cursor); - p->default_cursor = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; -} - -static PyObject *__pyx_getprop_6oursql_10Connection_charset(PyObject *o, void *x) { - return __pyx_pf_6oursql_10Connection_7charset___get__(o); -} - -static int __pyx_setprop_6oursql_10Connection_charset(PyObject *o, PyObject *v, void *x) { - if (v) { - return __pyx_pf_6oursql_10Connection_7charset_1__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; - } -} - -static PyObject *__pyx_getprop_6oursql_10Connection_server_info(PyObject *o, void *x) { - return __pyx_pf_6oursql_10Connection_11server_info___get__(o); -} - -static PyObject *__pyx_getprop_6oursql_10Connection_ssl_cipher(PyObject *o, void *x) { - return __pyx_pf_6oursql_10Connection_10ssl_cipher___get__(o); -} - -static PyObject *__pyx_getprop_6oursql_10Connection_use_unicode(PyObject *o, void *x) { - return __pyx_pf_6oursql_10Connection_11use_unicode___get__(o); -} - -static PyObject *__pyx_getprop_6oursql_10Connection_autoping(PyObject *o, void *x) { - return __pyx_pf_6oursql_10Connection_8autoping___get__(o); -} - -static PyObject *__pyx_getprop_6oursql_10Connection_raise_on_warnings(PyObject *o, void *x) { - return __pyx_pf_6oursql_10Connection_17raise_on_warnings___get__(o); -} - -static PyObject *__pyx_getprop_6oursql_10Connection_default_cursor(PyObject *o, void *x) { - return __pyx_pf_6oursql_10Connection_14default_cursor___get__(o); -} - -static int __pyx_setprop_6oursql_10Connection_default_cursor(PyObject *o, PyObject *v, void *x) { - if (v) { - return __pyx_pf_6oursql_10Connection_14default_cursor_1__set__(o, v); - } - else { - return __pyx_pf_6oursql_10Connection_14default_cursor_2__del__(o); - } -} - -static PyMethodDef __pyx_methods_6oursql_Connection[] = { - {__Pyx_NAMESTR("_setup_ssl_options"), (PyCFunction)__pyx_pf_6oursql_10Connection_1_setup_ssl_options, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pf_6oursql_10Connection_2close, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6oursql_10Connection_2close)}, - {__Pyx_NAMESTR("ping"), (PyCFunction)__pyx_pf_6oursql_10Connection_4ping, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6oursql_10Connection_4ping)}, - {__Pyx_NAMESTR("commit"), (PyCFunction)__pyx_pf_6oursql_10Connection_5commit, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6oursql_10Connection_5commit)}, - {__Pyx_NAMESTR("rollback"), (PyCFunction)__pyx_pf_6oursql_10Connection_6rollback, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6oursql_10Connection_6rollback)}, - {__Pyx_NAMESTR("warning_count"), (PyCFunction)__pyx_pf_6oursql_10Connection_7warning_count, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6oursql_10Connection_7warning_count)}, - {__Pyx_NAMESTR("cursor"), (PyCFunction)__pyx_pf_6oursql_10Connection_8cursor, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6oursql_10Connection_8cursor)}, - {__Pyx_NAMESTR("__enter__"), (PyCFunction)__pyx_pf_6oursql_10Connection_9__enter__, METH_NOARGS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("__exit__"), (PyCFunction)__pyx_pf_6oursql_10Connection_10__exit__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("_escape_string"), (PyCFunction)__pyx_pf_6oursql_10Connection_11_escape_string, METH_O, __Pyx_DOCSTR(__pyx_doc_6oursql_10Connection_11_escape_string)}, - {__Pyx_NAMESTR("_escape_unicode_string"), (PyCFunction)__pyx_pf_6oursql_10Connection_12_escape_unicode_string, METH_O, __Pyx_DOCSTR(__pyx_doc_6oursql_10Connection_12_escape_unicode_string)}, - {0, 0, 0, 0} -}; - -static struct PyGetSetDef __pyx_getsets_6oursql_Connection[] = { - {(char *)"charset", __pyx_getprop_6oursql_10Connection_charset, __pyx_setprop_6oursql_10Connection_charset, __Pyx_DOCSTR(__pyx_k_62), 0}, - {(char *)"server_info", __pyx_getprop_6oursql_10Connection_server_info, 0, 0, 0}, - {(char *)"ssl_cipher", __pyx_getprop_6oursql_10Connection_ssl_cipher, 0, 0, 0}, - {(char *)"use_unicode", __pyx_getprop_6oursql_10Connection_use_unicode, 0, 0, 0}, - {(char *)"autoping", __pyx_getprop_6oursql_10Connection_autoping, 0, 0, 0}, - {(char *)"raise_on_warnings", __pyx_getprop_6oursql_10Connection_raise_on_warnings, 0, 0, 0}, - {(char *)"default_cursor", __pyx_getprop_6oursql_10Connection_default_cursor, __pyx_setprop_6oursql_10Connection_default_cursor, 0, 0}, - {0, 0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number_Connection = { - 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_Connection = { - 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_Connection = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_Connection = { - #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_6oursql_Connection = { - PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("oursql.Connection"), /*tp_name*/ - sizeof(struct __pyx_obj_6oursql_Connection), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_6oursql_Connection, /*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_Connection, /*tp_as_number*/ - &__pyx_tp_as_sequence_Connection, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_Connection, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_Connection, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - __Pyx_DOCSTR("Connection([host, user, passwd,] db=None, port=0, unix_socket=None, \n connect_timeout=None, read_timeout=None, write_timeout=None, \n protocol=None, ssl=None, read_default_file=None, \n read_default_group=None, init_command=None, charset_dir=None, \n shared_memory_base_name=None, local_infile=False, \n require_secure_auth=False, report_truncation=True, compress=False, \n found_rows=True, use_unicode=True, charset='utf8', autoping=False, \n default_cursor=None, raise_on_warnings=True, autoreconnect=False)\n \n Connect to the MySQL database. The first three parameters may be passed by \n position, but the rest may only be passed by keyword. All options except \n 'use_unicode', 'charset', 'autoping', 'default_cursor', and \n 'raise_on_warnings' correspond with parameters or flags to the \n mysql_real_connect function, or options to the mysql_options function. \n \n 'protocol' can be one of None, 'tcp', 'socket', 'pipe', or 'memory'. A\n 'protocol' of None will use the default protocol, and values otherwise \n correspond with the potential values of the 'protocol' option in the option \n file.\n \n 'ssl' can either be None or a dict where each key corresponds to a \n parameter of the mysql_ssl_set function, e.g. {'capath': '/etc/ssl/ca', \n 'cipher': 'DHE-RSA-AES256-SHA'}. Unspecified keys are the same as passing\n NULL to that parameter.\n \n If 'use_unicode' is true, oursql will attempt to return unicode wherever \n feasible. If 'charset' is not None, oursql will set the connection charset \n to the value provided. 'charset' defaults to using utf-8. If 'autoping' is \n true, oursql will run the 'ping' method before executing queries or \n fetching results to attempt to prevent connection timeout errors. \n 'default_cursor', if provided, will be used as the default cursor class \n when calling the 'cursor' method. If 'raise_on_warnings' is true, oursql\n will raise a CollatedWarningsError exception if there were any warnings\n produced by running a query.\n \n Connections and their cursors can also be used as context managers.\n \n with some_connection.cursor() as cursor:\n do_something_with(cursor)\n \n Can also be written as:\n \n with some_connection as cursor:\n do_something_with(cursor)\n \n And both are equivalent to:\n \n cursor = some_connection.cursor()\n try:\n do_something_with(cursor)\n except:\n some_connection.rollback()\n raise\n else:\n some_connection.commit()\n finally:\n cursor.close()\n \n "), /*tp_doc*/ - __pyx_tp_traverse_6oursql_Connection, /*tp_traverse*/ - __pyx_tp_clear_6oursql_Connection, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - __pyx_methods_6oursql_Connection, /*tp_methods*/ - 0, /*tp_members*/ - __pyx_getsets_6oursql_Connection, /*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_6oursql_Connection, /*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 PyObject *__pyx_tp_new_6oursql__DictWhateverMixin(PyTypeObject *t, PyObject *a, PyObject *k) { - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; +static PyObject *__pyx_tp_new_6oursql__DictWhateverMixin(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; return o; } @@ -19482,108 +20977,10 @@ } static PyMethodDef __pyx_methods_6oursql__DictWhateverMixin[] = { - {__Pyx_NAMESTR("fetchone"), (PyCFunction)__pyx_pf_6oursql_18_DictWhateverMixin_fetchone, METH_NOARGS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("fetchone"), (PyCFunction)__pyx_pw_6oursql_18_DictWhateverMixin_1fetchone, METH_NOARGS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number__DictWhateverMixin = { - 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__DictWhateverMixin = { - 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__DictWhateverMixin = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer__DictWhateverMixin = { - #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_6oursql__DictWhateverMixin = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("oursql._DictWhateverMixin"), /*tp_name*/ @@ -19599,16 +20996,16 @@ 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number__DictWhateverMixin, /*tp_as_number*/ - &__pyx_tp_as_sequence__DictWhateverMixin, /*tp_as_sequence*/ - &__pyx_tp_as_mapping__DictWhateverMixin, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer__DictWhateverMixin, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ @@ -19640,9 +21037,10 @@ #endif }; -static PyObject *__pyx_tp_new_6oursql__AbstractIterWrapper(PyTypeObject *t, PyObject *a, PyObject *k) { - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; +static PyObject *__pyx_tp_new_6oursql__AbstractIterWrapper(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; return o; } @@ -19654,104 +21052,6 @@ {0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number__AbstractIterWrapper = { - 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__AbstractIterWrapper = { - 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__AbstractIterWrapper = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer__AbstractIterWrapper = { - #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_6oursql__AbstractIterWrapper = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("oursql._AbstractIterWrapper"), /*tp_name*/ @@ -19767,22 +21067,22 @@ 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number__AbstractIterWrapper, /*tp_as_number*/ - &__pyx_tp_as_sequence__AbstractIterWrapper, /*tp_as_sequence*/ - &__pyx_tp_as_mapping__AbstractIterWrapper, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer__AbstractIterWrapper, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pf_6oursql_20_AbstractIterWrapper___iter__, /*tp_iter*/ + __pyx_pw_6oursql_20_AbstractIterWrapper_1__iter__, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6oursql__AbstractIterWrapper, /*tp_methods*/ 0, /*tp_members*/ @@ -19808,125 +21108,73 @@ #endif }; -static PyObject *__pyx_tp_new_6oursql__BinaryWhateverMixin(PyTypeObject *t, PyObject *a, PyObject *k) { - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; +static PyObject *__pyx_tp_new_6oursql_FileWrapper(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_6oursql_FileWrapper *p; + PyObject *o = __pyx_tp_new_6oursql__AbstractIterWrapper(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_6oursql_FileWrapper *)o); + p->fileobj = Py_None; Py_INCREF(Py_None); + p->chunksize = Py_None; Py_INCREF(Py_None); + p->readfunc = Py_None; Py_INCREF(Py_None); + if (unlikely(__pyx_pw_6oursql_11FileWrapper_1__cinit__(o, a, k) < 0)) { + Py_DECREF(o); o = 0; + } return o; } -static void __pyx_tp_dealloc_6oursql__BinaryWhateverMixin(PyObject *o) { - (*Py_TYPE(o)->tp_free)(o); +static void __pyx_tp_dealloc_6oursql_FileWrapper(PyObject *o) { + struct __pyx_obj_6oursql_FileWrapper *p = (struct __pyx_obj_6oursql_FileWrapper *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->fileobj); + Py_CLEAR(p->chunksize); + Py_CLEAR(p->readfunc); + PyObject_GC_Track(o); + __pyx_tp_dealloc_6oursql__AbstractIterWrapper(o); } -static PyMethodDef __pyx_methods_6oursql__BinaryWhateverMixin[] = { - {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_6oursql_20_BinaryWhateverMixin___next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)}, - {0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number__BinaryWhateverMixin = { - 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__BinaryWhateverMixin = { - 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 int __pyx_tp_traverse_6oursql_FileWrapper(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_6oursql_FileWrapper *p = (struct __pyx_obj_6oursql_FileWrapper *)o; + e = ((likely(__pyx_ptype_6oursql__AbstractIterWrapper)) ? ((__pyx_ptype_6oursql__AbstractIterWrapper->tp_traverse) ? __pyx_ptype_6oursql__AbstractIterWrapper->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_6oursql_FileWrapper)); if (e) return e; + if (p->fileobj) { + e = (*v)(p->fileobj, a); if (e) return e; + } + if (p->chunksize) { + e = (*v)(p->chunksize, a); if (e) return e; + } + if (p->readfunc) { + e = (*v)(p->readfunc, a); if (e) return e; + } + return 0; +} -static PyMappingMethods __pyx_tp_as_mapping__BinaryWhateverMixin = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; +static int __pyx_tp_clear_6oursql_FileWrapper(PyObject *o) { + struct __pyx_obj_6oursql_FileWrapper *p = (struct __pyx_obj_6oursql_FileWrapper *)o; + PyObject* tmp; + if (likely(__pyx_ptype_6oursql__AbstractIterWrapper)) { if (__pyx_ptype_6oursql__AbstractIterWrapper->tp_clear) __pyx_ptype_6oursql__AbstractIterWrapper->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_6oursql_FileWrapper); + tmp = ((PyObject*)p->fileobj); + p->fileobj = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->chunksize); + p->chunksize = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->readfunc); + p->readfunc = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} -static PyBufferProcs __pyx_tp_as_buffer__BinaryWhateverMixin = { - #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 PyMethodDef __pyx_methods_6oursql_FileWrapper[] = { + {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_6oursql_11FileWrapper_3__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)}, + {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_6oursql__BinaryWhateverMixin = { +static PyTypeObject __pyx_type_6oursql_FileWrapper = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("oursql._BinaryWhateverMixin"), /*tp_name*/ - sizeof(struct __pyx_obj_6oursql__BinaryWhateverMixin), /*tp_basicsize*/ + __Pyx_NAMESTR("oursql.FileWrapper"), /*tp_name*/ + sizeof(struct __pyx_obj_6oursql_FileWrapper), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_6oursql__BinaryWhateverMixin, /*tp_dealloc*/ + __pyx_tp_dealloc_6oursql_FileWrapper, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -19936,24 +21184,28 @@ 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number__BinaryWhateverMixin, /*tp_as_number*/ - &__pyx_tp_as_sequence__BinaryWhateverMixin, /*tp_as_sequence*/ - &__pyx_tp_as_mapping__BinaryWhateverMixin, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer__BinaryWhateverMixin, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ - 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + __Pyx_DOCSTR("FileWrapper(fileobj, chunksize=8192, doclose=False)\n \n FileWrapper is a wrapper class for file-like objects so that their contents\n can be streamed over the wire as a bound parameter for a query. Strings \n read from the wrapped file are assumed to be text and not arbitrary bytes.\n \n Strings will be read by calling the 'read' method on the file object with\n the 'chunksize' parameter until it returns the empty string. If 'doclose'\n is true, the file will have its 'close' method called once it has been \n exhausted.\n "), /*tp_doc*/ + __pyx_tp_traverse_6oursql_FileWrapper, /*tp_traverse*/ + __pyx_tp_clear_6oursql_FileWrapper, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ + #if CYTHON_COMPILING_IN_PYPY + __pyx_pw_6oursql_20_AbstractIterWrapper_1__iter__, /*tp_iter*/ + #else 0, /*tp_iter*/ - __pyx_pf_6oursql_20_BinaryWhateverMixin___next__, /*tp_iternext*/ - __pyx_methods_6oursql__BinaryWhateverMixin, /*tp_methods*/ + #endif + __pyx_pw_6oursql_11FileWrapper_3__next__, /*tp_iternext*/ + __pyx_methods_6oursql_FileWrapper, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -19963,7 +21215,7 @@ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_6oursql__BinaryWhateverMixin, /*tp_new*/ + __pyx_tp_new_6oursql_FileWrapper, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -19976,166 +21228,154 @@ 0, /*tp_version_tag*/ #endif }; +static struct __pyx_vtabstruct_6oursql__Query __pyx_vtable_6oursql__Query; -static PyObject *__pyx_tp_new_6oursql_IterWrapper(PyTypeObject *t, PyObject *a, PyObject *k) { - struct __pyx_obj_6oursql_IterWrapper *p; - PyObject *o = __pyx_tp_new_6oursql__AbstractIterWrapper(t, a, k); - if (!o) return 0; - p = ((struct __pyx_obj_6oursql_IterWrapper *)o); - p->iterobj = Py_None; Py_INCREF(Py_None); - p->nextfunc = Py_None; Py_INCREF(Py_None); - if (__pyx_pf_6oursql_11IterWrapper___cinit__(o, a, k) < 0) { +static PyObject *__pyx_tp_new_6oursql__Query(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_6oursql__Query *p; + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_6oursql__Query *)o); + p->__pyx_vtab = __pyx_vtabptr_6oursql__Query; + p->conn = ((struct __pyx_obj_6oursql_Connection *)Py_None); Py_INCREF(Py_None); + p->result = Py_None; Py_INCREF(Py_None); + p->res_a = Py_None; Py_INCREF(Py_None); + p->res_kw = Py_None; Py_INCREF(Py_None); + p->rowcount = Py_None; Py_INCREF(Py_None); + p->lastrowid = Py_None; Py_INCREF(Py_None); + p->description = Py_None; Py_INCREF(Py_None); + p->warnings = Py_None; Py_INCREF(Py_None); + p->has_result = Py_None; Py_INCREF(Py_None); + if (unlikely(__pyx_pw_6oursql_6_Query_1__cinit__(o, a, k) < 0)) { Py_DECREF(o); o = 0; } return o; } -static void __pyx_tp_dealloc_6oursql_IterWrapper(PyObject *o) { - struct __pyx_obj_6oursql_IterWrapper *p = (struct __pyx_obj_6oursql_IterWrapper *)o; - Py_XDECREF(p->iterobj); - Py_XDECREF(p->nextfunc); - __pyx_tp_dealloc_6oursql__AbstractIterWrapper(o); +static void __pyx_tp_dealloc_6oursql__Query(PyObject *o) { + struct __pyx_obj_6oursql__Query *p = (struct __pyx_obj_6oursql__Query *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->conn); + Py_CLEAR(p->result); + Py_CLEAR(p->res_a); + Py_CLEAR(p->res_kw); + Py_CLEAR(p->rowcount); + Py_CLEAR(p->lastrowid); + Py_CLEAR(p->description); + Py_CLEAR(p->warnings); + Py_CLEAR(p->has_result); + (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_6oursql_IterWrapper(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_6oursql__Query(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_6oursql_IterWrapper *p = (struct __pyx_obj_6oursql_IterWrapper *)o; - if (__pyx_ptype_6oursql__AbstractIterWrapper->tp_traverse) { - e = __pyx_ptype_6oursql__AbstractIterWrapper->tp_traverse(o, v, a); if (e) return e; + struct __pyx_obj_6oursql__Query *p = (struct __pyx_obj_6oursql__Query *)o; + if (p->conn) { + e = (*v)(((PyObject*)p->conn), a); if (e) return e; } - if (p->iterobj) { - e = (*v)(p->iterobj, a); if (e) return e; + if (p->result) { + e = (*v)(p->result, a); if (e) return e; } - if (p->nextfunc) { - e = (*v)(p->nextfunc, a); if (e) return e; + if (p->res_a) { + e = (*v)(p->res_a, a); if (e) return e; + } + if (p->res_kw) { + e = (*v)(p->res_kw, a); if (e) return e; + } + if (p->rowcount) { + e = (*v)(p->rowcount, a); if (e) return e; + } + if (p->lastrowid) { + e = (*v)(p->lastrowid, a); if (e) return e; + } + if (p->description) { + e = (*v)(p->description, a); if (e) return e; + } + if (p->warnings) { + e = (*v)(p->warnings, a); if (e) return e; + } + if (p->has_result) { + e = (*v)(p->has_result, a); if (e) return e; } return 0; } -static int __pyx_tp_clear_6oursql_IterWrapper(PyObject *o) { - struct __pyx_obj_6oursql_IterWrapper *p = (struct __pyx_obj_6oursql_IterWrapper *)o; +static int __pyx_tp_clear_6oursql__Query(PyObject *o) { + struct __pyx_obj_6oursql__Query *p = (struct __pyx_obj_6oursql__Query *)o; PyObject* tmp; - if (__pyx_ptype_6oursql__AbstractIterWrapper->tp_clear) { - __pyx_ptype_6oursql__AbstractIterWrapper->tp_clear(o); - } - tmp = ((PyObject*)p->iterobj); - p->iterobj = Py_None; Py_INCREF(Py_None); + tmp = ((PyObject*)p->conn); + p->conn = ((struct __pyx_obj_6oursql_Connection *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); - tmp = ((PyObject*)p->nextfunc); - p->nextfunc = Py_None; Py_INCREF(Py_None); + tmp = ((PyObject*)p->result); + p->result = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->res_a); + p->res_a = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->res_kw); + p->res_kw = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->rowcount); + p->rowcount = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->lastrowid); + p->lastrowid = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->description); + p->description = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->warnings); + p->warnings = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->has_result); + p->has_result = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_6oursql_IterWrapper[] = { - {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_6oursql_11IterWrapper_1__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)}, - {0, 0, 0, 0} -}; +static PyObject *__pyx_getprop_6oursql_6_Query_rowcount(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_6_Query_8rowcount_1__get__(o); +} -static PyNumberMethods __pyx_tp_as_number_IterWrapper = { - 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 PyObject *__pyx_getprop_6oursql_6_Query_lastrowid(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_6_Query_9lastrowid_1__get__(o); +} -static PySequenceMethods __pyx_tp_as_sequence_IterWrapper = { - 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 PyObject *__pyx_getprop_6oursql_6_Query_description(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_6_Query_11description_1__get__(o); +} + +static PyObject *__pyx_getprop_6oursql_6_Query_warnings(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_6_Query_8warnings_1__get__(o); +} + +static PyObject *__pyx_getprop_6oursql_6_Query_has_result(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_6_Query_10has_result_1__get__(o); +} -static PyMappingMethods __pyx_tp_as_mapping_IterWrapper = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ +static PyMethodDef __pyx_methods_6oursql__Query[] = { + {__Pyx_NAMESTR("new_result"), (PyCFunction)__pyx_pw_6oursql_6_Query_3new_result, METH_NOARGS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("nextset"), (PyCFunction)__pyx_pw_6oursql_6_Query_5nextset, METH_NOARGS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("fetchone"), (PyCFunction)__pyx_pw_6oursql_6_Query_7fetchone, METH_NOARGS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("fetchall"), (PyCFunction)__pyx_pw_6oursql_6_Query_11fetchall, METH_NOARGS, __Pyx_DOCSTR(0)}, + {0, 0, 0, 0} }; -static PyBufferProcs __pyx_tp_as_buffer_IterWrapper = { - #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 struct PyGetSetDef __pyx_getsets_6oursql__Query[] = { + {(char *)"rowcount", __pyx_getprop_6oursql_6_Query_rowcount, 0, 0, 0}, + {(char *)"lastrowid", __pyx_getprop_6oursql_6_Query_lastrowid, 0, 0, 0}, + {(char *)"description", __pyx_getprop_6oursql_6_Query_description, 0, 0, 0}, + {(char *)"warnings", __pyx_getprop_6oursql_6_Query_warnings, 0, 0, 0}, + {(char *)"has_result", __pyx_getprop_6oursql_6_Query_has_result, 0, 0, 0}, + {0, 0, 0, 0, 0} }; -static PyTypeObject __pyx_type_6oursql_IterWrapper = { +static PyTypeObject __pyx_type_6oursql__Query = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("oursql.IterWrapper"), /*tp_name*/ - sizeof(struct __pyx_obj_6oursql_IterWrapper), /*tp_basicsize*/ + __Pyx_NAMESTR("oursql._Query"), /*tp_name*/ + sizeof(struct __pyx_obj_6oursql__Query), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_6oursql_IterWrapper, /*tp_dealloc*/ + __pyx_tp_dealloc_6oursql__Query, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -20145,26 +21385,26 @@ 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_IterWrapper, /*tp_as_number*/ - &__pyx_tp_as_sequence_IterWrapper, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_IterWrapper, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_IterWrapper, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - __Pyx_DOCSTR("IterWrapper(iterobj)\n \n IterWrapper is a wrapper class for arbitrary string-yielding iterable \n objects so that their contents can be streamed over the wire as a bound \n parameter for a query. The strings are assumed to be text and not arbitrary\n bytes.\n "), /*tp_doc*/ - __pyx_tp_traverse_6oursql_IterWrapper, /*tp_traverse*/ - __pyx_tp_clear_6oursql_IterWrapper, /*tp_clear*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + __Pyx_DOCSTR("_Query(...)\n \n _Queries generate _ResultSets. Eventually they will also support generating\n multiple _ResultSets when dealing with queries that produce multiple result\n sets.\n "), /*tp_doc*/ + __pyx_tp_traverse_6oursql__Query, /*tp_traverse*/ + __pyx_tp_clear_6oursql__Query, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - __pyx_pf_6oursql_11IterWrapper_1__next__, /*tp_iternext*/ - __pyx_methods_6oursql_IterWrapper, /*tp_methods*/ + __pyx_pw_6oursql_6_Query_9__iter__, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6oursql__Query, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_6oursql__Query, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ @@ -20172,7 +21412,7 @@ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_6oursql_IterWrapper, /*tp_new*/ + __pyx_tp_new_6oursql__Query, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -20186,173 +21426,60 @@ #endif }; -static PyObject *__pyx_tp_new_6oursql_FileWrapper(PyTypeObject *t, PyObject *a, PyObject *k) { - struct __pyx_obj_6oursql_FileWrapper *p; - PyObject *o = __pyx_tp_new_6oursql__AbstractIterWrapper(t, a, k); - if (!o) return 0; - p = ((struct __pyx_obj_6oursql_FileWrapper *)o); - p->fileobj = Py_None; Py_INCREF(Py_None); - p->chunksize = Py_None; Py_INCREF(Py_None); - p->readfunc = Py_None; Py_INCREF(Py_None); - if (__pyx_pf_6oursql_11FileWrapper___cinit__(o, a, k) < 0) { - Py_DECREF(o); o = 0; - } - return o; +static PyObject *__pyx_tp_new_6oursql__DBAPITypeObject(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_6oursql__DBAPITypeObject *p; + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_6oursql__DBAPITypeObject *)o); + p->values = Py_None; Py_INCREF(Py_None); + return o; } -static void __pyx_tp_dealloc_6oursql_FileWrapper(PyObject *o) { - struct __pyx_obj_6oursql_FileWrapper *p = (struct __pyx_obj_6oursql_FileWrapper *)o; - Py_XDECREF(p->fileobj); - Py_XDECREF(p->chunksize); - Py_XDECREF(p->readfunc); - __pyx_tp_dealloc_6oursql__AbstractIterWrapper(o); +static void __pyx_tp_dealloc_6oursql__DBAPITypeObject(PyObject *o) { + struct __pyx_obj_6oursql__DBAPITypeObject *p = (struct __pyx_obj_6oursql__DBAPITypeObject *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->values); + (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_6oursql_FileWrapper(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_6oursql__DBAPITypeObject(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_6oursql_FileWrapper *p = (struct __pyx_obj_6oursql_FileWrapper *)o; - if (__pyx_ptype_6oursql__AbstractIterWrapper->tp_traverse) { - e = __pyx_ptype_6oursql__AbstractIterWrapper->tp_traverse(o, v, a); if (e) return e; - } - if (p->fileobj) { - e = (*v)(p->fileobj, a); if (e) return e; - } - if (p->chunksize) { - e = (*v)(p->chunksize, a); if (e) return e; - } - if (p->readfunc) { - e = (*v)(p->readfunc, a); if (e) return e; + struct __pyx_obj_6oursql__DBAPITypeObject *p = (struct __pyx_obj_6oursql__DBAPITypeObject *)o; + if (p->values) { + e = (*v)(p->values, a); if (e) return e; } return 0; } -static int __pyx_tp_clear_6oursql_FileWrapper(PyObject *o) { - struct __pyx_obj_6oursql_FileWrapper *p = (struct __pyx_obj_6oursql_FileWrapper *)o; +static int __pyx_tp_clear_6oursql__DBAPITypeObject(PyObject *o) { + struct __pyx_obj_6oursql__DBAPITypeObject *p = (struct __pyx_obj_6oursql__DBAPITypeObject *)o; PyObject* tmp; - if (__pyx_ptype_6oursql__AbstractIterWrapper->tp_clear) { - __pyx_ptype_6oursql__AbstractIterWrapper->tp_clear(o); - } - tmp = ((PyObject*)p->fileobj); - p->fileobj = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->chunksize); - p->chunksize = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->readfunc); - p->readfunc = Py_None; Py_INCREF(Py_None); + tmp = ((PyObject*)p->values); + p->values = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_6oursql_FileWrapper[] = { - {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_6oursql_11FileWrapper_1__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)}, - {0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number_FileWrapper = { - 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_FileWrapper = { - 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 PyObject *__pyx_getprop_6oursql_16_DBAPITypeObject_values(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_16_DBAPITypeObject_6values_1__get__(o); +} -static PyMappingMethods __pyx_tp_as_mapping_FileWrapper = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ +static PyMethodDef __pyx_methods_6oursql__DBAPITypeObject[] = { + {0, 0, 0, 0} }; -static PyBufferProcs __pyx_tp_as_buffer_FileWrapper = { - #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 struct PyGetSetDef __pyx_getsets_6oursql__DBAPITypeObject[] = { + {(char *)"values", __pyx_getprop_6oursql_16_DBAPITypeObject_values, 0, 0, 0}, + {0, 0, 0, 0, 0} }; -static PyTypeObject __pyx_type_6oursql_FileWrapper = { +static PyTypeObject __pyx_type_6oursql__DBAPITypeObject = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("oursql.FileWrapper"), /*tp_name*/ - sizeof(struct __pyx_obj_6oursql_FileWrapper), /*tp_basicsize*/ + __Pyx_NAMESTR("oursql._DBAPITypeObject"), /*tp_name*/ + sizeof(struct __pyx_obj_6oursql__DBAPITypeObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_6oursql_FileWrapper, /*tp_dealloc*/ + __pyx_tp_dealloc_6oursql__DBAPITypeObject, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -20361,35 +21488,35 @@ #else 0, /*reserved*/ #endif - 0, /*tp_repr*/ - &__pyx_tp_as_number_FileWrapper, /*tp_as_number*/ - &__pyx_tp_as_sequence_FileWrapper, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_FileWrapper, /*tp_as_mapping*/ + __pyx_pw_6oursql_16_DBAPITypeObject_5__repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_FileWrapper, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - __Pyx_DOCSTR("FileWrapper(fileobj, chunksize=8192, doclose=False)\n \n FileWrapper is a wrapper class for file-like objects so that their contents\n can be streamed over the wire as a bound parameter for a query. Strings \n read from the wrapped file are assumed to be text and not arbitrary bytes.\n \n Strings will be read by calling the 'read' method on the file object with\n the 'chunksize' parameter until it returns the empty string. If 'doclose'\n is true, the file will have its 'close' method called once it has been \n exhausted.\n "), /*tp_doc*/ - __pyx_tp_traverse_6oursql_FileWrapper, /*tp_traverse*/ - __pyx_tp_clear_6oursql_FileWrapper, /*tp_clear*/ - 0, /*tp_richcompare*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_6oursql__DBAPITypeObject, /*tp_traverse*/ + __pyx_tp_clear_6oursql__DBAPITypeObject, /*tp_clear*/ + __pyx_pw_6oursql_16_DBAPITypeObject_3__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ - __pyx_pf_6oursql_11FileWrapper_1__next__, /*tp_iternext*/ - __pyx_methods_6oursql_FileWrapper, /*tp_methods*/ + 0, /*tp_iternext*/ + __pyx_methods_6oursql__DBAPITypeObject, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_6oursql__DBAPITypeObject, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - 0, /*tp_init*/ + __pyx_pw_6oursql_16_DBAPITypeObject_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_6oursql_FileWrapper, /*tp_new*/ + __pyx_tp_new_6oursql__DBAPITypeObject, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -20406,14 +21533,15 @@ static PyObject *__pyx_tp_new_6oursql__Statement(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6oursql__Statement *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6oursql__Statement *)o); p->__pyx_vtab = __pyx_vtabptr_6oursql__Statement; p->__weakref__ = 0; p->conn = ((struct __pyx_obj_6oursql_Connection *)Py_None); Py_INCREF(Py_None); p->warnings = Py_None; Py_INCREF(Py_None); - if (__pyx_pf_6oursql_10_Statement___cinit__(o, a, k) < 0) { + if (unlikely(__pyx_pw_6oursql_10_Statement_1__cinit__(o, a, k) < 0)) { Py_DECREF(o); o = 0; } return o; @@ -20421,18 +21549,19 @@ static void __pyx_tp_dealloc_6oursql__Statement(PyObject *o) { struct __pyx_obj_6oursql__Statement *p = (struct __pyx_obj_6oursql__Statement *)o; + PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); - __pyx_pf_6oursql_10_Statement_1__dealloc__(o); + __pyx_pw_6oursql_10_Statement_3__dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } if (p->__weakref__) PyObject_ClearWeakRefs(o); - Py_XDECREF(((PyObject *)p->conn)); - Py_XDECREF(p->warnings); + Py_CLEAR(p->conn); + Py_CLEAR(p->warnings); (*Py_TYPE(o)->tp_free)(o); } @@ -20460,13 +21589,13 @@ return 0; } -static PyObject *__pyx_getprop_6oursql_10_Statement_string_limit(PyObject *o, void *x) { - return __pyx_pf_6oursql_10_Statement_12string_limit___get__(o); +static PyObject *__pyx_getprop_6oursql_10_Statement_string_limit(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_10_Statement_12string_limit_1__get__(o); } -static int __pyx_setprop_6oursql_10_Statement_string_limit(PyObject *o, PyObject *v, void *x) { +static int __pyx_setprop_6oursql_10_Statement_string_limit(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pf_6oursql_10_Statement_12string_limit_1__set__(o, v); + return __pyx_pw_6oursql_10_Statement_12string_limit_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -20474,33 +21603,33 @@ } } -static PyObject *__pyx_getprop_6oursql_10_Statement_has_result(PyObject *o, void *x) { - return __pyx_pf_6oursql_10_Statement_10has_result___get__(o); +static PyObject *__pyx_getprop_6oursql_10_Statement_has_result(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_10_Statement_10has_result_1__get__(o); } -static PyObject *__pyx_getprop_6oursql_10_Statement_description(PyObject *o, void *x) { - return __pyx_pf_6oursql_10_Statement_11description___get__(o); +static PyObject *__pyx_getprop_6oursql_10_Statement_description(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_10_Statement_11description_1__get__(o); } -static PyObject *__pyx_getprop_6oursql_10_Statement_column_names(PyObject *o, void *x) { - return __pyx_pf_6oursql_10_Statement_12column_names___get__(o); +static PyObject *__pyx_getprop_6oursql_10_Statement_column_names(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_10_Statement_12column_names_1__get__(o); } -static PyObject *__pyx_getprop_6oursql_10_Statement_rowcount(PyObject *o, void *x) { - return __pyx_pf_6oursql_10_Statement_8rowcount___get__(o); +static PyObject *__pyx_getprop_6oursql_10_Statement_rowcount(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_10_Statement_8rowcount_1__get__(o); } -static PyObject *__pyx_getprop_6oursql_10_Statement_lastrowid(PyObject *o, void *x) { - return __pyx_pf_6oursql_10_Statement_9lastrowid___get__(o); +static PyObject *__pyx_getprop_6oursql_10_Statement_lastrowid(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_10_Statement_9lastrowid_1__get__(o); } -static PyObject *__pyx_getprop_6oursql_10_Statement_prefetch_rows(PyObject *o, void *x) { - return __pyx_pf_6oursql_10_Statement_13prefetch_rows___get__(o); +static PyObject *__pyx_getprop_6oursql_10_Statement_prefetch_rows(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_10_Statement_13prefetch_rows_1__get__(o); } -static int __pyx_setprop_6oursql_10_Statement_prefetch_rows(PyObject *o, PyObject *v, void *x) { +static int __pyx_setprop_6oursql_10_Statement_prefetch_rows(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pf_6oursql_10_Statement_13prefetch_rows_1__set__(o, v); + return __pyx_pw_6oursql_10_Statement_13prefetch_rows_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -20508,27 +21637,27 @@ } } -static PyObject *__pyx_getprop_6oursql_10_Statement_warnings(PyObject *o, void *x) { - return __pyx_pf_6oursql_10_Statement_8warnings___get__(o); +static PyObject *__pyx_getprop_6oursql_10_Statement_warnings(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_10_Statement_8warnings_1__get__(o); } -static int __pyx_setprop_6oursql_10_Statement_warnings(PyObject *o, PyObject *v, void *x) { +static int __pyx_setprop_6oursql_10_Statement_warnings(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pf_6oursql_10_Statement_8warnings_1__set__(o, v); + return __pyx_pw_6oursql_10_Statement_8warnings_3__set__(o, v); } else { - return __pyx_pf_6oursql_10_Statement_8warnings_2__del__(o); + return __pyx_pw_6oursql_10_Statement_8warnings_5__del__(o); } } static PyMethodDef __pyx_methods_6oursql__Statement[] = { - {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pf_6oursql_10_Statement_2close, METH_NOARGS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("prepare"), (PyCFunction)__pyx_pf_6oursql_10_Statement_3prepare, METH_O, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("execute"), (PyCFunction)__pyx_pf_6oursql_10_Statement_4execute, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("fetchone"), (PyCFunction)__pyx_pf_6oursql_10_Statement_5fetchone, METH_NOARGS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("fetchall"), (PyCFunction)__pyx_pf_6oursql_10_Statement_6fetchall, METH_NOARGS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("buffer_results"), (PyCFunction)__pyx_pf_6oursql_10_Statement_7buffer_results, METH_NOARGS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("nextset"), (PyCFunction)__pyx_pf_6oursql_10_Statement_8nextset, METH_NOARGS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pw_6oursql_10_Statement_5close, METH_NOARGS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("prepare"), (PyCFunction)__pyx_pw_6oursql_10_Statement_7prepare, METH_O, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("execute"), (PyCFunction)__pyx_pw_6oursql_10_Statement_9execute, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("fetchone"), (PyCFunction)__pyx_pw_6oursql_10_Statement_11fetchone, METH_NOARGS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("fetchall"), (PyCFunction)__pyx_pw_6oursql_10_Statement_13fetchall, METH_NOARGS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("buffer_results"), (PyCFunction)__pyx_pw_6oursql_10_Statement_15buffer_results, METH_NOARGS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("nextset"), (PyCFunction)__pyx_pw_6oursql_10_Statement_17nextset, METH_NOARGS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; @@ -20544,104 +21673,6 @@ {0, 0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number__Statement = { - 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__Statement = { - 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__Statement = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer__Statement = { - #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_6oursql__Statement = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("oursql._Statement"), /*tp_name*/ @@ -20657,22 +21688,22 @@ 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number__Statement, /*tp_as_number*/ - &__pyx_tp_as_sequence__Statement, /*tp_as_sequence*/ - &__pyx_tp_as_mapping__Statement, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer__Statement, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ __Pyx_DOCSTR("_Statement(...)\n \n A class that represents a prepared statement. You should probably avoid\n touching this, even if it's more stable than _Query/_ResultSet.\n "), /*tp_doc*/ __pyx_tp_traverse_6oursql__Statement, /*tp_traverse*/ __pyx_tp_clear_6oursql__Statement, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pf_6oursql_10_Statement_9__iter__, /*tp_iter*/ + __pyx_pw_6oursql_10_Statement_19__iter__, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6oursql__Statement, /*tp_methods*/ 0, /*tp_members*/ @@ -20700,11 +21731,12 @@ static PyObject *__pyx_tp_new_6oursql__ResultStringStream(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6oursql__ResultStringStream *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6oursql__ResultStringStream *)o); p->stmt = ((struct __pyx_obj_6oursql__Statement *)Py_None); Py_INCREF(Py_None); - if (__pyx_pf_6oursql_19_ResultStringStream___cinit__(o, a, k) < 0) { + if (unlikely(__pyx_pw_6oursql_19_ResultStringStream_1__cinit__(o, a, k) < 0)) { Py_DECREF(o); o = 0; } return o; @@ -20712,7 +21744,8 @@ static void __pyx_tp_dealloc_6oursql__ResultStringStream(PyObject *o) { struct __pyx_obj_6oursql__ResultStringStream *p = (struct __pyx_obj_6oursql__ResultStringStream *)o; - Py_XDECREF(((PyObject *)p->stmt)); + PyObject_GC_UnTrack(o); + Py_CLEAR(p->stmt); (*Py_TYPE(o)->tp_free)(o); } @@ -20735,108 +21768,10 @@ } static PyMethodDef __pyx_methods_6oursql__ResultStringStream[] = { - {__Pyx_NAMESTR("read"), (PyCFunction)__pyx_pf_6oursql_19_ResultStringStream_1read, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6oursql_19_ResultStringStream_1read)}, + {__Pyx_NAMESTR("read"), (PyCFunction)__pyx_pw_6oursql_19_ResultStringStream_3read, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6oursql_19_ResultStringStream_2read)}, {0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number__ResultStringStream = { - 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__ResultStringStream = { - 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__ResultStringStream = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer__ResultStringStream = { - #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_6oursql__ResultStringStream = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("oursql._ResultStringStream"), /*tp_name*/ @@ -20852,16 +21787,16 @@ 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number__ResultStringStream, /*tp_as_number*/ - &__pyx_tp_as_sequence__ResultStringStream, /*tp_as_sequence*/ - &__pyx_tp_as_mapping__ResultStringStream, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer__ResultStringStream, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ __Pyx_DOCSTR("_ResultStringStream(...)\n \n _ResultStringStream represents an incoming stream of binary data from the\n database. You should never ever instantiate this class yourself.\n \n A _ResultStringStream must be used immediately; fetching any additional \n rows from the database will cause it to go out of sync and become unusable.\n "), /*tp_doc*/ __pyx_tp_traverse_6oursql__ResultStringStream, /*tp_traverse*/ __pyx_tp_clear_6oursql__ResultStringStream, /*tp_clear*/ @@ -20892,256 +21827,233 @@ 0, /*tp_version_tag*/ #endif }; -static struct __pyx_vtabstruct_6oursql__ResultSet __pyx_vtable_6oursql__ResultSet; -static PyObject *__pyx_tp_new_6oursql__ResultSet(PyTypeObject *t, PyObject *a, PyObject *k) { - struct __pyx_obj_6oursql__ResultSet *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; - p = ((struct __pyx_obj_6oursql__ResultSet *)o); - p->__pyx_vtab = __pyx_vtabptr_6oursql__ResultSet; - p->conn = ((struct __pyx_obj_6oursql_Connection *)Py_None); Py_INCREF(Py_None); - p->conversion_info = Py_None; Py_INCREF(Py_None); - p->rowcount = Py_None; Py_INCREF(Py_None); - p->lastrowid = Py_None; Py_INCREF(Py_None); - p->description = Py_None; Py_INCREF(Py_None); - p->column_names = Py_None; Py_INCREF(Py_None); - p->warnings = Py_None; Py_INCREF(Py_None); - if (__pyx_pf_6oursql_10_ResultSet___cinit__(o, a, k) < 0) { - Py_DECREF(o); o = 0; - } +static PyObject *__pyx_tp_new_6oursql__BinaryWhateverMixin(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; return o; } -static void __pyx_tp_dealloc_6oursql__ResultSet(PyObject *o) { - struct __pyx_obj_6oursql__ResultSet *p = (struct __pyx_obj_6oursql__ResultSet *)o; - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); - __pyx_pf_6oursql_10_ResultSet_1__dealloc__(o); - if (PyErr_Occurred()) PyErr_WriteUnraisable(o); - --Py_REFCNT(o); - PyErr_Restore(etype, eval, etb); - } - Py_XDECREF(((PyObject *)p->conn)); - Py_XDECREF(p->conversion_info); - Py_XDECREF(p->rowcount); - Py_XDECREF(p->lastrowid); - Py_XDECREF(p->description); - Py_XDECREF(p->column_names); - Py_XDECREF(p->warnings); +static void __pyx_tp_dealloc_6oursql__BinaryWhateverMixin(PyObject *o) { (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_6oursql__ResultSet(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_6oursql__ResultSet *p = (struct __pyx_obj_6oursql__ResultSet *)o; - if (p->conn) { - e = (*v)(((PyObject*)p->conn), a); if (e) return e; - } - if (p->conversion_info) { - e = (*v)(p->conversion_info, a); if (e) return e; - } - if (p->rowcount) { - e = (*v)(p->rowcount, a); if (e) return e; - } - if (p->lastrowid) { - e = (*v)(p->lastrowid, a); if (e) return e; - } - if (p->description) { - e = (*v)(p->description, a); if (e) return e; - } - if (p->column_names) { - e = (*v)(p->column_names, a); if (e) return e; - } - if (p->warnings) { - e = (*v)(p->warnings, a); if (e) return e; - } - return 0; -} - -static int __pyx_tp_clear_6oursql__ResultSet(PyObject *o) { - struct __pyx_obj_6oursql__ResultSet *p = (struct __pyx_obj_6oursql__ResultSet *)o; - PyObject* tmp; - tmp = ((PyObject*)p->conn); - p->conn = ((struct __pyx_obj_6oursql_Connection *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->conversion_info); - p->conversion_info = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->rowcount); - p->rowcount = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->lastrowid); - p->lastrowid = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->description); - p->description = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->column_names); - p->column_names = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->warnings); - p->warnings = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; -} +static PyMethodDef __pyx_methods_6oursql__BinaryWhateverMixin[] = { + {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_6oursql_20_BinaryWhateverMixin_1__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)}, + {0, 0, 0, 0} +}; -static PyObject *__pyx_getprop_6oursql_10_ResultSet_has_result(PyObject *o, void *x) { - return __pyx_pf_6oursql_10_ResultSet_10has_result___get__(o); -} +static PyTypeObject __pyx_type_6oursql__BinaryWhateverMixin = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("oursql._BinaryWhateverMixin"), /*tp_name*/ + sizeof(struct __pyx_obj_6oursql__BinaryWhateverMixin), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6oursql__BinaryWhateverMixin, /*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*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + __pyx_pw_6oursql_20_BinaryWhateverMixin_1__next__, /*tp_iternext*/ + __pyx_methods_6oursql__BinaryWhateverMixin, /*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_6oursql__BinaryWhateverMixin, /*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 struct __pyx_vtabstruct_6oursql_Connection __pyx_vtable_6oursql_Connection; -static PyObject *__pyx_getprop_6oursql_10_ResultSet_rowcount(PyObject *o, void *x) { - return __pyx_pf_6oursql_10_ResultSet_8rowcount___get__(o); +static PyObject *__pyx_tp_new_6oursql_Connection(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_6oursql_Connection *p; + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_6oursql_Connection *)o); + p->__pyx_vtab = __pyx_vtabptr_6oursql_Connection; + p->__weakref__ = 0; + p->_charset = Py_None; Py_INCREF(Py_None); + p->_charset_bytes = Py_None; Py_INCREF(Py_None); + p->_context_cursors = Py_None; Py_INCREF(Py_None); + p->default_cursor = Py_None; Py_INCREF(Py_None); + if (unlikely(__pyx_pw_6oursql_10Connection_1__cinit__(o, a, k) < 0)) { + Py_DECREF(o); o = 0; + } + return o; } -static PyObject *__pyx_getprop_6oursql_10_ResultSet_lastrowid(PyObject *o, void *x) { - return __pyx_pf_6oursql_10_ResultSet_9lastrowid___get__(o); +static void __pyx_tp_dealloc_6oursql_Connection(PyObject *o) { + struct __pyx_obj_6oursql_Connection *p = (struct __pyx_obj_6oursql_Connection *)o; + PyObject_GC_UnTrack(o); + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_6oursql_10Connection_7__dealloc__(o); + if (PyErr_Occurred()) PyErr_WriteUnraisable(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + if (p->__weakref__) PyObject_ClearWeakRefs(o); + Py_CLEAR(p->_charset); + Py_CLEAR(p->_charset_bytes); + Py_CLEAR(p->_context_cursors); + Py_CLEAR(p->default_cursor); + (*Py_TYPE(o)->tp_free)(o); } -static PyObject *__pyx_getprop_6oursql_10_ResultSet_description(PyObject *o, void *x) { - return __pyx_pf_6oursql_10_ResultSet_11description___get__(o); +static int __pyx_tp_traverse_6oursql_Connection(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_6oursql_Connection *p = (struct __pyx_obj_6oursql_Connection *)o; + if (p->_charset) { + e = (*v)(p->_charset, a); if (e) return e; + } + if (p->_charset_bytes) { + e = (*v)(p->_charset_bytes, a); if (e) return e; + } + if (p->_context_cursors) { + e = (*v)(p->_context_cursors, a); if (e) return e; + } + if (p->default_cursor) { + e = (*v)(p->default_cursor, a); if (e) return e; + } + return 0; } -static PyObject *__pyx_getprop_6oursql_10_ResultSet_column_names(PyObject *o, void *x) { - return __pyx_pf_6oursql_10_ResultSet_12column_names___get__(o); +static int __pyx_tp_clear_6oursql_Connection(PyObject *o) { + struct __pyx_obj_6oursql_Connection *p = (struct __pyx_obj_6oursql_Connection *)o; + PyObject* tmp; + tmp = ((PyObject*)p->_charset); + p->_charset = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_charset_bytes); + p->_charset_bytes = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_context_cursors); + p->_context_cursors = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->default_cursor); + p->default_cursor = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; } -static PyObject *__pyx_getprop_6oursql_10_ResultSet_warnings(PyObject *o, void *x) { - return __pyx_pf_6oursql_10_ResultSet_8warnings___get__(o); +static PyObject *__pyx_getprop_6oursql_10Connection_charset(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_10Connection_7charset_1__get__(o); } -static int __pyx_setprop_6oursql_10_ResultSet_warnings(PyObject *o, PyObject *v, void *x) { +static int __pyx_setprop_6oursql_10Connection_charset(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pf_6oursql_10_ResultSet_8warnings_1__set__(o, v); + return __pyx_pw_6oursql_10Connection_7charset_3__set__(o, v); } else { - return __pyx_pf_6oursql_10_ResultSet_8warnings_2__del__(o); + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; } } -static PyMethodDef __pyx_methods_6oursql__ResultSet[] = { - {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pf_6oursql_10_ResultSet_2close, METH_NOARGS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("fetchone"), (PyCFunction)__pyx_pf_6oursql_10_ResultSet_3fetchone, METH_NOARGS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("fetchall"), (PyCFunction)__pyx_pf_6oursql_10_ResultSet_4fetchall, METH_NOARGS, __Pyx_DOCSTR(0)}, - {0, 0, 0, 0} -}; +static PyObject *__pyx_getprop_6oursql_10Connection_server_info(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_10Connection_11server_info_1__get__(o); +} -static struct PyGetSetDef __pyx_getsets_6oursql__ResultSet[] = { - {(char *)"has_result", __pyx_getprop_6oursql_10_ResultSet_has_result, 0, 0, 0}, - {(char *)"rowcount", __pyx_getprop_6oursql_10_ResultSet_rowcount, 0, 0, 0}, - {(char *)"lastrowid", __pyx_getprop_6oursql_10_ResultSet_lastrowid, 0, 0, 0}, - {(char *)"description", __pyx_getprop_6oursql_10_ResultSet_description, 0, 0, 0}, - {(char *)"column_names", __pyx_getprop_6oursql_10_ResultSet_column_names, 0, 0, 0}, - {(char *)"warnings", __pyx_getprop_6oursql_10_ResultSet_warnings, __pyx_setprop_6oursql_10_ResultSet_warnings, 0, 0}, - {0, 0, 0, 0, 0} -}; +static PyObject *__pyx_getprop_6oursql_10Connection_ssl_cipher(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_10Connection_10ssl_cipher_1__get__(o); +} -static PyNumberMethods __pyx_tp_as_number__ResultSet = { - 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 PyObject *__pyx_getprop_6oursql_10Connection_use_unicode(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_10Connection_11use_unicode_1__get__(o); +} -static PySequenceMethods __pyx_tp_as_sequence__ResultSet = { - 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 PyObject *__pyx_getprop_6oursql_10Connection_autoping(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_10Connection_8autoping_1__get__(o); +} + +static PyObject *__pyx_getprop_6oursql_10Connection_raise_on_warnings(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_10Connection_17raise_on_warnings_1__get__(o); +} + +static PyObject *__pyx_getprop_6oursql_10Connection_default_cursor(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_10Connection_14default_cursor_1__get__(o); +} + +static int __pyx_setprop_6oursql_10Connection_default_cursor(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_6oursql_10Connection_14default_cursor_3__set__(o, v); + } + else { + return __pyx_pw_6oursql_10Connection_14default_cursor_5__del__(o); + } +} -static PyMappingMethods __pyx_tp_as_mapping__ResultSet = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ +static PyMethodDef __pyx_methods_6oursql_Connection[] = { + {__Pyx_NAMESTR("_setup_ssl_options"), (PyCFunction)__pyx_pw_6oursql_10Connection_3_setup_ssl_options, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pw_6oursql_10Connection_5close, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6oursql_10Connection_4close)}, + {__Pyx_NAMESTR("ping"), (PyCFunction)__pyx_pw_6oursql_10Connection_9ping, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6oursql_10Connection_8ping)}, + {__Pyx_NAMESTR("commit"), (PyCFunction)__pyx_pw_6oursql_10Connection_11commit, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6oursql_10Connection_10commit)}, + {__Pyx_NAMESTR("rollback"), (PyCFunction)__pyx_pw_6oursql_10Connection_13rollback, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6oursql_10Connection_12rollback)}, + {__Pyx_NAMESTR("warning_count"), (PyCFunction)__pyx_pw_6oursql_10Connection_15warning_count, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6oursql_10Connection_14warning_count)}, + {__Pyx_NAMESTR("cursor"), (PyCFunction)__pyx_pw_6oursql_10Connection_17cursor, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6oursql_10Connection_16cursor)}, + {__Pyx_NAMESTR("__enter__"), (PyCFunction)__pyx_pw_6oursql_10Connection_19__enter__, METH_NOARGS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("__exit__"), (PyCFunction)__pyx_pw_6oursql_10Connection_21__exit__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("_escape_string"), (PyCFunction)__pyx_pw_6oursql_10Connection_23_escape_string, METH_O, __Pyx_DOCSTR(__pyx_doc_6oursql_10Connection_22_escape_string)}, + {__Pyx_NAMESTR("_escape_unicode_string"), (PyCFunction)__pyx_pw_6oursql_10Connection_25_escape_unicode_string, METH_O, __Pyx_DOCSTR(__pyx_doc_6oursql_10Connection_24_escape_unicode_string)}, + {0, 0, 0, 0} }; -static PyBufferProcs __pyx_tp_as_buffer__ResultSet = { - #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 struct PyGetSetDef __pyx_getsets_6oursql_Connection[] = { + {(char *)"charset", __pyx_getprop_6oursql_10Connection_charset, __pyx_setprop_6oursql_10Connection_charset, __Pyx_DOCSTR(__pyx_k_68), 0}, + {(char *)"server_info", __pyx_getprop_6oursql_10Connection_server_info, 0, 0, 0}, + {(char *)"ssl_cipher", __pyx_getprop_6oursql_10Connection_ssl_cipher, 0, 0, 0}, + {(char *)"use_unicode", __pyx_getprop_6oursql_10Connection_use_unicode, 0, 0, 0}, + {(char *)"autoping", __pyx_getprop_6oursql_10Connection_autoping, 0, 0, 0}, + {(char *)"raise_on_warnings", __pyx_getprop_6oursql_10Connection_raise_on_warnings, 0, 0, 0}, + {(char *)"default_cursor", __pyx_getprop_6oursql_10Connection_default_cursor, __pyx_setprop_6oursql_10Connection_default_cursor, 0, 0}, + {0, 0, 0, 0, 0} }; -static PyTypeObject __pyx_type_6oursql__ResultSet = { +static PyTypeObject __pyx_type_6oursql_Connection = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("oursql._ResultSet"), /*tp_name*/ - sizeof(struct __pyx_obj_6oursql__ResultSet), /*tp_basicsize*/ + __Pyx_NAMESTR("oursql.Connection"), /*tp_name*/ + sizeof(struct __pyx_obj_6oursql_Connection), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_6oursql__ResultSet, /*tp_dealloc*/ + __pyx_tp_dealloc_6oursql_Connection, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -21151,26 +22063,26 @@ 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number__ResultSet, /*tp_as_number*/ - &__pyx_tp_as_sequence__ResultSet, /*tp_as_sequence*/ - &__pyx_tp_as_mapping__ResultSet, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer__ResultSet, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - __Pyx_DOCSTR("_ResultSet(...)\n \n You should never ever instantiate a _ResultSet yourself unless you really\n know what you're doing. \n "), /*tp_doc*/ - __pyx_tp_traverse_6oursql__ResultSet, /*tp_traverse*/ - __pyx_tp_clear_6oursql__ResultSet, /*tp_clear*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + __Pyx_DOCSTR("Connection([host, user, passwd,] db=None, port=0, unix_socket=None, \n connect_timeout=None, read_timeout=None, write_timeout=None, \n protocol=None, ssl=None, read_default_file=None, \n read_default_group=None, init_command=None, charset_dir=None, \n shared_memory_base_name=None, local_infile=False, \n require_secure_auth=False, report_truncation=True, compress=False, \n found_rows=True, use_unicode=True, charset='utf8', autoping=False, \n default_cursor=None, raise_on_warnings=True, autoreconnect=False)\n \n Connect to the MySQL database. The first three parameters may be passed by \n position, but the rest may only be passed by keyword. All options except \n 'use_unicode', 'charset', 'autoping', 'default_cursor', and \n 'raise_on_warnings' correspond with parameters or flags to the \n mysql_real_connect function, or options to the mysql_options function. \n \n 'protocol' can be one of None, 'tcp', 'socket', 'pipe', or 'memory'. A\n 'protocol' of None will use the default protocol, and values otherwise \n correspond with the potential values of the 'protocol' option in the option \n file.\n \n 'ssl' can either be None or a dict where each key corresponds to a \n parameter of the mysql_ssl_set function, e.g. {'capath': '/etc/ssl/ca', \n 'cipher': 'DHE-RSA-AES256-SHA'}. Unspecified keys are the same as passing\n NULL to that parameter.\n \n If 'use_unicode' is true, oursql will attempt to return unicode wherever \n feasible. If 'charset' is not None, oursql will set the connection charset \n to the value provided. 'charset' defaults to using utf-8. If 'autoping' is \n true, oursql will run the 'ping' method before executing queries or \n fetching results to attempt to prevent connection timeout errors. \n 'default_cursor', if provided, will be used as the default cursor class \n when calling the 'cursor' method. If 'raise_on_warnings' is true, oursql\n will raise a CollatedWarningsError exception if there were any warnings\n produced by running a query.\n \n Connections and their cursors can also be used as context managers.\n \n with some_connection.cursor() as cursor:\n do_something_with(cursor)\n \n Can also be written as:\n \n with some_connection as cursor:\n do_something_with(cursor)\n \n And both are equivalent to:\n \n cursor = some_connection.cursor()\n try:\n do_something_with(cursor)\n except:\n some_connection.rollback()\n raise\n else:\n some_connection.commit()\n finally:\n cursor.close()\n \n "), /*tp_doc*/ + __pyx_tp_traverse_6oursql_Connection, /*tp_traverse*/ + __pyx_tp_clear_6oursql_Connection, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pf_6oursql_10_ResultSet_5__iter__, /*tp_iter*/ + 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_6oursql__ResultSet, /*tp_methods*/ + __pyx_methods_6oursql_Connection, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_6oursql__ResultSet, /*tp_getset*/ + __pyx_getsets_6oursql_Connection, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ @@ -21178,7 +22090,7 @@ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_6oursql__ResultSet, /*tp_new*/ + __pyx_tp_new_6oursql_Connection, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -21191,57 +22103,58 @@ 0, /*tp_version_tag*/ #endif }; -static struct __pyx_vtabstruct_6oursql__Query __pyx_vtable_6oursql__Query; +static struct __pyx_vtabstruct_6oursql__ResultSet __pyx_vtable_6oursql__ResultSet; -static PyObject *__pyx_tp_new_6oursql__Query(PyTypeObject *t, PyObject *a, PyObject *k) { - struct __pyx_obj_6oursql__Query *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; - p = ((struct __pyx_obj_6oursql__Query *)o); - p->__pyx_vtab = __pyx_vtabptr_6oursql__Query; +static PyObject *__pyx_tp_new_6oursql__ResultSet(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_6oursql__ResultSet *p; + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_6oursql__ResultSet *)o); + p->__pyx_vtab = __pyx_vtabptr_6oursql__ResultSet; p->conn = ((struct __pyx_obj_6oursql_Connection *)Py_None); Py_INCREF(Py_None); - p->result = Py_None; Py_INCREF(Py_None); - p->res_a = Py_None; Py_INCREF(Py_None); - p->res_kw = Py_None; Py_INCREF(Py_None); + p->conversion_info = Py_None; Py_INCREF(Py_None); p->rowcount = Py_None; Py_INCREF(Py_None); p->lastrowid = Py_None; Py_INCREF(Py_None); p->description = Py_None; Py_INCREF(Py_None); + p->column_names = Py_None; Py_INCREF(Py_None); p->warnings = Py_None; Py_INCREF(Py_None); - p->has_result = Py_None; Py_INCREF(Py_None); - if (__pyx_pf_6oursql_6_Query___cinit__(o, a, k) < 0) { + if (unlikely(__pyx_pw_6oursql_10_ResultSet_1__cinit__(o, a, k) < 0)) { Py_DECREF(o); o = 0; } return o; } -static void __pyx_tp_dealloc_6oursql__Query(PyObject *o) { - struct __pyx_obj_6oursql__Query *p = (struct __pyx_obj_6oursql__Query *)o; - Py_XDECREF(((PyObject *)p->conn)); - Py_XDECREF(p->result); - Py_XDECREF(p->res_a); - Py_XDECREF(p->res_kw); - Py_XDECREF(p->rowcount); - Py_XDECREF(p->lastrowid); - Py_XDECREF(p->description); - Py_XDECREF(p->warnings); - Py_XDECREF(p->has_result); +static void __pyx_tp_dealloc_6oursql__ResultSet(PyObject *o) { + struct __pyx_obj_6oursql__ResultSet *p = (struct __pyx_obj_6oursql__ResultSet *)o; + PyObject_GC_UnTrack(o); + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_6oursql_10_ResultSet_3__dealloc__(o); + if (PyErr_Occurred()) PyErr_WriteUnraisable(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + Py_CLEAR(p->conn); + Py_CLEAR(p->conversion_info); + Py_CLEAR(p->rowcount); + Py_CLEAR(p->lastrowid); + Py_CLEAR(p->description); + Py_CLEAR(p->column_names); + Py_CLEAR(p->warnings); (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_6oursql__Query(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_6oursql__ResultSet(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_6oursql__Query *p = (struct __pyx_obj_6oursql__Query *)o; + struct __pyx_obj_6oursql__ResultSet *p = (struct __pyx_obj_6oursql__ResultSet *)o; if (p->conn) { e = (*v)(((PyObject*)p->conn), a); if (e) return e; } - if (p->result) { - e = (*v)(p->result, a); if (e) return e; - } - if (p->res_a) { - e = (*v)(p->res_a, a); if (e) return e; - } - if (p->res_kw) { - e = (*v)(p->res_kw, a); if (e) return e; + if (p->conversion_info) { + e = (*v)(p->conversion_info, a); if (e) return e; } if (p->rowcount) { e = (*v)(p->rowcount, a); if (e) return e; @@ -21252,29 +22165,23 @@ if (p->description) { e = (*v)(p->description, a); if (e) return e; } + if (p->column_names) { + e = (*v)(p->column_names, a); if (e) return e; + } if (p->warnings) { e = (*v)(p->warnings, a); if (e) return e; } - if (p->has_result) { - e = (*v)(p->has_result, a); if (e) return e; - } return 0; } -static int __pyx_tp_clear_6oursql__Query(PyObject *o) { - struct __pyx_obj_6oursql__Query *p = (struct __pyx_obj_6oursql__Query *)o; +static int __pyx_tp_clear_6oursql__ResultSet(PyObject *o) { + struct __pyx_obj_6oursql__ResultSet *p = (struct __pyx_obj_6oursql__ResultSet *)o; PyObject* tmp; tmp = ((PyObject*)p->conn); p->conn = ((struct __pyx_obj_6oursql_Connection *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); - tmp = ((PyObject*)p->result); - p->result = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->res_a); - p->res_a = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->res_kw); - p->res_kw = Py_None; Py_INCREF(Py_None); + tmp = ((PyObject*)p->conversion_info); + p->conversion_info = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->rowcount); p->rowcount = Py_None; Py_INCREF(Py_None); @@ -21285,156 +22192,71 @@ tmp = ((PyObject*)p->description); p->description = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); + tmp = ((PyObject*)p->column_names); + p->column_names = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); tmp = ((PyObject*)p->warnings); p->warnings = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); - tmp = ((PyObject*)p->has_result); - p->has_result = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); return 0; } -static PyObject *__pyx_getprop_6oursql_6_Query_rowcount(PyObject *o, void *x) { - return __pyx_pf_6oursql_6_Query_8rowcount___get__(o); +static PyObject *__pyx_getprop_6oursql_10_ResultSet_has_result(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_10_ResultSet_10has_result_1__get__(o); } -static PyObject *__pyx_getprop_6oursql_6_Query_lastrowid(PyObject *o, void *x) { - return __pyx_pf_6oursql_6_Query_9lastrowid___get__(o); +static PyObject *__pyx_getprop_6oursql_10_ResultSet_rowcount(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_10_ResultSet_8rowcount_1__get__(o); } -static PyObject *__pyx_getprop_6oursql_6_Query_description(PyObject *o, void *x) { - return __pyx_pf_6oursql_6_Query_11description___get__(o); +static PyObject *__pyx_getprop_6oursql_10_ResultSet_lastrowid(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_10_ResultSet_9lastrowid_1__get__(o); } -static PyObject *__pyx_getprop_6oursql_6_Query_warnings(PyObject *o, void *x) { - return __pyx_pf_6oursql_6_Query_8warnings___get__(o); +static PyObject *__pyx_getprop_6oursql_10_ResultSet_description(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_10_ResultSet_11description_1__get__(o); } -static PyObject *__pyx_getprop_6oursql_6_Query_has_result(PyObject *o, void *x) { - return __pyx_pf_6oursql_6_Query_10has_result___get__(o); +static PyObject *__pyx_getprop_6oursql_10_ResultSet_column_names(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_10_ResultSet_12column_names_1__get__(o); } -static PyMethodDef __pyx_methods_6oursql__Query[] = { - {__Pyx_NAMESTR("new_result"), (PyCFunction)__pyx_pf_6oursql_6_Query_1new_result, METH_NOARGS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("nextset"), (PyCFunction)__pyx_pf_6oursql_6_Query_2nextset, METH_NOARGS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("fetchone"), (PyCFunction)__pyx_pf_6oursql_6_Query_3fetchone, METH_NOARGS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("fetchall"), (PyCFunction)__pyx_pf_6oursql_6_Query_5fetchall, METH_NOARGS, __Pyx_DOCSTR(0)}, - {0, 0, 0, 0} -}; - -static struct PyGetSetDef __pyx_getsets_6oursql__Query[] = { - {(char *)"rowcount", __pyx_getprop_6oursql_6_Query_rowcount, 0, 0, 0}, - {(char *)"lastrowid", __pyx_getprop_6oursql_6_Query_lastrowid, 0, 0, 0}, - {(char *)"description", __pyx_getprop_6oursql_6_Query_description, 0, 0, 0}, - {(char *)"warnings", __pyx_getprop_6oursql_6_Query_warnings, 0, 0, 0}, - {(char *)"has_result", __pyx_getprop_6oursql_6_Query_has_result, 0, 0, 0}, - {0, 0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number__Query = { - 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 PyObject *__pyx_getprop_6oursql_10_ResultSet_warnings(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_10_ResultSet_8warnings_1__get__(o); +} -static PySequenceMethods __pyx_tp_as_sequence__Query = { - 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 int __pyx_setprop_6oursql_10_ResultSet_warnings(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_6oursql_10_ResultSet_8warnings_3__set__(o, v); + } + else { + return __pyx_pw_6oursql_10_ResultSet_8warnings_5__del__(o); + } +} -static PyMappingMethods __pyx_tp_as_mapping__Query = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ +static PyMethodDef __pyx_methods_6oursql__ResultSet[] = { + {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pw_6oursql_10_ResultSet_5close, METH_NOARGS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("fetchone"), (PyCFunction)__pyx_pw_6oursql_10_ResultSet_7fetchone, METH_NOARGS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("fetchall"), (PyCFunction)__pyx_pw_6oursql_10_ResultSet_9fetchall, METH_NOARGS, __Pyx_DOCSTR(0)}, + {0, 0, 0, 0} }; -static PyBufferProcs __pyx_tp_as_buffer__Query = { - #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 struct PyGetSetDef __pyx_getsets_6oursql__ResultSet[] = { + {(char *)"has_result", __pyx_getprop_6oursql_10_ResultSet_has_result, 0, 0, 0}, + {(char *)"rowcount", __pyx_getprop_6oursql_10_ResultSet_rowcount, 0, 0, 0}, + {(char *)"lastrowid", __pyx_getprop_6oursql_10_ResultSet_lastrowid, 0, 0, 0}, + {(char *)"description", __pyx_getprop_6oursql_10_ResultSet_description, 0, 0, 0}, + {(char *)"column_names", __pyx_getprop_6oursql_10_ResultSet_column_names, 0, 0, 0}, + {(char *)"warnings", __pyx_getprop_6oursql_10_ResultSet_warnings, __pyx_setprop_6oursql_10_ResultSet_warnings, 0, 0}, + {0, 0, 0, 0, 0} }; -static PyTypeObject __pyx_type_6oursql__Query = { +static PyTypeObject __pyx_type_6oursql__ResultSet = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("oursql._Query"), /*tp_name*/ - sizeof(struct __pyx_obj_6oursql__Query), /*tp_basicsize*/ + __Pyx_NAMESTR("oursql._ResultSet"), /*tp_name*/ + sizeof(struct __pyx_obj_6oursql__ResultSet), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_6oursql__Query, /*tp_dealloc*/ + __pyx_tp_dealloc_6oursql__ResultSet, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -21444,26 +22266,26 @@ 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number__Query, /*tp_as_number*/ - &__pyx_tp_as_sequence__Query, /*tp_as_sequence*/ - &__pyx_tp_as_mapping__Query, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer__Query, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - __Pyx_DOCSTR("_Query(...)\n \n _Queries generate _ResultSets. Eventually they will also support generating\n multiple _ResultSets when dealing with queries that produce multiple result\n sets.\n "), /*tp_doc*/ - __pyx_tp_traverse_6oursql__Query, /*tp_traverse*/ - __pyx_tp_clear_6oursql__Query, /*tp_clear*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + __Pyx_DOCSTR("_ResultSet(...)\n \n You should never ever instantiate a _ResultSet yourself unless you really\n know what you're doing. \n "), /*tp_doc*/ + __pyx_tp_traverse_6oursql__ResultSet, /*tp_traverse*/ + __pyx_tp_clear_6oursql__ResultSet, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pf_6oursql_6_Query_4__iter__, /*tp_iter*/ + __pyx_pw_6oursql_10_ResultSet_11__iter__, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_6oursql__Query, /*tp_methods*/ + __pyx_methods_6oursql__ResultSet, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_6oursql__Query, /*tp_getset*/ + __pyx_getsets_6oursql__ResultSet, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ @@ -21471,7 +22293,7 @@ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_6oursql__Query, /*tp_new*/ + __pyx_tp_new_6oursql__ResultSet, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -21489,7 +22311,7 @@ static PyObject *__pyx_tp_new_6oursql__DictQuery(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6oursql__DictQuery *p; PyObject *o = __pyx_tp_new_6oursql__Query(t, a, k); - if (!o) return 0; + if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6oursql__DictQuery *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6oursql__Query*)__pyx_vtabptr_6oursql__DictQuery; return o; @@ -21499,110 +22321,125 @@ {0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number__DictQuery = { - 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*/ +static PyTypeObject __pyx_type_6oursql__DictQuery = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("oursql._DictQuery"), /*tp_name*/ + sizeof(struct __pyx_obj_6oursql__DictQuery), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6oursql__Query, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 - 0, /*nb_long*/ + 0, /*tp_compare*/ #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*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_6oursql__Query, /*tp_traverse*/ + __pyx_tp_clear_6oursql__Query, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + #if CYTHON_COMPILING_IN_PYPY + __pyx_pw_6oursql_6_Query_9__iter__, /*tp_iter*/ + #else + 0, /*tp_iter*/ #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*/ + 0, /*tp_iternext*/ + __pyx_methods_6oursql__DictQuery, /*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_6oursql__DictQuery, /*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 PySequenceMethods __pyx_tp_as_sequence__DictQuery = { - 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 PyObject *__pyx_tp_new_6oursql_IterWrapper(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_6oursql_IterWrapper *p; + PyObject *o = __pyx_tp_new_6oursql__AbstractIterWrapper(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_6oursql_IterWrapper *)o); + p->iterobj = Py_None; Py_INCREF(Py_None); + p->nextfunc = Py_None; Py_INCREF(Py_None); + if (unlikely(__pyx_pw_6oursql_11IterWrapper_1__cinit__(o, a, k) < 0)) { + Py_DECREF(o); o = 0; + } + return o; +} -static PyMappingMethods __pyx_tp_as_mapping__DictQuery = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; +static void __pyx_tp_dealloc_6oursql_IterWrapper(PyObject *o) { + struct __pyx_obj_6oursql_IterWrapper *p = (struct __pyx_obj_6oursql_IterWrapper *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->iterobj); + Py_CLEAR(p->nextfunc); + PyObject_GC_Track(o); + __pyx_tp_dealloc_6oursql__AbstractIterWrapper(o); +} -static PyBufferProcs __pyx_tp_as_buffer__DictQuery = { - #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 int __pyx_tp_traverse_6oursql_IterWrapper(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_6oursql_IterWrapper *p = (struct __pyx_obj_6oursql_IterWrapper *)o; + e = ((likely(__pyx_ptype_6oursql__AbstractIterWrapper)) ? ((__pyx_ptype_6oursql__AbstractIterWrapper->tp_traverse) ? __pyx_ptype_6oursql__AbstractIterWrapper->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_6oursql_IterWrapper)); if (e) return e; + if (p->iterobj) { + e = (*v)(p->iterobj, a); if (e) return e; + } + if (p->nextfunc) { + e = (*v)(p->nextfunc, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_6oursql_IterWrapper(PyObject *o) { + struct __pyx_obj_6oursql_IterWrapper *p = (struct __pyx_obj_6oursql_IterWrapper *)o; + PyObject* tmp; + if (likely(__pyx_ptype_6oursql__AbstractIterWrapper)) { if (__pyx_ptype_6oursql__AbstractIterWrapper->tp_clear) __pyx_ptype_6oursql__AbstractIterWrapper->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_6oursql_IterWrapper); + tmp = ((PyObject*)p->iterobj); + p->iterobj = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->nextfunc); + p->nextfunc = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_6oursql_IterWrapper[] = { + {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_6oursql_11IterWrapper_3__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)}, + {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_6oursql__DictQuery = { +static PyTypeObject __pyx_type_6oursql_IterWrapper = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("oursql._DictQuery"), /*tp_name*/ - sizeof(struct __pyx_obj_6oursql__DictQuery), /*tp_basicsize*/ + __Pyx_NAMESTR("oursql.IterWrapper"), /*tp_name*/ + sizeof(struct __pyx_obj_6oursql_IterWrapper), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_6oursql__Query, /*tp_dealloc*/ + __pyx_tp_dealloc_6oursql_IterWrapper, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -21612,24 +22449,28 @@ 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number__DictQuery, /*tp_as_number*/ - &__pyx_tp_as_sequence__DictQuery, /*tp_as_sequence*/ - &__pyx_tp_as_mapping__DictQuery, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer__DictQuery, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - 0, /*tp_doc*/ - __pyx_tp_traverse_6oursql__Query, /*tp_traverse*/ - __pyx_tp_clear_6oursql__Query, /*tp_clear*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + __Pyx_DOCSTR("IterWrapper(iterobj)\n \n IterWrapper is a wrapper class for arbitrary string-yielding iterable \n objects so that their contents can be streamed over the wire as a bound \n parameter for a query. The strings are assumed to be text and not arbitrary\n bytes.\n "), /*tp_doc*/ + __pyx_tp_traverse_6oursql_IterWrapper, /*tp_traverse*/ + __pyx_tp_clear_6oursql_IterWrapper, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ + #if CYTHON_COMPILING_IN_PYPY + __pyx_pw_6oursql_20_AbstractIterWrapper_1__iter__, /*tp_iter*/ + #else 0, /*tp_iter*/ - 0, /*tp_iternext*/ - __pyx_methods_6oursql__DictQuery, /*tp_methods*/ + #endif + __pyx_pw_6oursql_11IterWrapper_3__next__, /*tp_iternext*/ + __pyx_methods_6oursql_IterWrapper, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -21639,7 +22480,7 @@ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_6oursql__DictQuery, /*tp_new*/ + __pyx_tp_new_6oursql_IterWrapper, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -21656,8 +22497,9 @@ static PyObject *__pyx_tp_new_6oursql_Cursor(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6oursql_Cursor *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6oursql_Cursor *)o); p->__pyx_vtab = __pyx_vtabptr_6oursql_Cursor; p->_statements = Py_None; Py_INCREF(Py_None); @@ -21667,7 +22509,7 @@ p->lastrowid = Py_None; Py_INCREF(Py_None); p->description = Py_None; Py_INCREF(Py_None); p->messages = Py_None; Py_INCREF(Py_None); - if (__pyx_pf_6oursql_6Cursor___cinit__(o, a, k) < 0) { + if (unlikely(__pyx_pw_6oursql_6Cursor_1__cinit__(o, a, k) < 0)) { Py_DECREF(o); o = 0; } return o; @@ -21675,13 +22517,14 @@ static void __pyx_tp_dealloc_6oursql_Cursor(PyObject *o) { struct __pyx_obj_6oursql_Cursor *p = (struct __pyx_obj_6oursql_Cursor *)o; - Py_XDECREF(p->_statements); - Py_XDECREF(p->_stmt_kwargs); - Py_XDECREF(((PyObject *)p->conn)); - Py_XDECREF(p->rowcount); - Py_XDECREF(p->lastrowid); - Py_XDECREF(p->description); - Py_XDECREF(p->messages); + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_statements); + Py_CLEAR(p->_stmt_kwargs); + Py_CLEAR(p->conn); + Py_CLEAR(p->rowcount); + Py_CLEAR(p->lastrowid); + Py_CLEAR(p->description); + Py_CLEAR(p->messages); (*Py_TYPE(o)->tp_free)(o); } @@ -21739,41 +22582,41 @@ return 0; } -static PyObject *__pyx_getprop_6oursql_6Cursor_connection(PyObject *o, void *x) { - return __pyx_pf_6oursql_6Cursor_10connection___get__(o); +static PyObject *__pyx_getprop_6oursql_6Cursor_connection(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_6Cursor_10connection_1__get__(o); } -static PyObject *__pyx_getprop_6oursql_6Cursor__statements(PyObject *o, void *x) { - return __pyx_pf_6oursql_6Cursor_11_statements___get__(o); +static PyObject *__pyx_getprop_6oursql_6Cursor__statements(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_6Cursor_11_statements_1__get__(o); } -static PyObject *__pyx_getprop_6oursql_6Cursor__stmt_kwargs(PyObject *o, void *x) { - return __pyx_pf_6oursql_6Cursor_12_stmt_kwargs___get__(o); +static PyObject *__pyx_getprop_6oursql_6Cursor__stmt_kwargs(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_6Cursor_12_stmt_kwargs_1__get__(o); } -static PyObject *__pyx_getprop_6oursql_6Cursor_rowcount(PyObject *o, void *x) { - return __pyx_pf_6oursql_6Cursor_8rowcount___get__(o); +static PyObject *__pyx_getprop_6oursql_6Cursor_rowcount(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_6Cursor_8rowcount_1__get__(o); } -static PyObject *__pyx_getprop_6oursql_6Cursor_lastrowid(PyObject *o, void *x) { - return __pyx_pf_6oursql_6Cursor_9lastrowid___get__(o); +static PyObject *__pyx_getprop_6oursql_6Cursor_lastrowid(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_6Cursor_9lastrowid_1__get__(o); } -static PyObject *__pyx_getprop_6oursql_6Cursor_description(PyObject *o, void *x) { - return __pyx_pf_6oursql_6Cursor_11description___get__(o); +static PyObject *__pyx_getprop_6oursql_6Cursor_description(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_6Cursor_11description_1__get__(o); } -static PyObject *__pyx_getprop_6oursql_6Cursor_messages(PyObject *o, void *x) { - return __pyx_pf_6oursql_6Cursor_8messages___get__(o); +static PyObject *__pyx_getprop_6oursql_6Cursor_messages(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_6Cursor_8messages_1__get__(o); } -static PyObject *__pyx_getprop_6oursql_6Cursor_arraysize(PyObject *o, void *x) { - return __pyx_pf_6oursql_6Cursor_9arraysize___get__(o); +static PyObject *__pyx_getprop_6oursql_6Cursor_arraysize(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6oursql_6Cursor_9arraysize_1__get__(o); } -static int __pyx_setprop_6oursql_6Cursor_arraysize(PyObject *o, PyObject *v, void *x) { +static int __pyx_setprop_6oursql_6Cursor_arraysize(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pf_6oursql_6Cursor_9arraysize_1__set__(o, v); + return __pyx_pw_6oursql_6Cursor_9arraysize_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -21782,21 +22625,21 @@ } static PyMethodDef __pyx_methods_6oursql_Cursor[] = { - {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pf_6oursql_6Cursor_1close, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6oursql_6Cursor_1close)}, - {__Pyx_NAMESTR("_new_statement"), (PyCFunction)__pyx_pf_6oursql_6Cursor_2_new_statement, METH_NOARGS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("_new_query"), (PyCFunction)__pyx_pf_6oursql_6Cursor_3_new_query, METH_O, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("callproc"), (PyCFunction)__pyx_pf_6oursql_6Cursor_4callproc, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6oursql_6Cursor_4callproc)}, - {__Pyx_NAMESTR("_do_autoping"), (PyCFunction)__pyx_pf_6oursql_6Cursor_5_do_autoping, METH_NOARGS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("execute"), (PyCFunction)__pyx_pf_6oursql_6Cursor_6execute, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6oursql_6Cursor_6execute)}, - {__Pyx_NAMESTR("executemany"), (PyCFunction)__pyx_pf_6oursql_6Cursor_7executemany, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6oursql_6Cursor_7executemany)}, - {__Pyx_NAMESTR("nextset"), (PyCFunction)__pyx_pf_6oursql_6Cursor_8nextset, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6oursql_6Cursor_8nextset)}, - {__Pyx_NAMESTR("fetchone"), (PyCFunction)__pyx_pf_6oursql_6Cursor_9fetchone, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6oursql_6Cursor_9fetchone)}, - {__Pyx_NAMESTR("fetchmany"), (PyCFunction)__pyx_pf_6oursql_6Cursor_10fetchmany, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6oursql_6Cursor_10fetchmany)}, - {__Pyx_NAMESTR("fetchall"), (PyCFunction)__pyx_pf_6oursql_6Cursor_11fetchall, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6oursql_6Cursor_11fetchall)}, - {__Pyx_NAMESTR("setinputsizes"), (PyCFunction)__pyx_pf_6oursql_6Cursor_13setinputsizes, METH_O, __Pyx_DOCSTR(__pyx_doc_6oursql_6Cursor_13setinputsizes)}, - {__Pyx_NAMESTR("setoutputsize"), (PyCFunction)__pyx_pf_6oursql_6Cursor_14setoutputsize, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6oursql_6Cursor_14setoutputsize)}, - {__Pyx_NAMESTR("__enter__"), (PyCFunction)__pyx_pf_6oursql_6Cursor_15__enter__, METH_NOARGS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("__exit__"), (PyCFunction)__pyx_pf_6oursql_6Cursor_16__exit__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pw_6oursql_6Cursor_3close, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6oursql_6Cursor_2close)}, + {__Pyx_NAMESTR("_new_statement"), (PyCFunction)__pyx_pw_6oursql_6Cursor_5_new_statement, METH_NOARGS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("_new_query"), (PyCFunction)__pyx_pw_6oursql_6Cursor_7_new_query, METH_O, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("callproc"), (PyCFunction)__pyx_pw_6oursql_6Cursor_9callproc, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6oursql_6Cursor_8callproc)}, + {__Pyx_NAMESTR("_do_autoping"), (PyCFunction)__pyx_pw_6oursql_6Cursor_11_do_autoping, METH_NOARGS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("execute"), (PyCFunction)__pyx_pw_6oursql_6Cursor_13execute, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6oursql_6Cursor_12execute)}, + {__Pyx_NAMESTR("executemany"), (PyCFunction)__pyx_pw_6oursql_6Cursor_15executemany, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6oursql_6Cursor_14executemany)}, + {__Pyx_NAMESTR("nextset"), (PyCFunction)__pyx_pw_6oursql_6Cursor_17nextset, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6oursql_6Cursor_16nextset)}, + {__Pyx_NAMESTR("fetchone"), (PyCFunction)__pyx_pw_6oursql_6Cursor_19fetchone, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6oursql_6Cursor_18fetchone)}, + {__Pyx_NAMESTR("fetchmany"), (PyCFunction)__pyx_pw_6oursql_6Cursor_21fetchmany, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6oursql_6Cursor_20fetchmany)}, + {__Pyx_NAMESTR("fetchall"), (PyCFunction)__pyx_pw_6oursql_6Cursor_23fetchall, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6oursql_6Cursor_22fetchall)}, + {__Pyx_NAMESTR("setinputsizes"), (PyCFunction)__pyx_pw_6oursql_6Cursor_27setinputsizes, METH_O, __Pyx_DOCSTR(__pyx_doc_6oursql_6Cursor_26setinputsizes)}, + {__Pyx_NAMESTR("setoutputsize"), (PyCFunction)__pyx_pw_6oursql_6Cursor_29setoutputsize, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6oursql_6Cursor_28setoutputsize)}, + {__Pyx_NAMESTR("__enter__"), (PyCFunction)__pyx_pw_6oursql_6Cursor_31__enter__, METH_NOARGS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("__exit__"), (PyCFunction)__pyx_pw_6oursql_6Cursor_33__exit__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; @@ -21812,104 +22655,6 @@ {0, 0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_Cursor = { - 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_Cursor = { - 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_Cursor = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_Cursor = { - #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_6oursql_Cursor = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("oursql.Cursor"), /*tp_name*/ @@ -21925,22 +22670,22 @@ 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_Cursor, /*tp_as_number*/ - &__pyx_tp_as_sequence_Cursor, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_Cursor, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_Cursor, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ __Pyx_DOCSTR("Cursor(...)\n \n Cursors should never be instantiated directly. They may be passed other \n options via the Connection.cursor method:\n \n - try_plain_query=True: If this is true, oursql will first attempt to run\n queries as prepared statements, and then fall back to the plain query \n API if MySQL refuses to parameterize the query. Otherwise, oursql will \n only run plain queries if explicitly asked.\n \n - show_table=False: If this is true, the name of the table will be \n prepended to the name of the column in the 'description' attribute of\n the cursor.\n \n - string_limit=0: Set a limit on the size of the buffer oursql will \n allocate when fetching strings over the wire. If the string_limit is \n nonzero, file-like objects will always be returned instead of strings. \n If the size of the string value is greater than the string_limit, the \n string will be streamed as necessary instead of fetched all at once.\n Note: plain queries buffer incoming result differently, and are \n therefore unaffected by the string_limit.\n \n Cursor instances yield tuples to represent rows.\n "), /*tp_doc*/ __pyx_tp_traverse_6oursql_Cursor, /*tp_traverse*/ __pyx_tp_clear_6oursql_Cursor, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pf_6oursql_6Cursor_12__iter__, /*tp_iter*/ + __pyx_pw_6oursql_6Cursor_25__iter__, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6oursql_Cursor, /*tp_methods*/ 0, /*tp_members*/ @@ -21970,7 +22715,7 @@ static PyObject *__pyx_tp_new_6oursql_DictCursor(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6oursql_DictCursor *p; PyObject *o = __pyx_tp_new_6oursql_Cursor(t, a, k); - if (!o) return 0; + if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6oursql_DictCursor *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6oursql_Cursor*)__pyx_vtabptr_6oursql_DictCursor; return o; @@ -21980,104 +22725,6 @@ {0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_DictCursor = { - 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_DictCursor = { - 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_DictCursor = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_DictCursor = { - #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_6oursql_DictCursor = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("oursql.DictCursor"), /*tp_name*/ @@ -22093,22 +22740,26 @@ 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_DictCursor, /*tp_as_number*/ - &__pyx_tp_as_sequence_DictCursor, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_DictCursor, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_DictCursor, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ __Pyx_DOCSTR("DictCursor(...)\n \n Cursors should never be instantiated directly. They may be passed other \n options via the Connection.cursor method. See the documentation for the\n Cursor class for details.\n \n DictCursor instances represent rows as dicts mapping column names or \n aliases to values. These key names are taken from the 'description' \n attribute of the cursor, and are therefore affected by the 'show_table'\n cursor option. A ProgrammingError is raised when fetching a row if there \n were duplicate keys with inequal values.\n "), /*tp_doc*/ __pyx_tp_traverse_6oursql_Cursor, /*tp_traverse*/ __pyx_tp_clear_6oursql_Cursor, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ + #if CYTHON_COMPILING_IN_PYPY + __pyx_pw_6oursql_6Cursor_25__iter__, /*tp_iter*/ + #else 0, /*tp_iter*/ + #endif 0, /*tp_iternext*/ __pyx_methods_6oursql_DictCursor, /*tp_methods*/ 0, /*tp_members*/ @@ -22134,215 +22785,19 @@ #endif }; -static PyObject *__pyx_tp_new_6oursql__DBAPITypeObject(PyTypeObject *t, PyObject *a, PyObject *k) { - struct __pyx_obj_6oursql__DBAPITypeObject *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; - p = ((struct __pyx_obj_6oursql__DBAPITypeObject *)o); - p->values = Py_None; Py_INCREF(Py_None); - return o; -} - -static void __pyx_tp_dealloc_6oursql__DBAPITypeObject(PyObject *o) { - struct __pyx_obj_6oursql__DBAPITypeObject *p = (struct __pyx_obj_6oursql__DBAPITypeObject *)o; - Py_XDECREF(p->values); - (*Py_TYPE(o)->tp_free)(o); -} - -static int __pyx_tp_traverse_6oursql__DBAPITypeObject(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_6oursql__DBAPITypeObject *p = (struct __pyx_obj_6oursql__DBAPITypeObject *)o; - if (p->values) { - e = (*v)(p->values, a); if (e) return e; - } - return 0; -} - -static int __pyx_tp_clear_6oursql__DBAPITypeObject(PyObject *o) { - struct __pyx_obj_6oursql__DBAPITypeObject *p = (struct __pyx_obj_6oursql__DBAPITypeObject *)o; - PyObject* tmp; - tmp = ((PyObject*)p->values); - p->values = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; -} - -static PyObject *__pyx_getprop_6oursql_16_DBAPITypeObject_values(PyObject *o, void *x) { - return __pyx_pf_6oursql_16_DBAPITypeObject_6values___get__(o); -} - -static PyMethodDef __pyx_methods_6oursql__DBAPITypeObject[] = { - {0, 0, 0, 0} -}; - -static struct PyGetSetDef __pyx_getsets_6oursql__DBAPITypeObject[] = { - {(char *)"values", __pyx_getprop_6oursql_16_DBAPITypeObject_values, 0, 0, 0}, - {0, 0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number__DBAPITypeObject = { - 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__DBAPITypeObject = { - 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__DBAPITypeObject = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer__DBAPITypeObject = { - #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_6oursql__DBAPITypeObject = { - PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("oursql._DBAPITypeObject"), /*tp_name*/ - sizeof(struct __pyx_obj_6oursql__DBAPITypeObject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_6oursql__DBAPITypeObject, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 - 0, /*tp_compare*/ - #else - 0, /*reserved*/ - #endif - __pyx_pf_6oursql_16_DBAPITypeObject_2__repr__, /*tp_repr*/ - &__pyx_tp_as_number__DBAPITypeObject, /*tp_as_number*/ - &__pyx_tp_as_sequence__DBAPITypeObject, /*tp_as_sequence*/ - &__pyx_tp_as_mapping__DBAPITypeObject, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - &__pyx_tp_as_buffer__DBAPITypeObject, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - 0, /*tp_doc*/ - __pyx_tp_traverse_6oursql__DBAPITypeObject, /*tp_traverse*/ - __pyx_tp_clear_6oursql__DBAPITypeObject, /*tp_clear*/ - __pyx_pf_6oursql_16_DBAPITypeObject_1__richcmp__, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - __pyx_methods_6oursql__DBAPITypeObject, /*tp_methods*/ - 0, /*tp_members*/ - __pyx_getsets_6oursql__DBAPITypeObject, /*tp_getset*/ - 0, /*tp_base*/ - 0, /*tp_dict*/ - 0, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - 0, /*tp_dictoffset*/ - __pyx_pf_6oursql_16_DBAPITypeObject___init__, /*tp_init*/ - 0, /*tp_alloc*/ - __pyx_tp_new_6oursql__DBAPITypeObject, /*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 = { + #if PY_VERSION_HEX < 0x03020000 + { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, + #else PyModuleDef_HEAD_INIT, + #endif __Pyx_NAMESTR("oursql"), - __Pyx_DOCSTR(__pyx_k_63), /* m_doc */ + __Pyx_DOCSTR(__pyx_k_69), /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ @@ -22354,49 +22809,53 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_u_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 1, 0, 0}, - {&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0}, + {&__pyx_kp_s_100, __pyx_k_100, sizeof(__pyx_k_100), 0, 0, 1, 0}, + {&__pyx_kp_s_102, __pyx_k_102, sizeof(__pyx_k_102), 0, 0, 1, 0}, {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0}, - {&__pyx_n_s_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 0, 1, 1}, {&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0}, - {&__pyx_kp_s_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 0, 1, 0}, - {&__pyx_kp_s_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 0, 1, 0}, - {&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0}, + {&__pyx_n_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 1}, + {&__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_kp_s_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 1, 0}, - {&__pyx_kp_s_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 0, 1, 0}, - {&__pyx_kp_s_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 0, 1, 0}, + {&__pyx_kp_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 0}, + {&__pyx_kp_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 0}, {&__pyx_kp_s_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 0, 1, 0}, {&__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_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_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 0, 1, 0}, - {&__pyx_kp_s_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 0, 1, 0}, + {&__pyx_kp_s_35, __pyx_k_35, sizeof(__pyx_k_35), 0, 0, 1, 0}, + {&__pyx_kp_s_37, __pyx_k_37, sizeof(__pyx_k_37), 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_41, __pyx_k_41, sizeof(__pyx_k_41), 0, 0, 1, 0}, + {&__pyx_kp_s_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 0, 1, 0}, {&__pyx_kp_s_42, __pyx_k_42, sizeof(__pyx_k_42), 0, 0, 1, 0}, {&__pyx_kp_s_44, __pyx_k_44, sizeof(__pyx_k_44), 0, 0, 1, 0}, - {&__pyx_kp_s_46, __pyx_k_46, sizeof(__pyx_k_46), 0, 0, 1, 0}, + {&__pyx_kp_s_45, __pyx_k_45, sizeof(__pyx_k_45), 0, 0, 1, 0}, + {&__pyx_kp_s_47, __pyx_k_47, sizeof(__pyx_k_47), 0, 0, 1, 0}, {&__pyx_kp_s_48, __pyx_k_48, sizeof(__pyx_k_48), 0, 0, 1, 0}, {&__pyx_kp_s_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 1, 0}, - {&__pyx_kp_s_51, __pyx_k_51, sizeof(__pyx_k_51), 0, 0, 1, 0}, - {&__pyx_kp_s_53, __pyx_k_53, sizeof(__pyx_k_53), 0, 0, 1, 0}, - {&__pyx_kp_s_56, __pyx_k_56, sizeof(__pyx_k_56), 0, 0, 1, 0}, - {&__pyx_kp_s_58, __pyx_k_58, sizeof(__pyx_k_58), 0, 0, 1, 0}, + {&__pyx_kp_s_50, __pyx_k_50, sizeof(__pyx_k_50), 0, 0, 1, 0}, + {&__pyx_kp_s_52, __pyx_k_52, sizeof(__pyx_k_52), 0, 0, 1, 0}, + {&__pyx_kp_s_54, __pyx_k_54, sizeof(__pyx_k_54), 0, 0, 1, 0}, + {&__pyx_kp_s_57, __pyx_k_57, sizeof(__pyx_k_57), 0, 0, 1, 0}, + {&__pyx_kp_s_59, __pyx_k_59, sizeof(__pyx_k_59), 0, 0, 1, 0}, {&__pyx_n_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 1}, - {&__pyx_kp_s_60, __pyx_k_60, sizeof(__pyx_k_60), 0, 0, 1, 0}, - {&__pyx_kp_s_61, __pyx_k_61, sizeof(__pyx_k_61), 0, 0, 1, 0}, + {&__pyx_kp_s_62, __pyx_k_62, sizeof(__pyx_k_62), 0, 0, 1, 0}, {&__pyx_kp_s_64, __pyx_k_64, sizeof(__pyx_k_64), 0, 0, 1, 0}, - {&__pyx_kp_s_65, __pyx_k_65, sizeof(__pyx_k_65), 0, 0, 1, 0}, - {&__pyx_n_s_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 0, 1, 1}, + {&__pyx_kp_s_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 0, 1, 0}, {&__pyx_kp_s_67, __pyx_k_67, sizeof(__pyx_k_67), 0, 0, 1, 0}, - {&__pyx_kp_s_68, __pyx_k_68, sizeof(__pyx_k_68), 0, 0, 1, 0}, - {&__pyx_kp_s_69, __pyx_k_69, sizeof(__pyx_k_69), 0, 0, 1, 0}, {&__pyx_kp_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 0}, + {&__pyx_kp_s_70, __pyx_k_70, sizeof(__pyx_k_70), 0, 0, 1, 0}, {&__pyx_kp_s_71, __pyx_k_71, sizeof(__pyx_k_71), 0, 0, 1, 0}, + {&__pyx_kp_s_74, __pyx_k_74, sizeof(__pyx_k_74), 0, 0, 1, 0}, + {&__pyx_n_s_76, __pyx_k_76, sizeof(__pyx_k_76), 0, 0, 1, 1}, + {&__pyx_kp_s_79, __pyx_k_79, sizeof(__pyx_k_79), 0, 0, 1, 0}, + {&__pyx_kp_s_84, __pyx_k_84, sizeof(__pyx_k_84), 0, 0, 1, 0}, + {&__pyx_n_s_87, __pyx_k_87, sizeof(__pyx_k_87), 0, 0, 1, 1}, {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0}, + {&__pyx_kp_s_98, __pyx_k_98, sizeof(__pyx_k_98), 0, 0, 1, 0}, + {&__pyx_kp_s_99, __pyx_k_99, sizeof(__pyx_k_99), 0, 0, 1, 0}, {&__pyx_n_s__BINARY, __pyx_k__BINARY, sizeof(__pyx_k__BINARY), 0, 0, 1, 1}, {&__pyx_n_s__Binary, __pyx_k__Binary, sizeof(__pyx_k__Binary), 0, 0, 1, 1}, {&__pyx_n_s__BinaryFileWrapper, __pyx_k__BinaryFileWrapper, sizeof(__pyx_k__BinaryFileWrapper), 0, 0, 1, 1}, @@ -22441,10 +22900,14 @@ {&__pyx_n_s____doc__, __pyx_k____doc__, sizeof(__pyx_k____doc__), 0, 0, 1, 1}, {&__pyx_n_s____enter__, __pyx_k____enter__, sizeof(__pyx_k____enter__), 0, 0, 1, 1}, {&__pyx_n_s____exit__, __pyx_k____exit__, sizeof(__pyx_k____exit__), 0, 0, 1, 1}, + {&__pyx_n_s____import__, __pyx_k____import__, sizeof(__pyx_k____import__), 0, 0, 1, 1}, {&__pyx_n_s____init__, __pyx_k____init__, sizeof(__pyx_k____init__), 0, 0, 1, 1}, {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1}, + {&__pyx_n_s____metaclass__, __pyx_k____metaclass__, sizeof(__pyx_k____metaclass__), 0, 0, 1, 1}, {&__pyx_n_s____module__, __pyx_k____module__, sizeof(__pyx_k____module__), 0, 0, 1, 1}, {&__pyx_n_s____name__, __pyx_k____name__, sizeof(__pyx_k____name__), 0, 0, 1, 1}, + {&__pyx_n_s____pyx_vtable__, __pyx_k____pyx_vtable__, sizeof(__pyx_k____pyx_vtable__), 0, 0, 1, 1}, + {&__pyx_n_s____qualname__, __pyx_k____qualname__, sizeof(__pyx_k____qualname__), 0, 0, 1, 1}, {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1}, {&__pyx_n_s____version__, __pyx_k____version__, sizeof(__pyx_k____version__), 0, 0, 1, 1}, {&__pyx_n_s___bitval_from_string, __pyx_k___bitval_from_string, sizeof(__pyx_k___bitval_from_string), 0, 0, 1, 1}, @@ -22463,6 +22926,7 @@ {&__pyx_n_s___statement_class, __pyx_k___statement_class, sizeof(__pyx_k___statement_class), 0, 0, 1, 1}, {&__pyx_n_s___time_from_string, __pyx_k___time_from_string, sizeof(__pyx_k___time_from_string), 0, 0, 1, 1}, {&__pyx_n_s__apilevel, __pyx_k__apilevel, sizeof(__pyx_k__apilevel), 0, 0, 1, 1}, + {&__pyx_n_s__append, __pyx_k__append, sizeof(__pyx_k__append), 0, 0, 1, 1}, {&__pyx_n_s__autoping, __pyx_k__autoping, sizeof(__pyx_k__autoping), 0, 0, 1, 1}, {&__pyx_n_s__autoreconnect, __pyx_k__autoreconnect, sizeof(__pyx_k__autoreconnect), 0, 0, 1, 1}, {&__pyx_n_s__buffer_results, __pyx_k__buffer_results, sizeof(__pyx_k__buffer_results), 0, 0, 1, 1}, @@ -22500,6 +22964,7 @@ {&__pyx_n_s__description, __pyx_k__description, sizeof(__pyx_k__description), 0, 0, 1, 1}, {&__pyx_n_s__doclose, __pyx_k__doclose, sizeof(__pyx_k__doclose), 0, 0, 1, 1}, {&__pyx_n_s__encode, __pyx_k__encode, sizeof(__pyx_k__encode), 0, 0, 1, 1}, + {&__pyx_n_s__err, __pyx_k__err, sizeof(__pyx_k__err), 0, 0, 1, 1}, {&__pyx_n_s__errno, __pyx_k__errno, sizeof(__pyx_k__errno), 0, 0, 1, 1}, {&__pyx_n_s__errnos, __pyx_k__errnos, sizeof(__pyx_k__errnos), 0, 0, 1, 1}, {&__pyx_n_s__exc, __pyx_k__exc, sizeof(__pyx_k__exc), 0, 0, 1, 1}, @@ -22521,6 +22986,7 @@ {&__pyx_n_s__iterobj, __pyx_k__iterobj, sizeof(__pyx_k__iterobj), 0, 0, 1, 1}, {&__pyx_n_s__itertools, __pyx_k__itertools, sizeof(__pyx_k__itertools), 0, 0, 1, 1}, {&__pyx_n_s__key, __pyx_k__key, sizeof(__pyx_k__key), 0, 0, 1, 1}, + {&__pyx_n_s__kind, __pyx_k__kind, sizeof(__pyx_k__kind), 0, 0, 1, 1}, {&__pyx_n_s__lastrowid, __pyx_k__lastrowid, sizeof(__pyx_k__lastrowid), 0, 0, 1, 1}, {&__pyx_n_s__length, __pyx_k__length, sizeof(__pyx_k__length), 0, 0, 1, 1}, {&__pyx_n_s__local_infile, __pyx_k__local_infile, sizeof(__pyx_k__local_infile), 0, 0, 1, 1}, @@ -22540,12 +23006,14 @@ {&__pyx_n_s__ping, __pyx_k__ping, sizeof(__pyx_k__ping), 0, 0, 1, 1}, {&__pyx_n_s__pipe, __pyx_k__pipe, sizeof(__pyx_k__pipe), 0, 0, 1, 1}, {&__pyx_n_s__plain_query, __pyx_k__plain_query, sizeof(__pyx_k__plain_query), 0, 0, 1, 1}, + {&__pyx_n_s__pop, __pyx_k__pop, sizeof(__pyx_k__pop), 0, 0, 1, 1}, {&__pyx_n_s__popleft, __pyx_k__popleft, sizeof(__pyx_k__popleft), 0, 0, 1, 1}, {&__pyx_n_s__port, __pyx_k__port, sizeof(__pyx_k__port), 0, 0, 1, 1}, {&__pyx_n_s__prefetch_rows, __pyx_k__prefetch_rows, sizeof(__pyx_k__prefetch_rows), 0, 0, 1, 1}, {&__pyx_n_s__prepare, __pyx_k__prepare, sizeof(__pyx_k__prepare), 0, 0, 1, 1}, {&__pyx_n_s__procname, __pyx_k__procname, sizeof(__pyx_k__procname), 0, 0, 1, 1}, {&__pyx_n_s__protocol, __pyx_k__protocol, sizeof(__pyx_k__protocol), 0, 0, 1, 1}, + {&__pyx_n_s__q, __pyx_k__q, sizeof(__pyx_k__q), 0, 0, 1, 1}, {&__pyx_n_s__qmark, __pyx_k__qmark, sizeof(__pyx_k__qmark), 0, 0, 1, 1}, {&__pyx_n_s__query, __pyx_k__query, sizeof(__pyx_k__query), 0, 0, 1, 1}, {&__pyx_n_s__raise_on_warnings, __pyx_k__raise_on_warnings, sizeof(__pyx_k__raise_on_warnings), 0, 0, 1, 1}, @@ -22555,12 +23023,16 @@ {&__pyx_n_s__read_timeout, __pyx_k__read_timeout, sizeof(__pyx_k__read_timeout), 0, 0, 1, 1}, {&__pyx_n_s__report_truncation, __pyx_k__report_truncation, sizeof(__pyx_k__report_truncation), 0, 0, 1, 1}, {&__pyx_n_s__require_secure_auth, __pyx_k__require_secure_auth, sizeof(__pyx_k__require_secure_auth), 0, 0, 1, 1}, + {&__pyx_n_s__ret, __pyx_k__ret, sizeof(__pyx_k__ret), 0, 0, 1, 1}, {&__pyx_n_s__rollback, __pyx_k__rollback, sizeof(__pyx_k__rollback), 0, 0, 1, 1}, {&__pyx_n_s__rowcount, __pyx_k__rowcount, sizeof(__pyx_k__rowcount), 0, 0, 1, 1}, + {&__pyx_n_s__s, __pyx_k__s, sizeof(__pyx_k__s), 0, 0, 1, 1}, {&__pyx_n_s__self, __pyx_k__self, sizeof(__pyx_k__self), 0, 0, 1, 1}, + {&__pyx_n_s__should_raise, __pyx_k__should_raise, sizeof(__pyx_k__should_raise), 0, 0, 1, 1}, {&__pyx_n_s__show_table, __pyx_k__show_table, sizeof(__pyx_k__show_table), 0, 0, 1, 1}, {&__pyx_n_s__size, __pyx_k__size, sizeof(__pyx_k__size), 0, 0, 1, 1}, {&__pyx_n_s__socket, __pyx_k__socket, sizeof(__pyx_k__socket), 0, 0, 1, 1}, + {&__pyx_n_s__ss, __pyx_k__ss, sizeof(__pyx_k__ss), 0, 0, 1, 1}, {&__pyx_n_s__ssl, __pyx_k__ssl, sizeof(__pyx_k__ssl), 0, 0, 1, 1}, {&__pyx_n_s__stmt, __pyx_k__stmt, sizeof(__pyx_k__stmt), 0, 0, 1, 1}, {&__pyx_n_s__string_limit, __pyx_k__string_limit, sizeof(__pyx_k__string_limit), 0, 0, 1, 1}, @@ -22569,8 +23041,10 @@ {&__pyx_n_s__tb, __pyx_k__tb, sizeof(__pyx_k__tb), 0, 0, 1, 1}, {&__pyx_n_s__tcp, __pyx_k__tcp, sizeof(__pyx_k__tcp), 0, 0, 1, 1}, {&__pyx_n_s__threadsafety, __pyx_k__threadsafety, sizeof(__pyx_k__threadsafety), 0, 0, 1, 1}, + {&__pyx_n_s__ticks, __pyx_k__ticks, sizeof(__pyx_k__ticks), 0, 0, 1, 1}, {&__pyx_n_s__time, __pyx_k__time, sizeof(__pyx_k__time), 0, 0, 1, 1}, {&__pyx_n_s__try_plain_query, __pyx_k__try_plain_query, sizeof(__pyx_k__try_plain_query), 0, 0, 1, 1}, + {&__pyx_n_s__tt, __pyx_k__tt, sizeof(__pyx_k__tt), 0, 0, 1, 1}, {&__pyx_n_s__unix_socket, __pyx_k__unix_socket, sizeof(__pyx_k__unix_socket), 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__user, __pyx_k__user, sizeof(__pyx_k__user), 0, 0, 1, 1}, @@ -22584,13 +23058,13 @@ {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_super = __Pyx_GetName(__pyx_b, __pyx_n_s__super); if (!__pyx_builtin_super) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_zip = __Pyx_GetName(__pyx_b, __pyx_n_s__zip); if (!__pyx_builtin_zip) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_MemoryError = __Pyx_GetName(__pyx_b, __pyx_n_s__MemoryError); if (!__pyx_builtin_MemoryError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_StopIteration = __Pyx_GetName(__pyx_b, __pyx_n_s__StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 68; __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[3]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_id = __Pyx_GetName(__pyx_b, __pyx_n_s__id); if (!__pyx_builtin_id) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s__super); if (!__pyx_builtin_super) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s__zip); if (!__pyx_builtin_zip) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s__MemoryError); if (!__pyx_builtin_MemoryError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s__StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s__id); if (!__pyx_builtin_id) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; @@ -22598,368 +23072,488 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants"); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":105 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":105 * ret.append((kind, (message, err))) * if should_raise and conn.raise_on_warnings: * raise CollatedWarningsError('query caused warnings', extra=ret) # <<<<<<<<<<<<<< * return ret */ - __pyx_k_tuple_8 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_8)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_7)); - PyTuple_SET_ITEM(__pyx_k_tuple_8, 0, ((PyObject *)__pyx_kp_s_7)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_7)); + __pyx_k_tuple_8 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_7)); if (unlikely(!__pyx_k_tuple_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_8); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_8)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":102 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":11 + * def _datetime_from_string(s): + * tt = time.strptime(s, '%Y-%m-%d %H:%M:%S') + * return datetime.datetime(*tt[:6]) # <<<<<<<<<<<<<< + * + * def _date_from_string(s): + */ + __pyx_k_slice_10 = PySlice_New(Py_None, __pyx_int_6, Py_None); if (unlikely(!__pyx_k_slice_10)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_slice_10); + __Pyx_GIVEREF(__pyx_k_slice_10); + + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":15 + * def _date_from_string(s): + * tt = time.strptime(s, '%Y-%m-%d') + * return datetime.date(*tt[:3]) # <<<<<<<<<<<<<< + * + * def _time_from_string(s): + */ + __pyx_k_slice_12 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_k_slice_12)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_slice_12); + __Pyx_GIVEREF(__pyx_k_slice_12); + + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":19 + * def _time_from_string(s): + * tt = time.strptime(s, '%H:%M:%S') + * return datetime.time(*tt[3:6]) # <<<<<<<<<<<<<< + * + * _conversions = { + */ + __pyx_k_slice_14 = PySlice_New(__pyx_int_3, __pyx_int_6, Py_None); if (unlikely(!__pyx_k_slice_14)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_slice_14); + __Pyx_GIVEREF(__pyx_k_slice_14); + + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":60 + * Convert a time in seconds since the epoch into a Timestamp. + * """ + * return Timestamp(*time.localtime(ticks)[:6]) # <<<<<<<<<<<<<< + * + * def DateFromTicks(ticks): + */ + __pyx_k_slice_15 = PySlice_New(Py_None, __pyx_int_6, Py_None); if (unlikely(!__pyx_k_slice_15)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_slice_15); + __Pyx_GIVEREF(__pyx_k_slice_15); + + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":67 + * Convert a time in seconds since the epoch into a Date. + * """ + * return Date(*time.localtime(ticks)[:3]) # <<<<<<<<<<<<<< + * + * def TimeFromTicks(ticks): + */ + __pyx_k_slice_16 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_k_slice_16)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_slice_16); + __Pyx_GIVEREF(__pyx_k_slice_16); + + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":74 + * Convert a time in seconds since the epoch into a Time. + * """ + * return Time(*time.localtime(ticks)[3:6]) # <<<<<<<<<<<<<< + */ + __pyx_k_slice_17 = PySlice_New(__pyx_int_3, __pyx_int_6, Py_None); if (unlikely(!__pyx_k_slice_17)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_slice_17); + __Pyx_GIVEREF(__pyx_k_slice_17); + + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":102 * self.conn = mysql_init(NULL) * if not self.conn: * raise MemoryError('alloc of conn object failed') # <<<<<<<<<<<<<< * if protocol not in _protocol_enum_map: * raise ProgrammingError('unknown protocol %r' % (protocol,)) */ - __pyx_k_tuple_14 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_14)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_13)); - PyTuple_SET_ITEM(__pyx_k_tuple_14, 0, ((PyObject *)__pyx_kp_s_13)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_13)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14)); + __pyx_k_tuple_20 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_19)); if (unlikely(!__pyx_k_tuple_20)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_20); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_20)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":212 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":212 * cdef int _check_closed(self) except -1: * if not self.conn: * raise ProgrammingError('connection closed') # <<<<<<<<<<<<<< * * def ping(self): */ - __pyx_k_tuple_17 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_17)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_17)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_16)); - PyTuple_SET_ITEM(__pyx_k_tuple_17, 0, ((PyObject *)__pyx_kp_s_16)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_16)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_17)); + __pyx_k_tuple_23 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_22)); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_23); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_23)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":106 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":106 * self.stmt = mysql_stmt_init(self.conn.conn) * if not self.stmt: * raise MemoryError('alloc of statement failed') # <<<<<<<<<<<<<< * self.string_limit = string_limit * self.show_table = show_table */ - __pyx_k_tuple_19 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_19)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_19)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_18)); - PyTuple_SET_ITEM(__pyx_k_tuple_19, 0, ((PyObject *)__pyx_kp_s_18)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_18)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_19)); + __pyx_k_tuple_25 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_24)); if (unlikely(!__pyx_k_tuple_25)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_25); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_25)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":137 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":137 * if self.stmt: * self.close() * raise ProgrammingError('connection closed') # <<<<<<<<<<<<<< * if not self.stmt: * raise ProgrammingError('statement closed') */ - __pyx_k_tuple_20 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_20)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_16)); - PyTuple_SET_ITEM(__pyx_k_tuple_20, 0, ((PyObject *)__pyx_kp_s_16)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_16)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_20)); + __pyx_k_tuple_26 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_22)); if (unlikely(!__pyx_k_tuple_26)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_26); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_26)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":139 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":139 * raise ProgrammingError('connection closed') * if not self.stmt: * raise ProgrammingError('statement closed') # <<<<<<<<<<<<<< * * property string_limit: */ - __pyx_k_tuple_22 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_22)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_22)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_21)); - PyTuple_SET_ITEM(__pyx_k_tuple_22, 0, ((PyObject *)__pyx_kp_s_21)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_21)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_22)); + __pyx_k_tuple_28 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_27)); if (unlikely(!__pyx_k_tuple_28)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_28); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_28)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":147 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":147 * def __set__(self, unsigned long value): * if value < 0: * raise ValueError('string limit must be >= 0') # <<<<<<<<<<<<<< * self.string_limit = value * */ - __pyx_k_tuple_24 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_24)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_24)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_23)); - PyTuple_SET_ITEM(__pyx_k_tuple_24, 0, ((PyObject *)__pyx_kp_s_23)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_23)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_24)); + __pyx_k_tuple_30 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_29)); if (unlikely(!__pyx_k_tuple_30)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_30); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_30)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":155 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":155 * self._check_closed() * if self.data_waiting: * raise ProgrammingError('binding this query would cause rows to ' # <<<<<<<<<<<<<< * 'become unfetchable') * statement = bytes_maybe_from_encoding( */ - __pyx_k_tuple_26 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_26)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_26)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_25)); - PyTuple_SET_ITEM(__pyx_k_tuple_26, 0, ((PyObject *)__pyx_kp_s_25)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_25)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_26)); + __pyx_k_tuple_32 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_31)); if (unlikely(!__pyx_k_tuple_32)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_32); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_32)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":190 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":190 * bind = PyMem_Malloc(sizeof(MYSQL_BIND) * fields) * if not bind: * raise MemoryError('alloc of result bind structure failed') # <<<<<<<<<<<<<< * memset(bind, 0, sizeof(MYSQL_BIND) * fields) * result_data = PyMem_Malloc( */ - __pyx_k_tuple_28 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_28)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_28)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_27)); - PyTuple_SET_ITEM(__pyx_k_tuple_28, 0, ((PyObject *)__pyx_kp_s_27)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_27)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_28)); + __pyx_k_tuple_34 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_33)); if (unlikely(!__pyx_k_tuple_34)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_34); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_34)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":195 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":195 * sizeof(column_output) * fields) * if not result_data: * raise MemoryError('alloc of result buffers failed') # <<<<<<<<<<<<<< * memset(result_data, 0, sizeof(column_output) * fields) * except: */ - __pyx_k_tuple_30 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_30)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__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)); + __pyx_k_tuple_36 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_35)); if (unlikely(!__pyx_k_tuple_36)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_36); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_36)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":282 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":282 * self._check_closed() * if self.data_waiting: * raise ProgrammingError('executing this query would cause rows to ' # <<<<<<<<<<<<<< * 'become unfetchable') * n_params = PyTuple_GET_SIZE(parameters) */ - __pyx_k_tuple_32 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_32)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_32)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_31)); - PyTuple_SET_ITEM(__pyx_k_tuple_32, 0, ((PyObject *)__pyx_kp_s_31)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_31)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_32)); + __pyx_k_tuple_38 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_37)); if (unlikely(!__pyx_k_tuple_38)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_38); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_38)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":297 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":297 * (sizeof(MYSQL_BIND) + sizeof(column_data)) * n_params) * if not buf: * raise MemoryError('alloc of bind parameters failed') # <<<<<<<<<<<<<< * bind = buf * memset(bind, 0, sizeof(MYSQL_BIND) * n_params) */ - __pyx_k_tuple_35 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_35)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_35)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_34)); - PyTuple_SET_ITEM(__pyx_k_tuple_35, 0, ((PyObject *)__pyx_kp_s_34)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_34)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_35)); + __pyx_k_tuple_41 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_40)); if (unlikely(!__pyx_k_tuple_41)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_41); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_41)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":595 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":595 * def __set__(self, unsigned long value): * if value < 1: * raise ValueError('must prefetch at least 1 row') # <<<<<<<<<<<<<< * self._prefetch_rows = value * if _oursqlx_stmt_set_prefetch_rows(self.stmt, */ - __pyx_k_tuple_40 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_40)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_40)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_39)); - PyTuple_SET_ITEM(__pyx_k_tuple_40, 0, ((PyObject *)__pyx_kp_s_39)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_39)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_40)); + __pyx_k_tuple_46 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_45)); if (unlikely(!__pyx_k_tuple_46)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_46); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_46)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":643 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":643 * self.stmt._check_closed() * if self.stmt.fetched != self.stmt_fetched: * raise ProgrammingError('row no longer available from database') # <<<<<<<<<<<<<< * left = self.length - self.offset * if size == -1 or size > left: */ - __pyx_k_tuple_43 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_43)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_43)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_42)); - PyTuple_SET_ITEM(__pyx_k_tuple_43, 0, ((PyObject *)__pyx_kp_s_42)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_42)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_43)); + __pyx_k_tuple_49 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_48)); if (unlikely(!__pyx_k_tuple_49)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_49); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_49)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":648 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":648 * size = left * elif size < 0: * raise ValueError("can't read negative bytes") # <<<<<<<<<<<<<< * ret = PyBytes_FromStringAndSize(NULL, size) * self.bind.buffer_length = size */ - __pyx_k_tuple_45 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_45)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_45)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_44)); - PyTuple_SET_ITEM(__pyx_k_tuple_45, 0, ((PyObject *)__pyx_kp_s_44)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_44)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_45)); + __pyx_k_tuple_51 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_50)); if (unlikely(!__pyx_k_tuple_51)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_51); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_51)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":71 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":71 * if self.res: * self.close() * raise ProgrammingError('connection closed') # <<<<<<<<<<<<<< * if not self.res: * raise ProgrammingError('query closed') */ - __pyx_k_tuple_47 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_47)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_47)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_16)); - PyTuple_SET_ITEM(__pyx_k_tuple_47, 0, ((PyObject *)__pyx_kp_s_16)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_16)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_47)); + __pyx_k_tuple_53 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_22)); if (unlikely(!__pyx_k_tuple_53)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_53); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_53)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":73 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":73 * raise ProgrammingError('connection closed') * if not self.res: * raise ProgrammingError('query closed') # <<<<<<<<<<<<<< * * property has_result: */ - __pyx_k_tuple_49 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_49)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_49)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_48)); - PyTuple_SET_ITEM(__pyx_k_tuple_49, 0, ((PyObject *)__pyx_kp_s_48)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_48)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_49)); + __pyx_k_tuple_55 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_54)); if (unlikely(!__pyx_k_tuple_55)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_55); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_55)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":51 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":51 * cdef int _check_closed(self) except -1: * if not self.conn.conn: * raise ProgrammingError('connection closed') # <<<<<<<<<<<<<< * if self.closed: * raise ProgrammingError('cursor closed') */ - __pyx_k_tuple_50 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_50)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_50)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_16)); - PyTuple_SET_ITEM(__pyx_k_tuple_50, 0, ((PyObject *)__pyx_kp_s_16)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_16)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_50)); + __pyx_k_tuple_56 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_22)); if (unlikely(!__pyx_k_tuple_56)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_56); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_56)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":53 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":53 * raise ProgrammingError('connection closed') * if self.closed: * raise ProgrammingError('cursor closed') # <<<<<<<<<<<<<< * * def close(self): */ - __pyx_k_tuple_52 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_52)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_52)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_51)); - PyTuple_SET_ITEM(__pyx_k_tuple_52, 0, ((PyObject *)__pyx_kp_s_51)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_51)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_52)); + __pyx_k_tuple_58 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_57)); if (unlikely(!__pyx_k_tuple_58)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_58); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_58)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":81 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":81 * # This is slightly irritating, but not too horribly bad. The horribly * # bad part is getting the results from a procedure. * raise NotSupportedError('use the CALL statement with the execute ' # <<<<<<<<<<<<<< * 'method to call stored procedures') * */ - __pyx_k_tuple_54 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_54)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_54)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_53)); - PyTuple_SET_ITEM(__pyx_k_tuple_54, 0, ((PyObject *)__pyx_kp_s_53)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_53)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_54)); + __pyx_k_tuple_60 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_59)); if (unlikely(!__pyx_k_tuple_60)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_60); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_60)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":105 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":105 * # worth parameterizing supports the prepared statement API * # anyway, so this shouldn't matter too much. * raise ProgrammingError("can't call execute with both " # <<<<<<<<<<<<<< * "parameters and a plain query") * stmt = self._new_query(query) */ - __pyx_k_tuple_57 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_57)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_57)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_56)); - PyTuple_SET_ITEM(__pyx_k_tuple_57, 0, ((PyObject *)__pyx_kp_s_56)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_56)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_57)); + __pyx_k_tuple_63 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_62)); if (unlikely(!__pyx_k_tuple_63)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_63); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_63)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":161 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":161 * self._check_closed() * if not self._statements: * raise ProgrammingError('no results available') # <<<<<<<<<<<<<< * * def nextset(self): */ - __pyx_k_tuple_59 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_59)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_59)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_58)); - PyTuple_SET_ITEM(__pyx_k_tuple_59, 0, ((PyObject *)__pyx_kp_s_58)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_58)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_59)); + __pyx_k_tuple_65 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_64)); if (unlikely(!__pyx_k_tuple_65)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_65); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_65)); - /* "oursql.pyx":91 - * # time, so it's threadsafe to call this. - * if mysql_library_init(0, NULL, NULL): - * raise InterfaceError('could not initialize mysql') # <<<<<<<<<<<<<< + /* "oursql.pyx":58 * - * paramstyle = 'qmark' + * class Error(builtins.Exception): + * def __init__(self, message, errno=None, extra=None): # <<<<<<<<<<<<<< + * super(Error, self).__init__(errno, message, extra) + * self.errno = errno */ - __pyx_k_tuple_70 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_70)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_69)); - PyTuple_SET_ITEM(__pyx_k_tuple_70, 0, ((PyObject *)__pyx_kp_s_69)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_69)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_70)); - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; - __Pyx_RefNannyFinishContext(); - return -1; -} + __pyx_k_tuple_72 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__message), ((PyObject *)__pyx_n_s__errno), ((PyObject *)__pyx_n_s__extra)); if (unlikely(!__pyx_k_tuple_72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_72); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_72)); + __pyx_k_codeobj_73 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_74, __pyx_n_s____init__, 58, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_k_tuple_75 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_k_tuple_75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_75); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_75)); -static int __Pyx_InitGlobals(void) { - #if PY_VERSION_HEX < 0x02040000 - if (unlikely(__Pyx_Py23SetsImport() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif - 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_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_63 = PyInt_FromLong(63); if (unlikely(!__pyx_int_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_8192 = PyInt_FromLong(8192); if (unlikely(!__pyx_int_8192)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - return 0; - __pyx_L1_error:; - return -1; -} + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":85 + * _oursqlx_UnknownError: UnknownError, + * } + * def _exception_from_errno(int err): # <<<<<<<<<<<<<< + * return _exception_enum_map[_oursqlx_exc_from_errno(err)] + * + */ + __pyx_k_tuple_77 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__err), ((PyObject *)__pyx_n_s__err)); if (unlikely(!__pyx_k_tuple_77)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_77); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_77)); + __pyx_k_codeobj_78 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_79, __pyx_n_s_4, 85, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_78)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} -#if PY_MAJOR_VERSION < 3 -PyMODINIT_FUNC initoursql(void); /*proto*/ -PyMODINIT_FUNC initoursql(void) -#else -PyMODINIT_FUNC PyInit_oursql(void); /*proto*/ -PyMODINIT_FUNC PyInit_oursql(void) -#endif -{ - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; - PyObject *__pyx_t_6 = NULL; + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":88 + * return _exception_enum_map[_oursqlx_exc_from_errno(err)] + * + * def _do_warnings_query(Connection conn not None): # <<<<<<<<<<<<<< + * cdef int should_raise = False + * q = _Query(conn, 'SHOW WARNINGS') + */ + __pyx_k_tuple_80 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__conn), ((PyObject *)__pyx_n_s__should_raise), ((PyObject *)__pyx_n_s__q), ((PyObject *)__pyx_n_s__ret), ((PyObject *)__pyx_n_s__kind), ((PyObject *)__pyx_n_s__err), ((PyObject *)__pyx_n_s__message)); if (unlikely(!__pyx_k_tuple_80)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_80); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_80)); + __pyx_k_codeobj_81 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_80, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_79, __pyx_n_s___do_warnings_query, 88, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_81)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":3 + * import decimal, datetime, time + * + * def _bitval_from_string(s): # <<<<<<<<<<<<<< + * cdef Py_ssize_t length + * cdef unsigned char *ss + */ + __pyx_k_tuple_82 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__s), ((PyObject *)__pyx_n_s__length), ((PyObject *)__pyx_n_s__ss)); if (unlikely(!__pyx_k_tuple_82)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_82); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_82)); + __pyx_k_codeobj_83 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_84, __pyx_n_s___bitval_from_string, 3, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_83)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":9 + * return bitval_from_char_p(ss, length) + * + * def _datetime_from_string(s): # <<<<<<<<<<<<<< + * tt = time.strptime(s, '%Y-%m-%d %H:%M:%S') + * return datetime.datetime(*tt[:6]) + */ + __pyx_k_tuple_85 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__s), ((PyObject *)__pyx_n_s__tt)); if (unlikely(!__pyx_k_tuple_85)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_85); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_85)); + __pyx_k_codeobj_86 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_84, __pyx_n_s_87, 9, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_86)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":13 + * return datetime.datetime(*tt[:6]) + * + * def _date_from_string(s): # <<<<<<<<<<<<<< + * tt = time.strptime(s, '%Y-%m-%d') + * return datetime.date(*tt[:3]) + */ + __pyx_k_tuple_88 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__s), ((PyObject *)__pyx_n_s__tt)); if (unlikely(!__pyx_k_tuple_88)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_88); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_88)); + __pyx_k_codeobj_89 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_84, __pyx_n_s___date_from_string, 13, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_89)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":17 + * return datetime.date(*tt[:3]) + * + * def _time_from_string(s): # <<<<<<<<<<<<<< + * tt = time.strptime(s, '%H:%M:%S') + * return datetime.time(*tt[3:6]) + */ + __pyx_k_tuple_90 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__s), ((PyObject *)__pyx_n_s__tt)); if (unlikely(!__pyx_k_tuple_90)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_90); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_90)); + __pyx_k_codeobj_91 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_84, __pyx_n_s___time_from_string, 17, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_91)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":55 + * Binary = bytes + * + * def TimestampFromTicks(ticks): # <<<<<<<<<<<<<< + * """TimestampFromTicks(ticks) -> Timestamp. + * + */ + __pyx_k_tuple_92 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ticks)); if (unlikely(!__pyx_k_tuple_92)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_92); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_92)); + __pyx_k_codeobj_93 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_84, __pyx_n_s__TimestampFromTicks, 55, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_93)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":62 + * return Timestamp(*time.localtime(ticks)[:6]) + * + * def DateFromTicks(ticks): # <<<<<<<<<<<<<< + * """DateFromTicks(ticks) -> Date. + * + */ + __pyx_k_tuple_94 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ticks)); if (unlikely(!__pyx_k_tuple_94)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_94); + __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_84, __pyx_n_s__DateFromTicks, 62, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_95)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":69 + * return Date(*time.localtime(ticks)[:3]) + * + * def TimeFromTicks(ticks): # <<<<<<<<<<<<<< + * """TimeFromTicks(ticks) -> Time. + * + */ + __pyx_k_tuple_96 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ticks)); if (unlikely(!__pyx_k_tuple_96)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_96); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_96)); + __pyx_k_codeobj_97 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_96, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_84, __pyx_n_s__TimeFromTicks, 69, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_97)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "oursql.pyx":91 + * # time, so it's threadsafe to call this. + * if mysql_library_init(0, NULL, NULL): + * raise InterfaceError('could not initialize mysql') # <<<<<<<<<<<<<< + * + * paramstyle = 'qmark' + */ + __pyx_k_tuple_101 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_100)); if (unlikely(!__pyx_k_tuple_101)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_101); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_101)); + __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_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_63 = PyInt_FromLong(63); if (unlikely(!__pyx_int_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_8192 = PyInt_FromLong(8192); if (unlikely(!__pyx_int_8192)) {__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 initoursql(void); /*proto*/ +PyMODINIT_FUNC initoursql(void) +#else +PyMODINIT_FUNC PyInit_oursql(void); /*proto*/ +PyMODINIT_FUNC PyInit_oursql(void) +#endif +{ + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); @@ -22970,12 +23564,18 @@ Py_FatalError("failed to import 'refnanny' module"); } #endif - __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_oursql(void)"); + __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_oursql(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_binding_PyCFunctionType_USED - if (__pyx_binding_PyCFunctionType_init() < 0) {__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 ---*/ @@ -22986,19 +23586,31 @@ #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 - __pyx_m = Py_InitModule4(__Pyx_NAMESTR("oursql"), __pyx_methods, __Pyx_DOCSTR(__pyx_k_63), 0, PYTHON_API_VERSION); + __pyx_m = Py_InitModule4(__Pyx_NAMESTR("oursql"), __pyx_methods, __Pyx_DOCSTR(__pyx_k_69), 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif - if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - #if PY_MAJOR_VERSION < 3 - Py_INCREF(__pyx_m); + if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + Py_INCREF(__pyx_d); + #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, "oursql")) { + if (unlikely(PyDict_SetItemString(modules, "oursql", __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 - __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); - if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; 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 PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) + if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif if (__pyx_module_is_main_oursql) { 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;}; } @@ -23010,32 +23622,25 @@ /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ - __pyx_vtabptr_6oursql_Connection = &__pyx_vtable_6oursql_Connection; - __pyx_vtable_6oursql_Connection._raise_error = (int (*)(struct __pyx_obj_6oursql_Connection *))__pyx_f_6oursql_10Connection__raise_error; - __pyx_vtable_6oursql_Connection._check_closed = (int (*)(struct __pyx_obj_6oursql_Connection *))__pyx_f_6oursql_10Connection__check_closed; - __pyx_vtable_6oursql_Connection._decode_char_p = (PyObject *(*)(struct __pyx_obj_6oursql_Connection *, const char *))__pyx_f_6oursql_10Connection__decode_char_p; - if (PyType_Ready(&__pyx_type_6oursql_Connection) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetVtable(__pyx_type_6oursql_Connection.tp_dict, __pyx_vtabptr_6oursql_Connection) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "Connection", (PyObject *)&__pyx_type_6oursql_Connection) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__pyx_type_6oursql_Connection.tp_weaklistoffset == 0) __pyx_type_6oursql_Connection.tp_weaklistoffset = offsetof(struct __pyx_obj_6oursql_Connection, __weakref__); - __pyx_ptype_6oursql_Connection = &__pyx_type_6oursql_Connection; if (PyType_Ready(&__pyx_type_6oursql__DictWhateverMixin) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "_DictWhateverMixin", (PyObject *)&__pyx_type_6oursql__DictWhateverMixin) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6oursql__DictWhateverMixin = &__pyx_type_6oursql__DictWhateverMixin; if (PyType_Ready(&__pyx_type_6oursql__AbstractIterWrapper) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "_AbstractIterWrapper", (PyObject *)&__pyx_type_6oursql__AbstractIterWrapper) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6oursql__AbstractIterWrapper = &__pyx_type_6oursql__AbstractIterWrapper; - if (PyType_Ready(&__pyx_type_6oursql__BinaryWhateverMixin) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "_BinaryWhateverMixin", (PyObject *)&__pyx_type_6oursql__BinaryWhateverMixin) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_6oursql__BinaryWhateverMixin = &__pyx_type_6oursql__BinaryWhateverMixin; - __pyx_type_6oursql_IterWrapper.tp_base = __pyx_ptype_6oursql__AbstractIterWrapper; - if (PyType_Ready(&__pyx_type_6oursql_IterWrapper) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "IterWrapper", (PyObject *)&__pyx_type_6oursql_IterWrapper) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_6oursql_IterWrapper = &__pyx_type_6oursql_IterWrapper; __pyx_type_6oursql_FileWrapper.tp_base = __pyx_ptype_6oursql__AbstractIterWrapper; if (PyType_Ready(&__pyx_type_6oursql_FileWrapper) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "FileWrapper", (PyObject *)&__pyx_type_6oursql_FileWrapper) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6oursql_FileWrapper = &__pyx_type_6oursql_FileWrapper; + __pyx_vtabptr_6oursql__Query = &__pyx_vtable_6oursql__Query; + __pyx_vtable_6oursql__Query._raise_error = (int (*)(struct __pyx_obj_6oursql__Query *))__pyx_f_6oursql_6_Query__raise_error; + if (PyType_Ready(&__pyx_type_6oursql__Query) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_6oursql__Query.tp_dict, __pyx_vtabptr_6oursql__Query) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "_Query", (PyObject *)&__pyx_type_6oursql__Query) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_6oursql__Query = &__pyx_type_6oursql__Query; + if (PyType_Ready(&__pyx_type_6oursql__DBAPITypeObject) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "_DBAPITypeObject", (PyObject *)&__pyx_type_6oursql__DBAPITypeObject) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_6oursql__DBAPITypeObject = &__pyx_type_6oursql__DBAPITypeObject; __pyx_vtabptr_6oursql__Statement = &__pyx_vtable_6oursql__Statement; __pyx_vtable_6oursql__Statement._raise_error = (int (*)(struct __pyx_obj_6oursql__Statement *))__pyx_f_6oursql_10_Statement__raise_error; __pyx_vtable_6oursql__Statement._check_closed = (int (*)(struct __pyx_obj_6oursql__Statement *))__pyx_f_6oursql_10_Statement__check_closed; @@ -23049,6 +23654,18 @@ if (PyType_Ready(&__pyx_type_6oursql__ResultStringStream) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "_ResultStringStream", (PyObject *)&__pyx_type_6oursql__ResultStringStream) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6oursql__ResultStringStream = &__pyx_type_6oursql__ResultStringStream; + if (PyType_Ready(&__pyx_type_6oursql__BinaryWhateverMixin) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "_BinaryWhateverMixin", (PyObject *)&__pyx_type_6oursql__BinaryWhateverMixin) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_6oursql__BinaryWhateverMixin = &__pyx_type_6oursql__BinaryWhateverMixin; + __pyx_vtabptr_6oursql_Connection = &__pyx_vtable_6oursql_Connection; + __pyx_vtable_6oursql_Connection._raise_error = (int (*)(struct __pyx_obj_6oursql_Connection *))__pyx_f_6oursql_10Connection__raise_error; + __pyx_vtable_6oursql_Connection._check_closed = (int (*)(struct __pyx_obj_6oursql_Connection *))__pyx_f_6oursql_10Connection__check_closed; + __pyx_vtable_6oursql_Connection._decode_char_p = (PyObject *(*)(struct __pyx_obj_6oursql_Connection *, const char *))__pyx_f_6oursql_10Connection__decode_char_p; + if (PyType_Ready(&__pyx_type_6oursql_Connection) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_6oursql_Connection.tp_dict, __pyx_vtabptr_6oursql_Connection) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "Connection", (PyObject *)&__pyx_type_6oursql_Connection) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_type_6oursql_Connection.tp_weaklistoffset == 0) __pyx_type_6oursql_Connection.tp_weaklistoffset = offsetof(struct __pyx_obj_6oursql_Connection, __weakref__); + __pyx_ptype_6oursql_Connection = &__pyx_type_6oursql_Connection; __pyx_vtabptr_6oursql__ResultSet = &__pyx_vtable_6oursql__ResultSet; __pyx_vtable_6oursql__ResultSet._raise_error = (int (*)(struct __pyx_obj_6oursql__ResultSet *))__pyx_f_6oursql_10_ResultSet__raise_error; __pyx_vtable_6oursql__ResultSet._check_closed = (int (*)(struct __pyx_obj_6oursql__ResultSet *))__pyx_f_6oursql_10_ResultSet__check_closed; @@ -23056,12 +23673,6 @@ if (__Pyx_SetVtable(__pyx_type_6oursql__ResultSet.tp_dict, __pyx_vtabptr_6oursql__ResultSet) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "_ResultSet", (PyObject *)&__pyx_type_6oursql__ResultSet) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6oursql__ResultSet = &__pyx_type_6oursql__ResultSet; - __pyx_vtabptr_6oursql__Query = &__pyx_vtable_6oursql__Query; - __pyx_vtable_6oursql__Query._raise_error = (int (*)(struct __pyx_obj_6oursql__Query *))__pyx_f_6oursql_6_Query__raise_error; - if (PyType_Ready(&__pyx_type_6oursql__Query) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetVtable(__pyx_type_6oursql__Query.tp_dict, __pyx_vtabptr_6oursql__Query) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "_Query", (PyObject *)&__pyx_type_6oursql__Query) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_6oursql__Query = &__pyx_type_6oursql__Query; __pyx_vtabptr_6oursql__DictQuery = &__pyx_vtable_6oursql__DictQuery; __pyx_vtable_6oursql__DictQuery.__pyx_base = *__pyx_vtabptr_6oursql__Query; __pyx_type_6oursql__DictQuery.tp_base = __pyx_ptype_6oursql__Query; @@ -23069,6 +23680,10 @@ if (__Pyx_SetVtable(__pyx_type_6oursql__DictQuery.tp_dict, __pyx_vtabptr_6oursql__DictQuery) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "_DictQuery", (PyObject *)&__pyx_type_6oursql__DictQuery) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6oursql__DictQuery = &__pyx_type_6oursql__DictQuery; + __pyx_type_6oursql_IterWrapper.tp_base = __pyx_ptype_6oursql__AbstractIterWrapper; + if (PyType_Ready(&__pyx_type_6oursql_IterWrapper) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "IterWrapper", (PyObject *)&__pyx_type_6oursql_IterWrapper) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_6oursql_IterWrapper = &__pyx_type_6oursql_IterWrapper; __pyx_vtabptr_6oursql_Cursor = &__pyx_vtable_6oursql_Cursor; __pyx_vtable_6oursql_Cursor._check_closed = (int (*)(struct __pyx_obj_6oursql_Cursor *))__pyx_f_6oursql_6Cursor__check_closed; __pyx_vtable_6oursql_Cursor._update_fields = (int (*)(struct __pyx_obj_6oursql_Cursor *, PyObject *, struct __pyx_opt_args_6oursql_6Cursor__update_fields *__pyx_optional_args))__pyx_f_6oursql_6Cursor__update_fields; @@ -23084,9 +23699,6 @@ if (__Pyx_SetVtable(__pyx_type_6oursql_DictCursor.tp_dict, __pyx_vtabptr_6oursql_DictCursor) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "DictCursor", (PyObject *)&__pyx_type_6oursql_DictCursor) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6oursql_DictCursor = &__pyx_type_6oursql_DictCursor; - if (PyType_Ready(&__pyx_type_6oursql__DBAPITypeObject) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "_DBAPITypeObject", (PyObject *)&__pyx_type_6oursql__DBAPITypeObject) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_6oursql__DBAPITypeObject = &__pyx_type_6oursql__DBAPITypeObject; /*--- Type import code ---*/ /*--- Variable import code ---*/ /*--- Function import code ---*/ @@ -23096,19 +23708,19 @@ * """ * * __author__ = 'Aaron Gallagher ' # <<<<<<<<<<<<<< - * __version__ = '0.9.2' + * __version__ = '0.9.3' * */ - if (PyObject_SetAttr(__pyx_m, __pyx_n_s____author__, ((PyObject *)__pyx_kp_s_64)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s____author__, ((PyObject *)__pyx_kp_s_70)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "oursql.pyx":8 * * __author__ = 'Aaron Gallagher ' - * __version__ = '0.9.2' # <<<<<<<<<<<<<< + * __version__ = '0.9.3' # <<<<<<<<<<<<<< * * include "oursql.pxi" */ - if (PyObject_SetAttr(__pyx_m, __pyx_n_s____version__, ((PyObject *)__pyx_kp_s_65)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s____version__, ((PyObject *)__pyx_kp_s_71)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "oursql.pyx":13 * include "nogil.pyx" @@ -23137,7 +23749,7 @@ */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__builtins), 0, -1); 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__builtins, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__builtins, __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; /* "oursql.pyx":54 @@ -23149,20 +23761,20 @@ */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__builtins); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__builtins); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__Warning); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__Warning); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __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 = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_CreateClass(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_1), __pyx_n_s__Warning, __pyx_n_s__oursql); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_CreateClass(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_1), __pyx_n_s__Warning, __pyx_n_s__Warning, __pyx_n_s__oursql); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Warning, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__Warning, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; @@ -23175,17 +23787,17 @@ */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__Warning); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__Warning); 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_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_CreateClass(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_1), __pyx_n_s__Note, __pyx_n_s__oursql); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_CreateClass(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_1), __pyx_n_s__Note, __pyx_n_s__Note, __pyx_n_s__oursql); 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_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Note, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__Note, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; @@ -23206,8 +23818,9 @@ * super(Error, self).__init__(errno, message, extra) * self.errno = errno */ - __pyx_t_3 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_6oursql_5Error___init__, NULL, __pyx_n_s__oursql); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6oursql_5Error_1__init__, 0, __pyx_n_s_76, NULL, __pyx_n_s__oursql, ((PyObject *)__pyx_k_codeobj_73)); 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_CyFunction_SetDefaultsTuple(__pyx_t_3, ((PyObject *)__pyx_k_tuple_75)); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____init__, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -23218,20 +23831,20 @@ * def __init__(self, message, errno=None, extra=None): * super(Error, self).__init__(errno, message, extra) */ - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__builtins); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__builtins); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__Exception); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__Exception); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__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 = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __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 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1), __pyx_n_s__Error, __pyx_n_s__oursql); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1), __pyx_n_s__Error, __pyx_n_s__Error, __pyx_n_s__oursql); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Error, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__Error, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; @@ -23244,17 +23857,17 @@ */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__Error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__Error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __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 = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __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 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1), __pyx_n_s__InterfaceError, __pyx_n_s__oursql); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1), __pyx_n_s__InterfaceError, __pyx_n_s__InterfaceError, __pyx_n_s__oursql); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__InterfaceError, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__InterfaceError, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; @@ -23267,17 +23880,17 @@ */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__Error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__Error); 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_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __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 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1), __pyx_n_s__DatabaseError, __pyx_n_s__oursql); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1), __pyx_n_s__DatabaseError, __pyx_n_s__DatabaseError, __pyx_n_s__oursql); 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(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__DatabaseError, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__DatabaseError, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; @@ -23290,17 +23903,17 @@ */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__DatabaseError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__DatabaseError); 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_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __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 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1), __pyx_n_s__DataError, __pyx_n_s__oursql); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1), __pyx_n_s__DataError, __pyx_n_s__DataError, __pyx_n_s__oursql); 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(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__DataError, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__DataError, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; @@ -23313,17 +23926,17 @@ */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__DatabaseError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__DatabaseError); 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_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(((PyObject *)__pyx_t_3)); + __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 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1), __pyx_n_s__OperationalError, __pyx_n_s__oursql); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1), __pyx_n_s__OperationalError, __pyx_n_s__OperationalError, __pyx_n_s__oursql); 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(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__OperationalError, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__OperationalError, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; @@ -23336,17 +23949,17 @@ */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__DatabaseError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__DatabaseError); 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_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(((PyObject *)__pyx_t_3)); + __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 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1), __pyx_n_s__IntegrityError, __pyx_n_s__oursql); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1), __pyx_n_s__IntegrityError, __pyx_n_s__IntegrityError, __pyx_n_s__oursql); 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(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__IntegrityError, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__IntegrityError, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; @@ -23359,17 +23972,17 @@ */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__DatabaseError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__DatabaseError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __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 = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __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 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1), __pyx_n_s__InternalError, __pyx_n_s__oursql); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1), __pyx_n_s__InternalError, __pyx_n_s__InternalError, __pyx_n_s__oursql); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__InternalError, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__InternalError, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; @@ -23382,17 +23995,17 @@ */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__DatabaseError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__DatabaseError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __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 = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __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 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1), __pyx_n_s__ProgrammingError, __pyx_n_s__oursql); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1), __pyx_n_s__ProgrammingError, __pyx_n_s__ProgrammingError, __pyx_n_s__oursql); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ProgrammingError, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__ProgrammingError, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; @@ -23405,17 +24018,17 @@ */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__ProgrammingError); 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(((PyObject *)__pyx_t_3)); + __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 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1), __pyx_n_s_6, __pyx_n_s__oursql); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1), __pyx_n_s_6, __pyx_n_s_6, __pyx_n_s__oursql); 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; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_6, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_6, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; @@ -23428,17 +24041,17 @@ */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__DatabaseError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__DatabaseError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __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 = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __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 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1), __pyx_n_s__NotSupportedError, __pyx_n_s__oursql); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1), __pyx_n_s__NotSupportedError, __pyx_n_s__NotSupportedError, __pyx_n_s__oursql); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__NotSupportedError, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__NotSupportedError, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; @@ -23451,17 +24064,17 @@ */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__DatabaseError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__DatabaseError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __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 = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __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 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1), __pyx_n_s__PermissionsError, __pyx_n_s__oursql); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1), __pyx_n_s__PermissionsError, __pyx_n_s__PermissionsError, __pyx_n_s__oursql); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__PermissionsError, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__PermissionsError, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; @@ -23474,21 +24087,21 @@ */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__Error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__Error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __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 = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __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 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1), __pyx_n_s__UnknownError, __pyx_n_s__oursql); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1), __pyx_n_s__UnknownError, __pyx_n_s__UnknownError, __pyx_n_s__oursql); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__UnknownError, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__UnknownError, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":74 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":74 * return ret * * _exception_enum_map = { # <<<<<<<<<<<<<< @@ -23498,7 +24111,7 @@ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":75 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":75 * * _exception_enum_map = { * _oursqlx_InterfaceError: InterfaceError, # <<<<<<<<<<<<<< @@ -23507,13 +24120,13 @@ */ __pyx_t_2 = PyInt_FromLong(_oursqlx_InterfaceError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__InterfaceError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__InterfaceError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":76 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":76 * _exception_enum_map = { * _oursqlx_InterfaceError: InterfaceError, * _oursqlx_DataError: DataError, # <<<<<<<<<<<<<< @@ -23522,13 +24135,13 @@ */ __pyx_t_3 = PyInt_FromLong(_oursqlx_DataError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__DataError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__DataError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":77 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":77 * _oursqlx_InterfaceError: InterfaceError, * _oursqlx_DataError: DataError, * _oursqlx_OperationalError: OperationalError, # <<<<<<<<<<<<<< @@ -23537,13 +24150,13 @@ */ __pyx_t_2 = PyInt_FromLong(_oursqlx_OperationalError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__OperationalError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__OperationalError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":78 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":78 * _oursqlx_DataError: DataError, * _oursqlx_OperationalError: OperationalError, * _oursqlx_IntegrityError: IntegrityError, # <<<<<<<<<<<<<< @@ -23552,13 +24165,13 @@ */ __pyx_t_3 = PyInt_FromLong(_oursqlx_IntegrityError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__IntegrityError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__IntegrityError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":79 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":79 * _oursqlx_OperationalError: OperationalError, * _oursqlx_IntegrityError: IntegrityError, * _oursqlx_InternalError: InternalError, # <<<<<<<<<<<<<< @@ -23567,13 +24180,13 @@ */ __pyx_t_2 = PyInt_FromLong(_oursqlx_InternalError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__InternalError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__InternalError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":80 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":80 * _oursqlx_IntegrityError: IntegrityError, * _oursqlx_InternalError: InternalError, * _oursqlx_ProgrammingError: ProgrammingError, # <<<<<<<<<<<<<< @@ -23582,13 +24195,13 @@ */ __pyx_t_3 = PyInt_FromLong(_oursqlx_ProgrammingError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__ProgrammingError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":81 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":81 * _oursqlx_InternalError: InternalError, * _oursqlx_ProgrammingError: ProgrammingError, * _oursqlx_NotSupportedError: NotSupportedError, # <<<<<<<<<<<<<< @@ -23597,13 +24210,13 @@ */ __pyx_t_2 = PyInt_FromLong(_oursqlx_NotSupportedError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__NotSupportedError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__NotSupportedError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":82 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":82 * _oursqlx_ProgrammingError: ProgrammingError, * _oursqlx_NotSupportedError: NotSupportedError, * _oursqlx_PermissionsError: PermissionsError, # <<<<<<<<<<<<<< @@ -23612,13 +24225,13 @@ */ __pyx_t_3 = PyInt_FromLong(_oursqlx_PermissionsError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__PermissionsError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__PermissionsError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":83 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":83 * _oursqlx_NotSupportedError: NotSupportedError, * _oursqlx_PermissionsError: PermissionsError, * _oursqlx_UnknownError: UnknownError, # <<<<<<<<<<<<<< @@ -23627,105 +24240,105 @@ */ __pyx_t_2 = PyInt_FromLong(_oursqlx_UnknownError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__UnknownError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__UnknownError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s___exception_enum_map, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s___exception_enum_map, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":85 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":85 * _oursqlx_UnknownError: UnknownError, * } * def _exception_from_errno(int err): # <<<<<<<<<<<<<< * return _exception_enum_map[_oursqlx_exc_from_errno(err)] * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6oursql__exception_from_errno, NULL, __pyx_n_s__oursql); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6oursql_1_exception_from_errno, NULL, __pyx_n_s__oursql); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_4, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_4, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/util.pyx":88 + /* "/private/tmp/oursql-0.9.3/oursqlx/util.pyx":88 * return _exception_enum_map[_oursqlx_exc_from_errno(err)] * * def _do_warnings_query(Connection conn not None): # <<<<<<<<<<<<<< * cdef int should_raise = False * q = _Query(conn, 'SHOW WARNINGS') */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6oursql_1_do_warnings_query, NULL, __pyx_n_s__oursql); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6oursql_3_do_warnings_query, NULL, __pyx_n_s__oursql); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s___do_warnings_query, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s___do_warnings_query, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":1 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":1 * import decimal, datetime, time # <<<<<<<<<<<<<< * * def _bitval_from_string(s): */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__decimal), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1; __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[4]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__decimal, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1; __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[4]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__datetime, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__time), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1; __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[4]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__time, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":3 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":3 * import decimal, datetime, time * * def _bitval_from_string(s): # <<<<<<<<<<<<<< * cdef Py_ssize_t length * cdef unsigned char *ss */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6oursql_2_bitval_from_string, NULL, __pyx_n_s__oursql); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6oursql_5_bitval_from_string, NULL, __pyx_n_s__oursql); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s___bitval_from_string, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s___bitval_from_string, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":9 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":9 * return bitval_from_char_p(ss, length) * * def _datetime_from_string(s): # <<<<<<<<<<<<<< * tt = time.strptime(s, '%Y-%m-%d %H:%M:%S') * return datetime.datetime(*tt[:6]) */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6oursql_3_datetime_from_string, NULL, __pyx_n_s__oursql); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6oursql_7_datetime_from_string, NULL, __pyx_n_s__oursql); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_66, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_87, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":13 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":13 * return datetime.datetime(*tt[:6]) * * def _date_from_string(s): # <<<<<<<<<<<<<< * tt = time.strptime(s, '%Y-%m-%d') * return datetime.date(*tt[:3]) */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6oursql_4_date_from_string, NULL, __pyx_n_s__oursql); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6oursql_9_date_from_string, NULL, __pyx_n_s__oursql); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s___date_from_string, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s___date_from_string, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":17 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":17 * return datetime.date(*tt[:3]) * * def _time_from_string(s): # <<<<<<<<<<<<<< * tt = time.strptime(s, '%H:%M:%S') * return datetime.time(*tt[3:6]) */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6oursql_5_time_from_string, NULL, __pyx_n_s__oursql); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6oursql_11_time_from_string, NULL, __pyx_n_s__oursql); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s___time_from_string, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s___time_from_string, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":21 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":21 * return datetime.time(*tt[3:6]) * * _conversions = { # <<<<<<<<<<<<<< @@ -23735,7 +24348,7 @@ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":22 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":22 * * _conversions = { * MYSQL_TYPE_TINY: int, # <<<<<<<<<<<<<< @@ -23747,7 +24360,7 @@ if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, ((PyObject *)((PyObject*)(&PyInt_Type)))) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":23 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":23 * _conversions = { * MYSQL_TYPE_TINY: int, * MYSQL_TYPE_SHORT: int, # <<<<<<<<<<<<<< @@ -23759,7 +24372,7 @@ if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, ((PyObject *)((PyObject*)(&PyInt_Type)))) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":24 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":24 * MYSQL_TYPE_TINY: int, * MYSQL_TYPE_SHORT: int, * MYSQL_TYPE_LONG: long, # <<<<<<<<<<<<<< @@ -23771,7 +24384,7 @@ if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, ((PyObject *)((PyObject*)(&PyLong_Type)))) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":25 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":25 * MYSQL_TYPE_SHORT: int, * MYSQL_TYPE_LONG: long, * MYSQL_TYPE_FLOAT: float, # <<<<<<<<<<<<<< @@ -23783,7 +24396,7 @@ if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":26 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":26 * MYSQL_TYPE_LONG: long, * MYSQL_TYPE_FLOAT: float, * MYSQL_TYPE_DOUBLE: float, # <<<<<<<<<<<<<< @@ -23795,7 +24408,7 @@ if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":27 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":27 * MYSQL_TYPE_FLOAT: float, * MYSQL_TYPE_DOUBLE: float, * MYSQL_TYPE_DECIMAL: float, # <<<<<<<<<<<<<< @@ -23807,7 +24420,7 @@ if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":28 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":28 * MYSQL_TYPE_DOUBLE: float, * MYSQL_TYPE_DECIMAL: float, * MYSQL_TYPE_NEWDECIMAL: float, # <<<<<<<<<<<<<< @@ -23819,7 +24432,7 @@ if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":29 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":29 * MYSQL_TYPE_DECIMAL: float, * MYSQL_TYPE_NEWDECIMAL: float, * MYSQL_TYPE_LONGLONG: long, # <<<<<<<<<<<<<< @@ -23831,7 +24444,7 @@ if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, ((PyObject *)((PyObject*)(&PyLong_Type)))) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":30 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":30 * MYSQL_TYPE_NEWDECIMAL: float, * MYSQL_TYPE_LONGLONG: long, * MYSQL_TYPE_INT24: int, # <<<<<<<<<<<<<< @@ -23843,7 +24456,7 @@ if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, ((PyObject *)((PyObject*)(&PyInt_Type)))) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":31 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":31 * MYSQL_TYPE_LONGLONG: long, * MYSQL_TYPE_INT24: int, * MYSQL_TYPE_YEAR: int, # <<<<<<<<<<<<<< @@ -23855,7 +24468,7 @@ if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, ((PyObject *)((PyObject*)(&PyInt_Type)))) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":32 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":32 * MYSQL_TYPE_INT24: int, * MYSQL_TYPE_YEAR: int, * MYSQL_TYPE_DECIMAL: decimal.Decimal, # <<<<<<<<<<<<<< @@ -23864,16 +24477,16 @@ */ __pyx_t_3 = PyInt_FromLong(MYSQL_TYPE_DECIMAL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__decimal); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__decimal); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__Decimal); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__Decimal); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":33 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":33 * MYSQL_TYPE_YEAR: int, * MYSQL_TYPE_DECIMAL: decimal.Decimal, * MYSQL_TYPE_NEWDECIMAL: decimal.Decimal, # <<<<<<<<<<<<<< @@ -23882,16 +24495,16 @@ */ __pyx_t_4 = PyInt_FromLong(MYSQL_TYPE_NEWDECIMAL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__decimal); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__decimal); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__Decimal); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__Decimal); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_t_4, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":34 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":34 * MYSQL_TYPE_DECIMAL: decimal.Decimal, * MYSQL_TYPE_NEWDECIMAL: decimal.Decimal, * MYSQL_TYPE_BIT: _bitval_from_string, # <<<<<<<<<<<<<< @@ -23900,13 +24513,13 @@ */ __pyx_t_2 = PyInt_FromLong(MYSQL_TYPE_BIT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s___bitval_from_string); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s___bitval_from_string); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":35 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":35 * MYSQL_TYPE_NEWDECIMAL: decimal.Decimal, * MYSQL_TYPE_BIT: _bitval_from_string, * MYSQL_TYPE_TIMESTAMP: _datetime_from_string, # <<<<<<<<<<<<<< @@ -23915,13 +24528,13 @@ */ __pyx_t_4 = PyInt_FromLong(MYSQL_TYPE_TIMESTAMP); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s_66); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_87); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_t_4, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":36 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":36 * MYSQL_TYPE_BIT: _bitval_from_string, * MYSQL_TYPE_TIMESTAMP: _datetime_from_string, * MYSQL_TYPE_DATETIME: _datetime_from_string, # <<<<<<<<<<<<<< @@ -23930,13 +24543,13 @@ */ __pyx_t_2 = PyInt_FromLong(MYSQL_TYPE_DATETIME); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s_66); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_87); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":37 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":37 * MYSQL_TYPE_TIMESTAMP: _datetime_from_string, * MYSQL_TYPE_DATETIME: _datetime_from_string, * MYSQL_TYPE_DATE: _date_from_string, # <<<<<<<<<<<<<< @@ -23945,13 +24558,13 @@ */ __pyx_t_4 = PyInt_FromLong(MYSQL_TYPE_DATE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s___date_from_string); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s___date_from_string); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_t_4, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":38 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":38 * MYSQL_TYPE_DATETIME: _datetime_from_string, * MYSQL_TYPE_DATE: _date_from_string, * MYSQL_TYPE_TIME: _time_from_string, # <<<<<<<<<<<<<< @@ -23960,13 +24573,13 @@ */ __pyx_t_2 = PyInt_FromLong(MYSQL_TYPE_TIME); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s___time_from_string); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s___time_from_string); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":42 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":42 * # None means to try to decode if we're using unicode and the field isn't * # in 'binary' encoding. * MYSQL_TYPE_BLOB: None, # <<<<<<<<<<<<<< @@ -23978,7 +24591,7 @@ if (PyDict_SetItem(__pyx_t_1, __pyx_t_4, Py_None) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":43 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":43 * # in 'binary' encoding. * MYSQL_TYPE_BLOB: None, * MYSQL_TYPE_STRING: None, # <<<<<<<<<<<<<< @@ -23990,7 +24603,7 @@ if (PyDict_SetItem(__pyx_t_1, __pyx_t_4, Py_None) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":44 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":44 * MYSQL_TYPE_BLOB: None, * MYSQL_TYPE_STRING: None, * MYSQL_TYPE_VAR_STRING: None, # <<<<<<<<<<<<<< @@ -24002,7 +24615,7 @@ if (PyDict_SetItem(__pyx_t_1, __pyx_t_4, Py_None) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":45 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":45 * MYSQL_TYPE_STRING: None, * MYSQL_TYPE_VAR_STRING: None, * MYSQL_TYPE_VARCHAR: None, # <<<<<<<<<<<<<< @@ -24014,7 +24627,7 @@ if (PyDict_SetItem(__pyx_t_1, __pyx_t_4, Py_None) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":47 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":47 * MYSQL_TYPE_VARCHAR: None, * # For consistency with the statement API. * MYSQL_TYPE_SET: None, # <<<<<<<<<<<<<< @@ -24025,100 +24638,100 @@ __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_1, __pyx_t_4, Py_None) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s___conversions, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s___conversions, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":50 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":50 * } * * Timestamp = datetime.datetime # <<<<<<<<<<<<<< * Date = datetime.date * Time = datetime.time */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__datetime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__datetime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Timestamp, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__Timestamp, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":51 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":51 * * Timestamp = datetime.datetime * Date = datetime.date # <<<<<<<<<<<<<< * Time = datetime.time * Binary = bytes */ - __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__datetime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__date); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__date); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Date, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__Date, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":52 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":52 * Timestamp = datetime.datetime * Date = datetime.date * Time = datetime.time # <<<<<<<<<<<<<< * Binary = bytes * */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__time); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__time); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Time, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__Time, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":53 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":53 * Date = datetime.date * Time = datetime.time * Binary = bytes # <<<<<<<<<<<<<< * * def TimestampFromTicks(ticks): */ - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Binary, ((PyObject *)((PyObject*)(&PyBytes_Type)))) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__Binary, ((PyObject *)((PyObject*)(&PyBytes_Type)))) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":55 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":55 * Binary = bytes * * def TimestampFromTicks(ticks): # <<<<<<<<<<<<<< * """TimestampFromTicks(ticks) -> Timestamp. * */ - __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6oursql_6TimestampFromTicks, NULL, __pyx_n_s__oursql); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6oursql_13TimestampFromTicks, NULL, __pyx_n_s__oursql); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__TimestampFromTicks, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__TimestampFromTicks, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":62 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":62 * return Timestamp(*time.localtime(ticks)[:6]) * * def DateFromTicks(ticks): # <<<<<<<<<<<<<< * """DateFromTicks(ticks) -> Date. * */ - __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6oursql_7DateFromTicks, NULL, __pyx_n_s__oursql); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6oursql_15DateFromTicks, NULL, __pyx_n_s__oursql); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__DateFromTicks, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__DateFromTicks, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/conversions.pyx":69 + /* "/private/tmp/oursql-0.9.3/oursqlx/conversions.pyx":69 * return Date(*time.localtime(ticks)[:3]) * * def TimeFromTicks(ticks): # <<<<<<<<<<<<<< * """TimeFromTicks(ticks) -> Time. * */ - __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6oursql_8TimeFromTicks, NULL, __pyx_n_s__oursql); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6oursql_17TimeFromTicks, NULL, __pyx_n_s__oursql); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__TimeFromTicks, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__TimeFromTicks, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":1 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":1 * _protocol_enum_map = { # <<<<<<<<<<<<<< * None: MYSQL_PROTOCOL_DEFAULT, * 'tcp': MYSQL_PROTOCOL_TCP, @@ -24126,7 +24739,7 @@ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":2 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":2 * _protocol_enum_map = { * None: MYSQL_PROTOCOL_DEFAULT, # <<<<<<<<<<<<<< * 'tcp': MYSQL_PROTOCOL_TCP, @@ -24137,7 +24750,7 @@ if (PyDict_SetItem(__pyx_t_4, Py_None, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":3 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":3 * _protocol_enum_map = { * None: MYSQL_PROTOCOL_DEFAULT, * 'tcp': MYSQL_PROTOCOL_TCP, # <<<<<<<<<<<<<< @@ -24149,7 +24762,7 @@ if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__tcp), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":4 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":4 * None: MYSQL_PROTOCOL_DEFAULT, * 'tcp': MYSQL_PROTOCOL_TCP, * 'socket': MYSQL_PROTOCOL_SOCKET, # <<<<<<<<<<<<<< @@ -24161,7 +24774,7 @@ if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__socket), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":5 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":5 * 'tcp': MYSQL_PROTOCOL_TCP, * 'socket': MYSQL_PROTOCOL_SOCKET, * 'pipe': MYSQL_PROTOCOL_PIPE, # <<<<<<<<<<<<<< @@ -24173,7 +24786,7 @@ if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__pipe), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/connection.pyx":6 + /* "/private/tmp/oursql-0.9.3/oursqlx/connection.pyx":6 * 'socket': MYSQL_PROTOCOL_SOCKET, * 'pipe': MYSQL_PROTOCOL_PIPE, * 'memory': MYSQL_PROTOCOL_MEMORY, # <<<<<<<<<<<<<< @@ -24184,20 +24797,20 @@ __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__memory), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s___protocol_enum_map, ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s___protocol_enum_map, ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":1 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":1 * import datetime # <<<<<<<<<<<<<< * import decimal * import codecs */ __pyx_t_4 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), 0, -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__datetime, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__datetime, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":2 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":2 * import datetime * import decimal # <<<<<<<<<<<<<< * import codecs @@ -24205,10 +24818,10 @@ */ __pyx_t_4 = __Pyx_Import(((PyObject *)__pyx_n_s__decimal), 0, -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__decimal, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__decimal, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":3 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":3 * import datetime * import decimal * import codecs # <<<<<<<<<<<<<< @@ -24217,10 +24830,10 @@ */ __pyx_t_4 = __Pyx_Import(((PyObject *)__pyx_n_s__codecs), 0, -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__codecs, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__codecs, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":4 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":4 * import decimal * import codecs * import io # <<<<<<<<<<<<<< @@ -24229,10 +24842,10 @@ */ __pyx_t_4 = __Pyx_Import(((PyObject *)__pyx_n_s__io), 0, -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__io, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__io, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":6 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":6 * import io * * cdef my_ulonglong ull_negone = -1 # <<<<<<<<<<<<<< @@ -24241,7 +24854,7 @@ */ __pyx_v_6oursql_ull_negone = ((my_ulonglong)-1); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":36 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":36 * * BinaryIterWrapper = type('BinaryIterWrapper', * (_BinaryWhateverMixin, IterWrapper), {'__module__': __name__, '__doc__': # <<<<<<<<<<<<<< @@ -24249,7 +24862,7 @@ * */ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_6oursql__BinaryWhateverMixin))); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)((PyObject*)__pyx_ptype_6oursql__BinaryWhateverMixin))); __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_6oursql__BinaryWhateverMixin))); @@ -24258,13 +24871,13 @@ __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_6oursql_IterWrapper))); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s____name__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s____name__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s____module__), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s____doc__), ((PyObject *)__pyx_kp_s_67)) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s____doc__), ((PyObject *)__pyx_kp_s_98)) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__BinaryIterWrapper)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__BinaryIterWrapper)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__BinaryIterWrapper)); @@ -24277,10 +24890,10 @@ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyType_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__BinaryIterWrapper, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__BinaryIterWrapper, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":78 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":78 * * BinaryFileWrapper = type('BinaryFileWrapper', * (_BinaryWhateverMixin, FileWrapper), {'__module__': __name__, '__doc__': # <<<<<<<<<<<<<< @@ -24288,7 +24901,7 @@ * */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_6oursql__BinaryWhateverMixin))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)__pyx_ptype_6oursql__BinaryWhateverMixin))); __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_6oursql__BinaryWhateverMixin))); @@ -24297,13 +24910,13 @@ __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_6oursql_FileWrapper))); __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s____name__); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s____name__); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s____module__), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s____doc__), ((PyObject *)__pyx_kp_s_68)) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s____doc__), ((PyObject *)__pyx_kp_s_99)) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_n_s__BinaryFileWrapper)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_n_s__BinaryFileWrapper)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__BinaryFileWrapper)); @@ -24316,10 +24929,10 @@ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyType_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__BinaryFileWrapper, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__BinaryFileWrapper, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":601 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":601 * self._raise_error() * * _DictStatement = type('_DictStatement', (_DictWhateverMixin, _Statement), # <<<<<<<<<<<<<< @@ -24327,7 +24940,7 @@ * */ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_6oursql__DictWhateverMixin))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)__pyx_ptype_6oursql__DictWhateverMixin))); __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_6oursql__DictWhateverMixin))); @@ -24335,7 +24948,7 @@ PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)__pyx_ptype_6oursql__Statement))); __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_6oursql__Statement))); - /* "/home/sthorne/src/oursql-py3k/oursqlx/statement.pyx":602 + /* "/private/tmp/oursql-0.9.3/oursqlx/statement.pyx":602 * * _DictStatement = type('_DictStatement', (_DictWhateverMixin, _Statement), * {'__module__': __name__}) # <<<<<<<<<<<<<< @@ -24344,12 +24957,12 @@ */ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s____name__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s____name__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s____module__), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_n_s___DictStatement)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s___DictStatement)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s___DictStatement)); @@ -24362,23 +24975,23 @@ __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyType_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s___DictStatement, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s___DictStatement, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":19 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":19 * cdef int show_table * * conversions_dict = _conversions # <<<<<<<<<<<<<< * * def __cinit__(self, Connection conn not None, bint show_table=False, */ - __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s___conversions); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s___conversions); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem((PyObject *)__pyx_ptype_6oursql__ResultSet->tp_dict, __pyx_n_s__conversions_dict, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6oursql__ResultSet); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":143 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":143 * self.has_result = self.result.has_result * * _result_class = _ResultSet # <<<<<<<<<<<<<< @@ -24388,7 +25001,7 @@ if (PyDict_SetItem((PyObject *)__pyx_ptype_6oursql__Query->tp_dict, __pyx_n_s___result_class, ((PyObject *)((PyObject*)__pyx_ptype_6oursql__ResultSet))) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} PyType_Modified(__pyx_ptype_6oursql__Query); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":190 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":190 * * # Cython should support multiple inheritance one of these days. * _DictResultSet = type('_DictResultSet', (_DictWhateverMixin, _ResultSet), # <<<<<<<<<<<<<< @@ -24396,7 +25009,7 @@ * */ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_6oursql__DictWhateverMixin))); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)((PyObject*)__pyx_ptype_6oursql__DictWhateverMixin))); __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_6oursql__DictWhateverMixin))); @@ -24404,7 +25017,7 @@ PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)((PyObject*)__pyx_ptype_6oursql__ResultSet))); __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_6oursql__ResultSet))); - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":191 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":191 * # Cython should support multiple inheritance one of these days. * _DictResultSet = type('_DictResultSet', (_DictWhateverMixin, _ResultSet), * {'__module__': __name__}) # <<<<<<<<<<<<<< @@ -24413,12 +25026,12 @@ */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s____name__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s____name__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s____module__), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s___DictResultSet)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s___DictResultSet)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s___DictResultSet)); @@ -24431,35 +25044,35 @@ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyType_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s___DictResultSet, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s___DictResultSet, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/query.pyx":194 + /* "/private/tmp/oursql-0.9.3/oursqlx/query.pyx":194 * * cdef class _DictQuery(_Query): * _result_class = _DictResultSet # <<<<<<<<<<<<<< */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___DictResultSet); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___DictResultSet); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_6oursql__DictQuery->tp_dict, __pyx_n_s___result_class, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6oursql__DictQuery); - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":1 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":1 * import collections, itertools # <<<<<<<<<<<<<< * * cdef class Cursor: */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__collections), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__collections, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__collections, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__itertools), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__itertools, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__itertools, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":35 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":35 * cdef public unsigned long arraysize * * _statement_class = _Statement # <<<<<<<<<<<<<< @@ -24469,7 +25082,7 @@ if (PyDict_SetItem((PyObject *)__pyx_ptype_6oursql_Cursor->tp_dict, __pyx_n_s___statement_class, ((PyObject *)((PyObject*)__pyx_ptype_6oursql__Statement))) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} PyType_Modified(__pyx_ptype_6oursql_Cursor); - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":36 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":36 * * _statement_class = _Statement * _query_class = _Query # <<<<<<<<<<<<<< @@ -24479,7 +25092,7 @@ if (PyDict_SetItem((PyObject *)__pyx_ptype_6oursql_Cursor->tp_dict, __pyx_n_s___query_class, ((PyObject *)((PyObject*)__pyx_ptype_6oursql__Query))) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} PyType_Modified(__pyx_ptype_6oursql_Cursor); - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":88 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":88 * self.conn.ping() * * def execute(self, query, params=(), plain_query=False): # <<<<<<<<<<<<<< @@ -24488,23 +25101,23 @@ */ __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_k_55 = __pyx_t_1; + __pyx_k_61 = __pyx_t_1; __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":279 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":279 * """ * * _statement_class = _DictStatement # <<<<<<<<<<<<<< * _query_class = _DictQuery */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___DictStatement); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___DictStatement); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_6oursql_DictCursor->tp_dict, __pyx_n_s___statement_class, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6oursql_DictCursor); - /* "/home/sthorne/src/oursql-py3k/oursqlx/cursor.pyx":280 + /* "/private/tmp/oursql-0.9.3/oursqlx/cursor.pyx":280 * * _statement_class = _DictStatement * _query_class = _DictQuery # <<<<<<<<<<<<<< @@ -24519,7 +25132,7 @@ * raise InterfaceError('could not initialize mysql') * */ - __pyx_t_5 = mysql_library_init(0, NULL, NULL); + __pyx_t_5 = (mysql_library_init(0, NULL, NULL) != 0); if (__pyx_t_5) { /* "oursql.pyx":91 @@ -24529,9 +25142,9 @@ * * paramstyle = 'qmark' */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__InterfaceError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__InterfaceError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_70), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_101), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); @@ -24548,7 +25161,7 @@ * threadsafety = 1 * apilevel = '2.0' */ - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__paramstyle, ((PyObject *)__pyx_n_s__qmark)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__paramstyle, ((PyObject *)__pyx_n_s__qmark)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "oursql.pyx":94 * @@ -24557,7 +25170,7 @@ * apilevel = '2.0' * connect = Connection */ - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__threadsafety, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__threadsafety, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "oursql.pyx":95 * paramstyle = 'qmark' @@ -24566,7 +25179,7 @@ * connect = Connection * */ - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__apilevel, ((PyObject *)__pyx_kp_s_71)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__apilevel, ((PyObject *)__pyx_kp_s_102)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "oursql.pyx":96 * threadsafety = 1 @@ -24575,7 +25188,7 @@ * * cdef class _DBAPITypeObject: */ - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__connect, ((PyObject *)((PyObject*)__pyx_ptype_6oursql_Connection))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__connect, ((PyObject *)((PyObject*)__pyx_ptype_6oursql_Connection))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "oursql.pyx":118 * @@ -24591,7 +25204,7 @@ __pyx_t_4 = PyInt_FromLong(MYSQL_TYPE_VAR_STRING); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); @@ -24604,7 +25217,7 @@ __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6oursql__DBAPITypeObject)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__STRING, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__STRING, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "oursql.pyx":120 @@ -24631,7 +25244,7 @@ __pyx_t_2 = PyInt_FromLong(MYSQL_TYPE_TINY_BLOB); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3); @@ -24647,7 +25260,7 @@ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6oursql__DBAPITypeObject)), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__BINARY, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__BINARY, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "oursql.pyx":123 @@ -24682,7 +25295,7 @@ __pyx_t_9 = PyInt_FromLong(MYSQL_TYPE_YEAR); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyTuple_New(8); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_10)); + __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_6); @@ -24710,7 +25323,7 @@ __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6oursql__DBAPITypeObject)), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__NUMBER, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__NUMBER, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "oursql.pyx":126 @@ -24725,7 +25338,7 @@ __pyx_t_10 = PyInt_FromLong(MYSQL_TYPE_NEWDATE); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_8)); + __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_10); @@ -24735,7 +25348,7 @@ __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6oursql__DBAPITypeObject)), ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__DATE, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__DATE, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "oursql.pyx":128 @@ -24748,14 +25361,14 @@ __pyx_t_10 = PyInt_FromLong(MYSQL_TYPE_TIME); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_8)); + __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6oursql__DBAPITypeObject)), ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__TIME, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__TIME, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "oursql.pyx":130 @@ -24770,7 +25383,7 @@ __pyx_t_8 = PyInt_FromLong(MYSQL_TYPE_DATETIME); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_9)); + __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_8); @@ -24780,8 +25393,8 @@ __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6oursql__DBAPITypeObject)), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__DATETIME, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__TIMESTAMP, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__DATETIME, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__TIMESTAMP, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "oursql.pyx":131 @@ -24793,7 +25406,7 @@ */ __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6oursql__DBAPITypeObject)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ROWID, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__ROWID, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "oursql.pyx":133 @@ -24804,7 +25417,7 @@ */ __pyx_t_8 = PyUnicode_FromString(mysql_get_client_info()); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__client_info, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__client_info, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "oursql.pyx":134 @@ -24814,7 +25427,7 @@ */ __pyx_t_8 = _oursqlx_generate_errno_dict(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__errnos, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__errnos, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "oursql.pyx":1 @@ -24824,7 +25437,7 @@ */ __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s____test__, ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; goto __pyx_L0; __pyx_L1_error:; @@ -24853,7 +25466,6 @@ } /* Runtime support code */ - #if CYTHON_REFNANNY static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; @@ -24870,17 +25482,15 @@ } #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); - } +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); + if (unlikely(!result)) { + PyErr_Format(PyExc_NameError, +#if PY_MAJOR_VERSION >= 3 + "name '%U' is not defined", name); +#else + "name '%s' is not defined", PyString_AS_STRING(name)); +#endif } return result; } @@ -24894,7 +25504,6 @@ { Py_ssize_t num_expected; const char *more_or_less; - if (num_found < num_min) { num_expected = num_min; more_or_less = "at least"; @@ -24906,7 +25515,7 @@ more_or_less = "exactly"; } PyErr_Format(PyExc_TypeError, - "%s() takes %s %"PY_FORMAT_SIZE_T"d positional argument%s (%"PY_FORMAT_SIZE_T"d given)", + "%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); } @@ -24920,7 +25529,7 @@ "%s() got multiple values for keyword argument '%U'", func_name, kw_name); #else "%s() got multiple values for keyword argument '%s'", func_name, - PyString_AS_STRING(kw_name)); + PyString_AsString(kw_name)); #endif } @@ -24936,55 +25545,77 @@ 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; - } else { - #if PY_MAJOR_VERSION < 3 - if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) { - #else - if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key))) { - #endif - goto invalid_keyword_type; - } else { - for (name = first_kw_arg; *name; name++) { - #if PY_MAJOR_VERSION >= 3 - if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) && - PyUnicode_Compare(**name, key) == 0) break; - #else - if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) && - _PyString_Eq(**name, key)) break; - #endif - } - if (*name) { + 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; - } else { - /* unexpected keyword found */ - for (name=argnames; name != first_kw_arg; name++) { - if (**name == key) goto arg_passed_twice; - #if PY_MAJOR_VERSION >= 3 - if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) && - PyUnicode_Compare(**name, key) == 0) goto arg_passed_twice; - #else - if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) && - _PyString_Eq(**name, key)) goto arg_passed_twice; - #endif - } - if (kwds2) { - if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; - } else { - goto invalid_keyword; + 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, **name); + __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, @@ -25003,23 +25634,57 @@ return -1; } -static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { - PyErr_Format(PyExc_ValueError, - "need more than %"PY_FORMAT_SIZE_T"d value%s to unpack", - index, (index == 1) ? "" : "s"); +static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { + PyObject *result; +#if CYTHON_COMPILING_IN_CPYTHON + result = PyDict_GetItem(__pyx_d, name); + if (result) { + Py_INCREF(result); + } else { +#else + result = PyObject_GetItem(__pyx_d, name); + if (!result) { + PyErr_Clear(); +#endif + result = __Pyx_GetBuiltinName(name); + } + return result; } static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, - "too many values to unpack (expected %"PY_FORMAT_SIZE_T"d)", expected); + "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); } -static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { - if (unlikely(retval)) { - Py_DECREF(retval); - __Pyx_RaiseTooManyValuesError(expected); - return -1; - } else if (PyErr_Occurred()) { +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; @@ -25028,16 +25693,24 @@ } } return 0; +#endif } -static CYTHON_INLINE void __Pyx_RaiseNoneIndexingError(void) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is unsubscriptable"); +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_ErrRestore(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->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; @@ -25047,78 +25720,81 @@ Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); +#else + PyErr_Restore(type, value, tb); +#endif } - static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { +#if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; - tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; +#else + PyErr_Fetch(type, value, tb); +#endif } - #if PY_MAJOR_VERSION < 3 -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { - /* cause is unused */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, + CYTHON_UNUSED PyObject *cause) { Py_XINCREF(type); - Py_XINCREF(value); - Py_XINCREF(tb); - /* First, check the traceback argument, replacing None with NULL. */ - if (tb == Py_None) { - Py_DECREF(tb); - tb = 0; - } - else if (tb != NULL && !PyTraceBack_Check(tb)) { - PyErr_SetString(PyExc_TypeError, - "raise: arg 3 must be a traceback or None"); - goto raise_error; - } - /* Next, replace a missing value with None */ - if (value == NULL) { - value = Py_None; + if (!value || value == Py_None) + value = NULL; + else Py_INCREF(value); + if (!tb || tb == Py_None) + tb = NULL; + else { + Py_INCREF(tb); + if (!PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto raise_error; + } } #if PY_VERSION_HEX < 0x02050000 - if (!PyClass_Check(type)) + if (PyClass_Check(type)) { #else - if (!PyType_Check(type)) + if (PyType_Check(type)) { #endif - { - /* Raising an instance. The value should be a dummy. */ - if (value != Py_None) { +#if CYTHON_COMPILING_IN_PYPY + if (!value) { + Py_INCREF(Py_None); + value = Py_None; + } +#endif + PyErr_NormalizeException(&type, &value, &tb); + } else { + if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } - /* Normalize to raise , */ - Py_DECREF(value); value = type; #if PY_VERSION_HEX < 0x02050000 - if (PyInstance_Check(type)) { - type = (PyObject*) ((PyInstanceObject*)type)->in_class; - Py_INCREF(type); - } - else { - type = 0; - PyErr_SetString(PyExc_TypeError, - "raise: exception must be an old-style class or instance"); - goto raise_error; - } - #else - type = (PyObject*) Py_TYPE(type); + if (PyInstance_Check(type)) { + type = (PyObject*) ((PyInstanceObject*)type)->in_class; Py_INCREF(type); - if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { - PyErr_SetString(PyExc_TypeError, - "raise: exception class must be a subclass of BaseException"); - goto raise_error; - } + } else { + type = 0; + PyErr_SetString(PyExc_TypeError, + "raise: exception must be an old-style class or instance"); + goto raise_error; + } + #else + type = (PyObject*) Py_TYPE(type); + Py_INCREF(type); + if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto raise_error; + } #endif } - __Pyx_ErrRestore(type, value, tb); return; raise_error: @@ -25127,10 +25803,9 @@ Py_XDECREF(tb); return; } - #else /* Python 3+ */ - static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; if (tb == Py_None) { tb = 0; } else if (tb && !PyTraceBack_Check(tb)) { @@ -25140,7 +25815,6 @@ } if (value == Py_None) value = 0; - if (PyExceptionInstance_Check(type)) { if (value) { PyErr_SetString(PyExc_TypeError, @@ -25149,37 +25823,58 @@ } value = type; type = (PyObject*) Py_TYPE(value); - } else if (!PyExceptionClass_Check(type)) { + } else if (PyExceptionClass_Check(type)) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyEval_CallObject(type, args); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } - +#if PY_VERSION_HEX >= 0x03030000 if (cause) { +#else + if (cause && cause != Py_None) { +#endif PyObject *fixed_cause; - if (PyExceptionClass_Check(cause)) { + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; - } - else if (PyExceptionInstance_Check(cause)) { + } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); - } - else { + } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } - if (!value) { - value = PyObject_CallObject(type, NULL); - } PyException_SetCause(value, fixed_cause); } - PyErr_SetObject(type, value); - if (tb) { PyThreadState *tstate = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; @@ -25189,8 +25884,8 @@ Py_XDECREF(tmp_tb); } } - bad: + Py_XDECREF(owned_instance); return; } #endif @@ -25215,23 +25910,132 @@ return 0; } -static PyObject* __Pyx_PyEval_CallObjectWithKeywords(PyObject *callable, PyObject *args, PyObject *kwargs) { - PyObject* result; - if (likely(PyDict_Check(kwargs))) { - return PyEval_CallObjectWithKeywords(callable, args, kwargs); +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( + PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, + int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { +#if CYTHON_COMPILING_IN_CPYTHON + PyMappingMethods* mp; +#if PY_MAJOR_VERSION < 3 + PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; + if (likely(ms && ms->sq_slice)) { + if (!has_cstart) { + if (_py_start && (*_py_start != Py_None)) { + cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); + if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; + } else + cstart = 0; + } + if (!has_cstop) { + if (_py_stop && (*_py_stop != Py_None)) { + cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); + if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; + } else + cstop = PY_SSIZE_T_MAX; + } + if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { + Py_ssize_t l = ms->sq_length(obj); + if (likely(l >= 0)) { + if (cstop < 0) { + cstop += l; + if (cstop < 0) cstop = 0; + } + if (cstart < 0) { + cstart += l; + if (cstart < 0) cstart = 0; + } + } else { + if (PyErr_ExceptionMatches(PyExc_OverflowError)) + PyErr_Clear(); + else + goto bad; + } + } + return ms->sq_slice(obj, cstart, cstop); + } +#endif + mp = Py_TYPE(obj)->tp_as_mapping; + if (likely(mp && mp->mp_subscript)) +#endif + { + PyObject* result; + PyObject *py_slice, *py_start, *py_stop; + if (_py_slice) { + py_slice = *_py_slice; + } else { + PyObject* owned_start = NULL; + PyObject* owned_stop = NULL; + if (_py_start) { + py_start = *_py_start; + } else { + if (has_cstart) { + owned_start = py_start = PyInt_FromSsize_t(cstart); + if (unlikely(!py_start)) goto bad; + } else + py_start = Py_None; + } + if (_py_stop) { + py_stop = *_py_stop; + } else { + if (has_cstop) { + owned_stop = py_stop = PyInt_FromSsize_t(cstop); + if (unlikely(!py_stop)) { + Py_XDECREF(owned_start); + goto bad; + } + } else + py_stop = Py_None; + } + py_slice = PySlice_New(py_start, py_stop, Py_None); + Py_XDECREF(owned_start); + Py_XDECREF(owned_stop); + if (unlikely(!py_slice)) goto bad; + } +#if CYTHON_COMPILING_IN_CPYTHON + result = mp->mp_subscript(obj, py_slice); +#else + result = PyObject_GetItem(obj, py_slice); +#endif + if (!_py_slice) { + Py_DECREF(py_slice); + } + return result; + } + PyErr_Format(PyExc_TypeError, + "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); +bad: + return NULL; +} + +static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) { + if (likely(PyList_CheckExact(L))) { + if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return NULL; + Py_INCREF(Py_None); + return Py_None; /* this is just to have an accurate signature */ } else { - PyObject* real_dict; - real_dict = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, kwargs, NULL); - if (unlikely(!real_dict)) - return NULL; - result = PyEval_CallObjectWithKeywords(callable, args, real_dict); - Py_DECREF(real_dict); - return result; /* may be NULL */ + return __Pyx_PyObject_CallMethod1(L, __pyx_n_s__append, x); + } +} + +static CYTHON_INLINE PyObject* __Pyx_PyObject_Pop(PyObject* L) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02040000 + if (likely(PyList_CheckExact(L)) + && likely(PyList_GET_SIZE(L) > (((PyListObject*)L)->allocated >> 1))) { + Py_SIZE(L) -= 1; + return PyList_GET_ITEM(L, PyList_GET_SIZE(L)); + } +#if PY_VERSION_HEX >= 0x02050000 + else if (Py_TYPE(L) == (&PySet_Type)) { + return PySet_Pop(L); } +#endif +#endif + return __Pyx_PyObject_CallMethod0(L, __pyx_n_s__pop); } 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; @@ -25240,19 +26044,27 @@ 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 - *type = local_type; - *value = local_value; - *tb = local_tb; 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; @@ -25260,10 +26072,13 @@ tstate->exc_value = local_value; tstate->exc_traceback = local_tb; /* Make sure tstate is in a consistent state when we XDECREF - these objects (XDECREF may run arbitrary code). */ + 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; @@ -25275,43 +26090,703 @@ return -1; } - +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; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck) { +#if CYTHON_COMPILING_IN_CPYTHON + if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o); + if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { + PyObject *r = PyList_GET_ITEM(o, i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck) { +#if CYTHON_COMPILING_IN_CPYTHON + if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck) { +#if CYTHON_COMPILING_IN_CPYTHON + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((!boundscheck) || (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 = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } else { + PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; + if (likely(m && m->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { + Py_ssize_t l = m->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (PyErr_ExceptionMatches(PyExc_OverflowError)) + PyErr_Clear(); + else + return NULL; + } + } + return m->sq_item(o, i); + } + } +#else + if (is_list || PySequence_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +} static CYTHON_INLINE int __Pyx_CheckKeywordStrings( PyObject *kwdict, const char* function_name, int kw_allowed) { - PyObject* key = 0; - Py_ssize_t pos = 0; - while (PyDict_Next(kwdict, &pos, &key, 0)) { - #if PY_MAJOR_VERSION < 3 - if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) - #else - if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key))) - #endif - goto invalid_keyword_type; + PyObject* key = 0; + Py_ssize_t pos = 0; +#if CPYTHON_COMPILING_IN_PYPY + if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0)) + goto invalid_keyword; + return 1; +#else + while (PyDict_Next(kwdict, &pos, &key, 0)) { + #if PY_MAJOR_VERSION < 3 + if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) + #endif + if (unlikely(!PyUnicode_Check(key))) + goto invalid_keyword_type; + } + if ((!kw_allowed) && unlikely(key)) + goto invalid_keyword; + return 1; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%s() keywords must be strings", function_name); + return 0; +#endif +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 + return 0; +} + +static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) { + PyTypeObject* type = Py_TYPE(obj); + while (type && type->tp_traverse != current_tp_traverse) + type = type->tp_base; + while (type && type->tp_traverse == current_tp_traverse) + type = type->tp_base; + if (type && type->tp_traverse) + return type->tp_traverse(obj, v, a); + return 0; +} + +static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) { + PyTypeObject* type = Py_TYPE(obj); + while (type && type->tp_clear != current_tp_clear) + type = type->tp_base; + while (type && type->tp_clear == current_tp_clear) + type = type->tp_base; + if (type && type->tp_clear) + type->tp_clear(obj); +} + +static int __Pyx_SetVtable(PyObject *dict, void *vtable) { +#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) + PyObject *ob = PyCapsule_New(vtable, 0, 0); +#else + PyObject *ob = PyCObject_FromVoidPtr(vtable, 0); +#endif + if (!ob) + goto bad; + if (PyDict_SetItem(dict, __pyx_n_s____pyx_vtable__, ob) < 0) + goto bad; + Py_DECREF(ob); + return 0; +bad: + Py_XDECREF(ob); + return -1; +} + +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) +{ + if (unlikely(op->func_doc == NULL)) { + if (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 (unlikely(op->func_doc == NULL)) + return NULL; + } else { + 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) + value = Py_None; /* Mark as deleted */ + Py_INCREF(value); + op->func_doc = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op) +{ + if (unlikely(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 + if (unlikely(op->func_name == NULL)) + return NULL; + } + 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 (unlikely(value == NULL || !PyUnicode_Check(value))) { +#else + if (unlikely(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_qualname(__pyx_CyFunctionObject *op) +{ + Py_INCREF(op->func_qualname); + return op->func_qualname; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value) +{ + PyObject *tmp; +#if PY_MAJOR_VERSION >= 3 + if (unlikely(value == NULL || !PyUnicode_Check(value))) { +#else + if (unlikely(value == NULL || !PyString_Check(value))) { +#endif + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + tmp = op->func_qualname; + Py_INCREF(value); + op->func_qualname = 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 (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(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 (unlikely(value == NULL)) { + PyErr_SetString(PyExc_TypeError, + "function's dictionary may not be deleted"); + return -1; + } + if (unlikely(!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 int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + Py_DECREF(res); + return 0; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) { + PyObject* tmp; + if (!value) { + value = Py_None; + } else if (value != Py_None && !PyTuple_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + Py_INCREF(value); + tmp = op->defaults_tuple; + op->defaults_tuple = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) { + PyObject* tmp; + if (!value) { + value = Py_None; + } else if (value != Py_None && !PyDict_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + Py_INCREF(value); + tmp = op->defaults_kwdict; + op->defaults_kwdict = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) { + PyObject* tmp; + if (!value || value == Py_None) { + value = NULL; + } else if (!PyDict_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + tmp = op->func_annotations; + op->func_annotations = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +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 *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 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, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 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* qualname, + 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; + Py_INCREF(qualname); + op->func_qualname = qualname; + 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_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = 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_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_code); + Py_CLEAR(m->func_classobj); + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + 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_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_code); + Py_VISIT(m->func_classobj); + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + if (m->defaults) { + PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); + int i; + for (i = 0; i < m->defaults_pyobjects; i++) + Py_VISIT(pydefaults[i]); } - if ((!kw_allowed) && unlikely(key)) - goto invalid_keyword; - return 1; -invalid_keyword_type: - PyErr_Format(PyExc_TypeError, - "%s() keywords must be strings", function_name); return 0; -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 +} +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) +{ +#if PY_MAJOR_VERSION >= 3 + return PyUnicode_FromFormat("", + op->func_qualname, (void *)op); +#else + return PyString_FromFormat("", + PyString_AsString(op->func_qualname), (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, 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 void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} 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; @@ -25319,9 +26794,12 @@ 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; @@ -25333,18 +26811,23 @@ 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; +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { 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_VERSION_HEX < 0x03030000 + PyObject *py_import; + py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s____import__); if (!py_import) goto bad; + #endif if (from_list) list = from_list; else { @@ -25361,12 +26844,42 @@ goto bad; #if PY_VERSION_HEX >= 0x02050000 { - 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); + #if PY_MAJOR_VERSION >= 3 + if (level == -1) { + if (strchr(__Pyx_MODULE_NAME, '.')) { + #if PY_VERSION_HEX < 0x03030000 + 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); + #else + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, 1); + #endif + if (!module) { + if (!PyErr_ExceptionMatches(PyExc_ImportError)) + goto bad; + PyErr_Clear(); + } + } + level = 0; /* try absolute import on failure */ + } + #endif + if (!module) { + #if PY_VERSION_HEX < 0x03030000 + 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 + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, level); + #endif + } } #else if (level>0) { @@ -25377,19 +26890,20 @@ name, global_dict, empty_dict, list, NULL); #endif bad: - Py_XDECREF(empty_list); + #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); + #endif + Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases) { PyObject *metaclass; - /* Default metaclass */ #if PY_MAJOR_VERSION < 3 if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) { PyObject *base = PyTuple_GET_ITEM(bases, 0); - metaclass = PyObject_GetAttrString(base, (char *)"__class__"); + metaclass = __Pyx_PyObject_GetAttrStr(base, __pyx_n_s____class__); if (!metaclass) { PyErr_Clear(); metaclass = (PyObject*) Py_TYPE(base); @@ -25410,15 +26924,14 @@ } static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, - PyObject *modname) { + PyObject *qualname, PyObject *modname) { PyObject *result; PyObject *metaclass; - - if (PyDict_SetItemString(dict, "__module__", modname) < 0) + if (PyDict_SetItem(dict, __pyx_n_s____module__, modname) < 0) return NULL; - - /* Python2 __metaclass__ */ - metaclass = PyDict_GetItemString(dict, "__metaclass__"); + if (PyDict_SetItem(dict, __pyx_n_s____qualname__, qualname) < 0) + return NULL; + metaclass = PyDict_GetItem(dict, __pyx_n_s____metaclass__); if (metaclass) { Py_INCREF(metaclass); } else { @@ -25429,108 +26942,6 @@ return result; } - -static PyObject *__pyx_binding_PyCFunctionType_NewEx(PyMethodDef *ml, PyObject *self, PyObject *module) { - __pyx_binding_PyCFunctionType_object *op = PyObject_GC_New(__pyx_binding_PyCFunctionType_object, __pyx_binding_PyCFunctionType); - if (op == NULL) - return NULL; - op->func.m_ml = ml; - Py_XINCREF(self); - op->func.m_self = self; - Py_XINCREF(module); - op->func.m_module = module; - PyObject_GC_Track(op); - return (PyObject *)op; -} - -static void __pyx_binding_PyCFunctionType_dealloc(__pyx_binding_PyCFunctionType_object *m) { - PyObject_GC_UnTrack(m); - Py_XDECREF(m->func.m_self); - Py_XDECREF(m->func.m_module); - PyObject_GC_Del(m); -} - -static PyObject *__pyx_binding_PyCFunctionType_descr_get(PyObject *func, PyObject *obj, PyObject *type) { - if (obj == Py_None) - obj = NULL; - return PyMethod_New(func, obj, type); -} - -static int __pyx_binding_PyCFunctionType_init(void) { - __pyx_binding_PyCFunctionType_type = PyCFunction_Type; - __pyx_binding_PyCFunctionType_type.tp_name = __Pyx_NAMESTR("cython_binding_builtin_function_or_method"); - __pyx_binding_PyCFunctionType_type.tp_dealloc = (destructor)__pyx_binding_PyCFunctionType_dealloc; - __pyx_binding_PyCFunctionType_type.tp_descr_get = __pyx_binding_PyCFunctionType_descr_get; - if (PyType_Ready(&__pyx_binding_PyCFunctionType_type) < 0) { - return -1; - } - __pyx_binding_PyCFunctionType = &__pyx_binding_PyCFunctionType_type; - return 0; - -} - -static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { - if (s1 == s2) { /* as done by PyObject_RichCompareBool(); also catches the (interned) empty string */ - return (equals == Py_EQ); - } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { - if (PyBytes_GET_SIZE(s1) != PyBytes_GET_SIZE(s2)) { - return (equals == Py_NE); - } else if (PyBytes_GET_SIZE(s1) == 1) { - if (equals == Py_EQ) - return (PyBytes_AS_STRING(s1)[0] == PyBytes_AS_STRING(s2)[0]); - else - return (PyBytes_AS_STRING(s1)[0] != PyBytes_AS_STRING(s2)[0]); - } else { - int result = memcmp(PyBytes_AS_STRING(s1), PyBytes_AS_STRING(s2), (size_t)PyBytes_GET_SIZE(s1)); - return (equals == Py_EQ) ? (result == 0) : (result != 0); - } - } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { - return (equals == Py_NE); - } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { - return (equals == Py_NE); - } else { - int result; - PyObject* py_result = PyObject_RichCompare(s1, s2, equals); - if (!py_result) - return -1; - result = __Pyx_PyObject_IsTrue(py_result); - Py_DECREF(py_result); - return result; - } -} - -static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { - if (s1 == s2) { /* as done by PyObject_RichCompareBool(); also catches the (interned) empty string */ - return (equals == Py_EQ); - } else if (PyUnicode_CheckExact(s1) & PyUnicode_CheckExact(s2)) { - if (PyUnicode_GET_SIZE(s1) != PyUnicode_GET_SIZE(s2)) { - return (equals == Py_NE); - } else if (PyUnicode_GET_SIZE(s1) == 1) { - if (equals == Py_EQ) - return (PyUnicode_AS_UNICODE(s1)[0] == PyUnicode_AS_UNICODE(s2)[0]); - else - return (PyUnicode_AS_UNICODE(s1)[0] != PyUnicode_AS_UNICODE(s2)[0]); - } else { - int result = PyUnicode_Compare(s1, s2); - if ((result == -1) && unlikely(PyErr_Occurred())) - return -1; - return (equals == Py_EQ) ? (result == 0) : (result != 0); - } - } else if ((s1 == Py_None) & PyUnicode_CheckExact(s2)) { - return (equals == Py_NE); - } else if ((s2 == Py_None) & PyUnicode_CheckExact(s1)) { - return (equals == Py_NE); - } else { - int result; - PyObject* py_result = PyObject_RichCompare(s1, s2, equals); - if (!py_result) - return -1; - result = __Pyx_PyObject_IsTrue(py_result); - Py_DECREF(py_result); - return result; - } -} - static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_my_ulonglong(my_ulonglong val) { const my_ulonglong neg_one = (my_ulonglong)-1, const_zero = (my_ulonglong)0; const int is_unsigned = const_zero < neg_one; @@ -25746,10 +27157,15 @@ return (int)__Pyx_PyInt_AsLong(x); } +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 +#if CYTHON_USE_PYLONG_INTERNALS +#include "longintrepr.h" +#endif +#endif 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 PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { @@ -25762,6 +27178,16 @@ #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 +#if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(unsigned long)) { + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: return (unsigned long) ((PyLongObject*)x)->ob_digit[0]; + } + } +#endif +#endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); @@ -25769,6 +27195,17 @@ } return (unsigned long)PyLong_AsUnsignedLong(x); } else { +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 +#if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(unsigned long)) { + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: return +(unsigned long) ((PyLongObject*)x)->ob_digit[0]; + case -1: return -(unsigned long) ((PyLongObject*)x)->ob_digit[0]; + } + } +#endif +#endif return (unsigned long)PyLong_AsLong(x); } } else { @@ -25781,10 +27218,15 @@ } } +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 +#if CYTHON_USE_PYLONG_INTERNALS +#include "longintrepr.h" +#endif +#endif 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 PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { @@ -25797,6 +27239,16 @@ #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 +#if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) { + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: return (unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; + } + } +#endif +#endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); @@ -25804,6 +27256,17 @@ } return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 +#if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) { + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: return +(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; + case -1: return -(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; + } + } +#endif +#endif return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x); } } else { @@ -25816,10 +27279,15 @@ } } +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 +#if CYTHON_USE_PYLONG_INTERNALS +#include "longintrepr.h" +#endif +#endif 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 PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { @@ -25832,6 +27300,16 @@ #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 +#if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(long)) { + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: return (long) ((PyLongObject*)x)->ob_digit[0]; + } + } +#endif +#endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); @@ -25839,6 +27317,17 @@ } return (long)PyLong_AsUnsignedLong(x); } else { +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 +#if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(long)) { + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: return +(long) ((PyLongObject*)x)->ob_digit[0]; + case -1: return -(long) ((PyLongObject*)x)->ob_digit[0]; + } + } +#endif +#endif return (long)PyLong_AsLong(x); } } else { @@ -25851,10 +27340,15 @@ } } +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 +#if CYTHON_USE_PYLONG_INTERNALS +#include "longintrepr.h" +#endif +#endif 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 PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { @@ -25867,6 +27361,16 @@ #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 +#if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: return (PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; + } + } +#endif +#endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PY_LONG_LONG"); @@ -25874,6 +27378,17 @@ } return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 +#if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: return +(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; + case -1: return -(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; + } + } +#endif +#endif return (PY_LONG_LONG)PyLong_AsLongLong(x); } } else { @@ -25886,10 +27401,15 @@ } } +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 +#if CYTHON_USE_PYLONG_INTERNALS +#include "longintrepr.h" +#endif +#endif 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 PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { @@ -25902,6 +27422,16 @@ #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 +#if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(signed long)) { + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: return (signed long) ((PyLongObject*)x)->ob_digit[0]; + } + } +#endif +#endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed long"); @@ -25909,6 +27439,17 @@ } return (signed long)PyLong_AsUnsignedLong(x); } else { +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 +#if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(signed long)) { + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: return +(signed long) ((PyLongObject*)x)->ob_digit[0]; + case -1: return -(signed long) ((PyLongObject*)x)->ob_digit[0]; + } + } +#endif +#endif return (signed long)PyLong_AsLong(x); } } else { @@ -25921,10 +27462,15 @@ } } +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 +#if CYTHON_USE_PYLONG_INTERNALS +#include "longintrepr.h" +#endif +#endif 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 PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { @@ -25937,6 +27483,16 @@ #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 +#if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) { + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: return (signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; + } + } +#endif +#endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed PY_LONG_LONG"); @@ -25944,6 +27500,17 @@ } return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 +#if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) { + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: return +(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; + case -1: return -(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; + } + } +#endif +#endif return (signed PY_LONG_LONG)PyLong_AsLongLong(x); } } else { @@ -25975,46 +27542,105 @@ return 0; } -static int __Pyx_SetVtable(PyObject *dict, void *vtable) { -#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) - PyObject *ob = PyCapsule_New(vtable, 0, 0); -#else - PyObject *ob = PyCObject_FromVoidPtr(vtable, 0); -#endif - if (!ob) - goto bad; - if (PyDict_SetItemString(dict, "__pyx_vtable__", ob) < 0) - goto bad; - Py_DECREF(ob); - return 0; -bad: - Py_XDECREF(ob); - return -1; +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 void __Pyx_AddTraceback(const char *funcname, int __pyx_clineno, - int __pyx_lineno, const char *__pyx_filename) { +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; - PyObject *py_globals = 0; - PyCodeObject *py_code = 0; - PyFrameObject *py_frame = 0; - #if PY_MAJOR_VERSION < 3 - py_srcfile = PyString_FromString(__pyx_filename); + py_srcfile = PyString_FromString(filename); #else - py_srcfile = PyUnicode_FromString(__pyx_filename); + py_srcfile = PyUnicode_FromString(filename); #endif if (!py_srcfile) goto bad; - if (__pyx_clineno) { + if (c_line) { #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno); + py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #else - py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno); + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #endif } else { @@ -26025,28 +27651,45 @@ #endif } if (!py_funcname) goto bad; - py_globals = PyModule_GetDict(__pyx_m); - if (!py_globals) goto bad; - py_code = PyCode_New( + py_code = __Pyx_PyCode_New( 0, /*int argcount,*/ - #if PY_MAJOR_VERSION >= 3 0, /*int kwonlyargcount,*/ - #endif 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,*/ + __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,*/ - __pyx_lineno, /*int firstlineno,*/ + py_line, /*int firstlineno,*/ __pyx_empty_bytes /*PyObject *lnotab*/ ); - if (!py_code) goto bad; + 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,*/ @@ -26054,11 +27697,9 @@ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; - py_frame->f_lineno = __pyx_lineno; + py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: - Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); Py_XDECREF(py_code); Py_XDECREF(py_frame); } @@ -26093,26 +27734,82 @@ return 0; } -/* Type Conversion Functions */ - +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) { + return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str)); +} +static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT + if ( +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + __Pyx_sys_getdefaultencoding_not_ascii && +#endif + PyUnicode_Check(o)) { +#if PY_VERSION_HEX < 0x03030000 + char* defenc_c; + PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); + if (!defenc) return NULL; + defenc_c = PyBytes_AS_STRING(defenc); +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + { + char* end = defenc_c + PyBytes_GET_SIZE(defenc); + char* c; + for (c = defenc_c; c < end; c++) { + if ((unsigned char) (*c) >= 128) { + PyUnicode_AsASCIIString(o); + return NULL; + } + } + } +#endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/ + *length = PyBytes_GET_SIZE(defenc); + return defenc_c; +#else /* PY_VERSION_HEX < 0x03030000 */ + if (PyUnicode_READY(o) == -1) return NULL; +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (PyUnicode_IS_ASCII(o)) { + *length = PyUnicode_GET_DATA_SIZE(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ + return PyUnicode_AsUTF8AndSize(o, length); +#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ +#endif /* PY_VERSION_HEX < 0x03030000 */ + } else +#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */ + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (r < 0) { + return NULL; + } else { + return result; + } + } +} 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 PY_MAJOR_VERSION < 3 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 PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); @@ -26128,7 +27825,7 @@ } #endif if (res) { -#if PY_VERSION_HEX < 0x03000000 +#if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { @@ -26146,7 +27843,6 @@ } return res; } - static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject* x = PyNumber_Index(b); @@ -26155,7 +27851,6 @@ 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) @@ -26169,14 +27864,12 @@ 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"); + if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) { + if ((val != (unsigned PY_LONG_LONG)-1) || !PyErr_Occurred()) + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to size_t"); return (size_t)-1; } return (size_t)val;