diff --git a/OpenGL_accelerate/src/arraydatatype.c b/OpenGL_accelerate/src/arraydatatype.c index 188a3db5..ddc20782 100644 --- a/OpenGL_accelerate/src/arraydatatype.c +++ b/OpenGL_accelerate/src/arraydatatype.c @@ -1,6 +1,18 @@ -/* Generated by Cython 0.18 on Mon Apr 15 22:37:35 2013 */ +/* Generated by Cython 0.19.1 on Thu Jul 11 00:05:41 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. @@ -116,6 +128,9 @@ #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)) ? \ @@ -155,6 +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) @@ -227,6 +250,40 @@ #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 @@ -259,17 +316,6 @@ #define CYTHON_WITHOUT_ASSERTIONS #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_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) @@ -283,10 +329,44 @@ # define CYTHON_UNUSED # endif #endif -typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ - -#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s) -#define __Pyx_PyBytes_AsUString(s) ((unsigned char*) PyBytes_AsString(s)) +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*/ + +#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*); @@ -300,6 +380,78 @@ static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #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__ @@ -315,8 +467,9 @@ static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #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; @@ -551,34 +704,6 @@ struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_ArrayDatatype { static struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_ArrayDatatype *__pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_ArrayDatatype; -/* "OpenGL_accelerate/wrapper.pxd":4 - * cdef class cArgConverter: - * cdef object c_call( self, tuple pyArgs, int index, object baseOperation ) - * cdef class pyArgConverter: # <<<<<<<<<<<<<< - * cdef object c_call( self, object incoming, object function, tuple arguments ) - * cdef class cArgumentConverter: - */ - -struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_pyArgConverter { - PyObject *(*c_call)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_pyArgConverter *, PyObject *, PyObject *, PyObject *); -}; -static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_pyArgConverter *__pyx_vtabptr_17OpenGL_accelerate_7wrapper_pyArgConverter; - - -/* "src/arraydatatype.pyx":361 - * return self.arrayType.asArray( incoming, arguments[ self.typeIndex ] ) - * - * cdef class AsArrayTyped(pyArgConverter): # <<<<<<<<<<<<<< - * """Given arrayName and arrayType, convert arrayName to array of type - * - */ - -struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_AsArrayTyped { - struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_pyArgConverter __pyx_base; -}; -static struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_AsArrayTyped *__pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_AsArrayTyped; - - /* "OpenGL_accelerate/wrapper.pxd":2 * """Importable Cython declarations for wrapper module""" * cdef class cArgConverter: # <<<<<<<<<<<<<< @@ -607,18 +732,32 @@ struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_Output { static struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_Output *__pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_Output; -/* "src/arraydatatype.pyx":302 - * return result +/* "OpenGL_accelerate/wrapper.pxd":4 + * cdef class cArgConverter: + * cdef object c_call( self, tuple pyArgs, int index, object baseOperation ) + * cdef class pyArgConverter: # <<<<<<<<<<<<<< + * cdef object c_call( self, object incoming, object function, tuple arguments ) + * cdef class cArgumentConverter: + */ + +struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_pyArgConverter { + PyObject *(*c_call)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_pyArgConverter *, PyObject *, PyObject *, PyObject *); +}; +static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_pyArgConverter *__pyx_vtabptr_17OpenGL_accelerate_7wrapper_pyArgConverter; + + +/* "src/arraydatatype.pyx":361 + * return self.arrayType.asArray( incoming, arguments[ self.typeIndex ] ) * - * cdef class SizedOutput( Output ): # <<<<<<<<<<<<<< - * """Output class that looks up output size via a callable function + * cdef class AsArrayTyped(pyArgConverter): # <<<<<<<<<<<<<< + * """Given arrayName and arrayType, convert arrayName to array of type * */ -struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_SizedOutput { - struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_Output __pyx_base; +struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_AsArrayTyped { + struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_pyArgConverter __pyx_base; }; -static struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_SizedOutput *__pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_SizedOutput; +static struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_AsArrayTyped *__pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_AsArrayTyped; /* "src/arraydatatype.pyx":404 @@ -635,6 +774,20 @@ struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSize { static struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSize *__pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSize; +/* "src/arraydatatype.pyx":302 + * return result + * + * cdef class SizedOutput( Output ): # <<<<<<<<<<<<<< + * """Output class that looks up output size via a callable function + * + */ + +struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_SizedOutput { + struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_Output __pyx_base; +}; +static struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_SizedOutput *__pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_SizedOutput; + + /* "OpenGL_accelerate/wrapper.pxd":8 * cdef class cArgumentConverter: * cdef object c_call( self, object incoming ) @@ -779,7 +932,22 @@ static struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_AsArrayOfType #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) -static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ +#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_GetBuiltinName(PyObject *name); /*proto*/ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ @@ -792,143 +960,82 @@ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ -static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { - PyObject* value; -#if PY_MAJOR_VERSION >= 3 - value = PyDict_GetItemWithError(d, key); - if (unlikely(!value)) { - if (unlikely(PyErr_Occurred())) - return NULL; - value = default_value; - } - Py_INCREF(value); -#else - if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) { - value = PyDict_GetItem(d, key); - if (unlikely(!value)) { - value = default_value; - } - Py_INCREF(value); - } else { - PyObject *m; - m = __Pyx_GetAttrString(d, "get"); - if (!m) return NULL; - value = PyObject_CallFunctionObjArgs(m, key, - (default_value == Py_None) ? NULL : default_value, NULL); - Py_DECREF(m); - } -#endif - return value; -} +static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value); /*proto*/ + +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 void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ -static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) { - if (likely(PyList_CheckExact(L))) { - if (unlikely(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; - } -} - -static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, - const char *name, int exact); /*proto*/ - -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { - PyObject *r; - if (!j) return NULL; - r = PyObject_GetItem(o, j); - Py_DECREF(j); - return r; -} -#define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \ - __Pyx_GetItemInt_List_Fast(o, i) : \ - __Pyx_GetItemInt_Generic(o, to_py_func(i))) -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) { -#if CYTHON_COMPILING_IN_CPYTHON - if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { - PyObject *r = PyList_GET_ITEM(o, i); - Py_INCREF(r); - return r; - } - else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) { - PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i); - Py_INCREF(r); - return r; - } - return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); -#else - return PySequence_GetItem(o, i); -#endif -} -#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \ - __Pyx_GetItemInt_Tuple_Fast(o, i) : \ - __Pyx_GetItemInt_Generic(o, to_py_func(i))) -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) { #if CYTHON_COMPILING_IN_CPYTHON - if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { - PyObject *r = PyTuple_GET_ITEM(o, i); - Py_INCREF(r); - return r; - } - else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) { - PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i); - Py_INCREF(r); - return r; +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 __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); -#else - return PySequence_GetItem(o, i); -#endif + return PyList_Append(list, x); } -#define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \ - __Pyx_GetItemInt_Fast(o, i) : \ - __Pyx_GetItemInt_Generic(o, to_py_func(i))) -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) { -#if CYTHON_COMPILING_IN_CPYTHON - if (PyList_CheckExact(o)) { - Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); - if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) { - PyObject *r = PyList_GET_ITEM(o, n); - Py_INCREF(r); - return r; - } - } - else if (PyTuple_CheckExact(o)) { - Py_ssize_t n = (likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); - if (likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { - PyObject *r = PyTuple_GET_ITEM(o, n); - Py_INCREF(r); - return r; - } - } else { /* inlined PySequence_GetItem() */ - PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; - if (likely(m && m->sq_item)) { - if (unlikely(i < 0) && likely(m->sq_length)) { - Py_ssize_t l = m->sq_length(o); - if (unlikely(l < 0)) return NULL; - i += l; - } - return m->sq_item(o, i); - } - } #else - if (PySequence_Check(o)) { - return PySequence_GetItem(o, i); - } +#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif - return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); + +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)) + +static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x); /*proto*/ + +static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ + +static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, + const char *name, int exact); /*proto*/ + +#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 PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /*proto*/ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ @@ -938,13 +1045,15 @@ static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, trav static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc); +static void* __Pyx_GetVtable(PyObject *dict); /*proto*/ + +static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*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, int level); /*proto*/ -static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name); - static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); @@ -979,8 +1088,6 @@ static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject * static int __Pyx_check_binary_version(void); -static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ - #if !defined(__Pyx_PyIdentifier_FromString) #if PY_MAJOR_VERSION < 3 #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) @@ -993,8 +1100,6 @@ static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /*proto*/ -static void* __Pyx_GetVtable(PyObject *dict); /*proto*/ - typedef struct { int code_line; PyCodeObject* code_object; @@ -1025,13 +1130,13 @@ static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter = static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler = 0; /* Module declarations from 'OpenGL_accelerate.arraydatatype' */ -static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_13arraydatatype_HandlerRegistry = 0; -static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_13arraydatatype_ArrayDatatype = 0; -static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_13arraydatatype_Output = 0; -static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_13arraydatatype_SizedOutput = 0; -static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_13arraydatatype_AsArrayOfType = 0; static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_13arraydatatype_AsArrayTyped = 0; +static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_13arraydatatype_AsArrayOfType = 0; static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked = 0; +static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_13arraydatatype_Output = 0; +static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_13arraydatatype_SizedOutput = 0; +static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_13arraydatatype_HandlerRegistry = 0; +static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_13arraydatatype_ArrayDatatype = 0; static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSize = 0; static struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *__pyx_v_17OpenGL_accelerate_13arraydatatype_GLOBAL_REGISTRY = 0; #define __Pyx_MODULE_NAME "OpenGL_accelerate.arraydatatype" @@ -1104,14 +1209,23 @@ static int __pyx_pf_17OpenGL_accelerate_13arraydatatype_16AsArrayTypedSize_9arra static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_16AsArrayTypedSize_9arrayType___get__(struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSize *__pyx_v_self); /* proto */ static int __pyx_pf_17OpenGL_accelerate_13arraydatatype_16AsArrayTypedSize_9arrayType_2__set__(struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSize *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_17OpenGL_accelerate_13arraydatatype_16AsArrayTypedSize_9arrayType_4__del__(struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSize *__pyx_v_self); /* proto */ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_13arraydatatype_AsArrayTyped(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_13arraydatatype_AsArrayOfType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_13arraydatatype_Output(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_13arraydatatype_SizedOutput(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_13arraydatatype_HandlerRegistry(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_13arraydatatype_ArrayDatatype(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSize(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static char __pyx_k_1[] = "No array-type handler for type %r (value: %s) registered"; -static char __pyx_k_2[] = "GENERIC_OUTPUT_PREFERENCES"; -static char __pyx_k_3[] = "Unable to find any output handler at all (not even ctypes/numpy ones!)"; -static char __pyx_k_6[] = "Unknown specifier %s (lookup = %s)"; -static char __pyx_k_7[] = "\"Did not resolve parameter index for %r"; -static char __pyx_k_8[] = "OpenGL.arrays.arraydatatype"; -static char __pyx_k_9[] = "Expected %r item array, got %r item array"; -static char __pyx_k_10[] = "Cython-coded Array-handling accelerator module"; +static char __pyx_k_3[] = "GENERIC_OUTPUT_PREFERENCES"; +static char __pyx_k_4[] = "Unable to find any output handler at all (not even ctypes/numpy ones!)"; +static char __pyx_k_7[] = "Unknown specifier %s (lookup = %s)"; +static char __pyx_k_8[] = "\"Did not resolve parameter index for %r"; +static char __pyx_k_9[] = "OpenGL.arrays.arraydatatype"; +static char __pyx_k_10[] = "Expected %r item array, got %r item array"; +static char __pyx_k_11[] = "Cython-coded Array-handling accelerator module"; +static char __pyx_k__get[] = "get"; static char __pyx_k__log[] = "log"; static char __pyx_k__cast[] = "cast"; static char __pyx_k__dims[] = "dims"; @@ -1128,6 +1242,7 @@ static char __pyx_k__types[] = "types"; static char __pyx_k__value[] = "value"; static char __pyx_k__zeros[] = "zeros"; static char __pyx_k__OpenGL[] = "OpenGL"; +static char __pyx_k__append[] = "append"; static char __pyx_k__ctypes[] = "ctypes"; static char __pyx_k__getLog[] = "getLog"; static char __pyx_k__lookup[] = "lookup"; @@ -1137,7 +1252,6 @@ static char __pyx_k__POINTER[] = "POINTER"; static char __pyx_k____mro__[] = "__mro__"; static char __pyx_k__asArray[] = "asArray"; static char __pyx_k__handler[] = "handler"; -static char __pyx_k__numeric[] = "numeric"; static char __pyx_k__plugins[] = "plugins"; static char __pyx_k__pointer[] = "pointer"; static char __pyx_k__KeyError[] = "KeyError"; @@ -1160,6 +1274,7 @@ static char __pyx_k__cArgIndex[] = "cArgIndex"; static char __pyx_k__constants[] = "constants"; static char __pyx_k__specifier[] = "specifier"; static char __pyx_k__ValueError[] = "ValueError"; +static char __pyx_k____import__[] = "__import__"; static char __pyx_k__dimensions[] = "dimensions"; static char __pyx_k__from_param[] = "from_param"; static char __pyx_k__pyArgIndex[] = "pyArgIndex"; @@ -1174,15 +1289,16 @@ static char __pyx_k__arrayToGLType[] = "arrayToGLType"; static char __pyx_k__baseOperation[] = "baseOperation"; static char __pyx_k__isAccelerated[] = "isAccelerated"; static char __pyx_k__AttributeError[] = "AttributeError"; +static char __pyx_k____pyx_vtable__[] = "__pyx_vtable__"; static char __pyx_k__arrayByteCount[] = "arrayByteCount"; static char __pyx_k__registerEquivalent[] = "registerEquivalent"; static PyObject *__pyx_kp_s_1; -static PyObject *__pyx_n_s_2; -static PyObject *__pyx_kp_s_3; -static PyObject *__pyx_kp_s_6; +static PyObject *__pyx_kp_s_10; +static PyObject *__pyx_n_s_3; +static PyObject *__pyx_kp_s_4; static PyObject *__pyx_kp_s_7; -static PyObject *__pyx_n_s_8; -static PyObject *__pyx_kp_s_9; +static PyObject *__pyx_kp_s_8; +static PyObject *__pyx_n_s_9; static PyObject *__pyx_n_s__ArrayDatatype; static PyObject *__pyx_n_s__AttributeError; static PyObject *__pyx_n_s__FormatHandler; @@ -1193,10 +1309,13 @@ static PyObject *__pyx_n_s__RuntimeError; static PyObject *__pyx_n_s__TypeError; static PyObject *__pyx_n_s__ValueError; static PyObject *__pyx_n_s____class__; +static PyObject *__pyx_n_s____import__; static PyObject *__pyx_n_s____init__; static PyObject *__pyx_n_s____main__; static PyObject *__pyx_n_s____mro__; +static PyObject *__pyx_n_s____pyx_vtable__; static PyObject *__pyx_n_s____test__; +static PyObject *__pyx_n_s__append; static PyObject *__pyx_n_s__arrayByteCount; static PyObject *__pyx_n_s__arrayName; static PyObject *__pyx_n_s__arraySize; @@ -1217,6 +1336,7 @@ static PyObject *__pyx_n_s__dimensions; static PyObject *__pyx_n_s__dims; static PyObject *__pyx_n_s__finalise; static PyObject *__pyx_n_s__from_param; +static PyObject *__pyx_n_s__get; static PyObject *__pyx_n_s__getLog; static PyObject *__pyx_n_s__handler; static PyObject *__pyx_n_s__isAccelerated; @@ -1227,7 +1347,6 @@ static PyObject *__pyx_n_s__logs; static PyObject *__pyx_n_s__lookup; static PyObject *__pyx_n_s__match; static PyObject *__pyx_n_s__name; -static PyObject *__pyx_n_s__numeric; static PyObject *__pyx_n_s__numpy; static PyObject *__pyx_n_s__plugin_match; static PyObject *__pyx_n_s__plugins; @@ -1248,14 +1367,19 @@ static PyObject *__pyx_n_s__unitSize; static PyObject *__pyx_n_s__value; static PyObject *__pyx_n_s__zeros; static PyObject *__pyx_int_1; -static PyObject *__pyx_k_tuple_4; +static PyObject *__pyx_int_50; +static PyObject *__pyx_k_slice_2; static PyObject *__pyx_k_tuple_5; -static PyObject *__pyx_k_tuple_11; +static PyObject *__pyx_k_tuple_6; +static PyObject *__pyx_k_tuple_12; /* Python wrapper */ static int __pyx_pw_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_plugin_match = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -1300,7 +1424,7 @@ static int __pyx_pw_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_1__ini } /* "src/arraydatatype.pyx":22 - * GENERIC_OUTPUT_PREFERENCES = ['numpy','numeric','ctypesarrays'] + * GENERIC_OUTPUT_PREFERENCES = ['numpy','ctypesarrays'] * cdef object all_output_handlers * def __init__( self, plugin_match ): # <<<<<<<<<<<<<< * self.registry = {} @@ -1450,6 +1574,9 @@ static int __pyx_pf_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_2__set static PyObject *__pyx_pw_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_5__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_5__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_value = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); @@ -1589,7 +1716,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_c * except AttributeError, err: * typ = PyObject_Type(value) */ - __pyx_t_4 = PyObject_GetAttr(__pyx_v_value, __pyx_n_s____class__); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s____class__); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_typ = __pyx_t_4; __pyx_t_4 = 0; @@ -1673,7 +1800,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_c * for base in typ.__mro__: */ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_handler); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_10 = (!__pyx_t_9); + __pyx_t_10 = ((!__pyx_t_9) != 0); if (__pyx_t_10) { /* "src/arraydatatype.pyx":42 @@ -1684,7 +1811,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_c * handler = self.registry.get( base ) */ __pyx_t_10 = PyObject_HasAttr(__pyx_v_typ, ((PyObject *)__pyx_n_s____mro__)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__pyx_t_10) { + __pyx_t_9 = (__pyx_t_10 != 0); + if (__pyx_t_9) { /* "src/arraydatatype.pyx":43 * if not handler: @@ -1693,7 +1821,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_c * handler = self.registry.get( base ) * if not handler: */ - __pyx_t_7 = PyObject_GetAttr(__pyx_v_typ, __pyx_n_s____mro__); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_typ, __pyx_n_s____mro__); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyList_CheckExact(__pyx_t_7) || PyTuple_CheckExact(__pyx_t_7)) { __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_11 = 0; @@ -1758,9 +1886,9 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_c * handler = self.match( base ) * if handler: */ - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_handler); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_9 = (!__pyx_t_10); - if (__pyx_t_9) { + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_handler); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = ((!__pyx_t_9) != 0); + if (__pyx_t_10) { /* "src/arraydatatype.pyx":46 * handler = self.registry.get( base ) @@ -1788,8 +1916,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_c * handler = handler.load() * if handler: */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_handler); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__pyx_t_9) { + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_handler); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_10) { /* "src/arraydatatype.pyx":48 * handler = self.match( base ) @@ -1798,7 +1926,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_c * if handler: * handler=handler() */ - __pyx_t_4 = PyObject_GetAttr(__pyx_v_handler, __pyx_n_s__load); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_handler, __pyx_n_s__load); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); @@ -1814,8 +1942,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_c * handler=handler() * if handler: */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_handler); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__pyx_t_9) { + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_handler); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_10) { /* "src/arraydatatype.pyx":50 * handler = handler.load() @@ -1846,8 +1974,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_c * self.registry[ typ ] = handler * if hasattr( handler, 'registerEquivalent' ): */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_handler); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__pyx_t_9) { + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_handler); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_10) { /* "src/arraydatatype.pyx":52 * handler=handler() @@ -1869,7 +1997,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_c * handler.registerEquivalent( typ, base ) * return handler */ - __pyx_t_9 = PyObject_HasAttr(__pyx_v_handler, ((PyObject *)__pyx_n_s__registerEquivalent)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyObject_HasAttr(__pyx_v_handler, ((PyObject *)__pyx_n_s__registerEquivalent)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = (__pyx_t_10 != 0); if (__pyx_t_9) { /* "src/arraydatatype.pyx":54 @@ -1879,7 +2008,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_c * return handler * raise TypeError( */ - __pyx_t_7 = PyObject_GetAttr(__pyx_v_handler, __pyx_n_s__registerEquivalent); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_handler, __pyx_n_s__registerEquivalent); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); @@ -1928,7 +2057,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_c */ __pyx_t_6 = PyObject_Repr(__pyx_v_value); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = __Pyx_PySequence_GetSlice(__pyx_t_6, 0, 50); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_t_6, 0, 50, NULL, NULL, &__pyx_k_slice_2, 0, 1, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -2002,8 +2131,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_c PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - int __pyx_t_3; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; PyObject *(*__pyx_t_6)(PyObject *); @@ -2020,7 +2149,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_c * self.output_handler = self.registry.get( self.preferredOutput ) */ __pyx_t_1 = (__pyx_v_self->output_handler == Py_None); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { /* "src/arraydatatype.pyx":66 * """Fast-path lookup for output handler object""" @@ -2029,7 +2159,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_c * self.output_handler = self.registry.get( self.preferredOutput ) * if not self.output_handler: */ - __pyx_t_1 = (__pyx_v_self->preferredOutput != Py_None); + __pyx_t_2 = (__pyx_v_self->preferredOutput != Py_None); + __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "src/arraydatatype.pyx":67 @@ -2043,13 +2174,13 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_c PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_self->registry), __pyx_v_self->preferredOutput, Py_None); 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_GIVEREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_self->registry), __pyx_v_self->preferredOutput, Py_None); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->output_handler); __Pyx_DECREF(__pyx_v_self->output_handler); - __pyx_v_self->output_handler = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_v_self->output_handler = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L4; } __pyx_L4:; @@ -2062,8 +2193,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_c * self.output_handler = self.registry.get( preferred ) */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->output_handler); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_3 = (!__pyx_t_1); - if (__pyx_t_3) { + __pyx_t_2 = ((!__pyx_t_1) != 0); + if (__pyx_t_2) { /* "src/arraydatatype.pyx":69 * self.output_handler = self.registry.get( self.preferredOutput ) @@ -2072,46 +2203,46 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_c * self.output_handler = self.registry.get( preferred ) * if self.output_handler: */ - __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_2); 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); - if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) { - __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { 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_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __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[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __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_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __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[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { - __pyx_t_2 = __pyx_t_6(__pyx_t_4); - if (unlikely(!__pyx_t_2)) { + __pyx_t_3 = __pyx_t_6(__pyx_t_4); + if (unlikely(!__pyx_t_3)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } - __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF(__pyx_v_preferred); - __pyx_v_preferred = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_v_preferred = __pyx_t_3; + __pyx_t_3 = 0; /* "src/arraydatatype.pyx":70 * if not self.output_handler: @@ -2124,13 +2255,13 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_c PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_self->registry), __pyx_v_preferred, Py_None); 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_GIVEREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_self->registry), __pyx_v_preferred, Py_None); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->output_handler); __Pyx_DECREF(__pyx_v_self->output_handler); - __pyx_v_self->output_handler = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_v_self->output_handler = __pyx_t_3; + __pyx_t_3 = 0; /* "src/arraydatatype.pyx":71 * for preferred in self.GENERIC_OUTPUT_PREFERENCES: @@ -2139,8 +2270,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_c * break * if not self.output_handler: */ - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->output_handler); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__pyx_t_3) { + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->output_handler); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_2) { /* "src/arraydatatype.pyx":72 * self.output_handler = self.registry.get( preferred ) @@ -2167,8 +2298,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_c * # look for anything that can do output... * for handler in self.all_output_handlers: */ - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->output_handler); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = (!__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->output_handler); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { /* "src/arraydatatype.pyx":75 @@ -2190,30 +2321,30 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_c 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_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __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[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __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_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __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[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { - __pyx_t_2 = __pyx_t_6(__pyx_t_4); - if (unlikely(!__pyx_t_2)) { + __pyx_t_3 = __pyx_t_6(__pyx_t_4); + if (unlikely(!__pyx_t_3)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } - __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_t_3); } - __pyx_v_handler = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_v_handler = __pyx_t_3; + __pyx_t_3 = 0; /* "src/arraydatatype.pyx":76 * # look for anything that can do output... @@ -2251,8 +2382,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_c * """Unable to find any output handler at all (not even ctypes/numpy ones!)""" */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->output_handler); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_3 = (!__pyx_t_1); - if (__pyx_t_3) { + __pyx_t_2 = ((!__pyx_t_1) != 0); + if (__pyx_t_2) { /* "src/arraydatatype.pyx":79 * break @@ -2261,7 +2392,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_c * """Unable to find any output handler at all (not even ctypes/numpy ones!)""" * ) */ - __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_4), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -2288,7 +2419,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_c __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("OpenGL_accelerate.arraydatatype.HandlerRegistry.c_get_output_handler", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; @@ -2306,6 +2437,9 @@ static char __pyx_doc_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_6reg static PyObject *__pyx_pw_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_7register(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_handler = 0; PyObject *__pyx_v_types = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("register (wrapper)", 0); @@ -2402,7 +2536,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_ __pyx_t_4 = __pyx_t_2; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_2 = (!__pyx_t_4); + __pyx_t_2 = ((!(__pyx_t_4 != 0)) != 0); if (__pyx_t_2) { /* "src/arraydatatype.pyx":87 @@ -2491,7 +2625,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_ * self.all_output_handlers.append( handler ) * */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_handler, __pyx_n_s__isOutput); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_handler, __pyx_n_s__isOutput); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -2592,6 +2726,9 @@ struct wrapperbase __pyx_wrapperbase_17OpenGL_accelerate_13arraydatatype_13Array static int __pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_typeConstant = 0; PyObject *__pyx_v_baseType = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -2831,8 +2968,9 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_6f __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; + int __pyx_t_3; PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -2858,7 +2996,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_6f * value, self.typeConstant */ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_handler, ((PyObject*)__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)); - if (__pyx_t_2) { + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { /* "src/arraydatatype.pyx":133 * handler = self.handler.c_lookup( value ) @@ -2878,11 +3017,11 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_6f */ __pyx_t_1 = __pyx_v_self->typeConstant; __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler *)((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler)->__pyx_vtab)->c_from_param(((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler), __pyx_v_value, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler *)((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler)->__pyx_vtab)->c_from_param(((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler), __pyx_v_value, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L3; } @@ -2896,8 +3035,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_6f * def __call__( self, object value ): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyObject_GetAttr(__pyx_v_handler, __pyx_n_s__from_param); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_handler, __pyx_n_s__from_param); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_value); @@ -2906,20 +3045,20 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_6f __Pyx_INCREF(__pyx_v_self->typeConstant); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->typeConstant); __Pyx_GIVEREF(__pyx_v_self->typeConstant); - __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("OpenGL_accelerate.arraydatatype.ArrayDatatype.from_param", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -2937,6 +3076,9 @@ struct wrapperbase __pyx_wrapperbase_17OpenGL_accelerate_13arraydatatype_13Array #endif static PyObject *__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_9__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_value = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); @@ -3007,7 +3149,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_8_ * def dataPointer( self, value ): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__from_param); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__from_param); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -3062,8 +3204,9 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_10 __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; + int __pyx_t_3; PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -3089,7 +3232,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_10 * value */ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_handler, ((PyObject*)__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)); - if (__pyx_t_2) { + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { /* "src/arraydatatype.pyx":146 * handler = self.handler.c_lookup( value ) @@ -3124,27 +3268,27 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_10 * """Given value in a known data-pointer type, return void_p for pointer""" */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetAttr(__pyx_v_handler, __pyx_n_s__dataPointer); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_handler, __pyx_n_s__dataPointer); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_value); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_value); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); - __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("OpenGL_accelerate.arraydatatype.ArrayDatatype.dataPointer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -3198,7 +3342,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_12 * try: * return ctypes.c_void_p(pointer) */ - __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__dataPointer); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__dataPointer); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -3234,9 +3378,9 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_12 * return pointer */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__ctypes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__c_void_p); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__c_void_p); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L3_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 = 154; __pyx_clineno = __LINE__; goto __pyx_L3_error;} @@ -3380,9 +3524,9 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_14 * ctypes.POINTER( self.baseType ) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__ctypes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__cast); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__cast); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -3393,7 +3537,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_14 * ctypes.POINTER( self.baseType ) * ) */ - __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__dataPointer); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__dataPointer); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); @@ -3412,9 +3556,9 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_14 * ) * def asArray( self, value, typeCode=None ): */ - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__ctypes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__POINTER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__POINTER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __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 = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -3464,6 +3608,9 @@ static char __pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_16asAr static PyObject *__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_17asArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_value = 0; PyObject *__pyx_v_typeCode = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("asArray (wrapper)", 0); @@ -3531,9 +3678,10 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_16 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; + PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -3548,7 +3696,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_16 * handler = self.handler.c_lookup( value ) */ __pyx_t_1 = (__pyx_v_typeCode == Py_None); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { /* "src/arraydatatype.pyx":166 * """Given a value, convert to preferred array representation""" @@ -3557,11 +3706,11 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_16 * handler = self.handler.c_lookup( value ) * if isinstance( handler, FormatHandler ): */ - __pyx_t_2 = __pyx_v_self->typeConstant; - __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = __pyx_v_self->typeConstant; + __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_v_typeCode); - __pyx_v_typeCode = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_v_typeCode = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; @@ -3573,10 +3722,10 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_16 * if isinstance( handler, FormatHandler ): * return (handler).c_asArray( */ - __pyx_t_2 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *)__pyx_v_self->handler->__pyx_vtab)->c_lookup(__pyx_v_self->handler, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_v_handler = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_3 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *)__pyx_v_self->handler->__pyx_vtab)->c_lookup(__pyx_v_self->handler, __pyx_v_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_handler = __pyx_t_3; + __pyx_t_3 = 0; /* "src/arraydatatype.pyx":168 * typeCode = self.typeConstant @@ -3585,7 +3734,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_16 * return (handler).c_asArray( * value, typeCode */ - __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_handler, ((PyObject*)__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)); + __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_handler, ((PyObject*)__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)); + __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "src/arraydatatype.pyx":169 @@ -3604,10 +3754,10 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_16 * return handler.asArray( * value, typeCode */ - __pyx_t_2 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler *)((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler)->__pyx_vtab)->c_asArray(((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler), __pyx_v_value, __pyx_v_typeCode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_3 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler *)((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler)->__pyx_vtab)->c_asArray(((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler), __pyx_v_value, __pyx_v_typeCode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L4; } @@ -3621,8 +3771,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_16 * ) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyObject_GetAttr(__pyx_v_handler, __pyx_n_s__asArray); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_handler, __pyx_n_s__asArray); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); /* "src/arraydatatype.pyx":174 * return handler.asArray( @@ -3631,28 +3781,28 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_16 * def arrayToGLType( self, value ): * """Given a data-value, guess the OpenGL type of the corresponding pointer */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_value); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_value); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_INCREF(__pyx_v_typeCode); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_typeCode); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_typeCode); __Pyx_GIVEREF(__pyx_v_typeCode); - __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("OpenGL_accelerate.arraydatatype.ArrayDatatype.asArray", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -3704,7 +3854,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_18 __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *)__pyx_v_self->handler->__pyx_vtab)->c_lookup(__pyx_v_self->handler, __pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__arrayToGLType); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__arrayToGLType); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -3740,6 +3890,9 @@ static char __pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_20arra static PyObject *__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_21arraySize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_value = 0; PyObject *__pyx_v_typeCode = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("arraySize (wrapper)", 0); @@ -3807,9 +3960,10 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_20 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; + PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -3824,7 +3978,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_20 * handler = self.handler.c_lookup( value ) */ __pyx_t_1 = (__pyx_v_typeCode == Py_None); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { /* "src/arraydatatype.pyx":185 * """Given a data-value, calculate dimensions for the array (number-of-units)""" @@ -3833,11 +3988,11 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_20 * handler = self.handler.c_lookup( value ) * if isinstance( handler, FormatHandler ): */ - __pyx_t_2 = __pyx_v_self->typeConstant; - __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = __pyx_v_self->typeConstant; + __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_v_typeCode); - __pyx_v_typeCode = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_v_typeCode = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; @@ -3849,10 +4004,10 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_20 * if isinstance( handler, FormatHandler ): * return (handler).c_arraySize( */ - __pyx_t_2 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *)__pyx_v_self->handler->__pyx_vtab)->c_lookup(__pyx_v_self->handler, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_v_handler = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_3 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *)__pyx_v_self->handler->__pyx_vtab)->c_lookup(__pyx_v_self->handler, __pyx_v_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_handler = __pyx_t_3; + __pyx_t_3 = 0; /* "src/arraydatatype.pyx":187 * typeCode = self.typeConstant @@ -3861,7 +4016,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_20 * return (handler).c_arraySize( * value, typeCode */ - __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_handler, ((PyObject*)__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)); + __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_handler, ((PyObject*)__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)); + __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "src/arraydatatype.pyx":188 @@ -3880,10 +4036,10 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_20 * return handler.arraySize( * value, typeCode */ - __pyx_t_2 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler *)((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler)->__pyx_vtab)->c_arraySize(((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler), __pyx_v_value, __pyx_v_typeCode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_3 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler *)((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler)->__pyx_vtab)->c_arraySize(((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler), __pyx_v_value, __pyx_v_typeCode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L4; } @@ -3897,8 +4053,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_20 * ) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyObject_GetAttr(__pyx_v_handler, __pyx_n_s__arraySize); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_handler, __pyx_n_s__arraySize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); /* "src/arraydatatype.pyx":193 * return handler.arraySize( @@ -3907,28 +4063,28 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_20 * def unitSize( self, value, typeCode=None ): * """Determine unit size of an array (if possible) */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_value); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_value); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_INCREF(__pyx_v_typeCode); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_typeCode); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_typeCode); __Pyx_GIVEREF(__pyx_v_typeCode); - __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("OpenGL_accelerate.arraydatatype.ArrayDatatype.arraySize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -3945,6 +4101,9 @@ static char __pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_22unit static PyObject *__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_23unitSize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_value = 0; PyObject *__pyx_v_typeCode = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("unitSize (wrapper)", 0); @@ -4012,9 +4171,10 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_22 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; + PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -4029,7 +4189,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_22 * handler = self.handler.c_lookup( value ) */ __pyx_t_1 = (__pyx_v_typeCode == Py_None); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { /* "src/arraydatatype.pyx":200 * """ @@ -4038,11 +4199,11 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_22 * handler = self.handler.c_lookup( value ) * if isinstance( handler, FormatHandler ): */ - __pyx_t_2 = __pyx_v_self->typeConstant; - __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = __pyx_v_self->typeConstant; + __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_v_typeCode); - __pyx_v_typeCode = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_v_typeCode = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; @@ -4054,10 +4215,10 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_22 * if isinstance( handler, FormatHandler ): * return (handler).c_unitSize( */ - __pyx_t_2 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *)__pyx_v_self->handler->__pyx_vtab)->c_lookup(__pyx_v_self->handler, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_v_handler = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_3 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *)__pyx_v_self->handler->__pyx_vtab)->c_lookup(__pyx_v_self->handler, __pyx_v_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_handler = __pyx_t_3; + __pyx_t_3 = 0; /* "src/arraydatatype.pyx":202 * typeCode = self.typeConstant @@ -4066,7 +4227,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_22 * return (handler).c_unitSize( * value, typeCode */ - __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_handler, ((PyObject*)__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)); + __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_handler, ((PyObject*)__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)); + __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "src/arraydatatype.pyx":203 @@ -4085,10 +4247,10 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_22 * return handler.unitSize( * value, typeCode */ - __pyx_t_2 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler *)((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler)->__pyx_vtab)->c_unitSize(((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler), __pyx_v_value, __pyx_v_typeCode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_3 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler *)((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler)->__pyx_vtab)->c_unitSize(((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler), __pyx_v_value, __pyx_v_typeCode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L4; } @@ -4102,8 +4264,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_22 * ) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyObject_GetAttr(__pyx_v_handler, __pyx_n_s__unitSize); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_handler, __pyx_n_s__unitSize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); /* "src/arraydatatype.pyx":208 * return handler.unitSize( @@ -4112,28 +4274,28 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_22 * def returnHandler( self ): * """Get the default return-handler""" */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_value); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_value); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_INCREF(__pyx_v_typeCode); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_typeCode); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_typeCode); __Pyx_GIVEREF(__pyx_v_typeCode); - __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("OpenGL_accelerate.arraydatatype.ArrayDatatype.unitSize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -4205,6 +4367,9 @@ static char __pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_26zero static PyObject *__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_27zeros(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_dims = 0; PyObject *__pyx_v_typeCode = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("zeros (wrapper)", 0); @@ -4315,9 +4480,10 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_c_z 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; + PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -4332,7 +4498,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_c_z * handler = self.handler.c_get_output_handler( ) */ __pyx_t_1 = (__pyx_v_typeCode == Py_None); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { /* "src/arraydatatype.pyx":218 * """C-level function to create empty array""" @@ -4341,11 +4508,11 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_c_z * handler = self.handler.c_get_output_handler( ) * if isinstance( handler, FormatHandler ): */ - __pyx_t_2 = __pyx_v_self->typeConstant; - __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = __pyx_v_self->typeConstant; + __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_v_typeCode); - __pyx_v_typeCode = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_v_typeCode = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; @@ -4357,10 +4524,10 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_c_z * if isinstance( handler, FormatHandler ): * return (handler).c_zeros( */ - __pyx_t_2 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *)__pyx_v_self->handler->__pyx_vtab)->c_get_output_handler(__pyx_v_self->handler); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_v_handler = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_3 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *)__pyx_v_self->handler->__pyx_vtab)->c_get_output_handler(__pyx_v_self->handler); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_handler = __pyx_t_3; + __pyx_t_3 = 0; /* "src/arraydatatype.pyx":220 * typeCode = self.typeConstant @@ -4369,7 +4536,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_c_z * return (handler).c_zeros( * dims, typeCode */ - __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_handler, ((PyObject*)__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)); + __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_handler, ((PyObject*)__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)); + __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "src/arraydatatype.pyx":221 @@ -4388,10 +4556,10 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_c_z * return handler.zeros( * dims, typeCode */ - __pyx_t_2 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler *)((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler)->__pyx_vtab)->c_zeros(((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler), __pyx_v_dims, __pyx_v_typeCode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_3 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler *)((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler)->__pyx_vtab)->c_zeros(((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler), __pyx_v_dims, __pyx_v_typeCode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L4; } @@ -4405,8 +4573,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_c_z * ) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyObject_GetAttr(__pyx_v_handler, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_handler, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); /* "src/arraydatatype.pyx":226 * return handler.zeros( @@ -4415,28 +4583,28 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_c_z * * */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_dims); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_dims); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_dims); __Pyx_GIVEREF(__pyx_v_dims); __Pyx_INCREF(__pyx_v_typeCode); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_typeCode); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_typeCode); __Pyx_GIVEREF(__pyx_v_typeCode); - __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("OpenGL_accelerate.arraydatatype.ArrayDatatype.c_zeros", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -4453,6 +4621,9 @@ static char __pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_28dime static PyObject *__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_29dimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_value = 0; PyObject *__pyx_v_typeCode = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("dimensions (wrapper)", 0); @@ -4520,9 +4691,10 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_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; PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -4537,7 +4709,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_28 * handler = self.handler.c_lookup( value ) */ __pyx_t_1 = (__pyx_v_typeCode == Py_None); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { /* "src/arraydatatype.pyx":232 * """Given a data-value, get the dimensions (assumes full structure info)""" @@ -4546,11 +4719,11 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_28 * handler = self.handler.c_lookup( value ) * if isinstance( handler, FormatHandler ): */ - __pyx_t_2 = __pyx_v_self->typeConstant; - __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = __pyx_v_self->typeConstant; + __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_v_typeCode); - __pyx_v_typeCode = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_v_typeCode = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; @@ -4562,10 +4735,10 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_28 * if isinstance( handler, FormatHandler ): * return (handler).c_dimensions( */ - __pyx_t_2 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *)__pyx_v_self->handler->__pyx_vtab)->c_lookup(__pyx_v_self->handler, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_v_handler = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_3 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *)__pyx_v_self->handler->__pyx_vtab)->c_lookup(__pyx_v_self->handler, __pyx_v_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_handler = __pyx_t_3; + __pyx_t_3 = 0; /* "src/arraydatatype.pyx":234 * typeCode = self.typeConstant @@ -4574,7 +4747,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_28 * return (handler).c_dimensions( * value */ - __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_handler, ((PyObject*)__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)); + __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_handler, ((PyObject*)__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)); + __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "src/arraydatatype.pyx":235 @@ -4593,10 +4767,10 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_28 * return handler.dimensions( value ) * */ - __pyx_t_2 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler *)((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler)->__pyx_vtab)->c_dimensions(((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler), __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_3 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler *)((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler)->__pyx_vtab)->c_dimensions(((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler), __pyx_v_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L4; } @@ -4610,27 +4784,27 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_28 * def arrayByteCount( self, value, typeCode=None ): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyObject_GetAttr(__pyx_v_handler, __pyx_n_s__dimensions); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __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 = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_handler, __pyx_n_s__dimensions); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_value); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_value); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); - __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("OpenGL_accelerate.arraydatatype.ArrayDatatype.dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -4647,6 +4821,9 @@ static char __pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_30arra static PyObject *__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_31arrayByteCount(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_value = 0; PyObject *__pyx_v_typeCode = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("arrayByteCount (wrapper)", 0); @@ -4714,9 +4891,10 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_30 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; + PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -4731,7 +4909,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_30 * handler = self.handler.c_lookup( value ) */ __pyx_t_1 = (__pyx_v_typeCode == Py_None); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { /* "src/arraydatatype.pyx":246 * """ @@ -4740,11 +4919,11 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_30 * handler = self.handler.c_lookup( value ) * if isinstance( handler, FormatHandler ): */ - __pyx_t_2 = __pyx_v_self->typeConstant; - __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = __pyx_v_self->typeConstant; + __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_v_typeCode); - __pyx_v_typeCode = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_v_typeCode = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; @@ -4756,10 +4935,10 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_30 * if isinstance( handler, FormatHandler ): * return (handler).c_arrayByteCount( */ - __pyx_t_2 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *)__pyx_v_self->handler->__pyx_vtab)->c_lookup(__pyx_v_self->handler, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_v_handler = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_3 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *)__pyx_v_self->handler->__pyx_vtab)->c_lookup(__pyx_v_self->handler, __pyx_v_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_handler = __pyx_t_3; + __pyx_t_3 = 0; /* "src/arraydatatype.pyx":248 * typeCode = self.typeConstant @@ -4768,7 +4947,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_30 * return (handler).c_arrayByteCount( * value */ - __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_handler, ((PyObject*)__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)); + __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_handler, ((PyObject*)__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)); + __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "src/arraydatatype.pyx":249 @@ -4787,10 +4967,10 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_30 * return handler.arrayByteCount( value ) * */ - __pyx_t_2 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler *)((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler)->__pyx_vtab)->c_arrayByteCount(((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler), __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_3 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler *)((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler)->__pyx_vtab)->c_arrayByteCount(((struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *)__pyx_v_handler), __pyx_v_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L4; } @@ -4804,27 +4984,27 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_30 * # Now some array helper functions... */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyObject_GetAttr(__pyx_v_handler, __pyx_n_s__arrayByteCount); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __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 = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_handler, __pyx_n_s__arrayByteCount); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_value); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_value); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); - __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("OpenGL_accelerate.arraydatatype.ArrayDatatype.arrayByteCount", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -5015,6 +5195,9 @@ static int __pyx_pw_17OpenGL_accelerate_13arraydatatype_6Output_1__init__(PyObje PyObject *__pyx_v_name = 0; PyObject *__pyx_v_size = 0; struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype *__pyx_v_arrayType = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -5176,7 +5359,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_6Output_2finalise( * * cdef tuple c_getSize( self, tuple pyArgs ): */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_wrapper, __pyx_n_s__cArgIndex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_wrapper, __pyx_n_s__cArgIndex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -5298,6 +5481,9 @@ static PyObject *__pyx_pw_17OpenGL_accelerate_13arraydatatype_6Output_5oldStyleR CYTHON_UNUSED PyObject *__pyx_v_baseOperation = 0; PyObject *__pyx_v_pyArgs = 0; PyObject *__pyx_v_cArgs = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("oldStyleReturn (wrapper)", 0); @@ -5409,7 +5595,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_6Output_4oldStyleR PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_cArgs), __pyx_v_self->outIndex, sizeof(int), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_cArgs), __pyx_v_self->outIndex, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_v_result); __pyx_v_result = __pyx_t_1; @@ -5434,7 +5620,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_6Output_4oldStyleR * try: * return result[0] */ - __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_thisSize), ((PyObject *)__pyx_k_tuple_5), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_thisSize), ((PyObject *)__pyx_k_tuple_6), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { @@ -5461,7 +5647,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_6Output_4oldStyleR * return result */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L4_error;} + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -5577,6 +5763,9 @@ static int __pyx_pw_17OpenGL_accelerate_13arraydatatype_11SizedOutput_1__init__( PyObject *__pyx_v_specifier = 0; PyObject *__pyx_v_lookup = 0; struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype *__pyx_v_arrayType = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -5688,7 +5877,7 @@ static int __pyx_pf_17OpenGL_accelerate_13arraydatatype_11SizedOutput___init__(s __pyx_t_2 = PyObject_Call(__pyx_builtin_super, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____init__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s____init__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -5809,7 +5998,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_11SizedOutput_2fin __pyx_t_2 = PyObject_Call(__pyx_builtin_super, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__finalise); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__finalise); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -5830,7 +6019,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_11SizedOutput_2fin * cdef tuple c_getSize( self, tuple pyArgs ): * """Retrieve the array size for this argument""" */ - __pyx_t_3 = PyObject_GetAttr(__pyx_v_wrapper, __pyx_n_s__pyArgIndex); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_wrapper, __pyx_n_s__pyArgIndex); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __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 = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -5917,7 +6106,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_11SizedOutput_c_get PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } - __pyx_t_4 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_pyArgs), __pyx_v_self->index, sizeof(int), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_4 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_pyArgs), __pyx_v_self->index, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_specifier = __pyx_t_4; __pyx_t_4 = 0; @@ -5964,7 +6153,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_11SizedOutput_c_get * return result */ __pyx_t_9 = PyTuple_Check(__pyx_v_result); - __pyx_t_10 = (!__pyx_t_9); + __pyx_t_10 = ((!(__pyx_t_9 != 0)) != 0); if (__pyx_t_10) { /* "src/arraydatatype.pyx":330 @@ -6045,7 +6234,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_11SizedOutput_c_get __Pyx_INCREF(__pyx_v_self->lookup); PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_v_self->lookup); __Pyx_GIVEREF(__pyx_v_self->lookup); - __pyx_t_14 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_6), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L13_except_error;} + __pyx_t_14 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_7), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L13_except_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_14)); __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L13_except_error;} @@ -6109,7 +6298,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_11SizedOutput_c_get * else: * try: */ - __pyx_t_14 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_7), ((PyObject *)__pyx_v_self->__pyx_base.name)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __pyx_t_14 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_8), ((PyObject *)__pyx_v_self->__pyx_base.name)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_14)); __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_13); @@ -6171,6 +6360,9 @@ static int __pyx_pw_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_1__init_ static int __pyx_pw_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_arrayName = 0; PyObject *__pyx_v_typeName = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -6291,14 +6483,10 @@ static int __pyx_pf_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType___init__ __Pyx_INCREF(((PyObject *)__pyx_n_s__ArrayDatatype)); PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__ArrayDatatype)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ArrayDatatype)); - __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_8), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_9), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __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__ArrayDatatype); - if (__pyx_t_1 == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__ArrayDatatype); - if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__ArrayDatatype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_v_ArrayDatatype = __pyx_t_1; @@ -6370,7 +6558,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_2f * self.typeIndex = wrapper.pyArgIndex( self.typeName ) * cdef object c_call( self, object incoming, object function, tuple arguments ): */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_wrapper, __pyx_n_s__pyArgIndex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_wrapper, __pyx_n_s__pyArgIndex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -6392,7 +6580,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_2f * cdef object c_call( self, object incoming, object function, tuple arguments ): * """Get the arg as an array of the appropriate type""" */ - __pyx_t_3 = PyObject_GetAttr(__pyx_v_wrapper, __pyx_n_s__pyArgIndex); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_wrapper, __pyx_n_s__pyArgIndex); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __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 = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -6448,13 +6636,13 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_c_c * cdef class AsArrayTyped(pyArgConverter): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self->arrayType), __pyx_n_s__asArray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->arrayType), __pyx_n_s__asArray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (unlikely(((PyObject *)__pyx_v_arguments) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_arguments), __pyx_v_self->typeIndex, sizeof(int), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_arguments), __pyx_v_self->typeIndex, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); @@ -6779,6 +6967,9 @@ static int __pyx_pw_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_1__init__ static int __pyx_pw_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_arrayName = 0; PyObject *__pyx_v_arrayType = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -6849,8 +7040,9 @@ static int __pyx_pf_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped___init__( int __pyx_r; __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; @@ -6879,7 +7071,8 @@ static int __pyx_pf_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped___init__( * arrayType = ArrayDatatype */ __pyx_t_1 = (__pyx_v_arrayType == Py_None); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { /* "src/arraydatatype.pyx":374 * self.arrayName = arrayName # not actually used... @@ -6888,24 +7081,20 @@ static int __pyx_pf_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped___init__( * arrayType = ArrayDatatype * self.arrayType = arrayType */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_n_s__ArrayDatatype)); - PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__ArrayDatatype)); + PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__ArrayDatatype)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ArrayDatatype)); - __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s_8), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_Import(((PyObject *)__pyx_n_s_9), ((PyObject *)__pyx_t_3), -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s__ArrayDatatype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__ArrayDatatype); - if (__pyx_t_2 == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__ArrayDatatype); - if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } - __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_t_2); - __pyx_v_ArrayDatatype = __pyx_t_2; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_INCREF(__pyx_t_3); + __pyx_v_ArrayDatatype = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "src/arraydatatype.pyx":375 * if arrayType is None: @@ -6938,8 +7127,8 @@ static int __pyx_pf_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped___init__( __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_AddTraceback("OpenGL_accelerate.arraydatatype.AsArrayTyped.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -7007,7 +7196,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_c_ca * cdef class AsArrayTypedSizeChecked( AsArrayTyped ): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self->arrayType), __pyx_n_s__asArray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->arrayType), __pyx_n_s__asArray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -7233,6 +7422,9 @@ static int __pyx_pw_17OpenGL_accelerate_13arraydatatype_23AsArrayTypedSizeChecke static int __pyx_pw_17OpenGL_accelerate_13arraydatatype_23AsArrayTypedSizeChecked_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_arrayType = 0; PyObject *__pyx_v_size = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -7328,7 +7520,7 @@ static int __pyx_pf_17OpenGL_accelerate_13arraydatatype_23AsArrayTypedSizeChecke __pyx_t_2 = PyObject_Call(__pyx_builtin_super, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __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____init__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s____init__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -7398,7 +7590,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_23AsArrayTypedSizeC * actualSize = self.arrayType.arraySize( result ) * if actualSize != self.size: */ - __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self->__pyx_base.arrayType), __pyx_n_s__asArray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.arrayType), __pyx_n_s__asArray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -7419,7 +7611,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_23AsArrayTypedSizeC * if actualSize != self.size: * raise ValueError( */ - __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self->__pyx_base.arrayType), __pyx_n_s__arraySize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.arrayType), __pyx_n_s__arraySize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __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 = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -7441,7 +7633,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_23AsArrayTypedSizeC * raise ValueError( * """Expected %r item array, got %r item array"""%( */ - __pyx_t_5 = (__pyx_v_actualSize != __pyx_v_self->size); + __pyx_t_5 = ((__pyx_v_actualSize != __pyx_v_self->size) != 0); if (__pyx_t_5) { /* "src/arraydatatype.pyx":397 @@ -7471,7 +7663,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_23AsArrayTypedSizeC __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_9), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_10), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; @@ -7532,6 +7724,9 @@ static int __pyx_pw_17OpenGL_accelerate_13arraydatatype_16AsArrayTypedSize_1__in static int __pyx_pw_17OpenGL_accelerate_13arraydatatype_16AsArrayTypedSize_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_arrayName = 0; PyObject *__pyx_v_arrayType = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -7602,8 +7797,9 @@ static int __pyx_pf_17OpenGL_accelerate_13arraydatatype_16AsArrayTypedSize___ini int __pyx_r; __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; @@ -7632,7 +7828,8 @@ static int __pyx_pf_17OpenGL_accelerate_13arraydatatype_16AsArrayTypedSize___ini * arrayType = ArrayDatatype */ __pyx_t_1 = (__pyx_v_arrayType == Py_None); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { /* "src/arraydatatype.pyx":414 * self.arrayName = arrayName @@ -7641,24 +7838,20 @@ static int __pyx_pf_17OpenGL_accelerate_13arraydatatype_16AsArrayTypedSize___ini * arrayType = ArrayDatatype * self.arrayType = arrayType */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_n_s__ArrayDatatype)); - PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__ArrayDatatype)); + PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__ArrayDatatype)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ArrayDatatype)); - __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s_8), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_Import(((PyObject *)__pyx_n_s_9), ((PyObject *)__pyx_t_3), -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s__ArrayDatatype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__ArrayDatatype); - if (__pyx_t_2 == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__ArrayDatatype); - if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } - __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_t_2); - __pyx_v_ArrayDatatype = __pyx_t_2; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_INCREF(__pyx_t_3); + __pyx_v_ArrayDatatype = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "src/arraydatatype.pyx":415 * if arrayType is None: @@ -7691,8 +7884,8 @@ static int __pyx_pf_17OpenGL_accelerate_13arraydatatype_16AsArrayTypedSize___ini __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_AddTraceback("OpenGL_accelerate.arraydatatype.AsArrayTypedSize.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -7740,7 +7933,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13arraydatatype_16AsArrayTypedSize * cdef c_call( self, tuple pyArgs, int index, object wrappedOperation ): * return self.arrayType.arraySize( pyArgs[self.arrayIndex ] ) */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_wrapper, __pyx_n_s__pyArgIndex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_wrapper, __pyx_n_s__pyArgIndex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -7795,13 +7988,13 @@ static PyObject *__pyx_f_17OpenGL_accelerate_13arraydatatype_16AsArrayTypedSize_ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self->arrayType), __pyx_n_s__arraySize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->arrayType), __pyx_n_s__arraySize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (unlikely(((PyObject *)__pyx_v_pyArgs) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_pyArgs), __pyx_v_self->arrayIndex, sizeof(int), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_pyArgs), __pyx_v_self->arrayIndex, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __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 = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); @@ -8021,197 +8214,97 @@ static int __pyx_pf_17OpenGL_accelerate_13arraydatatype_16AsArrayTypedSize_9arra __Pyx_RefNannyFinishContext(); return __pyx_r; } -static struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_HandlerRegistry __pyx_vtable_17OpenGL_accelerate_13arraydatatype_HandlerRegistry; +static struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_AsArrayTyped __pyx_vtable_17OpenGL_accelerate_13arraydatatype_AsArrayTyped; -static PyObject *__pyx_tp_new_17OpenGL_accelerate_13arraydatatype_HandlerRegistry(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; - p = ((struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *)o); - p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_HandlerRegistry; - p->registry = ((PyObject*)Py_None); Py_INCREF(Py_None); - p->match = Py_None; Py_INCREF(Py_None); - p->output_handler = Py_None; Py_INCREF(Py_None); - p->preferredOutput = Py_None; Py_INCREF(Py_None); - p->all_output_handlers = Py_None; Py_INCREF(Py_None); +static PyObject *__pyx_tp_new_17OpenGL_accelerate_13arraydatatype_AsArrayTyped(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTyped *p; + PyObject *o = __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_new(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTyped *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_pyArgConverter*)__pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_AsArrayTyped; + p->arrayName = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->arrayType = ((struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype *)Py_None); Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_17OpenGL_accelerate_13arraydatatype_HandlerRegistry(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *p = (struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *)o; +static void __pyx_tp_dealloc_17OpenGL_accelerate_13arraydatatype_AsArrayTyped(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTyped *p = (struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTyped *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->registry); - Py_CLEAR(p->match); - Py_CLEAR(p->output_handler); - Py_CLEAR(p->preferredOutput); - Py_CLEAR(p->all_output_handlers); + Py_CLEAR(p->arrayName); + Py_CLEAR(p->arrayType); PyObject_GC_Track(o); - (*Py_TYPE(o)->tp_free)(o); + if (likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter)) __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_17OpenGL_accelerate_13arraydatatype_AsArrayTyped); } -static int __pyx_tp_traverse_17OpenGL_accelerate_13arraydatatype_HandlerRegistry(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_17OpenGL_accelerate_13arraydatatype_AsArrayTyped(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *p = (struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *)o; - if (p->registry) { - e = (*v)(p->registry, a); if (e) return e; - } - if (p->match) { - e = (*v)(p->match, a); if (e) return e; - } - if (p->output_handler) { - e = (*v)(p->output_handler, a); if (e) return e; - } - if (p->preferredOutput) { - e = (*v)(p->preferredOutput, a); if (e) return e; + struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTyped *p = (struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTyped *)o; + e = ((likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter)) ? ((__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_traverse) ? __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_17OpenGL_accelerate_13arraydatatype_AsArrayTyped)); if (e) return e; + if (p->arrayName) { + e = (*v)(p->arrayName, a); if (e) return e; } - if (p->all_output_handlers) { - e = (*v)(p->all_output_handlers, a); if (e) return e; + if (p->arrayType) { + e = (*v)(((PyObject*)p->arrayType), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_17OpenGL_accelerate_13arraydatatype_HandlerRegistry(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *p = (struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *)o; +static int __pyx_tp_clear_17OpenGL_accelerate_13arraydatatype_AsArrayTyped(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTyped *p = (struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTyped *)o; PyObject* tmp; - tmp = ((PyObject*)p->registry); - p->registry = ((PyObject*)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->match); - p->match = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->output_handler); - p->output_handler = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->preferredOutput); - p->preferredOutput = Py_None; Py_INCREF(Py_None); + if (likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter)) { if (__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_clear) __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_17OpenGL_accelerate_13arraydatatype_AsArrayTyped); + tmp = ((PyObject*)p->arrayName); + p->arrayName = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); - tmp = ((PyObject*)p->all_output_handlers); - p->all_output_handlers = Py_None; Py_INCREF(Py_None); + tmp = ((PyObject*)p->arrayType); + p->arrayType = ((struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static int __pyx_mp_ass_subscript_17OpenGL_accelerate_13arraydatatype_HandlerRegistry(PyObject *o, PyObject *i, PyObject *v) { +static PyObject *__pyx_getprop_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_arrayName(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_9arrayName_1__get__(o); +} + +static int __pyx_setprop_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_arrayName(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pw_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_3__setitem__(o, i, v); + return __pyx_pw_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_9arrayName_3__set__(o, v); } else { - PyErr_Format(PyExc_NotImplementedError, - "Subscript deletion not supported by %s", Py_TYPE(o)->tp_name); - return -1; + return __pyx_pw_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_9arrayName_5__del__(o); } } -static PyMethodDef __pyx_methods_17OpenGL_accelerate_13arraydatatype_HandlerRegistry[] = { - {__Pyx_NAMESTR("register"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_7register, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_6register)}, - {__Pyx_NAMESTR("registerReturn"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_9registerReturn, METH_O, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_8registerReturn)}, - {0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number_HandlerRegistry = { - 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_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_arrayType(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_9arrayType_1__get__(o); +} -static PySequenceMethods __pyx_tp_as_sequence_HandlerRegistry = { - 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_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_arrayType(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_9arrayType_3__set__(o, v); + } + else { + return __pyx_pw_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_9arrayType_5__del__(o); + } +} -static PyMappingMethods __pyx_tp_as_mapping_HandlerRegistry = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - __pyx_mp_ass_subscript_17OpenGL_accelerate_13arraydatatype_HandlerRegistry, /*mp_ass_subscript*/ +static PyMethodDef __pyx_methods_17OpenGL_accelerate_13arraydatatype_AsArrayTyped[] = { + {__Pyx_NAMESTR("finalise"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_3finalise, METH_O, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_2finalise)}, + {0, 0, 0, 0} }; -static PyBufferProcs __pyx_tp_as_buffer_HandlerRegistry = { - #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_17OpenGL_accelerate_13arraydatatype_AsArrayTyped[] = { + {(char *)"arrayName", __pyx_getprop_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_arrayName, __pyx_setprop_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_arrayName, 0, 0}, + {(char *)"arrayType", __pyx_getprop_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_arrayType, __pyx_setprop_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_arrayType, 0, 0}, + {0, 0, 0, 0, 0} }; -static PyTypeObject __pyx_type_17OpenGL_accelerate_13arraydatatype_HandlerRegistry = { +static PyTypeObject __pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayTyped = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("OpenGL_accelerate.arraydatatype.HandlerRegistry"), /*tp_name*/ - sizeof(struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_HandlerRegistry), /*tp_basicsize*/ + __Pyx_NAMESTR("OpenGL_accelerate.arraydatatype.AsArrayTyped"), /*tp_name*/ + sizeof(struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTyped), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_17OpenGL_accelerate_13arraydatatype_HandlerRegistry, /*tp_dealloc*/ + __pyx_tp_dealloc_17OpenGL_accelerate_13arraydatatype_AsArrayTyped, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -8221,34 +8314,34 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_13arraydatatype_HandlerRegist 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_HandlerRegistry, /*tp_as_number*/ - &__pyx_tp_as_sequence_HandlerRegistry, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_HandlerRegistry, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ - __pyx_pw_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_5__call__, /*tp_call*/ + 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_HandlerRegistry, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - __Pyx_DOCSTR("C-coded registry of format handlers for array data-formats"), /*tp_doc*/ - __pyx_tp_traverse_17OpenGL_accelerate_13arraydatatype_HandlerRegistry, /*tp_traverse*/ - __pyx_tp_clear_17OpenGL_accelerate_13arraydatatype_HandlerRegistry, /*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("Given arrayName and arrayType, convert arrayName to array of type\n \n TODO: It should be possible to drop this if ERROR_ON_COPY,\n as array inputs always have to be the final objects in that \n case.\n "), /*tp_doc*/ + __pyx_tp_traverse_17OpenGL_accelerate_13arraydatatype_AsArrayTyped, /*tp_traverse*/ + __pyx_tp_clear_17OpenGL_accelerate_13arraydatatype_AsArrayTyped, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_17OpenGL_accelerate_13arraydatatype_HandlerRegistry, /*tp_methods*/ + __pyx_methods_17OpenGL_accelerate_13arraydatatype_AsArrayTyped, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_17OpenGL_accelerate_13arraydatatype_AsArrayTyped, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_1__init__, /*tp_init*/ + __pyx_pw_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_17OpenGL_accelerate_13arraydatatype_HandlerRegistry, /*tp_new*/ + __pyx_tp_new_17OpenGL_accelerate_13arraydatatype_AsArrayTyped, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -8261,214 +8354,189 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_13arraydatatype_HandlerRegist 0, /*tp_version_tag*/ #endif }; -static struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_ArrayDatatype __pyx_vtable_17OpenGL_accelerate_13arraydatatype_ArrayDatatype; +static struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_AsArrayOfType __pyx_vtable_17OpenGL_accelerate_13arraydatatype_AsArrayOfType; -static PyObject *__pyx_tp_new_17OpenGL_accelerate_13arraydatatype_ArrayDatatype(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; - p = ((struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype *)o); - p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_ArrayDatatype; - p->handler = ((struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *)Py_None); Py_INCREF(Py_None); - p->typeConstant = Py_None; Py_INCREF(Py_None); - p->baseType = Py_None; Py_INCREF(Py_None); +static PyObject *__pyx_tp_new_17OpenGL_accelerate_13arraydatatype_AsArrayOfType(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayOfType *p; + PyObject *o = __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_new(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayOfType *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_pyArgConverter*)__pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_AsArrayOfType; + p->arrayName = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->typeName = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->arrayType = ((struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype *)Py_None); Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_17OpenGL_accelerate_13arraydatatype_ArrayDatatype(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype *p = (struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype *)o; +static void __pyx_tp_dealloc_17OpenGL_accelerate_13arraydatatype_AsArrayOfType(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayOfType *p = (struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayOfType *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->handler); - Py_CLEAR(p->typeConstant); - Py_CLEAR(p->baseType); + Py_CLEAR(p->arrayName); + Py_CLEAR(p->typeName); + Py_CLEAR(p->arrayType); PyObject_GC_Track(o); - (*Py_TYPE(o)->tp_free)(o); + if (likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter)) __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_17OpenGL_accelerate_13arraydatatype_AsArrayOfType); } -static int __pyx_tp_traverse_17OpenGL_accelerate_13arraydatatype_ArrayDatatype(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_17OpenGL_accelerate_13arraydatatype_AsArrayOfType(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype *p = (struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype *)o; - if (p->handler) { - e = (*v)(((PyObject*)p->handler), a); if (e) return e; + struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayOfType *p = (struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayOfType *)o; + e = ((likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter)) ? ((__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_traverse) ? __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_17OpenGL_accelerate_13arraydatatype_AsArrayOfType)); if (e) return e; + if (p->arrayName) { + e = (*v)(p->arrayName, a); if (e) return e; } - if (p->typeConstant) { - e = (*v)(p->typeConstant, a); if (e) return e; + if (p->typeName) { + e = (*v)(p->typeName, a); if (e) return e; } - if (p->baseType) { - e = (*v)(p->baseType, a); if (e) return e; + if (p->arrayType) { + e = (*v)(((PyObject*)p->arrayType), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_17OpenGL_accelerate_13arraydatatype_ArrayDatatype(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype *p = (struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype *)o; +static int __pyx_tp_clear_17OpenGL_accelerate_13arraydatatype_AsArrayOfType(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayOfType *p = (struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayOfType *)o; PyObject* tmp; - tmp = ((PyObject*)p->handler); - p->handler = ((struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *)Py_None); Py_INCREF(Py_None); + if (likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter)) { if (__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_clear) __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_17OpenGL_accelerate_13arraydatatype_AsArrayOfType); + tmp = ((PyObject*)p->arrayName); + p->arrayName = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); - tmp = ((PyObject*)p->typeConstant); - p->typeConstant = Py_None; Py_INCREF(Py_None); + tmp = ((PyObject*)p->typeName); + p->typeName = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); - tmp = ((PyObject*)p->baseType); - p->baseType = Py_None; Py_INCREF(Py_None); + tmp = ((PyObject*)p->arrayType); + p->arrayType = ((struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyObject *__pyx_getprop_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_typeConstant(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_12typeConstant_1__get__(o); +static PyObject *__pyx_getprop_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_arrayName(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_9arrayName_1__get__(o); } -static int __pyx_setprop_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_typeConstant(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_setprop_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_arrayName(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_12typeConstant_3__set__(o, v); + return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_9arrayName_3__set__(o, v); } else { - return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_12typeConstant_5__del__(o); + return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_9arrayName_5__del__(o); } } -static PyObject *__pyx_getprop_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_baseType(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_8baseType_1__get__(o); +static PyObject *__pyx_getprop_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_typeName(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_8typeName_1__get__(o); } -static int __pyx_setprop_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_baseType(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_setprop_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_typeName(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_8baseType_3__set__(o, v); + return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_8typeName_3__set__(o, v); } else { - return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_8baseType_5__del__(o); + return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_8typeName_5__del__(o); } } -static PyMethodDef __pyx_methods_17OpenGL_accelerate_13arraydatatype_ArrayDatatype[] = { - {__Pyx_NAMESTR("getRegistry"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_3getRegistry, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_2getRegistry)}, - {__Pyx_NAMESTR("getHandler"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_5getHandler, METH_O, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_4getHandler)}, - {__Pyx_NAMESTR("from_param"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_7from_param, METH_O, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_6from_param)}, - {__Pyx_NAMESTR("dataPointer"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_11dataPointer, METH_O, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_10dataPointer)}, - {__Pyx_NAMESTR("voidDataPointer"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_13voidDataPointer, METH_O, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_12voidDataPointer)}, - {__Pyx_NAMESTR("typedPointer"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_15typedPointer, METH_O, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_14typedPointer)}, - {__Pyx_NAMESTR("asArray"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_17asArray, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_16asArray)}, - {__Pyx_NAMESTR("arrayToGLType"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_19arrayToGLType, METH_O, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_18arrayToGLType)}, - {__Pyx_NAMESTR("arraySize"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_21arraySize, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_20arraySize)}, - {__Pyx_NAMESTR("unitSize"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_23unitSize, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_22unitSize)}, - {__Pyx_NAMESTR("returnHandler"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_25returnHandler, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_24returnHandler)}, - {__Pyx_NAMESTR("zeros"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_27zeros, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_26zeros)}, - {__Pyx_NAMESTR("dimensions"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_29dimensions, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_28dimensions)}, - {__Pyx_NAMESTR("arrayByteCount"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_31arrayByteCount, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_30arrayByteCount)}, +static PyObject *__pyx_getprop_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_arrayType(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_9arrayType_1__get__(o); +} + +static int __pyx_setprop_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_arrayType(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_9arrayType_3__set__(o, v); + } + else { + return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_9arrayType_5__del__(o); + } +} + +static PyMethodDef __pyx_methods_17OpenGL_accelerate_13arraydatatype_AsArrayOfType[] = { + {__Pyx_NAMESTR("finalise"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_3finalise, METH_O, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_17OpenGL_accelerate_13arraydatatype_ArrayDatatype[] = { - {(char *)"typeConstant", __pyx_getprop_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_typeConstant, __pyx_setprop_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_typeConstant, 0, 0}, - {(char *)"baseType", __pyx_getprop_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_baseType, __pyx_setprop_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_baseType, 0, 0}, +static struct PyGetSetDef __pyx_getsets_17OpenGL_accelerate_13arraydatatype_AsArrayOfType[] = { + {(char *)"arrayName", __pyx_getprop_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_arrayName, __pyx_setprop_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_arrayName, 0, 0}, + {(char *)"typeName", __pyx_getprop_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_typeName, __pyx_setprop_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_typeName, 0, 0}, + {(char *)"arrayType", __pyx_getprop_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_arrayType, __pyx_setprop_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_arrayType, 0, 0}, {0, 0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_ArrayDatatype = { - 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_17OpenGL_accelerate_13arraydatatype_AsArrayOfType = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("OpenGL_accelerate.arraydatatype.AsArrayOfType"), /*tp_name*/ + sizeof(struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayOfType), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_17OpenGL_accelerate_13arraydatatype_AsArrayOfType, /*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*/ - #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_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*/ + __Pyx_DOCSTR("Given arrayName and typeName coerce arrayName to array of type typeName\n \n TODO: It should be possible to drop this if ERROR_ON_COPY,\n as array inputs always have to be the final objects in that \n case.\n "), /*tp_doc*/ + __pyx_tp_traverse_17OpenGL_accelerate_13arraydatatype_AsArrayOfType, /*tp_traverse*/ + __pyx_tp_clear_17OpenGL_accelerate_13arraydatatype_AsArrayOfType, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_17OpenGL_accelerate_13arraydatatype_AsArrayOfType, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_17OpenGL_accelerate_13arraydatatype_AsArrayOfType, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + __pyx_pw_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_17OpenGL_accelerate_13arraydatatype_AsArrayOfType, /*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_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked __pyx_vtable_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked; -static PySequenceMethods __pyx_tp_as_sequence_ArrayDatatype = { - 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_ArrayDatatype = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; +static PyObject *__pyx_tp_new_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked *p; + PyObject *o = __pyx_tp_new_17OpenGL_accelerate_13arraydatatype_AsArrayTyped(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_pyArgConverter*)__pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked; + return o; +} -static PyBufferProcs __pyx_tp_as_buffer_ArrayDatatype = { - #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_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked[] = { + {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_17OpenGL_accelerate_13arraydatatype_ArrayDatatype = { +static PyTypeObject __pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("OpenGL_accelerate.arraydatatype.ArrayDatatype"), /*tp_name*/ - sizeof(struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype), /*tp_basicsize*/ + __Pyx_NAMESTR("OpenGL_accelerate.arraydatatype.AsArrayTypedSizeChecked"), /*tp_name*/ + sizeof(struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_17OpenGL_accelerate_13arraydatatype_ArrayDatatype, /*tp_dealloc*/ + __pyx_tp_dealloc_17OpenGL_accelerate_13arraydatatype_AsArrayTyped, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -8478,34 +8546,34 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_13arraydatatype_ArrayDatatype 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_ArrayDatatype, /*tp_as_number*/ - &__pyx_tp_as_sequence_ArrayDatatype, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_ArrayDatatype, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ - __pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_9__call__, /*tp_call*/ + 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_ArrayDatatype, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - __Pyx_DOCSTR("Mix-in for array datatype classes\n \n The ArrayDatatype marker essentially is used to mark a particular argument\n as having an \"array\" type, which means that it is eligible for handling \n via the arrays sub-package and its registered handlers.\n "), /*tp_doc*/ - __pyx_tp_traverse_17OpenGL_accelerate_13arraydatatype_ArrayDatatype, /*tp_traverse*/ - __pyx_tp_clear_17OpenGL_accelerate_13arraydatatype_ArrayDatatype, /*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("Size-checking version of AsArrayTyped"), /*tp_doc*/ + __pyx_tp_traverse_17OpenGL_accelerate_13arraydatatype_AsArrayTyped, /*tp_traverse*/ + __pyx_tp_clear_17OpenGL_accelerate_13arraydatatype_AsArrayTyped, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_17OpenGL_accelerate_13arraydatatype_ArrayDatatype, /*tp_methods*/ + __pyx_methods_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_17OpenGL_accelerate_13arraydatatype_ArrayDatatype, /*tp_getset*/ + 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_1__init__, /*tp_init*/ + __pyx_pw_17OpenGL_accelerate_13arraydatatype_23AsArrayTypedSizeChecked_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_17OpenGL_accelerate_13arraydatatype_ArrayDatatype, /*tp_new*/ + __pyx_tp_new_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -8523,7 +8591,7 @@ static struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_Output __pyx_ static PyObject *__pyx_tp_new_17OpenGL_accelerate_13arraydatatype_Output(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_Output *p; PyObject *o = __pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter->tp_new(t, a, k); - if (!o) return 0; + if (unlikely(!o)) return 0; p = ((struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_Output *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_cArgConverter*)__pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_Output; p->name = ((PyObject*)Py_None); Py_INCREF(Py_None); @@ -8580,104 +8648,6 @@ static PyMethodDef __pyx_methods_17OpenGL_accelerate_13arraydatatype_Output[] = {0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_Output = { - 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_Output = { - 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_Output = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_Output = { - #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_17OpenGL_accelerate_13arraydatatype_Output = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("OpenGL_accelerate.arraydatatype.Output"), /*tp_name*/ @@ -8693,16 +8663,16 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_13arraydatatype_Output = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_Output, /*tp_as_number*/ - &__pyx_tp_as_sequence_Output, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_Output, /*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_Output, /*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("CConverter generating static-size typed output arrays\n \n Produces an output array of given type (arrayType) and \n size using self.lookup() to determine the size of the \n array to be produced, where the lookup function is passed \n as an initialisation argument.\n \n Provides also:\n \n oldStyleReturn( ... ) for use in the default case of\n PyOpenGL compatability mode, where result arrays of\n size (1,) are returned as scalar values.\n "), /*tp_doc*/ __pyx_tp_traverse_17OpenGL_accelerate_13arraydatatype_Output, /*tp_traverse*/ __pyx_tp_clear_17OpenGL_accelerate_13arraydatatype_Output, /*tp_clear*/ @@ -8738,7 +8708,7 @@ static struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_SizedOutput _ static PyObject *__pyx_tp_new_17OpenGL_accelerate_13arraydatatype_SizedOutput(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_SizedOutput *p; PyObject *o = __pyx_tp_new_17OpenGL_accelerate_13arraydatatype_Output(t, a, k); - if (!o) return 0; + if (unlikely(!o)) return 0; p = ((struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_SizedOutput *)o); p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_cArgConverter*)__pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_SizedOutput; p->specifier = ((PyObject*)Py_None); Py_INCREF(Py_None); @@ -8786,129 +8756,31 @@ static PyMethodDef __pyx_methods_17OpenGL_accelerate_13arraydatatype_SizedOutput {0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_SizedOutput = { - 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_17OpenGL_accelerate_13arraydatatype_SizedOutput = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("OpenGL_accelerate.arraydatatype.SizedOutput"), /*tp_name*/ + sizeof(struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_SizedOutput), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_17OpenGL_accelerate_13arraydatatype_SizedOutput, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ #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_SizedOutput = { - 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_SizedOutput = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_SizedOutput = { - #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_17OpenGL_accelerate_13arraydatatype_SizedOutput = { - PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("OpenGL_accelerate.arraydatatype.SizedOutput"), /*tp_name*/ - sizeof(struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_SizedOutput), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_17OpenGL_accelerate_13arraydatatype_SizedOutput, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 - 0, /*tp_compare*/ + 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_SizedOutput, /*tp_as_number*/ - &__pyx_tp_as_sequence_SizedOutput, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_SizedOutput, /*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_SizedOutput, /*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("Output class that looks up output size via a callable function\n \n specifier -- Python argument name used to lookup the data-size \n lookup -- function taking argument in specifier to determine size \n "), /*tp_doc*/ __pyx_tp_traverse_17OpenGL_accelerate_13arraydatatype_SizedOutput, /*tp_traverse*/ __pyx_tp_clear_17OpenGL_accelerate_13arraydatatype_SizedOutput, /*tp_clear*/ @@ -8939,217 +8811,105 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_13arraydatatype_SizedOutput = 0, /*tp_version_tag*/ #endif }; -static struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_AsArrayOfType __pyx_vtable_17OpenGL_accelerate_13arraydatatype_AsArrayOfType; +static struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_HandlerRegistry __pyx_vtable_17OpenGL_accelerate_13arraydatatype_HandlerRegistry; -static PyObject *__pyx_tp_new_17OpenGL_accelerate_13arraydatatype_AsArrayOfType(PyTypeObject *t, PyObject *a, PyObject *k) { - struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayOfType *p; - PyObject *o = __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_new(t, a, k); - if (!o) return 0; - p = ((struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayOfType *)o); - p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_pyArgConverter*)__pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_AsArrayOfType; - p->arrayName = ((PyObject*)Py_None); Py_INCREF(Py_None); - p->typeName = ((PyObject*)Py_None); Py_INCREF(Py_None); - p->arrayType = ((struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype *)Py_None); Py_INCREF(Py_None); +static PyObject *__pyx_tp_new_17OpenGL_accelerate_13arraydatatype_HandlerRegistry(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *p; + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *)o); + p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_HandlerRegistry; + p->registry = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->match = Py_None; Py_INCREF(Py_None); + p->output_handler = Py_None; Py_INCREF(Py_None); + p->preferredOutput = Py_None; Py_INCREF(Py_None); + p->all_output_handlers = Py_None; Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_17OpenGL_accelerate_13arraydatatype_AsArrayOfType(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayOfType *p = (struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayOfType *)o; +static void __pyx_tp_dealloc_17OpenGL_accelerate_13arraydatatype_HandlerRegistry(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *p = (struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->arrayName); - Py_CLEAR(p->typeName); - Py_CLEAR(p->arrayType); - PyObject_GC_Track(o); - if (likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter)) __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_17OpenGL_accelerate_13arraydatatype_AsArrayOfType); + Py_CLEAR(p->registry); + Py_CLEAR(p->match); + Py_CLEAR(p->output_handler); + Py_CLEAR(p->preferredOutput); + Py_CLEAR(p->all_output_handlers); + (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_17OpenGL_accelerate_13arraydatatype_AsArrayOfType(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_17OpenGL_accelerate_13arraydatatype_HandlerRegistry(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayOfType *p = (struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayOfType *)o; - e = ((likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter)) ? ((__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_traverse) ? __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_17OpenGL_accelerate_13arraydatatype_AsArrayOfType)); if (e) return e; - if (p->arrayName) { - e = (*v)(p->arrayName, a); if (e) return e; + struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *p = (struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *)o; + if (p->registry) { + e = (*v)(p->registry, a); if (e) return e; } - if (p->typeName) { - e = (*v)(p->typeName, a); if (e) return e; + if (p->match) { + e = (*v)(p->match, a); if (e) return e; } - if (p->arrayType) { - e = (*v)(((PyObject*)p->arrayType), a); if (e) return e; + if (p->output_handler) { + e = (*v)(p->output_handler, a); if (e) return e; + } + if (p->preferredOutput) { + e = (*v)(p->preferredOutput, a); if (e) return e; + } + if (p->all_output_handlers) { + e = (*v)(p->all_output_handlers, a); if (e) return e; } return 0; } -static int __pyx_tp_clear_17OpenGL_accelerate_13arraydatatype_AsArrayOfType(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayOfType *p = (struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayOfType *)o; +static int __pyx_tp_clear_17OpenGL_accelerate_13arraydatatype_HandlerRegistry(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *p = (struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *)o; PyObject* tmp; - if (likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter)) { if (__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_clear) __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_17OpenGL_accelerate_13arraydatatype_AsArrayOfType); - tmp = ((PyObject*)p->arrayName); - p->arrayName = ((PyObject*)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->registry); + p->registry = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); - tmp = ((PyObject*)p->typeName); - p->typeName = ((PyObject*)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->match); + p->match = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); - tmp = ((PyObject*)p->arrayType); - p->arrayType = ((struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype *)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->output_handler); + p->output_handler = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->preferredOutput); + p->preferredOutput = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->all_output_handlers); + p->all_output_handlers = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyObject *__pyx_getprop_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_arrayName(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_9arrayName_1__get__(o); -} - -static int __pyx_setprop_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_arrayName(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_9arrayName_3__set__(o, v); - } - else { - return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_9arrayName_5__del__(o); - } -} - -static PyObject *__pyx_getprop_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_typeName(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_8typeName_1__get__(o); -} - -static int __pyx_setprop_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_typeName(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_8typeName_3__set__(o, v); - } - else { - return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_8typeName_5__del__(o); - } -} - -static PyObject *__pyx_getprop_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_arrayType(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_9arrayType_1__get__(o); -} - -static int __pyx_setprop_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_arrayType(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_mp_ass_subscript_17OpenGL_accelerate_13arraydatatype_HandlerRegistry(PyObject *o, PyObject *i, PyObject *v) { if (v) { - return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_9arrayType_3__set__(o, v); + return __pyx_pw_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_3__setitem__(o, i, v); } else { - return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_9arrayType_5__del__(o); + PyErr_Format(PyExc_NotImplementedError, + "Subscript deletion not supported by %s", Py_TYPE(o)->tp_name); + return -1; } } -static PyMethodDef __pyx_methods_17OpenGL_accelerate_13arraydatatype_AsArrayOfType[] = { - {__Pyx_NAMESTR("finalise"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_3finalise, METH_O, __Pyx_DOCSTR(0)}, +static PyMethodDef __pyx_methods_17OpenGL_accelerate_13arraydatatype_HandlerRegistry[] = { + {__Pyx_NAMESTR("register"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_7register, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_6register)}, + {__Pyx_NAMESTR("registerReturn"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_9registerReturn, METH_O, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_8registerReturn)}, {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_17OpenGL_accelerate_13arraydatatype_AsArrayOfType[] = { - {(char *)"arrayName", __pyx_getprop_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_arrayName, __pyx_setprop_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_arrayName, 0, 0}, - {(char *)"typeName", __pyx_getprop_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_typeName, __pyx_setprop_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_typeName, 0, 0}, - {(char *)"arrayType", __pyx_getprop_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_arrayType, __pyx_setprop_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_arrayType, 0, 0}, - {0, 0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number_AsArrayOfType = { - 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_AsArrayOfType = { - 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_AsArrayOfType = { +static PyMappingMethods __pyx_tp_as_mapping_HandlerRegistry = { 0, /*mp_length*/ 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_AsArrayOfType = { - #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 + __pyx_mp_ass_subscript_17OpenGL_accelerate_13arraydatatype_HandlerRegistry, /*mp_ass_subscript*/ }; -static PyTypeObject __pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayOfType = { +static PyTypeObject __pyx_type_17OpenGL_accelerate_13arraydatatype_HandlerRegistry = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("OpenGL_accelerate.arraydatatype.AsArrayOfType"), /*tp_name*/ - sizeof(struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayOfType), /*tp_basicsize*/ + __Pyx_NAMESTR("OpenGL_accelerate.arraydatatype.HandlerRegistry"), /*tp_name*/ + sizeof(struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_HandlerRegistry), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_17OpenGL_accelerate_13arraydatatype_AsArrayOfType, /*tp_dealloc*/ + __pyx_tp_dealloc_17OpenGL_accelerate_13arraydatatype_HandlerRegistry, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -9159,34 +8919,34 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayOfType 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_AsArrayOfType, /*tp_as_number*/ - &__pyx_tp_as_sequence_AsArrayOfType, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_AsArrayOfType, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_HandlerRegistry, /*tp_as_mapping*/ 0, /*tp_hash*/ - 0, /*tp_call*/ + __pyx_pw_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_5__call__, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_AsArrayOfType, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - __Pyx_DOCSTR("Given arrayName and typeName coerce arrayName to array of type typeName\n \n TODO: It should be possible to drop this if ERROR_ON_COPY,\n as array inputs always have to be the final objects in that \n case.\n "), /*tp_doc*/ - __pyx_tp_traverse_17OpenGL_accelerate_13arraydatatype_AsArrayOfType, /*tp_traverse*/ - __pyx_tp_clear_17OpenGL_accelerate_13arraydatatype_AsArrayOfType, /*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("C-coded registry of format handlers for array data-formats"), /*tp_doc*/ + __pyx_tp_traverse_17OpenGL_accelerate_13arraydatatype_HandlerRegistry, /*tp_traverse*/ + __pyx_tp_clear_17OpenGL_accelerate_13arraydatatype_HandlerRegistry, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_17OpenGL_accelerate_13arraydatatype_AsArrayOfType, /*tp_methods*/ + __pyx_methods_17OpenGL_accelerate_13arraydatatype_HandlerRegistry, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_17OpenGL_accelerate_13arraydatatype_AsArrayOfType, /*tp_getset*/ + 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_1__init__, /*tp_init*/ + __pyx_pw_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_17OpenGL_accelerate_13arraydatatype_AsArrayOfType, /*tp_new*/ + __pyx_tp_new_17OpenGL_accelerate_13arraydatatype_HandlerRegistry, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -9199,363 +8959,116 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayOfType 0, /*tp_version_tag*/ #endif }; -static struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_AsArrayTyped __pyx_vtable_17OpenGL_accelerate_13arraydatatype_AsArrayTyped; +static struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_ArrayDatatype __pyx_vtable_17OpenGL_accelerate_13arraydatatype_ArrayDatatype; -static PyObject *__pyx_tp_new_17OpenGL_accelerate_13arraydatatype_AsArrayTyped(PyTypeObject *t, PyObject *a, PyObject *k) { - struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTyped *p; - PyObject *o = __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_new(t, a, k); - if (!o) return 0; - p = ((struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTyped *)o); - p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_pyArgConverter*)__pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_AsArrayTyped; - p->arrayName = ((PyObject*)Py_None); Py_INCREF(Py_None); - p->arrayType = ((struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype *)Py_None); Py_INCREF(Py_None); +static PyObject *__pyx_tp_new_17OpenGL_accelerate_13arraydatatype_ArrayDatatype(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype *p; + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype *)o); + p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_ArrayDatatype; + p->handler = ((struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *)Py_None); Py_INCREF(Py_None); + p->typeConstant = Py_None; Py_INCREF(Py_None); + p->baseType = Py_None; Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_17OpenGL_accelerate_13arraydatatype_AsArrayTyped(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTyped *p = (struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTyped *)o; +static void __pyx_tp_dealloc_17OpenGL_accelerate_13arraydatatype_ArrayDatatype(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype *p = (struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->arrayName); - Py_CLEAR(p->arrayType); - PyObject_GC_Track(o); - if (likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter)) __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_17OpenGL_accelerate_13arraydatatype_AsArrayTyped); + Py_CLEAR(p->handler); + Py_CLEAR(p->typeConstant); + Py_CLEAR(p->baseType); + (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_17OpenGL_accelerate_13arraydatatype_AsArrayTyped(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_17OpenGL_accelerate_13arraydatatype_ArrayDatatype(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTyped *p = (struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTyped *)o; - e = ((likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter)) ? ((__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_traverse) ? __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_17OpenGL_accelerate_13arraydatatype_AsArrayTyped)); if (e) return e; - if (p->arrayName) { - e = (*v)(p->arrayName, a); if (e) return e; + struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype *p = (struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype *)o; + if (p->handler) { + e = (*v)(((PyObject*)p->handler), a); if (e) return e; } - if (p->arrayType) { - e = (*v)(((PyObject*)p->arrayType), a); if (e) return e; + if (p->typeConstant) { + e = (*v)(p->typeConstant, a); if (e) return e; + } + if (p->baseType) { + e = (*v)(p->baseType, a); if (e) return e; } return 0; } -static int __pyx_tp_clear_17OpenGL_accelerate_13arraydatatype_AsArrayTyped(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTyped *p = (struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTyped *)o; +static int __pyx_tp_clear_17OpenGL_accelerate_13arraydatatype_ArrayDatatype(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype *p = (struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype *)o; PyObject* tmp; - if (likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter)) { if (__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_clear) __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_17OpenGL_accelerate_13arraydatatype_AsArrayTyped); - tmp = ((PyObject*)p->arrayName); - p->arrayName = ((PyObject*)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->handler); + p->handler = ((struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); - tmp = ((PyObject*)p->arrayType); - p->arrayType = ((struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype *)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->typeConstant); + p->typeConstant = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->baseType); + p->baseType = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyObject *__pyx_getprop_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_arrayName(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_9arrayName_1__get__(o); +static PyObject *__pyx_getprop_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_typeConstant(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_12typeConstant_1__get__(o); } -static int __pyx_setprop_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_arrayName(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_setprop_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_typeConstant(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pw_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_9arrayName_3__set__(o, v); + return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_12typeConstant_3__set__(o, v); } else { - return __pyx_pw_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_9arrayName_5__del__(o); + return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_12typeConstant_5__del__(o); } } -static PyObject *__pyx_getprop_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_arrayType(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_9arrayType_1__get__(o); +static PyObject *__pyx_getprop_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_baseType(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_8baseType_1__get__(o); } -static int __pyx_setprop_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_arrayType(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_setprop_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_baseType(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pw_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_9arrayType_3__set__(o, v); + return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_8baseType_3__set__(o, v); } else { - return __pyx_pw_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_9arrayType_5__del__(o); + return __pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_8baseType_5__del__(o); } } -static PyMethodDef __pyx_methods_17OpenGL_accelerate_13arraydatatype_AsArrayTyped[] = { - {__Pyx_NAMESTR("finalise"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_3finalise, METH_O, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_2finalise)}, - {0, 0, 0, 0} -}; - -static struct PyGetSetDef __pyx_getsets_17OpenGL_accelerate_13arraydatatype_AsArrayTyped[] = { - {(char *)"arrayName", __pyx_getprop_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_arrayName, __pyx_setprop_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_arrayName, 0, 0}, - {(char *)"arrayType", __pyx_getprop_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_arrayType, __pyx_setprop_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_arrayType, 0, 0}, - {0, 0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number_AsArrayTyped = { - 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_AsArrayTyped = { - 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_AsArrayTyped = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_AsArrayTyped = { - #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_17OpenGL_accelerate_13arraydatatype_AsArrayTyped = { - PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("OpenGL_accelerate.arraydatatype.AsArrayTyped"), /*tp_name*/ - sizeof(struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTyped), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_17OpenGL_accelerate_13arraydatatype_AsArrayTyped, /*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_AsArrayTyped, /*tp_as_number*/ - &__pyx_tp_as_sequence_AsArrayTyped, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_AsArrayTyped, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_AsArrayTyped, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - __Pyx_DOCSTR("Given arrayName and arrayType, convert arrayName to array of type\n \n TODO: It should be possible to drop this if ERROR_ON_COPY,\n as array inputs always have to be the final objects in that \n case.\n "), /*tp_doc*/ - __pyx_tp_traverse_17OpenGL_accelerate_13arraydatatype_AsArrayTyped, /*tp_traverse*/ - __pyx_tp_clear_17OpenGL_accelerate_13arraydatatype_AsArrayTyped, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - __pyx_methods_17OpenGL_accelerate_13arraydatatype_AsArrayTyped, /*tp_methods*/ - 0, /*tp_members*/ - __pyx_getsets_17OpenGL_accelerate_13arraydatatype_AsArrayTyped, /*tp_getset*/ - 0, /*tp_base*/ - 0, /*tp_dict*/ - 0, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - 0, /*tp_dictoffset*/ - __pyx_pw_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_1__init__, /*tp_init*/ - 0, /*tp_alloc*/ - __pyx_tp_new_17OpenGL_accelerate_13arraydatatype_AsArrayTyped, /*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_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked __pyx_vtable_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked; - -static PyObject *__pyx_tp_new_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked(PyTypeObject *t, PyObject *a, PyObject *k) { - struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked *p; - PyObject *o = __pyx_tp_new_17OpenGL_accelerate_13arraydatatype_AsArrayTyped(t, a, k); - if (!o) return 0; - p = ((struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked *)o); - p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_pyArgConverter*)__pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked; - return o; -} - -static PyMethodDef __pyx_methods_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked[] = { - {0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number_AsArrayTypedSizeChecked = { - 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_AsArrayTypedSizeChecked = { - 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_AsArrayTypedSizeChecked = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ +static PyMethodDef __pyx_methods_17OpenGL_accelerate_13arraydatatype_ArrayDatatype[] = { + {__Pyx_NAMESTR("getRegistry"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_3getRegistry, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_2getRegistry)}, + {__Pyx_NAMESTR("getHandler"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_5getHandler, METH_O, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_4getHandler)}, + {__Pyx_NAMESTR("from_param"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_7from_param, METH_O, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_6from_param)}, + {__Pyx_NAMESTR("dataPointer"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_11dataPointer, METH_O, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_10dataPointer)}, + {__Pyx_NAMESTR("voidDataPointer"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_13voidDataPointer, METH_O, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_12voidDataPointer)}, + {__Pyx_NAMESTR("typedPointer"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_15typedPointer, METH_O, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_14typedPointer)}, + {__Pyx_NAMESTR("asArray"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_17asArray, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_16asArray)}, + {__Pyx_NAMESTR("arrayToGLType"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_19arrayToGLType, METH_O, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_18arrayToGLType)}, + {__Pyx_NAMESTR("arraySize"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_21arraySize, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_20arraySize)}, + {__Pyx_NAMESTR("unitSize"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_23unitSize, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_22unitSize)}, + {__Pyx_NAMESTR("returnHandler"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_25returnHandler, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_24returnHandler)}, + {__Pyx_NAMESTR("zeros"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_27zeros, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_26zeros)}, + {__Pyx_NAMESTR("dimensions"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_29dimensions, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_28dimensions)}, + {__Pyx_NAMESTR("arrayByteCount"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_31arrayByteCount, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_30arrayByteCount)}, + {0, 0, 0, 0} }; -static PyBufferProcs __pyx_tp_as_buffer_AsArrayTypedSizeChecked = { - #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_17OpenGL_accelerate_13arraydatatype_ArrayDatatype[] = { + {(char *)"typeConstant", __pyx_getprop_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_typeConstant, __pyx_setprop_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_typeConstant, 0, 0}, + {(char *)"baseType", __pyx_getprop_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_baseType, __pyx_setprop_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_baseType, 0, 0}, + {0, 0, 0, 0, 0} }; -static PyTypeObject __pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked = { +static PyTypeObject __pyx_type_17OpenGL_accelerate_13arraydatatype_ArrayDatatype = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("OpenGL_accelerate.arraydatatype.AsArrayTypedSizeChecked"), /*tp_name*/ - sizeof(struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked), /*tp_basicsize*/ + __Pyx_NAMESTR("OpenGL_accelerate.arraydatatype.ArrayDatatype"), /*tp_name*/ + sizeof(struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_ArrayDatatype), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_17OpenGL_accelerate_13arraydatatype_AsArrayTyped, /*tp_dealloc*/ + __pyx_tp_dealloc_17OpenGL_accelerate_13arraydatatype_ArrayDatatype, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -9565,34 +9078,34 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayTypedS 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_AsArrayTypedSizeChecked, /*tp_as_number*/ - &__pyx_tp_as_sequence_AsArrayTypedSizeChecked, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_AsArrayTypedSizeChecked, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ - 0, /*tp_call*/ + __pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_9__call__, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_AsArrayTypedSizeChecked, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - __Pyx_DOCSTR("Size-checking version of AsArrayTyped"), /*tp_doc*/ - __pyx_tp_traverse_17OpenGL_accelerate_13arraydatatype_AsArrayTyped, /*tp_traverse*/ - __pyx_tp_clear_17OpenGL_accelerate_13arraydatatype_AsArrayTyped, /*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("Mix-in for array datatype classes\n \n The ArrayDatatype marker essentially is used to mark a particular argument\n as having an \"array\" type, which means that it is eligible for handling \n via the arrays sub-package and its registered handlers.\n "), /*tp_doc*/ + __pyx_tp_traverse_17OpenGL_accelerate_13arraydatatype_ArrayDatatype, /*tp_traverse*/ + __pyx_tp_clear_17OpenGL_accelerate_13arraydatatype_ArrayDatatype, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked, /*tp_methods*/ + __pyx_methods_17OpenGL_accelerate_13arraydatatype_ArrayDatatype, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_17OpenGL_accelerate_13arraydatatype_ArrayDatatype, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_17OpenGL_accelerate_13arraydatatype_23AsArrayTypedSizeChecked_1__init__, /*tp_init*/ + __pyx_pw_17OpenGL_accelerate_13arraydatatype_13ArrayDatatype_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked, /*tp_new*/ + __pyx_tp_new_17OpenGL_accelerate_13arraydatatype_ArrayDatatype, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -9610,7 +9123,7 @@ static struct __pyx_vtabstruct_17OpenGL_accelerate_13arraydatatype_AsArrayTypedS static PyObject *__pyx_tp_new_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSize(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSize *p; PyObject *o = __pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter->tp_new(t, a, k); - if (!o) return 0; + if (unlikely(!o)) return 0; p = ((struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSize *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_cArgConverter*)__pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSize; p->arrayName = ((PyObject*)Py_None); Py_INCREF(Py_None); @@ -9690,104 +9203,6 @@ static struct PyGetSetDef __pyx_getsets_17OpenGL_accelerate_13arraydatatype_AsAr {0, 0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_AsArrayTypedSize = { - 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_AsArrayTypedSize = { - 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_AsArrayTypedSize = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_AsArrayTypedSize = { - #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_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSize = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("OpenGL_accelerate.arraydatatype.AsArrayTypedSize"), /*tp_name*/ @@ -9803,16 +9218,16 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayTypedS 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_AsArrayTypedSize, /*tp_as_number*/ - &__pyx_tp_as_sequence_AsArrayTypedSize, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_AsArrayTypedSize, /*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_AsArrayTypedSize, /*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("Given arrayName and arrayType, determine size of arrayName\n "), /*tp_doc*/ __pyx_tp_traverse_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSize, /*tp_traverse*/ __pyx_tp_clear_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSize, /*tp_clear*/ @@ -9856,7 +9271,7 @@ static struct PyModuleDef __pyx_moduledef = { PyModuleDef_HEAD_INIT, #endif __Pyx_NAMESTR("arraydatatype"), - __Pyx_DOCSTR(__pyx_k_10), /* m_doc */ + __Pyx_DOCSTR(__pyx_k_11), /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ @@ -9868,12 +9283,12 @@ static struct PyModuleDef __pyx_moduledef = { static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0}, - {&__pyx_n_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 1}, - {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0}, - {&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0}, + {&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0}, + {&__pyx_n_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 1}, + {&__pyx_kp_s_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 0, 1, 0}, {&__pyx_kp_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 0}, - {&__pyx_n_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 1}, - {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0}, + {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0}, + {&__pyx_n_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 1}, {&__pyx_n_s__ArrayDatatype, __pyx_k__ArrayDatatype, sizeof(__pyx_k__ArrayDatatype), 0, 0, 1, 1}, {&__pyx_n_s__AttributeError, __pyx_k__AttributeError, sizeof(__pyx_k__AttributeError), 0, 0, 1, 1}, {&__pyx_n_s__FormatHandler, __pyx_k__FormatHandler, sizeof(__pyx_k__FormatHandler), 0, 0, 1, 1}, @@ -9884,10 +9299,13 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1}, {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1}, {&__pyx_n_s____class__, __pyx_k____class__, sizeof(__pyx_k____class__), 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____mro__, __pyx_k____mro__, sizeof(__pyx_k____mro__), 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____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1}, + {&__pyx_n_s__append, __pyx_k__append, sizeof(__pyx_k__append), 0, 0, 1, 1}, {&__pyx_n_s__arrayByteCount, __pyx_k__arrayByteCount, sizeof(__pyx_k__arrayByteCount), 0, 0, 1, 1}, {&__pyx_n_s__arrayName, __pyx_k__arrayName, sizeof(__pyx_k__arrayName), 0, 0, 1, 1}, {&__pyx_n_s__arraySize, __pyx_k__arraySize, sizeof(__pyx_k__arraySize), 0, 0, 1, 1}, @@ -9908,6 +9326,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s__dims, __pyx_k__dims, sizeof(__pyx_k__dims), 0, 0, 1, 1}, {&__pyx_n_s__finalise, __pyx_k__finalise, sizeof(__pyx_k__finalise), 0, 0, 1, 1}, {&__pyx_n_s__from_param, __pyx_k__from_param, sizeof(__pyx_k__from_param), 0, 0, 1, 1}, + {&__pyx_n_s__get, __pyx_k__get, sizeof(__pyx_k__get), 0, 0, 1, 1}, {&__pyx_n_s__getLog, __pyx_k__getLog, sizeof(__pyx_k__getLog), 0, 0, 1, 1}, {&__pyx_n_s__handler, __pyx_k__handler, sizeof(__pyx_k__handler), 0, 0, 1, 1}, {&__pyx_n_s__isAccelerated, __pyx_k__isAccelerated, sizeof(__pyx_k__isAccelerated), 0, 0, 1, 1}, @@ -9918,7 +9337,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s__lookup, __pyx_k__lookup, sizeof(__pyx_k__lookup), 0, 0, 1, 1}, {&__pyx_n_s__match, __pyx_k__match, sizeof(__pyx_k__match), 0, 0, 1, 1}, {&__pyx_n_s__name, __pyx_k__name, sizeof(__pyx_k__name), 0, 0, 1, 1}, - {&__pyx_n_s__numeric, __pyx_k__numeric, sizeof(__pyx_k__numeric), 0, 0, 1, 1}, {&__pyx_n_s__numpy, __pyx_k__numpy, sizeof(__pyx_k__numpy), 0, 0, 1, 1}, {&__pyx_n_s__plugin_match, __pyx_k__plugin_match, sizeof(__pyx_k__plugin_match), 0, 0, 1, 1}, {&__pyx_n_s__plugins, __pyx_k__plugins, sizeof(__pyx_k__plugins), 0, 0, 1, 1}, @@ -9941,12 +9359,12 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_AttributeError = __Pyx_GetName(__pyx_b, __pyx_n_s__AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __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[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_super = __Pyx_GetName(__pyx_b, __pyx_n_s__super); if (!__pyx_builtin_super) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_KeyError = __Pyx_GetName(__pyx_b, __pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s__AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __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 = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; @@ -9956,6 +9374,17 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + /* "src/arraydatatype.pyx":58 + * raise TypeError( + * """No array-type handler for type %r (value: %s) registered"""%( + * typ, repr(value)[:50] # <<<<<<<<<<<<<< + * ) + * ) + */ + __pyx_k_slice_2 = PySlice_New(Py_None, __pyx_int_50, Py_None); if (unlikely(!__pyx_k_slice_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_slice_2); + __Pyx_GIVEREF(__pyx_k_slice_2); + /* "src/arraydatatype.pyx":79 * break * if not self.output_handler: @@ -9963,9 +9392,9 @@ static int __Pyx_InitCachedConstants(void) { * """Unable to find any output handler at all (not even ctypes/numpy ones!)""" * ) */ - __pyx_k_tuple_4 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_3)); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_4); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4)); + __pyx_k_tuple_5 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_4)); if (unlikely(!__pyx_k_tuple_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_5); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_5)); /* "src/arraydatatype.pyx":294 * result = cArgs[ self.outIndex ] @@ -9974,9 +9403,9 @@ static int __Pyx_InitCachedConstants(void) { * try: * return result[0] */ - __pyx_k_tuple_5 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_k_tuple_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_5); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_5)); + __pyx_k_tuple_6 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_k_tuple_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_6); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_6)); /* "src/arraydatatype.pyx":6 * from OpenGL import constants, plugins @@ -9985,9 +9414,9 @@ static int __Pyx_InitCachedConstants(void) { * from OpenGL_accelerate.wrapper cimport cArgConverter, pyArgConverter, returnConverter * from OpenGL_accelerate.formathandler cimport FormatHandler */ - __pyx_k_tuple_11 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s_8)); if (unlikely(!__pyx_k_tuple_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_11); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_11)); + __pyx_k_tuple_12 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s_9)); if (unlikely(!__pyx_k_tuple_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_12); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_12)); __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -9998,6 +9427,7 @@ static int __Pyx_InitCachedConstants(void) { 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_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_50 = PyInt_FromLong(50); if (unlikely(!__pyx_int_50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; return 0; __pyx_L1_error:; return -1; @@ -10013,6 +9443,9 @@ PyMODINIT_FUNC PyInit_arraydatatype(void) { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); @@ -10045,11 +9478,13 @@ PyMODINIT_FUNC PyInit_arraydatatype(void) #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 - __pyx_m = Py_InitModule4(__Pyx_NAMESTR("arraydatatype"), __pyx_methods, __Pyx_DOCSTR(__pyx_k_10), 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); + __pyx_m = Py_InitModule4(__Pyx_NAMESTR("arraydatatype"), __pyx_methods, __Pyx_DOCSTR(__pyx_k_11), 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __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;} @@ -10065,6 +9500,9 @@ PyMODINIT_FUNC PyInit_arraydatatype(void) 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_OpenGL_accelerate__arraydatatype) { 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;}; } @@ -10077,6 +9515,51 @@ PyMODINIT_FUNC PyInit_arraydatatype(void) /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ + __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter = __Pyx_ImportType("OpenGL_accelerate.wrapper", "pyArgConverter", sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_pyArgConverter), 1); if (unlikely(!__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_vtabptr_17OpenGL_accelerate_7wrapper_pyArgConverter = (struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_pyArgConverter*)__Pyx_GetVtable(__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_dict); if (unlikely(!__pyx_vtabptr_17OpenGL_accelerate_7wrapper_pyArgConverter)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_AsArrayTyped = &__pyx_vtable_17OpenGL_accelerate_13arraydatatype_AsArrayTyped; + __pyx_vtable_17OpenGL_accelerate_13arraydatatype_AsArrayTyped.__pyx_base = *__pyx_vtabptr_17OpenGL_accelerate_7wrapper_pyArgConverter; + __pyx_vtable_17OpenGL_accelerate_13arraydatatype_AsArrayTyped.__pyx_base.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_pyArgConverter *, PyObject *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_c_call; + __pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayTyped.tp_base = __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter; + if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayTyped) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayTyped.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_AsArrayTyped) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "AsArrayTyped", (PyObject *)&__pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayTyped) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_17OpenGL_accelerate_13arraydatatype_AsArrayTyped = &__pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayTyped; + __pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_AsArrayOfType = &__pyx_vtable_17OpenGL_accelerate_13arraydatatype_AsArrayOfType; + __pyx_vtable_17OpenGL_accelerate_13arraydatatype_AsArrayOfType.__pyx_base = *__pyx_vtabptr_17OpenGL_accelerate_7wrapper_pyArgConverter; + __pyx_vtable_17OpenGL_accelerate_13arraydatatype_AsArrayOfType.__pyx_base.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_pyArgConverter *, PyObject *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_c_call; + __pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayOfType.tp_base = __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter; + if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayOfType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayOfType.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_AsArrayOfType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "AsArrayOfType", (PyObject *)&__pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayOfType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_17OpenGL_accelerate_13arraydatatype_AsArrayOfType = &__pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayOfType; + __pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked = &__pyx_vtable_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked; + __pyx_vtable_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked.__pyx_base = *__pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_AsArrayTyped; + __pyx_vtable_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked.__pyx_base.__pyx_base.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_pyArgConverter *, PyObject *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_13arraydatatype_23AsArrayTypedSizeChecked_c_call; + __pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked.tp_base = __pyx_ptype_17OpenGL_accelerate_13arraydatatype_AsArrayTyped; + if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "AsArrayTypedSizeChecked", (PyObject *)&__pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked = &__pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked; + __pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter = __Pyx_ImportType("OpenGL_accelerate.wrapper", "cArgConverter", sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgConverter), 1); if (unlikely(!__pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_vtabptr_17OpenGL_accelerate_7wrapper_cArgConverter = (struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_cArgConverter*)__Pyx_GetVtable(__pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter->tp_dict); if (unlikely(!__pyx_vtabptr_17OpenGL_accelerate_7wrapper_cArgConverter)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_Output = &__pyx_vtable_17OpenGL_accelerate_13arraydatatype_Output; + __pyx_vtable_17OpenGL_accelerate_13arraydatatype_Output.__pyx_base = *__pyx_vtabptr_17OpenGL_accelerate_7wrapper_cArgConverter; + __pyx_vtable_17OpenGL_accelerate_13arraydatatype_Output.__pyx_base.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgConverter *, PyObject *, int, PyObject *))__pyx_f_17OpenGL_accelerate_13arraydatatype_6Output_c_call; + __pyx_vtable_17OpenGL_accelerate_13arraydatatype_Output.c_getSize = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_Output *, PyObject *))__pyx_f_17OpenGL_accelerate_13arraydatatype_6Output_c_getSize; + __pyx_type_17OpenGL_accelerate_13arraydatatype_Output.tp_base = __pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter; + if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_13arraydatatype_Output) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_13arraydatatype_Output.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_Output) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "Output", (PyObject *)&__pyx_type_17OpenGL_accelerate_13arraydatatype_Output) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_17OpenGL_accelerate_13arraydatatype_Output = &__pyx_type_17OpenGL_accelerate_13arraydatatype_Output; + __pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_SizedOutput = &__pyx_vtable_17OpenGL_accelerate_13arraydatatype_SizedOutput; + __pyx_vtable_17OpenGL_accelerate_13arraydatatype_SizedOutput.__pyx_base = *__pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_Output; + __pyx_vtable_17OpenGL_accelerate_13arraydatatype_SizedOutput.__pyx_base.c_getSize = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_Output *, PyObject *))__pyx_f_17OpenGL_accelerate_13arraydatatype_11SizedOutput_c_getSize; + __pyx_type_17OpenGL_accelerate_13arraydatatype_SizedOutput.tp_base = __pyx_ptype_17OpenGL_accelerate_13arraydatatype_Output; + if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_13arraydatatype_SizedOutput) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_13arraydatatype_SizedOutput.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_SizedOutput) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "SizedOutput", (PyObject *)&__pyx_type_17OpenGL_accelerate_13arraydatatype_SizedOutput) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_17OpenGL_accelerate_13arraydatatype_SizedOutput = &__pyx_type_17OpenGL_accelerate_13arraydatatype_SizedOutput; __pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_HandlerRegistry = &__pyx_vtable_17OpenGL_accelerate_13arraydatatype_HandlerRegistry; __pyx_vtable_17OpenGL_accelerate_13arraydatatype_HandlerRegistry.c_lookup = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *, PyObject *))__pyx_f_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_c_lookup; __pyx_vtable_17OpenGL_accelerate_13arraydatatype_HandlerRegistry.c_get_output_handler = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_HandlerRegistry *))__pyx_f_17OpenGL_accelerate_13arraydatatype_15HandlerRegistry_c_get_output_handler; @@ -10110,51 +9593,6 @@ PyMODINIT_FUNC PyInit_arraydatatype(void) if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_13arraydatatype_ArrayDatatype.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_ArrayDatatype) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "ArrayDatatype", (PyObject *)&__pyx_type_17OpenGL_accelerate_13arraydatatype_ArrayDatatype) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_17OpenGL_accelerate_13arraydatatype_ArrayDatatype = &__pyx_type_17OpenGL_accelerate_13arraydatatype_ArrayDatatype; - __pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter = __Pyx_ImportType("OpenGL_accelerate.wrapper", "cArgConverter", sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgConverter), 1); if (unlikely(!__pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_vtabptr_17OpenGL_accelerate_7wrapper_cArgConverter = (struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_cArgConverter*)__Pyx_GetVtable(__pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter->tp_dict); if (unlikely(!__pyx_vtabptr_17OpenGL_accelerate_7wrapper_cArgConverter)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_Output = &__pyx_vtable_17OpenGL_accelerate_13arraydatatype_Output; - __pyx_vtable_17OpenGL_accelerate_13arraydatatype_Output.__pyx_base = *__pyx_vtabptr_17OpenGL_accelerate_7wrapper_cArgConverter; - __pyx_vtable_17OpenGL_accelerate_13arraydatatype_Output.__pyx_base.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgConverter *, PyObject *, int, PyObject *))__pyx_f_17OpenGL_accelerate_13arraydatatype_6Output_c_call; - __pyx_vtable_17OpenGL_accelerate_13arraydatatype_Output.c_getSize = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_Output *, PyObject *))__pyx_f_17OpenGL_accelerate_13arraydatatype_6Output_c_getSize; - __pyx_type_17OpenGL_accelerate_13arraydatatype_Output.tp_base = __pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter; - if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_13arraydatatype_Output) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_13arraydatatype_Output.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_Output) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "Output", (PyObject *)&__pyx_type_17OpenGL_accelerate_13arraydatatype_Output) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_17OpenGL_accelerate_13arraydatatype_Output = &__pyx_type_17OpenGL_accelerate_13arraydatatype_Output; - __pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_SizedOutput = &__pyx_vtable_17OpenGL_accelerate_13arraydatatype_SizedOutput; - __pyx_vtable_17OpenGL_accelerate_13arraydatatype_SizedOutput.__pyx_base = *__pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_Output; - __pyx_vtable_17OpenGL_accelerate_13arraydatatype_SizedOutput.__pyx_base.c_getSize = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13arraydatatype_Output *, PyObject *))__pyx_f_17OpenGL_accelerate_13arraydatatype_11SizedOutput_c_getSize; - __pyx_type_17OpenGL_accelerate_13arraydatatype_SizedOutput.tp_base = __pyx_ptype_17OpenGL_accelerate_13arraydatatype_Output; - if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_13arraydatatype_SizedOutput) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_13arraydatatype_SizedOutput.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_SizedOutput) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "SizedOutput", (PyObject *)&__pyx_type_17OpenGL_accelerate_13arraydatatype_SizedOutput) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_17OpenGL_accelerate_13arraydatatype_SizedOutput = &__pyx_type_17OpenGL_accelerate_13arraydatatype_SizedOutput; - __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter = __Pyx_ImportType("OpenGL_accelerate.wrapper", "pyArgConverter", sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_pyArgConverter), 1); if (unlikely(!__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_vtabptr_17OpenGL_accelerate_7wrapper_pyArgConverter = (struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_pyArgConverter*)__Pyx_GetVtable(__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_dict); if (unlikely(!__pyx_vtabptr_17OpenGL_accelerate_7wrapper_pyArgConverter)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_AsArrayOfType = &__pyx_vtable_17OpenGL_accelerate_13arraydatatype_AsArrayOfType; - __pyx_vtable_17OpenGL_accelerate_13arraydatatype_AsArrayOfType.__pyx_base = *__pyx_vtabptr_17OpenGL_accelerate_7wrapper_pyArgConverter; - __pyx_vtable_17OpenGL_accelerate_13arraydatatype_AsArrayOfType.__pyx_base.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_pyArgConverter *, PyObject *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_13arraydatatype_13AsArrayOfType_c_call; - __pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayOfType.tp_base = __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter; - if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayOfType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayOfType.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_AsArrayOfType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "AsArrayOfType", (PyObject *)&__pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayOfType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_17OpenGL_accelerate_13arraydatatype_AsArrayOfType = &__pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayOfType; - __pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_AsArrayTyped = &__pyx_vtable_17OpenGL_accelerate_13arraydatatype_AsArrayTyped; - __pyx_vtable_17OpenGL_accelerate_13arraydatatype_AsArrayTyped.__pyx_base = *__pyx_vtabptr_17OpenGL_accelerate_7wrapper_pyArgConverter; - __pyx_vtable_17OpenGL_accelerate_13arraydatatype_AsArrayTyped.__pyx_base.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_pyArgConverter *, PyObject *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_13arraydatatype_12AsArrayTyped_c_call; - __pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayTyped.tp_base = __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter; - if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayTyped) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayTyped.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_AsArrayTyped) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "AsArrayTyped", (PyObject *)&__pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayTyped) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_17OpenGL_accelerate_13arraydatatype_AsArrayTyped = &__pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayTyped; - __pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked = &__pyx_vtable_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked; - __pyx_vtable_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked.__pyx_base = *__pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_AsArrayTyped; - __pyx_vtable_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked.__pyx_base.__pyx_base.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_pyArgConverter *, PyObject *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_13arraydatatype_23AsArrayTypedSizeChecked_c_call; - __pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked.tp_base = __pyx_ptype_17OpenGL_accelerate_13arraydatatype_AsArrayTyped; - if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "AsArrayTypedSizeChecked", (PyObject *)&__pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked = &__pyx_type_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSizeChecked; __pyx_vtabptr_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSize = &__pyx_vtable_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSize; __pyx_vtable_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSize.__pyx_base = *__pyx_vtabptr_17OpenGL_accelerate_7wrapper_cArgConverter; __pyx_vtable_17OpenGL_accelerate_13arraydatatype_AsArrayTypedSize.__pyx_base.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgConverter *, PyObject *, int, PyObject *))__pyx_f_17OpenGL_accelerate_13arraydatatype_16AsArrayTypedSize_c_call; @@ -10182,7 +9620,7 @@ PyMODINIT_FUNC PyInit_arraydatatype(void) */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__ctypes), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ctypes, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__ctypes, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/arraydatatype.pyx":3 @@ -10194,7 +9632,7 @@ PyMODINIT_FUNC PyInit_arraydatatype(void) */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__OpenGL), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__OpenGL, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__OpenGL, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/arraydatatype.pyx":4 @@ -10215,21 +9653,13 @@ PyMODINIT_FUNC PyInit_arraydatatype(void) __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__OpenGL), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __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__constants); - if (__pyx_t_1 == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__constants); - if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__constants); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__constants, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__constants, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__plugins); - if (__pyx_t_1 == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__plugins); - if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__plugins); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__plugins, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__plugins, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -10248,13 +9678,9 @@ PyMODINIT_FUNC PyInit_arraydatatype(void) __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__OpenGL), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__logs); - if (__pyx_t_2 == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__logs); - if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s__logs); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__logs, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__logs, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -10265,36 +9691,33 @@ PyMODINIT_FUNC PyInit_arraydatatype(void) * from OpenGL_accelerate.wrapper cimport cArgConverter, pyArgConverter, returnConverter * from OpenGL_accelerate.formathandler cimport FormatHandler */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__logs); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__logs); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__getLog); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__getLog); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __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_k_tuple_11), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_12), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__log, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__log, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/arraydatatype.pyx":20 * cdef object output_handler * cdef object preferredOutput - * GENERIC_OUTPUT_PREFERENCES = ['numpy','numeric','ctypesarrays'] # <<<<<<<<<<<<<< + * GENERIC_OUTPUT_PREFERENCES = ['numpy','ctypesarrays'] # <<<<<<<<<<<<<< * cdef object all_output_handlers * def __init__( self, plugin_match ): */ - __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_n_s__numpy)); PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__numpy)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__numpy)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__numeric)); - PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__numeric)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__numeric)); __Pyx_INCREF(((PyObject *)__pyx_n_s__ctypesarrays)); - PyList_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_n_s__ctypesarrays)); + PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__ctypesarrays)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ctypesarrays)); - if (PyDict_SetItem((PyObject *)__pyx_ptype_17OpenGL_accelerate_13arraydatatype_HandlerRegistry->tp_dict, __pyx_n_s_2, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem((PyObject *)__pyx_ptype_17OpenGL_accelerate_13arraydatatype_HandlerRegistry->tp_dict, __pyx_n_s_3, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_17OpenGL_accelerate_13arraydatatype_HandlerRegistry); @@ -10305,12 +9728,12 @@ PyMODINIT_FUNC PyInit_arraydatatype(void) * * cdef class ArrayDatatype: */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__plugins); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__plugins); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__FormatHandler); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__FormatHandler); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__match); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__match); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -10347,7 +9770,7 @@ PyMODINIT_FUNC PyInit_arraydatatype(void) */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; goto __pyx_L0; __pyx_L1_error:; @@ -10385,17 +9808,15 @@ static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { } #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; } @@ -10596,6 +10017,130 @@ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) return -1; } +static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { + PyObject* value; +#if PY_MAJOR_VERSION >= 3 + value = PyDict_GetItemWithError(d, key); + if (unlikely(!value)) { + if (unlikely(PyErr_Occurred())) + return NULL; + value = default_value; + } + Py_INCREF(value); +#else + if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) { + value = PyDict_GetItem(d, key); + if (unlikely(!value)) { + value = default_value; + } + Py_INCREF(value); + } else { + if (default_value == Py_None) + default_value = NULL; + value = PyObject_CallMethodObjArgs( + d, __pyx_n_s__get, key, default_value, NULL); + } +#endif + return value; +} + +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 void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; @@ -10663,26 +10208,25 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, "instance exception may not have a separate value"); goto raise_error; } - 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; - } + 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); - 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; - } + 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); @@ -10720,8 +10264,7 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; - } - else + } else args = PyTuple_Pack(1, value); if (!args) goto bad; @@ -10742,18 +10285,22 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject "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"); @@ -10777,6 +10324,33 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject } #endif +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 { + return __Pyx_PyObject_CallMethod1(L, __pyx_n_s__append, x); + } +} + +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 int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) { @@ -10797,6 +10371,97 @@ static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed return 0; } +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 PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Format(PyExc_ImportError, + #if PY_MAJOR_VERSION < 3 + "cannot import name %.230s", PyString_AS_STRING(name)); + #else + "cannot import name %S", name); + #endif + } + return value; +} + static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_Format(PyExc_SystemError, "Missing type object"); @@ -10840,6 +10505,42 @@ static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) { type->tp_clear(obj); } +static void* __Pyx_GetVtable(PyObject *dict) { + void* ptr; + PyObject *ob = PyObject_GetItem(dict, __pyx_n_s____pyx_vtable__); + if (!ob) + goto bad; +#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) + ptr = PyCapsule_GetPointer(ob, 0); +#else + ptr = PyCObject_AsVoidPtr(ob); +#endif + if (!ptr && !PyErr_Occurred()) + PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); + Py_DECREF(ob); + return ptr; +bad: + Py_XDECREF(ob); + return NULL; +} + +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 CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); @@ -10878,8 +10579,8 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 - PyObject *py_import = 0; - py_import = __Pyx_GetAttrString(__pyx_b, "__import__"); + PyObject *py_import; + py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s____import__); if (!py_import) goto bad; #endif @@ -10953,15 +10654,6 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { return module; } -static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name) { -#if PY_MAJOR_VERSION < 3 - PyErr_Format(PyExc_ImportError, "cannot import name %.230s", - PyString_AsString(name)); -#else - PyErr_Format(PyExc_ImportError, "cannot import name %S", name); -#endif -} - static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { const unsigned char neg_one = (unsigned char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; @@ -11152,10 +10844,15 @@ static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) { 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)) { @@ -11168,6 +10865,16 @@ static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { #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"); @@ -11175,6 +10882,17 @@ static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { } 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 { @@ -11187,10 +10905,15 @@ static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { } } +#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)) { @@ -11203,6 +10926,16 @@ static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObje #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"); @@ -11210,6 +10943,17 @@ static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObje } 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 { @@ -11222,10 +10966,15 @@ static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObje } } +#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)) { @@ -11238,6 +10987,16 @@ static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { #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"); @@ -11245,6 +11004,17 @@ static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { } 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 { @@ -11257,10 +11027,15 @@ static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { } } +#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)) { @@ -11273,6 +11048,16 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { #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"); @@ -11280,6 +11065,17 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { } 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 { @@ -11292,10 +11088,15 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { } } +#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)) { @@ -11308,6 +11109,16 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { #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"); @@ -11315,6 +11126,17 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { } 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 { @@ -11327,10 +11149,15 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { } } +#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)) { @@ -11343,6 +11170,16 @@ static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* #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"); @@ -11350,6 +11187,17 @@ static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* } 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 { @@ -11381,23 +11229,6 @@ static int __Pyx_check_binary_version(void) { 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; -} - #ifndef __PYX_HAVE_RT_ImportModule #define __PYX_HAVE_RT_ImportModule static PyObject *__Pyx_ImportModule(const char *name) { @@ -11483,25 +11314,6 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class } #endif -static void* __Pyx_GetVtable(PyObject *dict) { - void* ptr; - PyObject *ob = PyMapping_GetItemString(dict, (char *)"__pyx_vtable__"); - if (!ob) - goto bad; -#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) - ptr = PyCapsule_GetPointer(ob, 0); -#else - ptr = PyCObject_AsVoidPtr(ob); -#endif - if (!ptr && !PyErr_Occurred()) - PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); - Py_DECREF(ob); - return ptr; -bad: - Py_XDECREF(ob); - return NULL; -} - 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) { @@ -11694,6 +11506,65 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { return 0; } +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; @@ -11703,14 +11574,14 @@ 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); @@ -11726,7 +11597,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { } #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)) { @@ -11767,11 +11638,10 @@ static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { } 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; diff --git a/OpenGL_accelerate/src/errorchecker.c b/OpenGL_accelerate/src/errorchecker.c index f551a12e..e0a8f390 100644 --- a/OpenGL_accelerate/src/errorchecker.c +++ b/OpenGL_accelerate/src/errorchecker.c @@ -1,6 +1,18 @@ -/* Generated by Cython 0.18 on Mon Apr 15 22:37:35 2013 */ +/* Generated by Cython 0.19.1 on Thu Jul 11 00:05:41 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. @@ -116,6 +128,9 @@ #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)) ? \ @@ -155,6 +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) @@ -227,6 +250,40 @@ #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 @@ -259,17 +316,6 @@ #define CYTHON_WITHOUT_ASSERTIONS #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_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) @@ -283,10 +329,44 @@ # define CYTHON_UNUSED # endif #endif -typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ - -#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s) -#define __Pyx_PyBytes_AsUString(s) ((unsigned char*) PyBytes_AsString(s)) +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*/ + +#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*); @@ -300,6 +380,78 @@ static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #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__ @@ -315,8 +467,9 @@ static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #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; @@ -411,6 +564,23 @@ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ 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*/ +#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_ImportFrom(PyObject* module, PyObject* name); /*proto*/ + static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ @@ -418,8 +588,6 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ -static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name); - static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); @@ -494,6 +662,7 @@ static int __pyx_pf_17OpenGL_accelerate_12errorchecker_13_ErrorChecker_8_isValid static PyObject *__pyx_pf_17OpenGL_accelerate_12errorchecker_13_ErrorChecker_10_getErrors___get__(struct __pyx_obj_17OpenGL_accelerate_12errorchecker__ErrorChecker *__pyx_v_self); /* proto */ static int __pyx_pf_17OpenGL_accelerate_12errorchecker_13_ErrorChecker_10_getErrors_2__set__(struct __pyx_obj_17OpenGL_accelerate_12errorchecker__ErrorChecker *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_17OpenGL_accelerate_12errorchecker_13_ErrorChecker_10_getErrors_4__del__(struct __pyx_obj_17OpenGL_accelerate_12errorchecker__ErrorChecker *__pyx_v_self); /* proto */ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_12errorchecker__ErrorChecker(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static char __pyx_k_2[] = "CurrentContextIsValid"; static char __pyx_k_3[] = "OpenGL.error"; static char __pyx_k_4[] = "Cython-coded GL-error-check module"; @@ -504,6 +673,7 @@ static char __pyx_k__GLError[] = "GLError"; static char __pyx_k____main__[] = "__main__"; static char __pyx_k____test__[] = "__test__"; static char __pyx_k__platform[] = "platform"; +static char __pyx_k____import__[] = "__import__"; static char __pyx_k__cArguments[] = "cArguments"; static char __pyx_k__glGetError[] = "glGetError"; static char __pyx_k__checkContext[] = "checkContext"; @@ -512,6 +682,7 @@ static PyObject *__pyx_n_s_2; static PyObject *__pyx_n_s_3; static PyObject *__pyx_n_s__GLError; static PyObject *__pyx_n_s__OpenGL; +static PyObject *__pyx_n_s____import__; static PyObject *__pyx_n_s____main__; static PyObject *__pyx_n_s____test__; static PyObject *__pyx_n_s__baseOperation; @@ -532,6 +703,9 @@ struct wrapperbase __pyx_wrapperbase_17OpenGL_accelerate_12errorchecker_13_Error static int __pyx_pw_17OpenGL_accelerate_12errorchecker_13_ErrorChecker_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_platform = 0; PyObject *__pyx_v_checkContext = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -631,7 +805,7 @@ static int __pyx_pf_17OpenGL_accelerate_12errorchecker_13_ErrorChecker___init__( * self._getErrors = platform.OpenGL.glGetError * */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_platform, __pyx_n_s_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_platform, __pyx_n_s_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->_isValid); @@ -646,9 +820,9 @@ static int __pyx_pf_17OpenGL_accelerate_12errorchecker_13_ErrorChecker___init__( * * def glCheckError( */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_platform, __pyx_n_s__OpenGL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_platform, __pyx_n_s__OpenGL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__glGetError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__glGetError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_3); @@ -676,6 +850,9 @@ static PyObject *__pyx_pw_17OpenGL_accelerate_12errorchecker_13_ErrorChecker_3gl PyObject *__pyx_v_result = 0; PyObject *__pyx_v_baseOperation = 0; PyObject *__pyx_v_cArguments = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("glCheckError (wrapper)", 0); @@ -768,8 +945,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_12errorchecker_13_ErrorChecker_2gl PyObject *__pyx_v_GLError = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; @@ -786,7 +963,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_12errorchecker_13_ErrorChecker_2gl * if self.checkContext: * if not self._isValid(): */ - if (__pyx_v_self->doChecks) { + __pyx_t_1 = (__pyx_v_self->doChecks != 0); + if (__pyx_t_1) { /* "src/errorchecker.pyx":44 * cdef int err @@ -795,7 +973,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_12errorchecker_13_ErrorChecker_2gl * if not self._isValid(): * return */ - if (__pyx_v_self->checkContext) { + __pyx_t_1 = (__pyx_v_self->checkContext != 0); + if (__pyx_t_1) { /* "src/errorchecker.pyx":45 * if self.doChecks: @@ -804,11 +983,11 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_12errorchecker_13_ErrorChecker_2gl * return * err = self._getErrors() */ - __pyx_t_1 = PyObject_Call(__pyx_v_self->_isValid, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = (!__pyx_t_2); + __pyx_t_2 = PyObject_Call(__pyx_v_self->_isValid, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __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[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = ((!__pyx_t_1) != 0); if (__pyx_t_3) { /* "src/errorchecker.pyx":46 @@ -835,10 +1014,10 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_12errorchecker_13_ErrorChecker_2gl * if err: # GL_NO_ERROR's guaranteed value is 0 * from OpenGL.error import GLError */ - __pyx_t_1 = PyObject_Call(__pyx_v_self->_getErrors, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = PyObject_Call(__pyx_v_self->_getErrors, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_err = __pyx_t_4; /* "src/errorchecker.pyx":48 @@ -848,7 +1027,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_12errorchecker_13_ErrorChecker_2gl * from OpenGL.error import GLError * raise GLError( */ - if (__pyx_v_err) { + __pyx_t_3 = (__pyx_v_err != 0); + if (__pyx_t_3) { /* "src/errorchecker.pyx":49 * err = self._getErrors() @@ -857,23 +1037,19 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_12errorchecker_13_ErrorChecker_2gl * raise GLError( * err, */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__GLError)); - PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__GLError)); + PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__GLError)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__GLError)); - __pyx_t_5 = __Pyx_Import(((PyObject *)__pyx_n_s_3), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_Import(((PyObject *)__pyx_n_s_3), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__GLError); - if (__pyx_t_1 == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__GLError); - if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } - __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_t_1); - __pyx_v_GLError = __pyx_t_1; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s__GLError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_2); + __pyx_v_GLError = __pyx_t_2; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "src/errorchecker.pyx":51 @@ -893,12 +1069,12 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_12errorchecker_13_ErrorChecker_2gl * cArguments = cArguments, * baseOperation = baseOperation, */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_result); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_result); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __pyx_t_5 = 0; @@ -929,9 +1105,9 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_12errorchecker_13_ErrorChecker_2gl * return result */ if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__baseOperation), __pyx_v_baseOperation) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_6 = PyObject_Call(__pyx_v_GLError, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_Call(__pyx_v_GLError, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -958,7 +1134,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_12errorchecker_13_ErrorChecker_2gl __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -975,6 +1151,9 @@ static PyObject *__pyx_pw_17OpenGL_accelerate_12errorchecker_13_ErrorChecker_5on static char __pyx_doc_17OpenGL_accelerate_12errorchecker_13_ErrorChecker_4onBegin[] = "Called by glBegin to record the fact that glGetError won't work"; static PyObject *__pyx_pw_17OpenGL_accelerate_12errorchecker_13_ErrorChecker_5onBegin(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_target = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("onBegin (wrapper)", 0); @@ -1056,6 +1235,9 @@ static PyObject *__pyx_pw_17OpenGL_accelerate_12errorchecker_13_ErrorChecker_7on static char __pyx_doc_17OpenGL_accelerate_12errorchecker_13_ErrorChecker_6onEnd[] = "Called by glEnd to record the fact that glGetError will work"; static PyObject *__pyx_pw_17OpenGL_accelerate_12errorchecker_13_ErrorChecker_7onEnd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_target = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("onEnd (wrapper)", 0); @@ -1462,8 +1644,9 @@ static int __pyx_pf_17OpenGL_accelerate_12errorchecker_13_ErrorChecker_10_getErr static PyObject *__pyx_tp_new_17OpenGL_accelerate_12errorchecker__ErrorChecker(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_17OpenGL_accelerate_12errorchecker__ErrorChecker *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_17OpenGL_accelerate_12errorchecker__ErrorChecker *)o); p->_isValid = Py_None; Py_INCREF(Py_None); p->_getErrors = Py_None; Py_INCREF(Py_None); @@ -1475,7 +1658,6 @@ static void __pyx_tp_dealloc_17OpenGL_accelerate_12errorchecker__ErrorChecker(Py PyObject_GC_UnTrack(o); Py_CLEAR(p->_isValid); Py_CLEAR(p->_getErrors); - PyObject_GC_Track(o); (*Py_TYPE(o)->tp_free)(o); } @@ -1572,104 +1754,6 @@ static struct PyGetSetDef __pyx_getsets_17OpenGL_accelerate_12errorchecker__Erro {0, 0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number__ErrorChecker = { - 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__ErrorChecker = { - 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__ErrorChecker = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer__ErrorChecker = { - #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_17OpenGL_accelerate_12errorchecker__ErrorChecker = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("OpenGL_accelerate.errorchecker._ErrorChecker"), /*tp_name*/ @@ -1685,16 +1769,16 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_12errorchecker__ErrorChecker 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number__ErrorChecker, /*tp_as_number*/ - &__pyx_tp_as_sequence__ErrorChecker, /*tp_as_sequence*/ - &__pyx_tp_as_mapping__ErrorChecker, /*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__ErrorChecker, /*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("Global error-checking object\n\t\n\tThis error checker also includes \"safeGetError\" functionality,\n\tthat is, it allows for checking for context validity as well \n\tas for glBegin/glEnd checking.\n\t"), /*tp_doc*/ __pyx_tp_traverse_17OpenGL_accelerate_12errorchecker__ErrorChecker, /*tp_traverse*/ __pyx_tp_clear_17OpenGL_accelerate_12errorchecker__ErrorChecker, /*tp_clear*/ @@ -1753,6 +1837,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 1}, {&__pyx_n_s__GLError, __pyx_k__GLError, sizeof(__pyx_k__GLError), 0, 0, 1, 1}, {&__pyx_n_s__OpenGL, __pyx_k__OpenGL, sizeof(__pyx_k__OpenGL), 0, 0, 1, 1}, + {&__pyx_n_s____import__, __pyx_k____import__, sizeof(__pyx_k____import__), 0, 0, 1, 1}, {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1}, {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1}, {&__pyx_n_s__baseOperation, __pyx_k__baseOperation, sizeof(__pyx_k__baseOperation), 0, 0, 1, 1}, @@ -1791,6 +1876,9 @@ PyMODINIT_FUNC PyInit_errorchecker(void) #endif { PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); @@ -1828,6 +1916,8 @@ PyMODINIT_FUNC PyInit_errorchecker(void) __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __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;} @@ -1843,6 +1933,9 @@ PyMODINIT_FUNC PyInit_errorchecker(void) 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_OpenGL_accelerate__errorchecker) { 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;}; } @@ -1892,7 +1985,7 @@ PyMODINIT_FUNC PyInit_errorchecker(void) */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; goto __pyx_L0; __pyx_L1_error:; @@ -2068,6 +2161,19 @@ static void __Pyx_RaiseArgtupleInvalid( (num_expected == 1) ? "" : "s", num_found); } +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Format(PyExc_ImportError, + #if PY_MAJOR_VERSION < 3 + "cannot import name %.230s", PyString_AS_STRING(name)); + #else + "cannot import name %S", name); + #endif + } + return value; +} + static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; @@ -2137,24 +2243,23 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, } 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); @@ -2192,8 +2297,7 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; - } - else + } else args = PyTuple_Pack(1, value); if (!args) goto bad; @@ -2214,18 +2318,22 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject "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"); @@ -2256,8 +2364,8 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 - PyObject *py_import = 0; - py_import = __Pyx_GetAttrString(__pyx_b, "__import__"); + PyObject *py_import; + py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s____import__); if (!py_import) goto bad; #endif @@ -2331,15 +2439,6 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { return module; } -static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name) { -#if PY_MAJOR_VERSION < 3 - PyErr_Format(PyExc_ImportError, "cannot import name %.230s", - PyString_AsString(name)); -#else - PyErr_Format(PyExc_ImportError, "cannot import name %S", name); -#endif -} - static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { const unsigned char neg_one = (unsigned char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; @@ -2530,10 +2629,15 @@ static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) { 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)) { @@ -2546,6 +2650,16 @@ static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { #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"); @@ -2553,6 +2667,17 @@ static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { } 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 { @@ -2565,10 +2690,15 @@ static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { } } +#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)) { @@ -2581,6 +2711,16 @@ static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObje #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"); @@ -2588,6 +2728,17 @@ static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObje } 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 { @@ -2600,10 +2751,15 @@ static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObje } } +#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)) { @@ -2616,6 +2772,16 @@ static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { #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"); @@ -2623,6 +2789,17 @@ static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { } 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 { @@ -2635,10 +2812,15 @@ static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { } } +#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)) { @@ -2651,6 +2833,16 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { #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"); @@ -2658,6 +2850,17 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { } 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 { @@ -2670,10 +2873,15 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { } } +#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)) { @@ -2686,6 +2894,16 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { #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"); @@ -2693,6 +2911,17 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { } 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 { @@ -2705,10 +2934,15 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { } } +#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)) { @@ -2721,6 +2955,16 @@ static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* #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"); @@ -2728,6 +2972,17 @@ static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* } 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 { @@ -2951,6 +3206,65 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { return 0; } +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; @@ -2960,14 +3274,14 @@ 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); @@ -2983,7 +3297,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { } #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)) { @@ -3024,11 +3338,10 @@ static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { } 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; diff --git a/OpenGL_accelerate/src/formathandler.c b/OpenGL_accelerate/src/formathandler.c index 491424ff..6a7e523e 100644 --- a/OpenGL_accelerate/src/formathandler.c +++ b/OpenGL_accelerate/src/formathandler.c @@ -1,6 +1,18 @@ -/* Generated by Cython 0.18 on Mon Apr 15 22:37:35 2013 */ +/* Generated by Cython 0.19.1 on Thu Jul 11 00:05:41 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. @@ -116,6 +128,9 @@ #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)) ? \ @@ -155,6 +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) @@ -227,6 +250,40 @@ #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 @@ -259,17 +316,6 @@ #define CYTHON_WITHOUT_ASSERTIONS #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_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) @@ -283,10 +329,44 @@ # define CYTHON_UNUSED # endif #endif -typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ - -#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s) -#define __Pyx_PyBytes_AsUString(s) ((unsigned char*) PyBytes_AsString(s)) +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*/ + +#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*); @@ -300,6 +380,78 @@ static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #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__ @@ -315,8 +467,9 @@ static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #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; @@ -415,7 +568,22 @@ static struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) -static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ +#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_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*/ @@ -428,14 +596,16 @@ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ const char* function_name); /*proto*/ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /*proto*/ + static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ -static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ +static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ -static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name); +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); @@ -471,8 +641,6 @@ static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject * static int __Pyx_check_binary_version(void); -static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ - typedef struct { int code_line; PyCodeObject* code_object; @@ -515,6 +683,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13formathandler_13FormatHandler_22 static PyObject *__pyx_pf_17OpenGL_accelerate_13formathandler_13FormatHandler_24dimensions(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *__pyx_v_self, PyObject *__pyx_v_instance); /* proto */ static PyObject *__pyx_pf_17OpenGL_accelerate_13formathandler_13FormatHandler_13ERROR_ON_COPY___get__(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *__pyx_v_self); /* proto */ static int __pyx_pf_17OpenGL_accelerate_13formathandler_13FormatHandler_13ERROR_ON_COPY_2__set__(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_13formathandler_FormatHandler(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static char __pyx_k_1[] = "OpenGL.arrays.arraydatatype"; static char __pyx_k_2[] = "%s does not define from_param method"; static char __pyx_k_3[] = "%s does not define dataPointer method"; @@ -536,9 +705,11 @@ static char __pyx_k__instance[] = "instance"; static char __pyx_k__isOutput[] = "isOutput"; static char __pyx_k__register[] = "register"; static char __pyx_k__typeCode[] = "typeCode"; +static char __pyx_k____import__[] = "__import__"; static char __pyx_k__getRegistry[] = "getRegistry"; static char __pyx_k__ArrayDatatype[] = "ArrayDatatype"; static char __pyx_k__HANDLED_TYPES[] = "HANDLED_TYPES"; +static char __pyx_k____pyx_vtable__[] = "__pyx_vtable__"; static char __pyx_k__registerReturn[] = "registerReturn"; static char __pyx_k__NotImplementedError[] = "NotImplementedError"; static PyObject *__pyx_n_s_1; @@ -554,7 +725,9 @@ static PyObject *__pyx_kp_s_9; static PyObject *__pyx_n_s__ArrayDatatype; static PyObject *__pyx_n_s__HANDLED_TYPES; static PyObject *__pyx_n_s__NotImplementedError; +static PyObject *__pyx_n_s____import__; static PyObject *__pyx_n_s____main__; +static PyObject *__pyx_n_s____pyx_vtable__; static PyObject *__pyx_n_s____test__; static PyObject *__pyx_n_s__base; static PyObject *__pyx_n_s__dims; @@ -608,6 +781,9 @@ static PyObject *__pyx_pw_17OpenGL_accelerate_13formathandler_13FormatHandler_3r static char __pyx_doc_17OpenGL_accelerate_13formathandler_13FormatHandler_2register[] = "Register this class as handler for given set of types"; static PyObject *__pyx_pw_17OpenGL_accelerate_13formathandler_13FormatHandler_3register(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_types = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("register (wrapper)", 0); @@ -691,11 +867,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13formathandler_13FormatHandler_2r __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_1), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __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__ArrayDatatype); - if (__pyx_t_1 == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__ArrayDatatype); - if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__ArrayDatatype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_v_ArrayDatatype = __pyx_t_1; @@ -709,12 +881,12 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13formathandler_13FormatHandler_2r * def registerReturn( self ): * """Register this handler as the default return-type handler""" */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_ArrayDatatype, __pyx_n_s__getRegistry); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ArrayDatatype, __pyx_n_s__getRegistry); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __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[0]; __pyx_lineno = 26; __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_GetAttr(__pyx_t_1, __pyx_n_s__register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __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[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -793,11 +965,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13formathandler_13FormatHandler_4r __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_1), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __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__ArrayDatatype); - if (__pyx_t_1 == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__ArrayDatatype); - if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__ArrayDatatype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_v_ArrayDatatype = __pyx_t_1; @@ -811,12 +979,12 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_13formathandler_13FormatHandler_4r * def registerEquivalent( self, typ, base ): * """Register a sub-class for handling as the base-type""" */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_ArrayDatatype, __pyx_n_s__getRegistry); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ArrayDatatype, __pyx_n_s__getRegistry); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __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[0]; __pyx_lineno = 30; __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_GetAttr(__pyx_t_1, __pyx_n_s__registerReturn); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__registerReturn); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -851,6 +1019,9 @@ static char __pyx_doc_17OpenGL_accelerate_13formathandler_13FormatHandler_6regis static PyObject *__pyx_pw_17OpenGL_accelerate_13formathandler_13FormatHandler_7registerEquivalent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_typ = 0; CYTHON_UNUSED PyObject *__pyx_v_base = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("registerEquivalent (wrapper)", 0); @@ -927,6 +1098,9 @@ static char __pyx_doc_17OpenGL_accelerate_13formathandler_13FormatHandler_8from_ static PyObject *__pyx_pw_17OpenGL_accelerate_13formathandler_13FormatHandler_9from_param(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_instance = 0; PyObject *__pyx_v_typeCode = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("from_param (wrapper)", 0); @@ -1201,6 +1375,9 @@ static char __pyx_doc_17OpenGL_accelerate_13formathandler_13FormatHandler_12zero static PyObject *__pyx_pw_17OpenGL_accelerate_13formathandler_13FormatHandler_13zeros(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_dims = 0; PyObject *__pyx_v_typeCode = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("zeros (wrapper)", 0); @@ -1359,6 +1536,9 @@ static char __pyx_doc_17OpenGL_accelerate_13formathandler_13FormatHandler_14arra static PyObject *__pyx_pw_17OpenGL_accelerate_13formathandler_13FormatHandler_15arraySize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_instance = 0; PyObject *__pyx_v_typeCode = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("arraySize (wrapper)", 0); @@ -1746,6 +1926,9 @@ static char __pyx_doc_17OpenGL_accelerate_13formathandler_13FormatHandler_20asAr static PyObject *__pyx_pw_17OpenGL_accelerate_13formathandler_13FormatHandler_21asArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_instance = 0; PyObject *__pyx_v_typeCode = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("asArray (wrapper)", 0); @@ -1907,6 +2090,9 @@ static char __pyx_doc_17OpenGL_accelerate_13formathandler_13FormatHandler_22unit static PyObject *__pyx_pw_17OpenGL_accelerate_13formathandler_13FormatHandler_23unitSize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_instance = 0; PyObject *__pyx_v_typeCode = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("unitSize (wrapper)", 0); @@ -2254,8 +2440,9 @@ static struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler static PyObject *__pyx_tp_new_17OpenGL_accelerate_13formathandler_FormatHandler(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *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_17OpenGL_accelerate_13formathandler_FormatHandler *)o); p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_13formathandler_FormatHandler; return o; @@ -2300,104 +2487,6 @@ static struct PyGetSetDef __pyx_getsets_17OpenGL_accelerate_13formathandler_Form {0, 0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_FormatHandler = { - 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_FormatHandler = { - 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_FormatHandler = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_FormatHandler = { - #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_17OpenGL_accelerate_13formathandler_FormatHandler = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("OpenGL_accelerate.formathandler.FormatHandler"), /*tp_name*/ @@ -2413,16 +2502,16 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_13formathandler_FormatHandler 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_FormatHandler, /*tp_as_number*/ - &__pyx_tp_as_sequence_FormatHandler, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_FormatHandler, /*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_FormatHandler, /*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*/ __Pyx_DOCSTR("PyOpenGL \"Format\" plugin implementation\n\t\n\tPyOpenGL 3.x allows for multiple Formats for data arrays,\n\ta FormatHandler provides generic API entry points which \n\tallow PyOpenGL to manipulate/interact with data arrays\n\tin the given format.\n\t\n\tThis is the C-level accelerator module which allows\n\tfor much faster access to the accelerator by the C-level\n\twrapper classes. This FormatHandler type should only \n\tbe used as a base class by those FormatHandlers which \n\tprovide C-level API entry points, you should *not*\n\tsub-class it in Python.\n\t"), /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ @@ -2490,7 +2579,9 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s__ArrayDatatype, __pyx_k__ArrayDatatype, sizeof(__pyx_k__ArrayDatatype), 0, 0, 1, 1}, {&__pyx_n_s__HANDLED_TYPES, __pyx_k__HANDLED_TYPES, sizeof(__pyx_k__HANDLED_TYPES), 0, 0, 1, 1}, {&__pyx_n_s__NotImplementedError, __pyx_k__NotImplementedError, sizeof(__pyx_k__NotImplementedError), 0, 0, 1, 1}, + {&__pyx_n_s____import__, __pyx_k____import__, sizeof(__pyx_k____import__), 0, 0, 1, 1}, {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 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____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1}, {&__pyx_n_s__base, __pyx_k__base, sizeof(__pyx_k__base), 0, 0, 1, 1}, {&__pyx_n_s__dims, __pyx_k__dims, sizeof(__pyx_k__dims), 0, 0, 1, 1}, @@ -2505,7 +2596,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_NotImplementedError = __Pyx_GetName(__pyx_b, __pyx_n_s__NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s__NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; @@ -2534,6 +2625,9 @@ PyMODINIT_FUNC PyInit_formathandler(void) #endif { PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); @@ -2571,6 +2665,8 @@ PyMODINIT_FUNC PyInit_formathandler(void) __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __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;} @@ -2586,6 +2682,9 @@ PyMODINIT_FUNC PyInit_formathandler(void) 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_OpenGL_accelerate__formathandler) { 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;}; } @@ -2656,7 +2755,7 @@ PyMODINIT_FUNC PyInit_formathandler(void) */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; goto __pyx_L0; __pyx_L1_error:; @@ -2693,17 +2792,15 @@ static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { } #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; } @@ -2886,6 +2983,19 @@ static int __Pyx_ParseOptionalKeywords( return -1; } +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Format(PyExc_ImportError, + #if PY_MAJOR_VERSION < 3 + "cannot import name %.230s", PyString_AS_STRING(name)); + #else + "cannot import name %S", name); + #endif + } + return value; +} + static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; @@ -2955,24 +3065,23 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, } 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); @@ -3010,8 +3119,7 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; - } - else + } else args = PyTuple_Pack(1, value); if (!args) goto bad; @@ -3032,18 +3140,22 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject "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"); @@ -3067,6 +3179,23 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject } #endif +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_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; @@ -3074,8 +3203,8 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 - PyObject *py_import = 0; - py_import = __Pyx_GetAttrString(__pyx_b, "__import__"); + PyObject *py_import; + py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s____import__); if (!py_import) goto bad; #endif @@ -3149,15 +3278,6 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { return module; } -static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name) { -#if PY_MAJOR_VERSION < 3 - PyErr_Format(PyExc_ImportError, "cannot import name %.230s", - PyString_AsString(name)); -#else - PyErr_Format(PyExc_ImportError, "cannot import name %S", name); -#endif -} - static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { const unsigned char neg_one = (unsigned char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; @@ -3348,10 +3468,15 @@ static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) { 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)) { @@ -3364,6 +3489,16 @@ static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { #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"); @@ -3371,6 +3506,17 @@ static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { } 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 { @@ -3383,10 +3529,15 @@ static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { } } +#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)) { @@ -3399,6 +3550,16 @@ static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObje #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"); @@ -3406,6 +3567,17 @@ static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObje } 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 { @@ -3418,10 +3590,15 @@ static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObje } } +#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)) { @@ -3434,6 +3611,16 @@ static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { #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"); @@ -3441,6 +3628,17 @@ static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { } 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 { @@ -3453,10 +3651,15 @@ static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { } } +#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)) { @@ -3469,6 +3672,16 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { #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"); @@ -3476,6 +3689,17 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { } 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 { @@ -3488,10 +3712,15 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { } } +#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)) { @@ -3504,6 +3733,16 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { #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"); @@ -3511,6 +3750,17 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { } 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 { @@ -3523,10 +3773,15 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { } } +#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)) { @@ -3539,6 +3794,16 @@ static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* #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"); @@ -3546,6 +3811,17 @@ static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* } 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 { @@ -3577,23 +3853,6 @@ static int __Pyx_check_binary_version(void) { 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) { @@ -3786,6 +4045,65 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { return 0; } +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; @@ -3795,14 +4113,14 @@ 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); @@ -3818,7 +4136,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { } #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)) { @@ -3859,11 +4177,10 @@ static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { } 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; diff --git a/OpenGL_accelerate/src/latebind.c b/OpenGL_accelerate/src/latebind.c index d6036a50..868733df 100644 --- a/OpenGL_accelerate/src/latebind.c +++ b/OpenGL_accelerate/src/latebind.c @@ -1,6 +1,18 @@ -/* Generated by Cython 0.18 on Mon Apr 15 22:37:35 2013 */ +/* Generated by Cython 0.19.1 on Thu Jul 11 00:05:41 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. @@ -116,6 +128,9 @@ #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)) ? \ @@ -155,6 +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) @@ -227,6 +250,40 @@ #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 @@ -259,17 +316,6 @@ #define CYTHON_WITHOUT_ASSERTIONS #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_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) @@ -283,10 +329,44 @@ # define CYTHON_UNUSED # endif #endif -typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ - -#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s) -#define __Pyx_PyBytes_AsUString(s) ((unsigned char*) PyBytes_AsString(s)) +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*/ + +#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*); @@ -300,6 +380,78 @@ static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #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__ @@ -315,8 +467,9 @@ static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #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; @@ -414,6 +567,21 @@ struct __pyx_obj_17OpenGL_accelerate_8latebind_Curry { #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 CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /*proto*/ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, @@ -492,6 +660,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_4getFinalCall( static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_6__call__(struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_named); /* proto */ static int __pyx_pf_17OpenGL_accelerate_8latebind_5Curry___init__(struct __pyx_obj_17OpenGL_accelerate_8latebind_Curry *__pyx_v_self, PyObject *__pyx_v_wrapperFunction, PyObject *__pyx_v_baseFunction); /* proto */ static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_5Curry_2__call__(struct __pyx_obj_17OpenGL_accelerate_8latebind_Curry *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_named); /* proto */ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_8latebind_LateBind(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_8latebind_Curry(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static char __pyx_k_1[] = "General pattern which does late-bound calls"; static char __pyx_k____main__[] = "__main__"; static char __pyx_k____test__[] = "__test__"; @@ -619,7 +789,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_4getFinalCall( * return self._finalCall */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_finalCall); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = (!__pyx_t_1); + __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { /* "src/latebind.pyx":20 @@ -629,7 +799,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_4getFinalCall( * return self._finalCall * */ - __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__finalise); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__finalise); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); @@ -722,7 +892,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_6__call__(stru * return self._finalCall( *args, **named ) */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_finalCall); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = (!__pyx_t_1); + __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { /* "src/latebind.pyx":31 @@ -732,7 +902,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_6__call__(stru * return self._finalCall( *args, **named ) * */ - __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__finalise); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__finalise); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); @@ -789,6 +959,9 @@ struct wrapperbase __pyx_wrapperbase_17OpenGL_accelerate_8latebind_5Curry___init static int __pyx_pw_17OpenGL_accelerate_8latebind_5Curry_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_wrapperFunction = 0; PyObject *__pyx_v_baseFunction = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -971,8 +1144,9 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_5Curry_2__call__(struct static PyObject *__pyx_tp_new_17OpenGL_accelerate_8latebind_LateBind(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *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_17OpenGL_accelerate_8latebind_LateBind *)o); p->_finalCall = Py_None; Py_INCREF(Py_None); return o; @@ -982,7 +1156,6 @@ static void __pyx_tp_dealloc_17OpenGL_accelerate_8latebind_LateBind(PyObject *o) struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *p = (struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->_finalCall); - PyObject_GC_Track(o); (*Py_TYPE(o)->tp_free)(o); } @@ -1011,104 +1184,6 @@ static PyMethodDef __pyx_methods_17OpenGL_accelerate_8latebind_LateBind[] = { {0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_LateBind = { - 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_LateBind = { - 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_LateBind = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_LateBind = { - #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_17OpenGL_accelerate_8latebind_LateBind = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("OpenGL_accelerate.latebind.LateBind"), /*tp_name*/ @@ -1124,16 +1199,16 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_8latebind_LateBind = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_LateBind, /*tp_as_number*/ - &__pyx_tp_as_sequence_LateBind, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_LateBind, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ __pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_7__call__, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_LateBind, /*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("Provides a __call__ which dispatches to self._finalCall\n\n When called without self._finalCall() makes a call to\n self.finalise() and then calls self._finalCall()\n "), /*tp_doc*/ __pyx_tp_traverse_17OpenGL_accelerate_8latebind_LateBind, /*tp_traverse*/ __pyx_tp_clear_17OpenGL_accelerate_8latebind_LateBind, /*tp_clear*/ @@ -1167,8 +1242,9 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_8latebind_LateBind = { static PyObject *__pyx_tp_new_17OpenGL_accelerate_8latebind_Curry(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_17OpenGL_accelerate_8latebind_Curry *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_17OpenGL_accelerate_8latebind_Curry *)o); p->wrapperFunction = Py_None; Py_INCREF(Py_None); p->baseFunction = Py_None; Py_INCREF(Py_None); @@ -1180,7 +1256,6 @@ static void __pyx_tp_dealloc_17OpenGL_accelerate_8latebind_Curry(PyObject *o) { PyObject_GC_UnTrack(o); Py_CLEAR(p->wrapperFunction); Py_CLEAR(p->baseFunction); - PyObject_GC_Track(o); (*Py_TYPE(o)->tp_free)(o); } @@ -1212,104 +1287,6 @@ static PyMethodDef __pyx_methods_17OpenGL_accelerate_8latebind_Curry[] = { {0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_Curry = { - 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_Curry = { - 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_Curry = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_Curry = { - #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_17OpenGL_accelerate_8latebind_Curry = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("OpenGL_accelerate.latebind.Curry"), /*tp_name*/ @@ -1325,16 +1302,16 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_8latebind_Curry = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_Curry, /*tp_as_number*/ - &__pyx_tp_as_sequence_Curry, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_Curry, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ __pyx_pw_17OpenGL_accelerate_8latebind_5Curry_3__call__, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_Curry, /*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("Provides a simple Curry which can bind (only) the first element"), /*tp_doc*/ __pyx_tp_traverse_17OpenGL_accelerate_8latebind_Curry, /*tp_traverse*/ __pyx_tp_clear_17OpenGL_accelerate_8latebind_Curry, /*tp_clear*/ @@ -1423,6 +1400,9 @@ PyMODINIT_FUNC PyInit_latebind(void) #endif { PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); @@ -1460,6 +1440,8 @@ PyMODINIT_FUNC PyInit_latebind(void) __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __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;} @@ -1475,6 +1457,9 @@ PyMODINIT_FUNC PyInit_latebind(void) 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_OpenGL_accelerate__latebind) { 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;}; } @@ -1534,7 +1519,7 @@ PyMODINIT_FUNC PyInit_latebind(void) */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; goto __pyx_L0; __pyx_L1_error:; @@ -1939,10 +1924,15 @@ static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) { 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)) { @@ -1955,6 +1945,16 @@ static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { #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"); @@ -1962,6 +1962,17 @@ static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { } 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 { @@ -1974,10 +1985,15 @@ static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { } } +#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)) { @@ -1990,6 +2006,16 @@ static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObje #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"); @@ -1997,6 +2023,17 @@ static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObje } 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 { @@ -2009,10 +2046,15 @@ static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObje } } +#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)) { @@ -2025,6 +2067,16 @@ static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { #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"); @@ -2032,6 +2084,17 @@ static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { } 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 { @@ -2044,10 +2107,15 @@ static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { } } +#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)) { @@ -2060,6 +2128,16 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { #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"); @@ -2067,6 +2145,17 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { } 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 { @@ -2079,10 +2168,15 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { } } +#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)) { @@ -2095,6 +2189,16 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { #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"); @@ -2102,6 +2206,17 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { } 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 { @@ -2114,10 +2229,15 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { } } +#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)) { @@ -2130,6 +2250,16 @@ static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* #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"); @@ -2137,6 +2267,17 @@ static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* } 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 { @@ -2360,6 +2501,65 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { return 0; } +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; @@ -2369,14 +2569,14 @@ 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); @@ -2392,7 +2592,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { } #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)) { @@ -2433,11 +2633,10 @@ static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { } 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; diff --git a/OpenGL_accelerate/src/nones_formathandler.c b/OpenGL_accelerate/src/nones_formathandler.c index 1b7198e7..ee579470 100644 --- a/OpenGL_accelerate/src/nones_formathandler.c +++ b/OpenGL_accelerate/src/nones_formathandler.c @@ -1,6 +1,18 @@ -/* Generated by Cython 0.18 on Mon Apr 15 22:37:35 2013 */ +/* Generated by Cython 0.19.1 on Thu Jul 11 00:05:41 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. @@ -116,6 +128,9 @@ #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)) ? \ @@ -155,6 +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) @@ -227,6 +250,40 @@ #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 @@ -259,17 +316,6 @@ #define CYTHON_WITHOUT_ASSERTIONS #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_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) @@ -283,10 +329,44 @@ # define CYTHON_UNUSED # endif #endif -typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ - -#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s) -#define __Pyx_PyBytes_AsUString(s) ((unsigned char*) PyBytes_AsString(s)) +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*/ + +#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*); @@ -300,6 +380,78 @@ static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #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__ @@ -315,8 +467,9 @@ static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #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; @@ -451,6 +604,10 @@ static struct __pyx_vtabstruct_17OpenGL_accelerate_19nones_formathandler_NoneHan static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc); +static void* __Pyx_GetVtable(PyObject *dict); /*proto*/ + +static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ + static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); @@ -497,10 +654,6 @@ static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /*proto*/ -static void* __Pyx_GetVtable(PyObject *dict); /*proto*/ - -static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ - typedef struct { int code_line; PyCodeObject* code_object; @@ -530,13 +683,16 @@ static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_19nones_formathandler_NoneH int __pyx_module_is_main_OpenGL_accelerate__nones_formathandler = 0; /* Implementation of 'OpenGL_accelerate.nones_formathandler' */ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_19nones_formathandler_NoneHandler(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static char __pyx_k_2[] = "Accelerator for None-as-an-array format handler operations"; static char __pyx_k____main__[] = "__main__"; static char __pyx_k____test__[] = "__test__"; static char __pyx_k__isOutput[] = "isOutput"; static char __pyx_k__HANDLED_TYPES[] = "HANDLED_TYPES"; +static char __pyx_k____pyx_vtable__[] = "__pyx_vtable__"; static PyObject *__pyx_n_s__HANDLED_TYPES; static PyObject *__pyx_n_s____main__; +static PyObject *__pyx_n_s____pyx_vtable__; static PyObject *__pyx_n_s____test__; static PyObject *__pyx_n_s__isOutput; static PyObject *__pyx_int_0; @@ -736,7 +892,7 @@ static struct __pyx_vtabstruct_17OpenGL_accelerate_19nones_formathandler_NoneHan static PyObject *__pyx_tp_new_17OpenGL_accelerate_19nones_formathandler_NoneHandler(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_17OpenGL_accelerate_19nones_formathandler_NoneHandler *p; PyObject *o = __pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_new(t, a, k); - if (!o) return 0; + if (unlikely(!o)) return 0; p = ((struct __pyx_obj_17OpenGL_accelerate_19nones_formathandler_NoneHandler *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler*)__pyx_vtabptr_17OpenGL_accelerate_19nones_formathandler_NoneHandler; return o; @@ -750,104 +906,6 @@ static PyMethodDef __pyx_methods_17OpenGL_accelerate_19nones_formathandler_NoneH {0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_NoneHandler = { - 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_NoneHandler = { - 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_NoneHandler = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_NoneHandler = { - #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_17OpenGL_accelerate_19nones_formathandler_NoneHandler = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("OpenGL_accelerate.nones_formathandler.NoneHandler"), /*tp_name*/ @@ -863,16 +921,16 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_19nones_formathandler_NoneHan 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_NoneHandler, /*tp_as_number*/ - &__pyx_tp_as_sequence_NoneHandler, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_NoneHandler, /*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_NoneHandler, /*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*/ @@ -929,6 +987,7 @@ static struct PyModuleDef __pyx_moduledef = { static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s__HANDLED_TYPES, __pyx_k__HANDLED_TYPES, sizeof(__pyx_k__HANDLED_TYPES), 0, 0, 1, 1}, {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 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____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1}, {&__pyx_n_s__isOutput, __pyx_k__isOutput, sizeof(__pyx_k__isOutput), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} @@ -973,6 +1032,9 @@ PyMODINIT_FUNC PyInit_nones_formathandler(void) #endif { PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); @@ -1010,6 +1072,8 @@ PyMODINIT_FUNC PyInit_nones_formathandler(void) __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __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;} @@ -1025,6 +1089,9 @@ PyMODINIT_FUNC PyInit_nones_formathandler(void) 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_OpenGL_accelerate__nones_formathandler) { 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;}; } @@ -1092,7 +1159,7 @@ PyMODINIT_FUNC PyInit_nones_formathandler(void) */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; goto __pyx_L0; __pyx_L1_error:; @@ -1139,6 +1206,42 @@ static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_deal type->tp_dealloc(obj); } +static void* __Pyx_GetVtable(PyObject *dict) { + void* ptr; + PyObject *ob = PyObject_GetItem(dict, __pyx_n_s____pyx_vtable__); + if (!ob) + goto bad; +#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) + ptr = PyCapsule_GetPointer(ob, 0); +#else + ptr = PyCObject_AsVoidPtr(ob); +#endif + if (!ptr && !PyErr_Occurred()) + PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); + Py_DECREF(ob); + return ptr; +bad: + Py_XDECREF(ob); + return NULL; +} + +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 CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { const unsigned char neg_one = (unsigned char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; @@ -1329,10 +1432,15 @@ static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) { 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)) { @@ -1345,6 +1453,16 @@ static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { #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"); @@ -1352,6 +1470,17 @@ static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { } 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 { @@ -1364,10 +1493,15 @@ static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { } } +#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)) { @@ -1380,6 +1514,16 @@ static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObje #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"); @@ -1387,6 +1531,17 @@ static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObje } 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 { @@ -1399,10 +1554,15 @@ static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObje } } +#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)) { @@ -1415,6 +1575,16 @@ static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { #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"); @@ -1422,6 +1592,17 @@ static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { } 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 { @@ -1434,10 +1615,15 @@ static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { } } +#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)) { @@ -1450,6 +1636,16 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { #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"); @@ -1457,6 +1653,17 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { } 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 { @@ -1469,10 +1676,15 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { } } +#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)) { @@ -1485,6 +1697,16 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { #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"); @@ -1492,6 +1714,17 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { } 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 { @@ -1504,10 +1737,15 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { } } +#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)) { @@ -1520,6 +1758,16 @@ static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* #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"); @@ -1527,6 +1775,17 @@ static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* } 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 { @@ -1643,42 +1902,6 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class } #endif -static void* __Pyx_GetVtable(PyObject *dict) { - void* ptr; - PyObject *ob = PyMapping_GetItemString(dict, (char *)"__pyx_vtable__"); - if (!ob) - goto bad; -#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) - ptr = PyCapsule_GetPointer(ob, 0); -#else - ptr = PyCObject_AsVoidPtr(ob); -#endif - if (!ptr && !PyErr_Occurred()) - PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); - Py_DECREF(ob); - return ptr; -bad: - Py_XDECREF(ob); - return NULL; -} - -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) { @@ -1871,6 +2094,65 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { return 0; } +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; @@ -1880,14 +2162,14 @@ 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); @@ -1903,7 +2185,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { } #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)) { @@ -1944,11 +2226,10 @@ static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { } 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; diff --git a/OpenGL_accelerate/src/numpy_formathandler.c b/OpenGL_accelerate/src/numpy_formathandler.c index 9f9b5017..2c53d20c 100644 --- a/OpenGL_accelerate/src/numpy_formathandler.c +++ b/OpenGL_accelerate/src/numpy_formathandler.c @@ -1,6 +1,18 @@ -/* Generated by Cython 0.18 on Mon Apr 15 22:37:35 2013 */ +/* Generated by Cython 0.19.1 on Thu Jul 11 00:05:41 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. @@ -116,6 +128,9 @@ #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)) ? \ @@ -155,6 +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) @@ -227,6 +250,40 @@ #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 @@ -264,17 +321,6 @@ #define CYTHON_WITHOUT_ASSERTIONS #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_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) @@ -288,10 +334,44 @@ # define CYTHON_UNUSED # endif #endif -typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ - -#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s) -#define __Pyx_PyBytes_AsUString(s) ((unsigned char*) PyBytes_AsString(s)) +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*/ + +#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*); @@ -305,6 +385,78 @@ static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #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__ @@ -320,8 +472,9 @@ static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #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; @@ -727,7 +880,22 @@ static struct __pyx_vtabstruct_17OpenGL_accelerate_19numpy_formathandler_NumpyHa #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) -static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ +#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_GetBuiltinName(PyObject *name); /*proto*/ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ @@ -738,6 +906,8 @@ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ 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 PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /*proto*/ + static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ @@ -748,8 +918,12 @@ static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { PyObject *value; 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); @@ -759,38 +933,19 @@ static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) #endif +static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ + static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ -static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { - PyObject* value; +static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value); /*proto*/ + #if PY_MAJOR_VERSION >= 3 - value = PyDict_GetItemWithError(d, key); - if (unlikely(!value)) { - if (unlikely(PyErr_Occurred())) - return NULL; - value = default_value; - } - Py_INCREF(value); +static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d); /*proto*/ #else - if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) { - value = PyDict_GetItem(d, key); - if (unlikely(!value)) { - value = default_value; - } - Py_INCREF(value); - } else { - PyObject *m; - m = __Pyx_GetAttrString(d, "get"); - if (!m) return NULL; - value = PyObject_CallFunctionObjArgs(m, key, - (default_value == Py_None) ? NULL : default_value, NULL); - Py_DECREF(m); - } +#define __Pyx_PyDict_Keys(d) PyDict_Keys(d) #endif - return value; -} static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); @@ -808,13 +963,15 @@ static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, trav static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc); +static void* __Pyx_GetVtable(PyObject *dict); /*proto*/ + +static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*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, int level); /*proto*/ -static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name); - #if CYTHON_CCOMPLEX #ifdef __cplusplus #define __Pyx_CREAL(z) ((z).real()) @@ -959,10 +1116,6 @@ static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /*proto*/ -static void* __Pyx_GetVtable(PyObject *dict); /*proto*/ - -static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ - typedef struct { int code_line; PyCodeObject* code_object; @@ -1032,6 +1185,7 @@ static int __pyx_pf_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandler_20g static int __pyx_pf_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandler_20gl_constant_to_array_4__del__(struct __pyx_obj_17OpenGL_accelerate_19numpy_formathandler_NumpyHandler *__pyx_v_self); /* proto */ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_19numpy_formathandler_NumpyHandler(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static char __pyx_k_1[] = "OpenGL.arrays.numpymodule"; static char __pyx_k_2[] = "ARRAY_TO_GL_TYPE_MAPPING"; static char __pyx_k_3[] = "GL_TYPE_TO_ARRAY_MAPPING"; @@ -1067,7 +1221,9 @@ static char __pyx_k__Zd[] = "Zd"; static char __pyx_k__Zf[] = "Zf"; static char __pyx_k__Zg[] = "Zg"; static char __pyx_k__np[] = "np"; +static char __pyx_k__get[] = "get"; static char __pyx_k__char[] = "char"; +static char __pyx_k__keys[] = "keys"; static char __pyx_k__ndim[] = "ndim"; static char __pyx_k__size[] = "size"; static char __pyx_k__bytes[] = "bytes"; @@ -1090,10 +1246,12 @@ static char __pyx_k__CopyError[] = "CopyError"; static char __pyx_k__TypeError[] = "TypeError"; static char __pyx_k__traceback[] = "traceback"; static char __pyx_k__ValueError[] = "ValueError"; +static char __pyx_k____import__[] = "__import__"; static char __pyx_k__RuntimeError[] = "RuntimeError"; static char __pyx_k___configflags[] = "_configflags"; static char __pyx_k__ERROR_ON_COPY[] = "ERROR_ON_COPY"; static char __pyx_k__HANDLED_TYPES[] = "HANDLED_TYPES"; +static char __pyx_k____pyx_vtable__[] = "__pyx_vtable__"; static PyObject *__pyx_n_s_1; static PyObject *__pyx_kp_u_11; static PyObject *__pyx_kp_u_13; @@ -1117,7 +1275,9 @@ static PyObject *__pyx_n_s__OpenGL; static PyObject *__pyx_n_s__RuntimeError; static PyObject *__pyx_n_s__TypeError; static PyObject *__pyx_n_s__ValueError; +static PyObject *__pyx_n_s____import__; static PyObject *__pyx_n_s____main__; +static PyObject *__pyx_n_s____pyx_vtable__; static PyObject *__pyx_n_s____test__; static PyObject *__pyx_n_s___configflags; static PyObject *__pyx_n_s__a_to_gl; @@ -1126,8 +1286,10 @@ static PyObject *__pyx_n_s__c_void_p; static PyObject *__pyx_n_s__char; static PyObject *__pyx_n_s__ctypes; static PyObject *__pyx_n_s__dtype; +static PyObject *__pyx_n_s__get; static PyObject *__pyx_n_s__gl_to_a; static PyObject *__pyx_n_s__isOutput; +static PyObject *__pyx_n_s__keys; static PyObject *__pyx_n_s__nbytes; static PyObject *__pyx_n_s__ndim; static PyObject *__pyx_n_s__np; @@ -1153,6 +1315,9 @@ static int __pyx_pw_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandler_1__ PyObject *__pyx_v_ERROR_ON_COPY = 0; PyObject *__pyx_v_a_to_gl = 0; PyObject *__pyx_v_gl_to_a = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -1234,9 +1399,10 @@ static int __pyx_pf_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandler___i int __pyx_r; __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; + int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -1253,7 +1419,8 @@ static int __pyx_pf_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandler___i * ERROR_ON_COPY = _configflags.ERROR_ON_COPY */ __pyx_t_1 = (__pyx_v_ERROR_ON_COPY == Py_None); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { /* "src/numpy_formathandler.pyx":31 * def __init__( self, ERROR_ON_COPY=None, a_to_gl=None, gl_to_a=None ): @@ -1262,24 +1429,20 @@ static int __pyx_pf_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandler___i * ERROR_ON_COPY = _configflags.ERROR_ON_COPY * if a_to_gl is None: */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_n_s___configflags)); - PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s___configflags)); + PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s___configflags)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s___configflags)); - __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__OpenGL), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_Import(((PyObject *)__pyx_n_s__OpenGL), ((PyObject *)__pyx_t_3), -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s___configflags); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s___configflags); - if (__pyx_t_2 == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s___configflags); - if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } - __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_t_2); - __pyx_v__configflags = __pyx_t_2; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_INCREF(__pyx_t_3); + __pyx_v__configflags = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "src/numpy_formathandler.pyx":32 * if ERROR_ON_COPY is None: @@ -1288,11 +1451,11 @@ static int __pyx_pf_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandler___i * if a_to_gl is None: * from OpenGL.arrays.numpymodule import ARRAY_TO_GL_TYPE_MAPPING */ - __pyx_t_3 = PyObject_GetAttr(__pyx_v__configflags, __pyx_n_s__ERROR_ON_COPY); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v__configflags, __pyx_n_s__ERROR_ON_COPY); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_v_ERROR_ON_COPY); - __pyx_v_ERROR_ON_COPY = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_v_ERROR_ON_COPY = __pyx_t_4; + __pyx_t_4 = 0; goto __pyx_L3; } __pyx_L3:; @@ -1304,7 +1467,8 @@ static int __pyx_pf_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandler___i * from OpenGL.arrays.numpymodule import ARRAY_TO_GL_TYPE_MAPPING * a_to_gl = ARRAY_TO_GL_TYPE_MAPPING */ - __pyx_t_1 = (__pyx_v_a_to_gl == Py_None); + __pyx_t_2 = (__pyx_v_a_to_gl == Py_None); + __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "src/numpy_formathandler.pyx":34 @@ -1314,24 +1478,20 @@ static int __pyx_pf_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandler___i * a_to_gl = ARRAY_TO_GL_TYPE_MAPPING * if gl_to_a is None: */ - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_n_s_2)); - PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s_2)); + PyList_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_n_s_2)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s_2)); - __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_1), ((PyObject *)__pyx_t_3), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s_2); - if (__pyx_t_3 == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s_2); - if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } + __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s_1), ((PyObject *)__pyx_t_4), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_t_3); - __pyx_v_ARRAY_TO_GL_TYPE_MAPPING = __pyx_t_3; + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_4); + __pyx_v_ARRAY_TO_GL_TYPE_MAPPING = __pyx_t_4; + __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; /* "src/numpy_formathandler.pyx":35 * if a_to_gl is None: @@ -1355,7 +1515,8 @@ static int __pyx_pf_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandler___i * gl_to_a = GL_TYPE_TO_ARRAY_MAPPING */ __pyx_t_1 = (__pyx_v_gl_to_a == Py_None); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { /* "src/numpy_formathandler.pyx":37 * a_to_gl = ARRAY_TO_GL_TYPE_MAPPING @@ -1364,24 +1525,20 @@ static int __pyx_pf_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandler___i * gl_to_a = GL_TYPE_TO_ARRAY_MAPPING * self.ERROR_ON_COPY = ERROR_ON_COPY */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_n_s_3)); - PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s_3)); + PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s_3)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s_3)); - __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s_1), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_Import(((PyObject *)__pyx_n_s_1), ((PyObject *)__pyx_t_3), -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s_3); - if (__pyx_t_2 == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s_3); - if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } - __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_t_2); - __pyx_v_GL_TYPE_TO_ARRAY_MAPPING = __pyx_t_2; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_INCREF(__pyx_t_3); + __pyx_v_GL_TYPE_TO_ARRAY_MAPPING = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "src/numpy_formathandler.pyx":38 * if gl_to_a is None: @@ -1404,8 +1561,8 @@ static int __pyx_pf_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandler___i * self.array_to_gl_constant = a_to_gl * self.gl_constant_to_array = gl_to_a */ - __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_v_ERROR_ON_COPY); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_self->__pyx_base.ERROR_ON_COPY = __pyx_t_4; + __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_v_ERROR_ON_COPY); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->__pyx_base.ERROR_ON_COPY = __pyx_t_5; /* "src/numpy_formathandler.pyx":40 * gl_to_a = GL_TYPE_TO_ARRAY_MAPPING @@ -1438,8 +1595,8 @@ static int __pyx_pf_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandler___i __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_AddTraceback("OpenGL_accelerate.numpy_formathandler.NumpyHandler.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -1479,7 +1636,7 @@ static PyArrayObject *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyH * raise TypeError( * """Numpy format handler passed a non-numpy-array object %s (of type %s)"""%( instance, type(instance) ), */ - __pyx_t_1 = (!PyArray_Check(__pyx_v_instance)); + __pyx_t_1 = ((!(PyArray_Check(__pyx_v_instance) != 0)) != 0); if (__pyx_t_1) { /* "src/numpy_formathandler.pyx":46 @@ -1611,7 +1768,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandle * raise CopyError( * """Array of type %r passed, required array of type %r""", */ - __pyx_t_3 = PyObject_GetAttr(__pyx_v_instance, __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_v_targetType), Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -1626,7 +1783,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandle * """Array of type %r passed, required array of type %r""", * instance.dtype.char, targetType.char, */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__CopyError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__CopyError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "src/numpy_formathandler.pyx":59 @@ -1636,12 +1793,12 @@ static PyObject *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandle * ) * if not PyArray_ISCARRAY( instance ): */ - __pyx_t_3 = PyObject_GetAttr(__pyx_v_instance, __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__char); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__char); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_targetType), __pyx_n_s__char); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_targetType), __pyx_n_s__char); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); @@ -1676,7 +1833,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandle * """from_param received a non-contiguous array! %s"""%( */ if (!(likely(((__pyx_v_instance) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_instance, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = (!PyArray_ISCARRAY(((PyArrayObject *)__pyx_v_instance))); + __pyx_t_2 = ((!(PyArray_ISCARRAY(((PyArrayObject *)__pyx_v_instance)) != 0)) != 0); if (__pyx_t_2) { /* "src/numpy_formathandler.pyx":62 @@ -1686,7 +1843,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandle * """from_param received a non-contiguous array! %s"""%( * working, */ - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__CopyError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__CopyError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); /* "src/numpy_formathandler.pyx":64 @@ -1728,7 +1885,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandle * cdef c_dataPointer( self, object instance ): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__c_void_p); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__c_void_p); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyInt_FromSize_t(((size_t)__pyx_v_working->data)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); @@ -2027,7 +2184,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandle __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_17OpenGL_accelerate_19numpy_formathandler_NumpyHandler *)__pyx_v_self->__pyx_base.__pyx_vtab)->c_check_array(__pyx_v_self, __pyx_v_instance)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; @@ -2072,7 +2229,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandle * """Given a value, guess OpenGL type of the corresponding pointer""" */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetAttr(__pyx_v_instance, __pyx_n_s__nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s__nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -2106,7 +2263,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandle PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; - PyObject *__pyx_t_4 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -2135,7 +2293,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandle PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_value), __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_self->array_to_gl_constant), __pyx_t_1, Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -2151,7 +2309,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandle * """Don't know GL type for array of type %r, known types: %s\nvalue:%s"""%( */ __pyx_t_3 = (__pyx_v_constant == Py_None); - if (__pyx_t_3) { + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { /* "src/numpy_formathandler.pyx":100 * raise TypeError( @@ -2160,36 +2319,36 @@ static PyObject *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandle * ) * ) */ - __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_value), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (unlikely(((PyObject *)__pyx_v_self->array_to_gl_constant) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "keys"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = PyDict_Keys(__pyx_v_self->array_to_gl_constant); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyDict_Keys(__pyx_v_self->array_to_gl_constant); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_value)); - PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_v_value)); + PyTuple_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_v_value)); __Pyx_GIVEREF(((PyObject *)__pyx_v_value)); __pyx_t_2 = 0; __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_7), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_7), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_1)); + __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -2214,7 +2373,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandle __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("OpenGL_accelerate.numpy_formathandler.NumpyHandler.c_arrayToGLType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -2241,6 +2400,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandle PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; + int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -2269,7 +2429,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandle * else: */ __pyx_t_3 = (__pyx_v_typeCode == Py_None); - if (__pyx_t_3) { + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { /* "src/numpy_formathandler.pyx":109 * cdef np.dtype typecode @@ -2278,7 +2439,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandle * else: * typecode = self.typeCodeToDtype( typeCode ) */ - __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_working), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_working), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_typecode = ((PyArray_Descr *)__pyx_t_2); @@ -2357,9 +2518,9 @@ static PyObject *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandle * """Retrieve full set of dimensions for the array as tuple""" */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetAttr(__pyx_v_instance, __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_v_instance, __pyx_n_s__ndim); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s__ndim); 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_t_3 = PyNumber_Subtract(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); @@ -2411,7 +2572,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyHandle * cdef np.dtype typeCodeToDtype( self, object typeCode ): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetAttr(__pyx_v_instance, __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -2441,9 +2602,10 @@ static PyArray_Descr *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyH PyArray_Descr *__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; + PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -2457,7 +2619,8 @@ static PyArray_Descr *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyH * elif isinstance( typeCode, (bytes,unicode) ): */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_typeCode, ((PyObject*)__pyx_ptype_5numpy_dtype)); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { /* "src/numpy_formathandler.pyx":123 * """Convert type-code specification to a numpy dtype instance""" @@ -2481,20 +2644,21 @@ static PyArray_Descr *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyH * return np.dtype( typeCode ) * else: */ - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__bytes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__unicode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__bytes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__unicode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); - __pyx_t_2 = 0; + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); __pyx_t_3 = 0; - __pyx_t_1 = PyObject_IsInstance(__pyx_v_typeCode, ((PyObject *)__pyx_t_4)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __pyx_t_4 = 0; + __pyx_t_2 = PyObject_IsInstance(__pyx_v_typeCode, ((PyObject *)__pyx_t_5)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "src/numpy_formathandler.pyx":125 @@ -2505,16 +2669,16 @@ static PyArray_Descr *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyH * return self.gl_constant_to_array[ typeCode ] */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __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[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_typeCode); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_typeCode); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_typeCode); __Pyx_GIVEREF(__pyx_v_typeCode); - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; - __pyx_r = ((PyArray_Descr *)__pyx_t_3); - __pyx_t_3 = 0; + __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __pyx_r = ((PyArray_Descr *)__pyx_t_4); + __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L3; } @@ -2532,11 +2696,11 @@ static PyArray_Descr *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyH PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_3 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_self->gl_constant_to_array), __pyx_v_typeCode); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = ((PyArray_Descr *)__pyx_t_3); - __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_self->gl_constant_to_array), __pyx_v_typeCode); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = ((PyArray_Descr *)__pyx_t_4); + __pyx_t_4 = 0; goto __pyx_L0; } __pyx_L3:; @@ -2544,9 +2708,9 @@ static PyArray_Descr *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyH __pyx_r = ((PyArray_Descr *)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_AddTraceback("OpenGL_accelerate.numpy_formathandler.NumpyHandler.typeCodeToDtype", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -2585,7 +2749,8 @@ static PyArrayObject *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyH * if not PyArray_ISCARRAY( instance ): * raise CopyError( */ - if (__pyx_v_self->__pyx_base.ERROR_ON_COPY) { + __pyx_t_1 = (__pyx_v_self->__pyx_base.ERROR_ON_COPY != 0); + if (__pyx_t_1) { /* "src/numpy_formathandler.pyx":131 * """Ensure that this instance is a contiguous array""" @@ -2594,7 +2759,7 @@ static PyArrayObject *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyH * raise CopyError( * """Non-contiguous array passed""", */ - __pyx_t_1 = (!PyArray_ISCARRAY(__pyx_v_instance)); + __pyx_t_1 = ((!(PyArray_ISCARRAY(__pyx_v_instance) != 0)) != 0); if (__pyx_t_1) { /* "src/numpy_formathandler.pyx":132 @@ -2604,7 +2769,7 @@ static PyArrayObject *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyH * """Non-contiguous array passed""", * instance, */ - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__CopyError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__CopyError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); /* "src/numpy_formathandler.pyx":134 @@ -2639,7 +2804,7 @@ static PyArrayObject *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyH * raise CopyError( * """Array of type %r passed, required array of type %r""", */ - __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_instance), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_instance), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)__pyx_v_dtype), Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -2654,7 +2819,7 @@ static PyArrayObject *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyH * """Array of type %r passed, required array of type %r""", * instance.dtype.char, dtype.char, */ - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__CopyError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__CopyError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); /* "src/numpy_formathandler.pyx":139 @@ -2664,12 +2829,12 @@ static PyArrayObject *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyH * ) * # okay, so just return... */ - __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_instance), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_instance), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__char); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__char); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_dtype), __pyx_n_s__char); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dtype), __pyx_n_s__char); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); @@ -2715,9 +2880,9 @@ static PyArrayObject *__pyx_f_17OpenGL_accelerate_19numpy_formathandler_12NumpyH * # TODO: make sure there's no way to segfault here * Py_INCREF( dtype ) */ - __pyx_t_1 = (!PyArray_ISCARRAY(__pyx_v_instance)); + __pyx_t_1 = (!(PyArray_ISCARRAY(__pyx_v_instance) != 0)); if (!__pyx_t_1) { - __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_instance), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_instance), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)__pyx_v_dtype), Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -3043,7 +3208,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P * * cdef int copy_shape, i, ndim */ - __pyx_t_1 = (__pyx_v_info == NULL); + __pyx_t_1 = ((__pyx_v_info == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; @@ -3085,7 +3250,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P * copy_shape = 1 * else: */ - __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t))); + __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "numpy.pxd":209 @@ -3118,7 +3283,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") */ - __pyx_t_1 = ((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS); + __pyx_t_1 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); if (__pyx_t_1) { /* "numpy.pxd":214 @@ -3128,7 +3293,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P * raise ValueError(u"ndarray is not C contiguous") * */ - __pyx_t_2 = (!PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS)); + __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS) != 0)) != 0); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; @@ -3158,7 +3323,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") */ - __pyx_t_3 = ((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS); + __pyx_t_3 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); if (__pyx_t_3) { /* "numpy.pxd":218 @@ -3168,7 +3333,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P * raise ValueError(u"ndarray is not Fortran contiguous") * */ - __pyx_t_1 = (!PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS)); + __pyx_t_1 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0); __pyx_t_2 = __pyx_t_1; } else { __pyx_t_2 = __pyx_t_3; @@ -3216,7 +3381,8 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ - if (__pyx_v_copy_shape) { + __pyx_t_2 = (__pyx_v_copy_shape != 0); + if (__pyx_t_2) { /* "numpy.pxd":226 * # Allocate new buffer for strides and shape info. @@ -3314,7 +3480,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P * * cdef int t */ - __pyx_v_info->readonly = (!PyArray_ISWRITEABLE(__pyx_v_self)); + __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); /* "numpy.pxd":239 * @@ -3353,9 +3519,9 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P * # do not call releasebuffer * info.obj = None */ - __pyx_t_2 = (!__pyx_v_hasfields); + __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_2) { - __pyx_t_3 = (!__pyx_v_copy_shape); + __pyx_t_3 = ((!(__pyx_v_copy_shape != 0)) != 0); __pyx_t_1 = __pyx_t_3; } else { __pyx_t_1 = __pyx_t_2; @@ -3400,7 +3566,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or */ - __pyx_t_1 = (!__pyx_v_hasfields); + __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_1) { /* "numpy.pxd":254 @@ -3420,9 +3586,9 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ - __pyx_t_1 = (__pyx_v_descr->byteorder == '>'); + __pyx_t_1 = ((__pyx_v_descr->byteorder == '>') != 0); if (__pyx_t_1) { - __pyx_t_2 = __pyx_v_little_endian; + __pyx_t_2 = (__pyx_v_little_endian != 0); } else { __pyx_t_2 = __pyx_t_1; } @@ -3435,9 +3601,9 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" */ - __pyx_t_1 = (__pyx_v_descr->byteorder == '<'); + __pyx_t_1 = ((__pyx_v_descr->byteorder == '<') != 0); if (__pyx_t_1) { - __pyx_t_3 = (!__pyx_v_little_endian); + __pyx_t_3 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_7 = __pyx_t_3; } else { __pyx_t_7 = __pyx_t_1; @@ -3464,227 +3630,202 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P } __pyx_L12:; - /* "numpy.pxd":258 + /* "numpy.pxd":274 + * elif t == NPY_CDOUBLE: f = "Zd" + * elif t == NPY_CLONGDOUBLE: f = "Zg" + * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< + * else: + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) + */ + switch (__pyx_v_t) { + + /* "numpy.pxd":258 * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" */ - __pyx_t_1 = (__pyx_v_t == NPY_BYTE); - if (__pyx_t_1) { + case NPY_BYTE: __pyx_v_f = __pyx_k__b; - goto __pyx_L13; - } + break; - /* "numpy.pxd":259 + /* "numpy.pxd":259 * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" */ - __pyx_t_1 = (__pyx_v_t == NPY_UBYTE); - if (__pyx_t_1) { + case NPY_UBYTE: __pyx_v_f = __pyx_k__B; - goto __pyx_L13; - } + break; - /* "numpy.pxd":260 + /* "numpy.pxd":260 * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" */ - __pyx_t_1 = (__pyx_v_t == NPY_SHORT); - if (__pyx_t_1) { + case NPY_SHORT: __pyx_v_f = __pyx_k__h; - goto __pyx_L13; - } + break; - /* "numpy.pxd":261 + /* "numpy.pxd":261 * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" */ - __pyx_t_1 = (__pyx_v_t == NPY_USHORT); - if (__pyx_t_1) { + case NPY_USHORT: __pyx_v_f = __pyx_k__H; - goto __pyx_L13; - } + break; - /* "numpy.pxd":262 + /* "numpy.pxd":262 * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" */ - __pyx_t_1 = (__pyx_v_t == NPY_INT); - if (__pyx_t_1) { + case NPY_INT: __pyx_v_f = __pyx_k__i; - goto __pyx_L13; - } + break; - /* "numpy.pxd":263 + /* "numpy.pxd":263 * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" */ - __pyx_t_1 = (__pyx_v_t == NPY_UINT); - if (__pyx_t_1) { + case NPY_UINT: __pyx_v_f = __pyx_k__I; - goto __pyx_L13; - } + break; - /* "numpy.pxd":264 + /* "numpy.pxd":264 * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" */ - __pyx_t_1 = (__pyx_v_t == NPY_LONG); - if (__pyx_t_1) { + case NPY_LONG: __pyx_v_f = __pyx_k__l; - goto __pyx_L13; - } + break; - /* "numpy.pxd":265 + /* "numpy.pxd":265 * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" */ - __pyx_t_1 = (__pyx_v_t == NPY_ULONG); - if (__pyx_t_1) { + case NPY_ULONG: __pyx_v_f = __pyx_k__L; - goto __pyx_L13; - } + break; - /* "numpy.pxd":266 + /* "numpy.pxd":266 * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" */ - __pyx_t_1 = (__pyx_v_t == NPY_LONGLONG); - if (__pyx_t_1) { + case NPY_LONGLONG: __pyx_v_f = __pyx_k__q; - goto __pyx_L13; - } + break; - /* "numpy.pxd":267 + /* "numpy.pxd":267 * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" */ - __pyx_t_1 = (__pyx_v_t == NPY_ULONGLONG); - if (__pyx_t_1) { + case NPY_ULONGLONG: __pyx_v_f = __pyx_k__Q; - goto __pyx_L13; - } + break; - /* "numpy.pxd":268 + /* "numpy.pxd":268 * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" */ - __pyx_t_1 = (__pyx_v_t == NPY_FLOAT); - if (__pyx_t_1) { + case NPY_FLOAT: __pyx_v_f = __pyx_k__f; - goto __pyx_L13; - } + break; - /* "numpy.pxd":269 + /* "numpy.pxd":269 * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" */ - __pyx_t_1 = (__pyx_v_t == NPY_DOUBLE); - if (__pyx_t_1) { + case NPY_DOUBLE: __pyx_v_f = __pyx_k__d; - goto __pyx_L13; - } + break; - /* "numpy.pxd":270 + /* "numpy.pxd":270 * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" */ - __pyx_t_1 = (__pyx_v_t == NPY_LONGDOUBLE); - if (__pyx_t_1) { + case NPY_LONGDOUBLE: __pyx_v_f = __pyx_k__g; - goto __pyx_L13; - } + break; - /* "numpy.pxd":271 + /* "numpy.pxd":271 * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" */ - __pyx_t_1 = (__pyx_v_t == NPY_CFLOAT); - if (__pyx_t_1) { + case NPY_CFLOAT: __pyx_v_f = __pyx_k__Zf; - goto __pyx_L13; - } + break; - /* "numpy.pxd":272 + /* "numpy.pxd":272 * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" */ - __pyx_t_1 = (__pyx_v_t == NPY_CDOUBLE); - if (__pyx_t_1) { + case NPY_CDOUBLE: __pyx_v_f = __pyx_k__Zd; - goto __pyx_L13; - } + break; - /* "numpy.pxd":273 + /* "numpy.pxd":273 * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< * elif t == NPY_OBJECT: f = "O" * else: */ - __pyx_t_1 = (__pyx_v_t == NPY_CLONGDOUBLE); - if (__pyx_t_1) { + case NPY_CLONGDOUBLE: __pyx_v_f = __pyx_k__Zg; - goto __pyx_L13; - } + break; - /* "numpy.pxd":274 + /* "numpy.pxd":274 * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) */ - __pyx_t_1 = (__pyx_v_t == NPY_OBJECT); - if (__pyx_t_1) { + case NPY_OBJECT: __pyx_v_f = __pyx_k__O; - goto __pyx_L13; - } - /*else*/ { + break; + default: /* "numpy.pxd":276 * elif t == NPY_OBJECT: f = "O" @@ -3709,8 +3850,8 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + break; } - __pyx_L13:; /* "numpy.pxd":277 * else: @@ -3834,7 +3975,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ - __pyx_t_1 = PyArray_HASFIELDS(__pyx_v_self); + __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); if (__pyx_t_1) { /* "numpy.pxd":290 @@ -3856,7 +3997,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s * stdlib.free(info.strides) * # info.shape was stored after info.strides in the same block */ - __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t))); + __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "numpy.pxd":292 @@ -4287,9 +4428,9 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ - __pyx_t_7 = (__pyx_v_child->byteorder == '>'); + __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); if (__pyx_t_7) { - __pyx_t_8 = __pyx_v_little_endian; + __pyx_t_8 = (__pyx_v_little_endian != 0); } else { __pyx_t_8 = __pyx_t_7; } @@ -4302,9 +4443,9 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx * raise ValueError(u"Non-native byte order not supported") * # One could encode it in the format string and have Cython */ - __pyx_t_7 = (__pyx_v_child->byteorder == '<'); + __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); if (__pyx_t_7) { - __pyx_t_9 = (!__pyx_v_little_endian); + __pyx_t_9 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_10 = __pyx_t_9; } else { __pyx_t_10 = __pyx_t_7; @@ -4393,7 +4534,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx * t = child.type_num * if end - f < 5: */ - __pyx_t_7 = (!PyDataType_HASFIELDS(__pyx_v_child)); + __pyx_t_7 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); if (__pyx_t_7) { /* "numpy.pxd":821 @@ -4416,7 +4557,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx * raise RuntimeError(u"Format string allocated too short.") * */ - __pyx_t_7 = ((__pyx_v_end - __pyx_v_f) < 5); + __pyx_t_7 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); if (__pyx_t_7) { /* "numpy.pxd":823 @@ -4838,6 +4979,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a PyObject *__pyx_v_baseptr; __Pyx_RefNannyDeclarations int __pyx_t_1; + int __pyx_t_2; __Pyx_RefNannySetupContext("set_array_base", 0); /* "numpy.pxd":967 @@ -4848,7 +4990,8 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a * else: */ __pyx_t_1 = (__pyx_v_base == Py_None); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { /* "numpy.pxd":968 * cdef PyObject* baseptr @@ -4924,7 +5067,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py * return None * else: */ - __pyx_t_1 = (__pyx_v_arr->base == NULL); + __pyx_t_1 = ((__pyx_v_arr->base == NULL) != 0); if (__pyx_t_1) { /* "numpy.pxd":977 @@ -4965,7 +5108,7 @@ static struct __pyx_vtabstruct_17OpenGL_accelerate_19numpy_formathandler_NumpyHa static PyObject *__pyx_tp_new_17OpenGL_accelerate_19numpy_formathandler_NumpyHandler(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_17OpenGL_accelerate_19numpy_formathandler_NumpyHandler *p; PyObject *o = __pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_new(t, a, k); - if (!o) return 0; + if (unlikely(!o)) return 0; p = ((struct __pyx_obj_17OpenGL_accelerate_19numpy_formathandler_NumpyHandler *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler*)__pyx_vtabptr_17OpenGL_accelerate_19numpy_formathandler_NumpyHandler; p->array_to_gl_constant = ((PyObject*)Py_None); Py_INCREF(Py_None); @@ -5044,129 +5187,31 @@ static struct PyGetSetDef __pyx_getsets_17OpenGL_accelerate_19numpy_formathandle {0, 0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_NumpyHandler = { - 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_17OpenGL_accelerate_19numpy_formathandler_NumpyHandler = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("OpenGL_accelerate.numpy_formathandler.NumpyHandler"), /*tp_name*/ + sizeof(struct __pyx_obj_17OpenGL_accelerate_19numpy_formathandler_NumpyHandler), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_17OpenGL_accelerate_19numpy_formathandler_NumpyHandler, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ #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_NumpyHandler = { - 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_NumpyHandler = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_NumpyHandler = { - #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_17OpenGL_accelerate_19numpy_formathandler_NumpyHandler = { - PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("OpenGL_accelerate.numpy_formathandler.NumpyHandler"), /*tp_name*/ - sizeof(struct __pyx_obj_17OpenGL_accelerate_19numpy_formathandler_NumpyHandler), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_17OpenGL_accelerate_19numpy_formathandler_NumpyHandler, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 - 0, /*tp_compare*/ + 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_NumpyHandler, /*tp_as_number*/ - &__pyx_tp_as_sequence_NumpyHandler, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_NumpyHandler, /*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_NumpyHandler, /*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*/ 0, /*tp_doc*/ __pyx_tp_traverse_17OpenGL_accelerate_19numpy_formathandler_NumpyHandler, /*tp_traverse*/ __pyx_tp_clear_17OpenGL_accelerate_19numpy_formathandler_NumpyHandler, /*tp_clear*/ @@ -5244,7 +5289,9 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1}, {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1}, {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1}, + {&__pyx_n_s____import__, __pyx_k____import__, sizeof(__pyx_k____import__), 0, 0, 1, 1}, {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 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____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1}, {&__pyx_n_s___configflags, __pyx_k___configflags, sizeof(__pyx_k___configflags), 0, 0, 1, 1}, {&__pyx_n_s__a_to_gl, __pyx_k__a_to_gl, sizeof(__pyx_k__a_to_gl), 0, 0, 1, 1}, @@ -5253,8 +5300,10 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s__char, __pyx_k__char, sizeof(__pyx_k__char), 0, 0, 1, 1}, {&__pyx_n_s__ctypes, __pyx_k__ctypes, sizeof(__pyx_k__ctypes), 0, 0, 1, 1}, {&__pyx_n_s__dtype, __pyx_k__dtype, sizeof(__pyx_k__dtype), 0, 0, 1, 1}, + {&__pyx_n_s__get, __pyx_k__get, sizeof(__pyx_k__get), 0, 0, 1, 1}, {&__pyx_n_s__gl_to_a, __pyx_k__gl_to_a, sizeof(__pyx_k__gl_to_a), 0, 0, 1, 1}, {&__pyx_n_s__isOutput, __pyx_k__isOutput, sizeof(__pyx_k__isOutput), 0, 0, 1, 1}, + {&__pyx_n_s__keys, __pyx_k__keys, sizeof(__pyx_k__keys), 0, 0, 1, 1}, {&__pyx_n_s__nbytes, __pyx_k__nbytes, sizeof(__pyx_k__nbytes), 0, 0, 1, 1}, {&__pyx_n_s__ndim, __pyx_k__ndim, sizeof(__pyx_k__ndim), 0, 0, 1, 1}, {&__pyx_n_s__np, __pyx_k__np, sizeof(__pyx_k__np), 0, 0, 1, 1}, @@ -5268,10 +5317,10 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; @@ -5372,6 +5421,9 @@ PyMODINIT_FUNC PyInit_numpy_formathandler(void) { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); @@ -5409,6 +5461,8 @@ PyMODINIT_FUNC PyInit_numpy_formathandler(void) __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __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;} @@ -5424,6 +5478,9 @@ PyMODINIT_FUNC PyInit_numpy_formathandler(void) 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_OpenGL_accelerate__numpy_formathandler) { 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;}; } @@ -5487,13 +5544,9 @@ PyMODINIT_FUNC PyInit_numpy_formathandler(void) __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__ctypes), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __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__c_void_p); - if (__pyx_t_1 == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__c_void_p); - if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__c_void_p); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__c_void_p, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__c_void_p, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -5506,7 +5559,7 @@ PyMODINIT_FUNC PyInit_numpy_formathandler(void) */ __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__np, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/numpy_formathandler.pyx":6 @@ -5518,11 +5571,11 @@ PyMODINIT_FUNC PyInit_numpy_formathandler(void) */ __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__traceback), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__traceback, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__traceback, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__weakref), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__weakref, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__weakref, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/numpy_formathandler.pyx":7 @@ -5540,13 +5593,9 @@ PyMODINIT_FUNC PyInit_numpy_formathandler(void) __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s_22), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__CopyError); - if (__pyx_t_2 == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__CopyError); - if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s__CopyError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__CopyError, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__CopyError, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -5568,21 +5617,13 @@ PyMODINIT_FUNC PyInit_numpy_formathandler(void) __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_23), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __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__bytes); - if (__pyx_t_1 == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__bytes); - if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__bytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__bytes, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__bytes, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__unicode); - if (__pyx_t_1 == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__unicode); - if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__unicode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__unicode, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__unicode, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -5629,7 +5670,7 @@ PyMODINIT_FUNC PyInit_numpy_formathandler(void) */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_2)) < 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_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; /* "numpy.pxd":975 @@ -5675,17 +5716,15 @@ static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { } #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; } @@ -5829,6 +5868,19 @@ static void __Pyx_RaiseArgtupleInvalid( (num_expected == 1) ? "" : "s", num_found); } +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Format(PyExc_ImportError, + #if PY_MAJOR_VERSION < 3 + "cannot import name %.230s", PyString_AS_STRING(name)); + #else + "cannot import name %S", name); + #endif + } + return value; +} + static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; @@ -5898,24 +5950,23 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, } 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); @@ -5953,8 +6004,7 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; - } - else + } else args = PyTuple_Pack(1, value); if (!args) goto bad; @@ -5975,18 +6025,22 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject "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"); @@ -6010,6 +6064,23 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject } #endif +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 int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_Format(PyExc_SystemError, "Missing type object"); @@ -6079,6 +6150,39 @@ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) return -1; } +static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { + PyObject* value; +#if PY_MAJOR_VERSION >= 3 + value = PyDict_GetItemWithError(d, key); + if (unlikely(!value)) { + if (unlikely(PyErr_Occurred())) + return NULL; + value = default_value; + } + Py_INCREF(value); +#else + if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) { + value = PyDict_GetItem(d, key); + if (unlikely(!value)) { + value = default_value; + } + Py_INCREF(value); + } else { + if (default_value == Py_None) + default_value = NULL; + value = PyObject_CallMethodObjArgs( + d, __pyx_n_s__get, key, default_value, NULL); + } +#endif + return value; +} + +#if PY_MAJOR_VERSION >= 3 +static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d) { + return PyObject_CallMethodObjArgs(d, __pyx_n_s__keys, NULL); +} +#endif + static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); @@ -6170,6 +6274,42 @@ static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) { type->tp_clear(obj); } +static void* __Pyx_GetVtable(PyObject *dict) { + void* ptr; + PyObject *ob = PyObject_GetItem(dict, __pyx_n_s____pyx_vtable__); + if (!ob) + goto bad; +#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) + ptr = PyCapsule_GetPointer(ob, 0); +#else + ptr = PyCObject_AsVoidPtr(ob); +#endif + if (!ptr && !PyErr_Occurred()) + PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); + Py_DECREF(ob); + return ptr; +bad: + Py_XDECREF(ob); + return NULL; +} + +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 CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); @@ -6208,8 +6348,8 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 - PyObject *py_import = 0; - py_import = __Pyx_GetAttrString(__pyx_b, "__import__"); + PyObject *py_import; + py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s____import__); if (!py_import) goto bad; #endif @@ -6283,15 +6423,6 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { return module; } -static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name) { -#if PY_MAJOR_VERSION < 3 - PyErr_Format(PyExc_ImportError, "cannot import name %.230s", - PyString_AsString(name)); -#else - PyErr_Format(PyExc_ImportError, "cannot import name %S", name); -#endif -} - #if CYTHON_CCOMPLEX #ifdef __cplusplus static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { @@ -6722,10 +6853,15 @@ static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) { 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)) { @@ -6738,6 +6874,16 @@ static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { #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"); @@ -6745,6 +6891,17 @@ static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { } 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 { @@ -6757,10 +6914,15 @@ static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { } } +#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)) { @@ -6773,6 +6935,16 @@ static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObje #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"); @@ -6780,6 +6952,17 @@ static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObje } 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 { @@ -6792,10 +6975,15 @@ static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObje } } +#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)) { @@ -6808,6 +6996,16 @@ static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { #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"); @@ -6815,6 +7013,17 @@ static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { } 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 { @@ -6827,10 +7036,15 @@ static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { } } +#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)) { @@ -6843,6 +7057,16 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { #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"); @@ -6850,6 +7074,17 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { } 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 { @@ -6862,10 +7097,15 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { } } +#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)) { @@ -6878,6 +7118,16 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { #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"); @@ -6885,6 +7135,17 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { } 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 { @@ -6897,10 +7158,15 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { } } +#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)) { @@ -6913,6 +7179,16 @@ static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* #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"); @@ -6920,6 +7196,17 @@ static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* } 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 { @@ -7036,42 +7323,6 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class } #endif -static void* __Pyx_GetVtable(PyObject *dict) { - void* ptr; - PyObject *ob = PyMapping_GetItemString(dict, (char *)"__pyx_vtable__"); - if (!ob) - goto bad; -#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) - ptr = PyCapsule_GetPointer(ob, 0); -#else - ptr = PyCObject_AsVoidPtr(ob); -#endif - if (!ptr && !PyErr_Occurred()) - PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); - Py_DECREF(ob); - return ptr; -bad: - Py_XDECREF(ob); - return NULL; -} - -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) { @@ -7264,6 +7515,65 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { return 0; } +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; @@ -7273,14 +7583,14 @@ 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); @@ -7296,7 +7606,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { } #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)) { @@ -7337,11 +7647,10 @@ static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { } 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; diff --git a/OpenGL_accelerate/src/vbo.c b/OpenGL_accelerate/src/vbo.c index 2fb8aee9..b4bc00fb 100644 --- a/OpenGL_accelerate/src/vbo.c +++ b/OpenGL_accelerate/src/vbo.c @@ -1,6 +1,18 @@ -/* Generated by Cython 0.18 on Mon Apr 15 22:37:35 2013 */ +/* Generated by Cython 0.19.1 on Thu Jul 11 00:05:41 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. @@ -116,6 +128,9 @@ #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)) ? \ @@ -155,6 +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) @@ -227,6 +250,40 @@ #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 @@ -259,17 +316,6 @@ #define CYTHON_WITHOUT_ASSERTIONS #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_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) @@ -283,10 +329,44 @@ # define CYTHON_UNUSED # endif #endif -typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ - -#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s) -#define __Pyx_PyBytes_AsUString(s) ((unsigned char*) PyBytes_AsString(s)) +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*/ + +#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*); @@ -300,6 +380,78 @@ static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #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__ @@ -315,8 +467,9 @@ static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #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; @@ -554,7 +707,22 @@ static struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBOOffset *__pyx_vtabptr #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) -static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ +#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_GetBuiltinName(PyObject *name); /*proto*/ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ @@ -565,137 +733,79 @@ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ 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 PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /*proto*/ + +static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ + +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); /*proto*/ + static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ +static void __Pyx_WriteUnraisable(const char *name, int clineno, + int lineno, const char *filename); /*proto*/ -static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { - PyObject *r; - if (!j) return NULL; - r = PyObject_GetItem(o, j); - Py_DECREF(j); - return r; -} -#define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \ - __Pyx_GetItemInt_List_Fast(o, i) : \ - __Pyx_GetItemInt_Generic(o, to_py_func(i))) -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) { -#if CYTHON_COMPILING_IN_CPYTHON - if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { - PyObject *r = PyList_GET_ITEM(o, i); - Py_INCREF(r); - return r; - } - else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) { - PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i); - Py_INCREF(r); - return r; - } - return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); -#else - return PySequence_GetItem(o, i); -#endif -} -#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \ - __Pyx_GetItemInt_Tuple_Fast(o, i) : \ - __Pyx_GetItemInt_Generic(o, to_py_func(i))) -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) { #if CYTHON_COMPILING_IN_CPYTHON - if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { - PyObject *r = PyTuple_GET_ITEM(o, i); - Py_INCREF(r); - return r; - } - else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) { - PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i); - Py_INCREF(r); - return r; +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 __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); -#else - return PySequence_GetItem(o, i); -#endif + return PyList_Append(list, x); } -#define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \ - __Pyx_GetItemInt_Fast(o, i) : \ - __Pyx_GetItemInt_Generic(o, to_py_func(i))) -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) { -#if CYTHON_COMPILING_IN_CPYTHON - if (PyList_CheckExact(o)) { - Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); - if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) { - PyObject *r = PyList_GET_ITEM(o, n); - Py_INCREF(r); - return r; - } - } - else if (PyTuple_CheckExact(o)) { - Py_ssize_t n = (likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); - if (likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { - PyObject *r = PyTuple_GET_ITEM(o, n); - Py_INCREF(r); - return r; - } - } else { /* inlined PySequence_GetItem() */ - PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; - if (likely(m && m->sq_item)) { - if (unlikely(i < 0) && likely(m->sq_length)) { - Py_ssize_t l = m->sq_length(o); - if (unlikely(l < 0)) return NULL; - i += l; - } - return m->sq_item(o, i); - } - } #else - if (PySequence_Check(o)) { - return PySequence_GetItem(o, i); - } +#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif - return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); -} -static PyObject* __Pyx_PyObject_PopIndex(PyObject* L, Py_ssize_t ix) { - PyObject *r, *m, *t, *py_ix; -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02040000 - if (likely(PyList_CheckExact(L))) { - Py_ssize_t size = PyList_GET_SIZE(L); - if (likely(size > (((PyListObject*)L)->allocated >> 1))) { - if (ix < 0) { - ix += size; - } - if (likely(0 <= ix && ix < size)) { - PyObject* v = PyList_GET_ITEM(L, ix); - Py_SIZE(L) -= 1; - size -= 1; - memmove(&PyList_GET_ITEM(L, ix), &PyList_GET_ITEM(L, ix+1), (size-ix)*sizeof(PyObject*)); - return v; - } - } - } -#endif - py_ix = t = NULL; - m = __Pyx_GetAttrString(L, "pop"); - if (!m) goto bad; - py_ix = PyInt_FromSsize_t(ix); - if (!py_ix) goto bad; - t = PyTuple_New(1); - if (!t) goto bad; - PyTuple_SET_ITEM(t, 0, py_ix); - py_ix = NULL; - r = PyObject_CallObject(m, t); - Py_DECREF(m); - Py_DECREF(t); - return r; +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ + +#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 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_XDECREF(m); - Py_XDECREF(t); - Py_XDECREF(py_ix); - return NULL; + 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)) + +static PyObject* __Pyx_PyObject_PopIndex(PyObject* L, Py_ssize_t ix); /*proto*/ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); @@ -718,13 +828,17 @@ static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, trav static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc); +static void* __Pyx_GetVtable(PyObject *dict); /*proto*/ + +static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ + +static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name); /*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, int level); /*proto*/ -static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name); - static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); @@ -757,13 +871,8 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); -static void __Pyx_WriteUnraisable(const char *name, int clineno, - int lineno, const char *filename); /*proto*/ - static int __Pyx_check_binary_version(void); -static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ - #if !defined(__Pyx_PyIdentifier_FromString) #if PY_MAJOR_VERSION < 3 #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) @@ -776,8 +885,6 @@ static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /*proto*/ -static void* __Pyx_GetVtable(PyObject *dict); /*proto*/ - typedef struct { int code_line; PyCodeObject* code_object; @@ -802,10 +909,10 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler = 0; /* Module declarations from 'OpenGL_accelerate.vbo' */ -static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_3vbo_VBO = 0; +static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_3vbo_VBOOffsetHandler = 0; static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_3vbo_VBOOffset = 0; +static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_3vbo_VBO = 0; static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_3vbo_VBOHandler = 0; -static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_3vbo_VBOOffsetHandler = 0; #define __Pyx_MODULE_NAME "OpenGL_accelerate.vbo" int __pyx_module_is_main_OpenGL_accelerate__vbo = 0; @@ -880,6 +987,10 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_6offset___get__(st static int __pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_6offset_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_17OpenGL_accelerate_3vbo_10VBOHandler___init__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *__pyx_v_self); /* proto */ static int __pyx_pf_17OpenGL_accelerate_3vbo_16VBOOffsetHandler___init__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *__pyx_v_self); /* proto */ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_3vbo_VBOOffsetHandler(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_3vbo_VBOOffset(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_3vbo_VBO(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_3vbo_VBOHandler(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static char __pyx_k_1[] = "OpenGL.arrays.arraydatatype"; static char __pyx_k_2[] = "OpenGL.arrays.vbo"; static char __pyx_k_3[] = "Don't know how to map stepped arrays yet"; @@ -937,6 +1048,7 @@ static char __pyx_k__arraySize[] = "arraySize"; static char __pyx_k__copy_data[] = "copy_data"; static char __pyx_k__ValueError[] = "ValueError"; static char __pyx_k___DELETERS_[] = "_DELETERS_"; +static char __pyx_k____import__[] = "__import__"; static char __pyx_k___no_cache_[] = "_no_cache_"; static char __pyx_k__dimensions[] = "dimensions"; static char __pyx_k__RuntimeError[] = "RuntimeError"; @@ -947,6 +1059,7 @@ static char __pyx_k__ArrayDatatype[] = "ArrayDatatype"; static char __pyx_k__arrayToGLType[] = "arrayToGLType"; static char __pyx_k__AttributeError[] = "AttributeError"; static char __pyx_k__NotImplemented[] = "NotImplemented"; +static char __pyx_k____pyx_vtable__[] = "__pyx_vtable__"; static char __pyx_k___copy_segments[] = "_copy_segments"; static char __pyx_k__arrayByteCount[] = "arrayByteCount"; static char __pyx_k__create_buffers[] = "create_buffers"; @@ -983,7 +1096,9 @@ static PyObject *__pyx_n_s___DELETERS_; static PyObject *__pyx_n_s___I_; static PyObject *__pyx_n_s___NULL; static PyObject *__pyx_n_s____enter__; +static PyObject *__pyx_n_s____import__; static PyObject *__pyx_n_s____main__; +static PyObject *__pyx_n_s____pyx_vtable__; static PyObject *__pyx_n_s____test__; static PyObject *__pyx_n_s___copy_segments; static PyObject *__pyx_n_s___no_cache_; @@ -1054,6 +1169,9 @@ static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_1__init__(PyObject *__pyx_v_se PyObject *__pyx_v_usage = 0; PyObject *__pyx_v_target = 0; PyObject *__pyx_v_size = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -1168,11 +1286,7 @@ static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO___init__(struct __pyx_obj_17Op __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_1), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __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__ArrayDatatype); - if (__pyx_t_1 == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__ArrayDatatype); - if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__ArrayDatatype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_v_ArrayDatatype = __pyx_t_1; @@ -1301,7 +1415,8 @@ static void __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_3__dealloc__(PyObject *__pyx_ static void __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_2__dealloc__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "src/vbo.pyx":90 @@ -1312,7 +1427,8 @@ static void __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_2__dealloc__(struct __pyx_obj * self.data = None */ __pyx_t_1 = (__pyx_v_self->data != Py_None); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { /* "src/vbo.pyx":91 * """Deallocate our references""" @@ -1321,10 +1437,10 @@ static void __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_2__dealloc__(struct __pyx_obj * self.data = None * @property */ - __pyx_t_2 = __pyx_v_self->data; - __Pyx_INCREF(__pyx_t_2); - Py_XDECREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = __pyx_v_self->data; + __Pyx_INCREF(__pyx_t_3); + Py_XDECREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/vbo.pyx":92 * if self.data is not None: @@ -1413,8 +1529,9 @@ static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_3VBO_get_implementation(struct 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; @@ -1428,7 +1545,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_3VBO_get_implementation(struct * self._I_ = get_implementation() */ __pyx_t_1 = (__pyx_v_self->_I_ == Py_None); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { /* "src/vbo.pyx":100 * """C-level implementation retrieval""" @@ -1437,24 +1555,20 @@ static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_3VBO_get_implementation(struct * self._I_ = get_implementation() * return self._I_ */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_n_s__get_implementation)); - PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__get_implementation)); + PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__get_implementation)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__get_implementation)); - __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s_2), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_Import(((PyObject *)__pyx_n_s_2), ((PyObject *)__pyx_t_3), -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s__get_implementation); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__get_implementation); - if (__pyx_t_2 == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__get_implementation); - if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } - __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_t_2); - __pyx_v_get_implementation = __pyx_t_2; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_INCREF(__pyx_t_3); + __pyx_v_get_implementation = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "src/vbo.pyx":101 * if self._I_ is None: @@ -1463,13 +1577,13 @@ static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_3VBO_get_implementation(struct * return self._I_ * cdef unsigned int c_resolve( self, value ): */ - __pyx_t_3 = PyObject_Call(__pyx_v_get_implementation, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_4 = PyObject_Call(__pyx_v_get_implementation, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->_I_); __Pyx_DECREF(__pyx_v_self->_I_); - __pyx_v_self->_I_ = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_v_self->_I_ = __pyx_t_4; + __pyx_t_4 = 0; goto __pyx_L3; } __pyx_L3:; @@ -1489,8 +1603,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_3VBO_get_implementation(struct __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("OpenGL_accelerate.vbo.VBO.get_implementation", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -1515,8 +1629,9 @@ static unsigned int __pyx_f_17OpenGL_accelerate_3vbo_3VBO_c_resolve(struct __pyx PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; - PyObject *__pyx_t_5 = NULL; - unsigned int __pyx_t_6; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + unsigned int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -1529,9 +1644,9 @@ static unsigned int __pyx_f_17OpenGL_accelerate_3vbo_3VBO_c_resolve(struct __pyx * return getattr( * self.get_implementation(), */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__bytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__bytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__unicode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__unicode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); @@ -1543,7 +1658,8 @@ static unsigned int __pyx_f_17OpenGL_accelerate_3vbo_3VBO_c_resolve(struct __pyx __pyx_t_2 = 0; __pyx_t_4 = PyObject_IsInstance(__pyx_v_value, ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - if (__pyx_t_4) { + __pyx_t_5 = (__pyx_t_4 != 0); + if (__pyx_t_5) { /* "src/vbo.pyx":107 * if isinstance( value, (bytes,unicode)): @@ -1564,7 +1680,7 @@ static unsigned int __pyx_f_17OpenGL_accelerate_3vbo_3VBO_c_resolve(struct __pyx */ __pyx_t_2 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self->__pyx_vtab)->get_implementation(__pyx_v_self); 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 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__basename); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__basename); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_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 = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -1572,17 +1688,17 @@ static unsigned int __pyx_f_17OpenGL_accelerate_3vbo_3VBO_c_resolve(struct __pyx __Pyx_INCREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); - __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetAttr(__pyx_t_3, __pyx_t_6); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_6 = __Pyx_PyInt_AsUnsignedInt(__pyx_t_2); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = __Pyx_PyInt_AsUnsignedInt(__pyx_t_2); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) {__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_r = __pyx_t_6; + __pyx_r = __pyx_t_7; goto __pyx_L0; goto __pyx_L3; } @@ -1595,8 +1711,8 @@ static unsigned int __pyx_f_17OpenGL_accelerate_3vbo_3VBO_c_resolve(struct __pyx * def set_array( self, data, size=None ): * """Update our entire array with new data""" */ - __pyx_t_6 = __Pyx_PyInt_AsUnsignedInt(__pyx_v_value); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = __pyx_t_6; + __pyx_t_7 = __Pyx_PyInt_AsUnsignedInt(__pyx_v_value); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_t_7; goto __pyx_L0; __pyx_r = 0; @@ -1605,7 +1721,7 @@ static unsigned int __pyx_f_17OpenGL_accelerate_3vbo_3VBO_c_resolve(struct __pyx __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __Pyx_WriteUnraisable("OpenGL_accelerate.vbo.VBO.c_resolve", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -1619,6 +1735,9 @@ static char __pyx_doc_17OpenGL_accelerate_3vbo_3VBO_6set_array[] = "Update our e static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_7set_array(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_data = 0; PyObject *__pyx_v_size = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_array (wrapper)", 0); @@ -1728,8 +1847,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_3VBO_c_set_array(struct __pyx_ PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - int __pyx_t_3; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; @@ -1748,7 +1867,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_3VBO_c_set_array(struct __pyx_ * Py_XINCREF( data ) */ __pyx_t_1 = (__pyx_v_self->data != Py_None); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { /* "src/vbo.pyx":117 * """Set our array pointer with incref/decref support""" @@ -1757,10 +1877,10 @@ static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_3VBO_c_set_array(struct __pyx_ * Py_XINCREF( data ) * self.data = data */ - __pyx_t_2 = __pyx_v_self->data; - __Pyx_INCREF(__pyx_t_2); - Py_XDECREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = __pyx_v_self->data; + __Pyx_INCREF(__pyx_t_3); + Py_XDECREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; @@ -1794,12 +1914,12 @@ static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_3VBO_c_set_array(struct __pyx_ * size = self.arrayType.arrayByteCount( self.data ) * self.size = size */ - __pyx_t_1 = (__pyx_v_size == Py_None); - if (__pyx_t_1) { - __pyx_t_3 = (__pyx_v_self->data != Py_None); - __pyx_t_4 = __pyx_t_3; + __pyx_t_2 = (__pyx_v_size == Py_None); + if ((__pyx_t_2 != 0)) { + __pyx_t_1 = (__pyx_v_self->data != Py_None); + __pyx_t_4 = (__pyx_t_1 != 0); } else { - __pyx_t_4 = __pyx_t_1; + __pyx_t_4 = (__pyx_t_2 != 0); } if (__pyx_t_4) { @@ -1810,16 +1930,16 @@ static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_3VBO_c_set_array(struct __pyx_ * self.size = size * self.copied = False */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->arrayType, __pyx_n_s__arrayByteCount); 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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s__arrayByteCount); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_self->data); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self->data); __Pyx_GIVEREF(__pyx_v_self->data); - __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_v_size); __pyx_v_size = __pyx_t_6; @@ -1850,7 +1970,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_3VBO_c_set_array(struct __pyx_ __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_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.c_set_array", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -1912,12 +2032,12 @@ static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_8__setitem__(struct __pyx_obj_ * raise NotImplemented( """Don't know how to map stepped arrays yet""" ) * # TODO: handle e.g. mapping character data into an integer data-set */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_slice, __pyx_n_s__step); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_slice, __pyx_n_s__step); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - __pyx_t_1 = PyObject_GetAttr(__pyx_v_slice, __pyx_n_s__step); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_slice, __pyx_n_s__step); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -1953,7 +2073,7 @@ static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_8__setitem__(struct __pyx_obj_ * start = (slice.start or 0) * stop = (slice.stop or len(self.data)) */ - __pyx_t_3 = PyObject_GetAttr(__pyx_v_self->arrayType, __pyx_n_s__asArray); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s__asArray); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); @@ -1974,7 +2094,7 @@ static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_8__setitem__(struct __pyx_obj_ * stop = (slice.stop or len(self.data)) * if start < 0: */ - __pyx_t_6 = PyObject_GetAttr(__pyx_v_slice, __pyx_n_s__start); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_slice, __pyx_n_s__start); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_4) { @@ -1995,7 +2115,7 @@ static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_8__setitem__(struct __pyx_obj_ * if start < 0: * start += len(self.data) */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_slice, __pyx_n_s__stop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_slice, __pyx_n_s__stop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_4) { @@ -2155,10 +2275,10 @@ static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_8__setitem__(struct __pyx_obj_ * if start-stop != len(data): * self.copied = False */ - if (__pyx_v_self->copied) { - __pyx_t_4 = __pyx_v_self->created; + if ((__pyx_v_self->copied != 0)) { + __pyx_t_4 = (__pyx_v_self->created != 0); } else { - __pyx_t_4 = __pyx_v_self->copied; + __pyx_t_4 = (__pyx_v_self->copied != 0); } if (__pyx_t_4) { @@ -2233,7 +2353,8 @@ static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_8__setitem__(struct __pyx_obj_ * # structure of the array we're going to copy into and make */ __pyx_t_7 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__pyx_t_7) { + __pyx_t_4 = (__pyx_t_7 != 0); + if (__pyx_t_4) { /* "src/vbo.pyx":166 * @@ -2242,7 +2363,7 @@ static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_8__setitem__(struct __pyx_obj_ * #baseSize = self.arrayType.unitSize( data ) * # now create the start and distance values... */ - __pyx_t_3 = PyObject_GetAttr(__pyx_v_self->arrayType, __pyx_n_s__arrayByteCount); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s__arrayByteCount); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); @@ -2321,7 +2442,7 @@ static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_8__setitem__(struct __pyx_obj_ PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); __pyx_t_3 = 0; - __pyx_t_8 = PyList_Append(__pyx_v_self->_copy_segments, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_self->_copy_segments, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; goto __pyx_L7; } @@ -2502,7 +2623,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_12__getattr__(struct __p __pyx_t_5 = __pyx_t_3; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __pyx_t_5; + __pyx_t_3 = (__pyx_t_5 != 0); if (__pyx_t_3) { /* "src/vbo.pyx":179 @@ -2515,7 +2636,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_12__getattr__(struct __p __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_v_self->data; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; @@ -2600,7 +2721,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_14__int__(struct __pyx_o * self.create_buffers() * return self.buffer */ - __pyx_t_1 = (!__pyx_v_self->buffer); + __pyx_t_1 = ((!(__pyx_v_self->buffer != 0)) != 0); if (__pyx_t_1) { /* "src/vbo.pyx":185 @@ -2610,7 +2731,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_14__int__(struct __pyx_o * return self.buffer * def create_buffers( self ): */ - __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__create_buffers); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__create_buffers); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __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[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); @@ -2695,7 +2816,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_16create_buffers(struct * try: */ #ifndef CYTHON_WITHOUT_ASSERTIONS - if (unlikely(!(!__pyx_v_self->created))) { + if (unlikely(!((!(__pyx_v_self->created != 0)) != 0))) { PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_5)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } @@ -2710,7 +2831,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_16create_buffers(struct */ __pyx_t_1 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self->__pyx_vtab)->get_implementation(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__glGenBuffers); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__glGenBuffers); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __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_k_tuple_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -2784,7 +2905,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_16create_buffers(struct * self.target = self.c_resolve( self.target_spec ) * self.usage = self.c_resolve( self.usage_spec ) */ - __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_buffers, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_buffers, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = __Pyx_PyInt_AsUnsignedInt(__pyx_t_9); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -2860,9 +2981,9 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_16create_buffers(struct * # Cython instances can't have weakrefs, sigh... * self, */ - __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__weakref); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__weakref); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_1 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__ref); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__ref); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -2875,7 +2996,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_16create_buffers(struct */ __pyx_t_8 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self->__pyx_vtab)->get_implementation(__pyx_v_self); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__deleter); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__deleter); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyLong_FromUnsignedLong(__pyx_v_self->buffer); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -2927,7 +3048,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_16create_buffers(struct */ __pyx_t_8 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self->__pyx_vtab)->get_implementation(__pyx_v_self); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_1 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s___DELETERS_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s___DELETERS_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -3022,7 +3143,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_18copy_data(struct __pyx * if self._copy_segments: */ #ifndef CYTHON_WITHOUT_ASSERTIONS - if (unlikely(!__pyx_v_self->created)) { + if (unlikely(!(__pyx_v_self->created != 0))) { PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_7)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } @@ -3035,7 +3156,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_18copy_data(struct __pyx * if self._copy_segments: * while self._copy_segments: */ - if (__pyx_v_self->copied) { + __pyx_t_1 = (__pyx_v_self->copied != 0); + if (__pyx_t_1) { /* "src/vbo.pyx":208 * assert self.created, """Should do create_buffers before copy_data""" @@ -3142,7 +3264,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_18copy_data(struct __pyx * self.get_implementation().glBufferSubData(self.target, start, size, dataptr) * else: */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->arrayType, __pyx_n_s__voidDataPointer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s__voidDataPointer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); @@ -3166,7 +3288,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_18copy_data(struct __pyx */ __pyx_t_4 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self->__pyx_vtab)->get_implementation(__pyx_v_self); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__glBufferSubData); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__glBufferSubData); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -3205,7 +3327,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_18copy_data(struct __pyx */ __pyx_t_2 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self->__pyx_vtab)->get_implementation(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__glBufferData); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__glBufferData); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -3301,14 +3423,15 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_20delete(struct __pyx_ob CYTHON_UNUSED PyObject *__pyx_v_err = NULL; 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; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; - int __pyx_t_8; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -3321,7 +3444,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_20delete(struct __pyx_ob * self.created = False * try: */ - if (__pyx_v_self->created) { + __pyx_t_1 = (__pyx_v_self->created != 0); + if (__pyx_t_1) { /* "src/vbo.pyx":224 * """Delete this buffer explicitly""" @@ -3340,10 +3464,10 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_20delete(struct __pyx_ob * except (AttributeError, error.NullFunctionError), err: */ { - __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); - __Pyx_XGOTREF(__pyx_t_1); + __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "src/vbo.pyx":226 @@ -3353,50 +3477,50 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_20delete(struct __pyx_ob * except (AttributeError, error.NullFunctionError), err: * pass */ - __pyx_t_4 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self->__pyx_vtab)->get_implementation(__pyx_v_self); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L4_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__glDeleteBuffers); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L4_error;} + __pyx_t_5 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self->__pyx_vtab)->get_implementation(__pyx_v_self); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L4_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__c_uint32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L4_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__glDeleteBuffers); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyLong_FromUnsignedLong(__pyx_v_self->buffer); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L4_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L4_error;} - __Pyx_GOTREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L4_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L4_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L4_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__c_uint32); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyLong_FromUnsignedLong(__pyx_v_self->buffer); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L4_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L4_error;} + __Pyx_GOTREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L4_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L4_error;} + __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_int_1); - PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_int_1); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L4_error;} - __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L4_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "src/vbo.pyx":227 * try: @@ -3405,37 +3529,37 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_20delete(struct __pyx_ob * pass * try: */ - __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__error); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__NullFunctionError); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError) || PyErr_ExceptionMatches(__pyx_t_7); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__pyx_t_8) { + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__error); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__NullFunctionError); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError) || PyErr_ExceptionMatches(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_9) { __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.delete", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_4, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_5, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} + __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_5); - __Pyx_INCREF(__pyx_t_4); - __pyx_v_err = __pyx_t_4; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); + __pyx_v_err = __pyx_t_5; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L5_exception_handled; } __pyx_L6_except_error:; - __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L5_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); __pyx_L11_try_end:; } @@ -3447,10 +3571,10 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_20delete(struct __pyx_ob * except KeyError, err: */ { - __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1); + __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_2); - __Pyx_XGOTREF(__pyx_t_1); /*try:*/ { /* "src/vbo.pyx":230 @@ -3460,42 +3584,42 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_20delete(struct __pyx_ob * except KeyError, err: * pass */ - __pyx_t_5 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self->__pyx_vtab)->get_implementation(__pyx_v_self); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L14_error;} + __pyx_t_6 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self->__pyx_vtab)->get_implementation(__pyx_v_self); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L14_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s___DELETERS_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L14_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s___DELETERS_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L14_error;} - __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__pop); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L14_error;} + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__pop); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L14_error;} + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L14_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L14_error;} - __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - __pyx_t_7 = PyObject_Call(__pyx_builtin_id, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L14_error;} - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L14_error;} - __Pyx_GOTREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7); - __Pyx_GIVEREF(__pyx_t_7); - __pyx_t_7 = 0; - __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L14_error;} - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_8 = PyObject_Call(__pyx_builtin_id, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L14_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L14_error;} + __Pyx_GOTREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_8); + __pyx_t_8 = 0; + __pyx_t_8 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L14_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L21_try_end; __pyx_L14_error:; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; /* "src/vbo.pyx":231 * try: @@ -3504,32 +3628,32 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_20delete(struct __pyx_ob * pass * def bind( self ): */ - __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_KeyError); - if (__pyx_t_8) { + __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_KeyError); + if (__pyx_t_9) { __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.delete", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_4, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_5, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} + __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_5); - __Pyx_INCREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); __Pyx_XDECREF(__pyx_v_err); - __pyx_v_err = __pyx_t_4; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_err = __pyx_t_5; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L15_exception_handled; } __pyx_L16_except_error:; + __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); - __Pyx_XGIVEREF(__pyx_t_1); - __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1); + __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_3, __pyx_t_2); goto __pyx_L1_error; __pyx_L15_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); - __Pyx_XGIVEREF(__pyx_t_1); - __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1); + __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_3, __pyx_t_2); __pyx_L21_try_end:; } goto __pyx_L3; @@ -3539,10 +3663,10 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_20delete(struct __pyx_ob __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.delete", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -3592,7 +3716,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_22bind(struct __pyx_obj_ * buffer = self.create_buffers() * self.get_implementation().glBindBuffer( self.target, self.buffer) */ - __pyx_t_1 = (!__pyx_v_self->created); + __pyx_t_1 = ((!(__pyx_v_self->created != 0)) != 0); if (__pyx_t_1) { /* "src/vbo.pyx":236 @@ -3602,7 +3726,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_22bind(struct __pyx_obj_ * self.get_implementation().glBindBuffer( self.target, self.buffer) * self.copy_data() */ - __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__create_buffers); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__create_buffers); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __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[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); @@ -3622,7 +3746,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_22bind(struct __pyx_obj_ */ __pyx_t_3 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self->__pyx_vtab)->get_implementation(__pyx_v_self); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__glBindBuffer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__glBindBuffer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyLong_FromUnsignedLong(__pyx_v_self->buffer); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -3648,7 +3772,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_22bind(struct __pyx_obj_ * def unbind( self ): * """Unbind the buffer (make normal array operations active)""" */ - __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__copy_data); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__copy_data); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); @@ -3710,7 +3834,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_24unbind(struct __pyx_ob */ __pyx_t_1 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self->__pyx_vtab)->get_implementation(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__glBindBuffer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__glBindBuffer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __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[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -3768,8 +3892,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_26__add__(PyObject *__py PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - int __pyx_t_3; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; @@ -3786,7 +3910,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_26__add__(PyObject *__py * assert isinstance( other, (int,long) ), """Only know how to add integer/long offsets""" */ __pyx_t_1 = PyObject_HasAttr(__pyx_v_other, ((PyObject *)__pyx_n_s__offset)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { /* "src/vbo.pyx":245 * """Add an integer to this VBO (offset)""" @@ -3795,11 +3920,11 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_26__add__(PyObject *__py * assert isinstance( other, (int,long) ), """Only know how to add integer/long offsets""" * return VBOOffset( self, other ) */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_other, __pyx_n_s__offset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s__offset); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_v_other); - __pyx_v_other = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_v_other = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; @@ -3813,16 +3938,16 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_26__add__(PyObject *__py */ #ifndef CYTHON_WITHOUT_ASSERTIONS __Pyx_INCREF(__pyx_v_other); - __pyx_t_2 = __pyx_v_other; - __pyx_t_1 = PyInt_Check(__pyx_t_2); - if (!__pyx_t_1) { - __pyx_t_3 = PyLong_Check(__pyx_t_2); - __pyx_t_4 = __pyx_t_3; - } else { + __pyx_t_3 = __pyx_v_other; + __pyx_t_2 = PyInt_Check(__pyx_t_3); + if (!__pyx_t_2) { + __pyx_t_1 = PyLong_Check(__pyx_t_3); __pyx_t_4 = __pyx_t_1; + } else { + __pyx_t_4 = __pyx_t_2; } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_4)) { + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!(__pyx_t_4 != 0))) { PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_8)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } @@ -3836,17 +3961,17 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_26__add__(PyObject *__py * if self.data is _NULL: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_self); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); __Pyx_INCREF(__pyx_v_other); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_other); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); - __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_17OpenGL_accelerate_3vbo_VBOOffset)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_17OpenGL_accelerate_3vbo_VBOOffset)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; @@ -3854,7 +3979,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_26__add__(PyObject *__py __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_5); __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; @@ -3878,6 +4003,7 @@ static int __pyx_f_17OpenGL_accelerate_3vbo_3VBO_check_live(struct __pyx_obj_17O __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; + int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -3890,11 +4016,12 @@ static int __pyx_f_17OpenGL_accelerate_3vbo_3VBO_check_live(struct __pyx_obj_17O * raise RuntimeError( """Attempting to use a deleted VBO""" ) * */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_v_self->data == __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_2) { + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { /* "src/vbo.pyx":250 * cdef int check_live( self ): @@ -3930,6 +4057,9 @@ static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_29__exit__(PyObject *__p CYTHON_UNUSED PyObject *__pyx_v_exc_type = 0; CYTHON_UNUSED PyObject *__pyx_v_exc_val = 0; CYTHON_UNUSED PyObject *__pyx_v_exc_tb = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0); @@ -4021,7 +4151,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_28__exit__(struct __pyx_ * return False # do not supress exceptions... * */ - __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__unbind); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__unbind); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -5155,6 +5285,9 @@ static int __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_1__cinit__(PyObject *__p static int __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_vbo = 0; unsigned int __pyx_v_offset; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); @@ -5280,7 +5413,8 @@ static void __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_3__dealloc__(PyObject * static void __pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_2__dealloc__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "src/vbo.pyx":274 @@ -5291,7 +5425,8 @@ static void __pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_2__dealloc__(struct __p * self.vbo = None */ __pyx_t_1 = (((PyObject *)__pyx_v_self->vbo) != Py_None); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { /* "src/vbo.pyx":275 * def __dealloc__( self ): @@ -5300,10 +5435,10 @@ static void __pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_2__dealloc__(struct __p * self.vbo = None * */ - __pyx_t_2 = ((PyObject *)__pyx_v_self->vbo); - __Pyx_INCREF(__pyx_t_2); - Py_XDECREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = ((PyObject *)__pyx_v_self->vbo); + __Pyx_INCREF(__pyx_t_3); + Py_XDECREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/vbo.pyx":276 * if self.vbo is not None: @@ -5376,7 +5511,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_4__getattr__(struc __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_v_self->vbo); __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_v_key); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_key); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; @@ -5449,9 +5584,10 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_6__add__(PyObject 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; + PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -5466,7 +5602,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_6__add__(PyObject * return VBOOffset( self.vbo, self.offset + other ) */ __pyx_t_1 = PyObject_HasAttr(__pyx_v_other, ((PyObject *)__pyx_n_s__offset)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { /* "src/vbo.pyx":284 * def __add__( self, other ): @@ -5475,11 +5612,11 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_6__add__(PyObject * return VBOOffset( self.vbo, self.offset + other ) * cdef int check_live( self ): */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_other, __pyx_n_s__offset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s__offset); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_v_other); - __pyx_v_other = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_v_other = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; @@ -5492,34 +5629,34 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_6__add__(PyObject * if self.vbo is not None: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__vbo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__offset); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__vbo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_v_other); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__offset); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - __pyx_t_2 = 0; - __pyx_t_4 = 0; - __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_17OpenGL_accelerate_3vbo_VBOOffset)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_v_other); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __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; + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_3 = 0; + __pyx_t_5 = 0; + __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_17OpenGL_accelerate_3vbo_VBOOffset)), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBOOffset.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -5541,7 +5678,8 @@ static int __pyx_f_17OpenGL_accelerate_3vbo_9VBOOffset_check_live(struct __pyx_o int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -5555,7 +5693,8 @@ static int __pyx_f_17OpenGL_accelerate_3vbo_9VBOOffset_check_live(struct __pyx_o * else: */ __pyx_t_1 = (((PyObject *)__pyx_v_self->vbo) != Py_None); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { /* "src/vbo.pyx":288 * cdef int check_live( self ): @@ -5577,10 +5716,10 @@ static int __pyx_f_17OpenGL_accelerate_3vbo_9VBOOffset_check_live(struct __pyx_o * * cdef class VBOHandler(FormatHandler): */ - __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_13), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0, 0); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_13), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; @@ -5588,7 +5727,7 @@ static int __pyx_f_17OpenGL_accelerate_3vbo_9VBOOffset_check_live(struct __pyx_o __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("OpenGL_accelerate.vbo.VBOOffset.check_live", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -5810,9 +5949,9 @@ static int __pyx_pf_17OpenGL_accelerate_3vbo_10VBOHandler___init__(struct __pyx_ * from OpenGL.arrays.arraydatatype import ArrayDatatype * self.arrayType = ArrayDatatype */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__ctypes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__c_void_p); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__c_void_p); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_14), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -5839,11 +5978,7 @@ static int __pyx_pf_17OpenGL_accelerate_3vbo_10VBOHandler___init__(struct __pyx_ __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_1), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__ArrayDatatype); - if (__pyx_t_1 == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__ArrayDatatype); - if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__ArrayDatatype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_v_ArrayDatatype = __pyx_t_1; @@ -6035,7 +6170,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_arrayByteCount( * """Given a value, guess OpenGL type of the corresponding pointer""" */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->arrayType, __pyx_n_s__arrayByteCount); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s__arrayByteCount); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -6100,7 +6235,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_arrayToGLType(s * """Retrieve array size reference""" */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->arrayType, __pyx_n_s__arrayToGLType); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s__arrayToGLType); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -6165,7 +6300,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_arraySize(struc * """Retrieve last dimension of the array""" */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->arrayType, __pyx_n_s__arraySize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s__arraySize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -6230,7 +6365,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_unitSize(struct * """Retrieve full set of dimensions for the array as tuple""" */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->arrayType, __pyx_n_s__unitSize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s__unitSize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -6295,7 +6430,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_dimensions(stru * cdef class VBOOffsetHandler(FormatHandler): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->arrayType, __pyx_n_s__dimensions); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s__dimensions); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -6372,11 +6507,7 @@ static int __pyx_pf_17OpenGL_accelerate_3vbo_16VBOOffsetHandler___init__(struct __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_1), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__ArrayDatatype); - if (__pyx_t_1 == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__ArrayDatatype); - if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__ArrayDatatype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_v_ArrayDatatype = __pyx_t_1; @@ -6497,9 +6628,9 @@ static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_from_para * """Retrieve the given value as a (contiguous) array of type typeCode""" */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__ctypes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__c_void_p); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__c_void_p); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyLong_FromUnsignedLong(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)->offset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -6608,7 +6739,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_arrayByte * """Given a value, guess OpenGL type of the corresponding pointer""" */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->arrayType, __pyx_n_s__arrayByteCount); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s__arrayByteCount); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -6673,7 +6804,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_arrayToGL * """Retrieve array size reference""" */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->arrayType, __pyx_n_s__arrayToGLType); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s__arrayToGLType); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -6738,7 +6869,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_arraySize * """Retrieve last dimension of the array""" */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->arrayType, __pyx_n_s__arraySize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s__arraySize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -6803,7 +6934,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_unitSize( * """Retrieve full set of dimensions for the array as tuple""" */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->arrayType, __pyx_n_s__unitSize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s__unitSize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -6865,7 +6996,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_dimension * return self.arrayType.dimensions( (instance).vbo.data ) # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->arrayType, __pyx_n_s__dimensions); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s__dimensions); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -6893,233 +7024,184 @@ static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_dimension __Pyx_RefNannyFinishContext(); return __pyx_r; } -static struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO __pyx_vtable_17OpenGL_accelerate_3vbo_VBO; +static struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBOOffsetHandler __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffsetHandler; -static PyObject *__pyx_tp_new_17OpenGL_accelerate_3vbo_VBO(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; - p = ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)o); - p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_3vbo_VBO; - p->__weakref__ = 0; - p->data = Py_None; Py_INCREF(Py_None); - p->target = Py_None; Py_INCREF(Py_None); - p->usage = Py_None; Py_INCREF(Py_None); - p->target_spec = Py_None; Py_INCREF(Py_None); - p->usage_spec = Py_None; Py_INCREF(Py_None); - p->_copy_segments = ((PyObject*)Py_None); Py_INCREF(Py_None); - p->_I_ = Py_None; Py_INCREF(Py_None); +static PyObject *__pyx_tp_new_17OpenGL_accelerate_3vbo_VBOOffsetHandler(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *p; + PyObject *o = __pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_new(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler*)__pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOOffsetHandler; p->arrayType = Py_None; Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBO(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)o; +static void __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBOOffsetHandler(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *)o; PyObject_GC_UnTrack(o); - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); - __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_3__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->data); - Py_CLEAR(p->target); - Py_CLEAR(p->usage); - Py_CLEAR(p->target_spec); - Py_CLEAR(p->usage_spec); - Py_CLEAR(p->_copy_segments); - Py_CLEAR(p->_I_); Py_CLEAR(p->arrayType); PyObject_GC_Track(o); - (*Py_TYPE(o)->tp_free)(o); + if (likely(__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)) __pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBOOffsetHandler); } -static int __pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBO(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBOOffsetHandler(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)o; - if (p->data) { - e = (*v)(p->data, a); if (e) return e; - } - if (p->target) { - e = (*v)(p->target, a); if (e) return e; - } - if (p->usage) { - e = (*v)(p->usage, a); if (e) return e; - } - if (p->target_spec) { - e = (*v)(p->target_spec, a); if (e) return e; - } - if (p->usage_spec) { - e = (*v)(p->usage_spec, a); if (e) return e; - } - if (p->_copy_segments) { - e = (*v)(p->_copy_segments, a); if (e) return e; - } - if (p->_I_) { - e = (*v)(p->_I_, a); if (e) return e; - } + struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *)o; + e = ((likely(__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)) ? ((__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_traverse) ? __pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBOOffsetHandler)); if (e) return e; if (p->arrayType) { e = (*v)(p->arrayType, a); if (e) return e; } return 0; } -static int __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBO(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)o; +static int __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBOOffsetHandler(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *)o; PyObject* tmp; - tmp = ((PyObject*)p->data); - p->data = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->target); - p->target = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->usage); - p->usage = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->target_spec); - p->target_spec = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->usage_spec); - p->usage_spec = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->_copy_segments); - p->_copy_segments = ((PyObject*)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->_I_); - p->_I_ = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); + if (likely(__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)) { if (__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_clear) __pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBOOffsetHandler); tmp = ((PyObject*)p->arrayType); p->arrayType = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static int __pyx_mp_ass_subscript_17OpenGL_accelerate_3vbo_VBO(PyObject *o, PyObject *i, PyObject *v) { - if (v) { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_9__setitem__(o, i, v); - } - else { - PyErr_Format(PyExc_NotImplementedError, - "Subscript deletion not supported by %s", Py_TYPE(o)->tp_name); - return -1; - } -} - -static PyObject *__pyx_tp_getattro_17OpenGL_accelerate_3vbo_VBO(PyObject *o, PyObject *n) { - PyObject *v = PyObject_GenericGetAttr(o, n); - if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) { - PyErr_Clear(); - v = __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_13__getattr__(o, n); - } - return v; -} - -static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_copied(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6copied_1__get__(o); -} +static PyMethodDef __pyx_methods_17OpenGL_accelerate_3vbo_VBOOffsetHandler[] = { + {0, 0, 0, 0} +}; -static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_copied(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6copied_3__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; - } -} - -static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_created(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_7created_1__get__(o); -} - -static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_created(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_7created_3__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; - } -} - -static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_buffer(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6buffer_1__get__(o); -} +static PyTypeObject __pyx_type_17OpenGL_accelerate_3vbo_VBOOffsetHandler = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("OpenGL_accelerate.vbo.VBOOffsetHandler"), /*tp_name*/ + sizeof(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBOOffsetHandler, /*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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBOOffsetHandler, /*tp_traverse*/ + __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBOOffsetHandler, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_17OpenGL_accelerate_3vbo_VBOOffsetHandler, /*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*/ + __pyx_pw_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_17OpenGL_accelerate_3vbo_VBOOffsetHandler, /*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_17OpenGL_accelerate_3vbo_VBOOffset __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffset; -static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_buffer(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6buffer_3__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; +static PyObject *__pyx_tp_new_17OpenGL_accelerate_3vbo_VBOOffset(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *p; + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)o); + p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOOffset; + p->vbo = ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_1__cinit__(o, a, k) < 0)) { + Py_DECREF(o); o = 0; } + return o; } -static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_data(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4data_1__get__(o); -} - -static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4data_3__set__(o, v); - } - else { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4data_5__del__(o); +static void __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBOOffset(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)o; + PyObject_GC_UnTrack(o); + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_3__dealloc__(o); + if (PyErr_Occurred()) PyErr_WriteUnraisable(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); } + Py_CLEAR(p->vbo); + (*Py_TYPE(o)->tp_free)(o); } -static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_size(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4size_1__get__(o); -} - -static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_size(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4size_3__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; +static int __pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBOOffset(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)o; + if (p->vbo) { + e = (*v)(((PyObject*)p->vbo), a); if (e) return e; } + return 0; } -static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_target(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6target_1__get__(o); +static int __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBOOffset(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)o; + PyObject* tmp; + tmp = ((PyObject*)p->vbo); + p->vbo = ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; } -static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_target(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6target_3__set__(o, v); - } - else { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6target_5__del__(o); +static PyObject *__pyx_tp_getattro_17OpenGL_accelerate_3vbo_VBOOffset(PyObject *o, PyObject *n) { + PyObject *v = PyObject_GenericGetAttr(o, n); + if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + v = __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_5__getattr__(o, n); } + return v; } -static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_usage(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_5usage_1__get__(o); +static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_9VBOOffset_vbo(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo_1__get__(o); } -static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_usage(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_setprop_17OpenGL_accelerate_3vbo_9VBOOffset_vbo(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_5usage_3__set__(o, v); + return __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo_3__set__(o, v); } else { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_5usage_5__del__(o); + return __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo_5__del__(o); } } -static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_resolved(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_8resolved_1__get__(o); +static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_9VBOOffset_offset(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_6offset_1__get__(o); } -static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_resolved(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_setprop_17OpenGL_accelerate_3vbo_9VBOOffset_offset(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_8resolved_3__set__(o, v); + return __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_6offset_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -7127,103 +7209,19 @@ static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_resolved(PyObject *o, PyO } } -static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_target_spec(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_11target_spec_1__get__(o); -} - -static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_target_spec(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_11target_spec_3__set__(o, v); - } - else { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_11target_spec_5__del__(o); - } -} - -static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_usage_spec(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_10usage_spec_1__get__(o); -} - -static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_usage_spec(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_10usage_spec_3__set__(o, v); - } - else { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_10usage_spec_5__del__(o); - } -} - -static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO__copy_segments(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments_1__get__(o); -} - -static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO__copy_segments(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments_3__set__(o, v); - } - else { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments_5__del__(o); - } -} - -static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO__I_(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_3_I__1__get__(o); -} - -static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO__I_(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_3_I__3__set__(o, v); - } - else { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_3_I__5__del__(o); - } -} - -static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_arrayType(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_9arrayType_1__get__(o); -} - -static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_arrayType(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_9arrayType_3__set__(o, v); - } - else { - return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_9arrayType_5__del__(o); - } -} - -static PyMethodDef __pyx_methods_17OpenGL_accelerate_3vbo_VBO[] = { - {__Pyx_NAMESTR("implementation"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_5implementation, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_3vbo_3VBO_4implementation)}, - {__Pyx_NAMESTR("set_array"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_7set_array, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_3vbo_3VBO_6set_array)}, - {__Pyx_NAMESTR("__getattr__"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_13__getattr__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("create_buffers"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_17create_buffers, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_3vbo_3VBO_16create_buffers)}, - {__Pyx_NAMESTR("copy_data"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_19copy_data, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_3vbo_3VBO_18copy_data)}, - {__Pyx_NAMESTR("delete"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_21delete, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_3vbo_3VBO_20delete)}, - {__Pyx_NAMESTR("bind"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_23bind, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_3vbo_3VBO_22bind)}, - {__Pyx_NAMESTR("unbind"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_25unbind, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_3vbo_3VBO_24unbind)}, - {__Pyx_NAMESTR("__exit__"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_29__exit__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_3vbo_3VBO_28__exit__)}, +static PyMethodDef __pyx_methods_17OpenGL_accelerate_3vbo_VBOOffset[] = { + {__Pyx_NAMESTR("__getattr__"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_5__getattr__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_17OpenGL_accelerate_3vbo_VBO[] = { - {(char *)"copied", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_copied, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_copied, 0, 0}, - {(char *)"created", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_created, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_created, 0, 0}, - {(char *)"buffer", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_buffer, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_buffer, 0, 0}, - {(char *)"data", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_data, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_data, 0, 0}, - {(char *)"size", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_size, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_size, 0, 0}, - {(char *)"target", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_target, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_target, 0, 0}, - {(char *)"usage", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_usage, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_usage, 0, 0}, - {(char *)"resolved", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_resolved, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_resolved, 0, 0}, - {(char *)"target_spec", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_target_spec, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_target_spec, 0, 0}, - {(char *)"usage_spec", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_usage_spec, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_usage_spec, 0, 0}, - {(char *)"_copy_segments", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO__copy_segments, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO__copy_segments, 0, 0}, - {(char *)"_I_", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO__I_, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO__I_, 0, 0}, - {(char *)"arrayType", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_arrayType, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_arrayType, 0, 0}, +static struct PyGetSetDef __pyx_getsets_17OpenGL_accelerate_3vbo_VBOOffset[] = { + {(char *)"vbo", __pyx_getprop_17OpenGL_accelerate_3vbo_9VBOOffset_vbo, __pyx_setprop_17OpenGL_accelerate_3vbo_9VBOOffset_vbo, 0, 0}, + {(char *)"offset", __pyx_getprop_17OpenGL_accelerate_3vbo_9VBOOffset_offset, __pyx_setprop_17OpenGL_accelerate_3vbo_9VBOOffset_offset, 0, 0}, {0, 0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_VBO = { - __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_27__add__, /*nb_add*/ +static PyNumberMethods __pyx_tp_as_number_VBOOffset = { + __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_7__add__, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ #if PY_MAJOR_VERSION < 3 @@ -7245,9 +7243,9 @@ static PyNumberMethods __pyx_tp_as_number_VBO = { #if PY_MAJOR_VERSION < 3 0, /*nb_coerce*/ #endif - __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_15__int__, /*nb_int*/ + 0, /*nb_int*/ #if PY_MAJOR_VERSION < 3 - __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_15__int__, /*nb_long*/ + 0, /*nb_long*/ #else 0, /*reserved*/ #endif @@ -7280,52 +7278,12 @@ static PyNumberMethods __pyx_tp_as_number_VBO = { #endif }; -static PySequenceMethods __pyx_tp_as_sequence_VBO = { - __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_11__len__, /*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_VBO = { - __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_11__len__, /*mp_length*/ - 0, /*mp_subscript*/ - __pyx_mp_ass_subscript_17OpenGL_accelerate_3vbo_VBO, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_VBO = { - #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_17OpenGL_accelerate_3vbo_VBO = { +static PyTypeObject __pyx_type_17OpenGL_accelerate_3vbo_VBOOffset = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("OpenGL_accelerate.vbo.VBO"), /*tp_name*/ - sizeof(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO), /*tp_basicsize*/ + __Pyx_NAMESTR("OpenGL_accelerate.vbo.VBOOffset"), /*tp_name*/ + sizeof(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBO, /*tp_dealloc*/ + __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBOOffset, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -7335,34 +7293,34 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_3vbo_VBO = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_VBO, /*tp_as_number*/ - &__pyx_tp_as_sequence_VBO, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_VBO, /*tp_as_mapping*/ + &__pyx_tp_as_number_VBOOffset, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ - __pyx_tp_getattro_17OpenGL_accelerate_3vbo_VBO, /*tp_getattro*/ + __pyx_tp_getattro_17OpenGL_accelerate_3vbo_VBOOffset, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_VBO, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - __Pyx_DOCSTR("Instances can be passed into array-handling routines\n\n You can check for whether VBOs are supported by accessing the implementation\n attribute of the VBO, which will raise a RuntimeError if there is no available\n implementation.\n\n Attributes:\n\n int copied -- whether we are copied to back-end yet\n int created -- whether we've created a buffer yet\n unsigned int buffer -- our buffer once created\n object data -- our data-holding array-compatible object\n target -- our resolved GL constant target\n target_spec -- our (unresolved) GL constant specifier\n usage -- our resolved GL constant usage\n usage_spec -- our (unresolved) GL constant usage specifier\n _copy_segments -- slices of data to copy to back-end\n _I_ -- our implementation object\n arrayType -- our reference to arraydatatype.ArrayDatatype\n "), /*tp_doc*/ - __pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBO, /*tp_traverse*/ - __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBO, /*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("Offset into a VBO instance\n\n This is just a convenience object that lets you say\n vbo + integer and have the value passed as the correct\n data-type instead of being interpreted as a pointer to\n an integer-array of the offset.\n "), /*tp_doc*/ + __pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBOOffset, /*tp_traverse*/ + __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBOOffset, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_17OpenGL_accelerate_3vbo_VBO, /*tp_methods*/ + __pyx_methods_17OpenGL_accelerate_3vbo_VBOOffset, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_17OpenGL_accelerate_3vbo_VBO, /*tp_getset*/ + __pyx_getsets_17OpenGL_accelerate_3vbo_VBOOffset, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_1__init__, /*tp_init*/ + 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_17OpenGL_accelerate_3vbo_VBO, /*tp_new*/ + __pyx_tp_new_17OpenGL_accelerate_3vbo_VBOOffset, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -7375,85 +7333,152 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_3vbo_VBO = { 0, /*tp_version_tag*/ #endif }; -static struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBOOffset __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffset; +static struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO __pyx_vtable_17OpenGL_accelerate_3vbo_VBO; -static PyObject *__pyx_tp_new_17OpenGL_accelerate_3vbo_VBOOffset(PyTypeObject *t, PyObject *a, PyObject *k) { - struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; - p = ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)o); - p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOOffset; - p->vbo = ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)Py_None); Py_INCREF(Py_None); - if (__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_1__cinit__(o, a, k) < 0) { - Py_DECREF(o); o = 0; - } +static PyObject *__pyx_tp_new_17OpenGL_accelerate_3vbo_VBO(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *p; + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)o); + p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_3vbo_VBO; + p->__weakref__ = 0; + p->data = Py_None; Py_INCREF(Py_None); + p->target = Py_None; Py_INCREF(Py_None); + p->usage = Py_None; Py_INCREF(Py_None); + p->target_spec = Py_None; Py_INCREF(Py_None); + p->usage_spec = Py_None; Py_INCREF(Py_None); + p->_copy_segments = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->_I_ = Py_None; Py_INCREF(Py_None); + p->arrayType = Py_None; Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBOOffset(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)o; +static void __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBO(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)o; PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); - __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_3__dealloc__(o); + __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_3__dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } - Py_CLEAR(p->vbo); - PyObject_GC_Track(o); + if (p->__weakref__) PyObject_ClearWeakRefs(o); + Py_CLEAR(p->data); + Py_CLEAR(p->target); + Py_CLEAR(p->usage); + Py_CLEAR(p->target_spec); + Py_CLEAR(p->usage_spec); + Py_CLEAR(p->_copy_segments); + Py_CLEAR(p->_I_); + Py_CLEAR(p->arrayType); (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBOOffset(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBO(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)o; - if (p->vbo) { - e = (*v)(((PyObject*)p->vbo), a); if (e) return e; + struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)o; + if (p->data) { + e = (*v)(p->data, a); if (e) return e; + } + if (p->target) { + e = (*v)(p->target, a); if (e) return e; + } + if (p->usage) { + e = (*v)(p->usage, a); if (e) return e; + } + if (p->target_spec) { + e = (*v)(p->target_spec, a); if (e) return e; + } + if (p->usage_spec) { + e = (*v)(p->usage_spec, a); if (e) return e; + } + if (p->_copy_segments) { + e = (*v)(p->_copy_segments, a); if (e) return e; + } + if (p->_I_) { + e = (*v)(p->_I_, a); if (e) return e; + } + if (p->arrayType) { + e = (*v)(p->arrayType, a); if (e) return e; } return 0; } -static int __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBOOffset(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)o; +static int __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBO(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)o; PyObject* tmp; - tmp = ((PyObject*)p->vbo); - p->vbo = ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->data); + p->data = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->target); + p->target = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->usage); + p->usage = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->target_spec); + p->target_spec = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->usage_spec); + p->usage_spec = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_copy_segments); + p->_copy_segments = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_I_); + p->_I_ = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->arrayType); + p->arrayType = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyObject *__pyx_tp_getattro_17OpenGL_accelerate_3vbo_VBOOffset(PyObject *o, PyObject *n) { +static int __pyx_mp_ass_subscript_17OpenGL_accelerate_3vbo_VBO(PyObject *o, PyObject *i, PyObject *v) { + if (v) { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_9__setitem__(o, i, v); + } + else { + PyErr_Format(PyExc_NotImplementedError, + "Subscript deletion not supported by %s", Py_TYPE(o)->tp_name); + return -1; + } +} + +static PyObject *__pyx_tp_getattro_17OpenGL_accelerate_3vbo_VBO(PyObject *o, PyObject *n) { PyObject *v = PyObject_GenericGetAttr(o, n); if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); - v = __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_5__getattr__(o, n); + v = __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_13__getattr__(o, n); } return v; } -static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_9VBOOffset_vbo(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo_1__get__(o); +static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_copied(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6copied_1__get__(o); } -static int __pyx_setprop_17OpenGL_accelerate_3vbo_9VBOOffset_vbo(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_copied(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo_3__set__(o, v); + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6copied_3__set__(o, v); } else { - return __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo_5__del__(o); + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; } } -static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_9VBOOffset_offset(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_6offset_1__get__(o); +static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_created(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_7created_1__get__(o); } -static int __pyx_setprop_17OpenGL_accelerate_3vbo_9VBOOffset_offset(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_created(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_6offset_3__set__(o, v); + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_7created_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -7461,421 +7486,184 @@ static int __pyx_setprop_17OpenGL_accelerate_3vbo_9VBOOffset_offset(PyObject *o, } } -static PyMethodDef __pyx_methods_17OpenGL_accelerate_3vbo_VBOOffset[] = { - {__Pyx_NAMESTR("__getattr__"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_5__getattr__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)}, - {0, 0, 0, 0} -}; +static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_buffer(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6buffer_1__get__(o); +} -static struct PyGetSetDef __pyx_getsets_17OpenGL_accelerate_3vbo_VBOOffset[] = { - {(char *)"vbo", __pyx_getprop_17OpenGL_accelerate_3vbo_9VBOOffset_vbo, __pyx_setprop_17OpenGL_accelerate_3vbo_9VBOOffset_vbo, 0, 0}, - {(char *)"offset", __pyx_getprop_17OpenGL_accelerate_3vbo_9VBOOffset_offset, __pyx_setprop_17OpenGL_accelerate_3vbo_9VBOOffset_offset, 0, 0}, - {0, 0, 0, 0, 0} -}; +static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_buffer(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6buffer_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} -static PyNumberMethods __pyx_tp_as_number_VBOOffset = { - __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_7__add__, /*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_17OpenGL_accelerate_3vbo_3VBO_data(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4data_1__get__(o); +} -static PySequenceMethods __pyx_tp_as_sequence_VBOOffset = { - 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_17OpenGL_accelerate_3vbo_3VBO_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4data_3__set__(o, v); + } + else { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4data_5__del__(o); + } +} -static PyMappingMethods __pyx_tp_as_mapping_VBOOffset = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; +static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_size(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4size_1__get__(o); +} -static PyBufferProcs __pyx_tp_as_buffer_VBOOffset = { - #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_setprop_17OpenGL_accelerate_3vbo_3VBO_size(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4size_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} -static PyTypeObject __pyx_type_17OpenGL_accelerate_3vbo_VBOOffset = { - PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("OpenGL_accelerate.vbo.VBOOffset"), /*tp_name*/ - sizeof(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBOOffset, /*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_VBOOffset, /*tp_as_number*/ - &__pyx_tp_as_sequence_VBOOffset, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_VBOOffset, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - __pyx_tp_getattro_17OpenGL_accelerate_3vbo_VBOOffset, /*tp_getattro*/ - 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_VBOOffset, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - __Pyx_DOCSTR("Offset into a VBO instance\n\n This is just a convenience object that lets you say\n vbo + integer and have the value passed as the correct\n data-type instead of being interpreted as a pointer to\n an integer-array of the offset.\n "), /*tp_doc*/ - __pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBOOffset, /*tp_traverse*/ - __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBOOffset, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - __pyx_methods_17OpenGL_accelerate_3vbo_VBOOffset, /*tp_methods*/ - 0, /*tp_members*/ - __pyx_getsets_17OpenGL_accelerate_3vbo_VBOOffset, /*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_17OpenGL_accelerate_3vbo_VBOOffset, /*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_17OpenGL_accelerate_3vbo_VBOHandler __pyx_vtable_17OpenGL_accelerate_3vbo_VBOHandler; +static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_target(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6target_1__get__(o); +} -static PyObject *__pyx_tp_new_17OpenGL_accelerate_3vbo_VBOHandler(PyTypeObject *t, PyObject *a, PyObject *k) { - struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *p; - PyObject *o = __pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_new(t, a, k); - if (!o) return 0; - p = ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *)o); - p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler*)__pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOHandler; - p->vp0 = Py_None; Py_INCREF(Py_None); - p->arrayType = Py_None; Py_INCREF(Py_None); - return o; +static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_target(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6target_3__set__(o, v); + } + else { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6target_5__del__(o); + } } -static void __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBOHandler(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->vp0); - Py_CLEAR(p->arrayType); - PyObject_GC_Track(o); - if (likely(__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)) __pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBOHandler); +static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_usage(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_5usage_1__get__(o); } -static int __pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBOHandler(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *)o; - e = ((likely(__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)) ? ((__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_traverse) ? __pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBOHandler)); if (e) return e; - if (p->vp0) { - e = (*v)(p->vp0, a); if (e) return e; +static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_usage(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_5usage_3__set__(o, v); } - if (p->arrayType) { - e = (*v)(p->arrayType, a); if (e) return e; + else { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_5usage_5__del__(o); } - return 0; } -static int __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBOHandler(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *)o; - PyObject* tmp; - if (likely(__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)) { if (__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_clear) __pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBOHandler); - tmp = ((PyObject*)p->vp0); - p->vp0 = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->arrayType); - p->arrayType = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; +static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_resolved(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_8resolved_1__get__(o); } -static PyMethodDef __pyx_methods_17OpenGL_accelerate_3vbo_VBOHandler[] = { - {0, 0, 0, 0} -}; +static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_resolved(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_8resolved_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} -static PyNumberMethods __pyx_tp_as_number_VBOHandler = { - 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_17OpenGL_accelerate_3vbo_3VBO_target_spec(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_11target_spec_1__get__(o); +} -static PySequenceMethods __pyx_tp_as_sequence_VBOHandler = { - 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_17OpenGL_accelerate_3vbo_3VBO_target_spec(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_11target_spec_3__set__(o, v); + } + else { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_11target_spec_5__del__(o); + } +} -static PyMappingMethods __pyx_tp_as_mapping_VBOHandler = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; +static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_usage_spec(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_10usage_spec_1__get__(o); +} -static PyBufferProcs __pyx_tp_as_buffer_VBOHandler = { - #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_setprop_17OpenGL_accelerate_3vbo_3VBO_usage_spec(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_10usage_spec_3__set__(o, v); + } + else { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_10usage_spec_5__del__(o); + } +} -static PyTypeObject __pyx_type_17OpenGL_accelerate_3vbo_VBOHandler = { - PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("OpenGL_accelerate.vbo.VBOHandler"), /*tp_name*/ - sizeof(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBOHandler, /*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_VBOHandler, /*tp_as_number*/ - &__pyx_tp_as_sequence_VBOHandler, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_VBOHandler, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_VBOHandler, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - __Pyx_DOCSTR("Handles VBO instances passed in as array data"), /*tp_doc*/ - __pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBOHandler, /*tp_traverse*/ - __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBOHandler, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - __pyx_methods_17OpenGL_accelerate_3vbo_VBOHandler, /*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*/ - __pyx_pw_17OpenGL_accelerate_3vbo_10VBOHandler_1__init__, /*tp_init*/ - 0, /*tp_alloc*/ - __pyx_tp_new_17OpenGL_accelerate_3vbo_VBOHandler, /*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_17OpenGL_accelerate_3vbo_VBOOffsetHandler __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffsetHandler; +static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO__copy_segments(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments_1__get__(o); +} -static PyObject *__pyx_tp_new_17OpenGL_accelerate_3vbo_VBOOffsetHandler(PyTypeObject *t, PyObject *a, PyObject *k) { - struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *p; - PyObject *o = __pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_new(t, a, k); - if (!o) return 0; - p = ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *)o); - p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler*)__pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOOffsetHandler; - p->arrayType = Py_None; Py_INCREF(Py_None); - return o; +static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO__copy_segments(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments_3__set__(o, v); + } + else { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments_5__del__(o); + } } -static void __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBOOffsetHandler(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->arrayType); - PyObject_GC_Track(o); - if (likely(__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)) __pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBOOffsetHandler); +static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO__I_(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_3_I__1__get__(o); } -static int __pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBOOffsetHandler(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *)o; - e = ((likely(__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)) ? ((__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_traverse) ? __pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBOOffsetHandler)); if (e) return e; - if (p->arrayType) { - e = (*v)(p->arrayType, a); if (e) return e; +static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO__I_(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_3_I__3__set__(o, v); + } + else { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_3_I__5__del__(o); } - return 0; } -static int __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBOOffsetHandler(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *)o; - PyObject* tmp; - if (likely(__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)) { if (__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_clear) __pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBOOffsetHandler); - tmp = ((PyObject*)p->arrayType); - p->arrayType = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; +static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_arrayType(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_9arrayType_1__get__(o); } -static PyMethodDef __pyx_methods_17OpenGL_accelerate_3vbo_VBOOffsetHandler[] = { +static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_arrayType(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_9arrayType_3__set__(o, v); + } + else { + return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_9arrayType_5__del__(o); + } +} + +static PyMethodDef __pyx_methods_17OpenGL_accelerate_3vbo_VBO[] = { + {__Pyx_NAMESTR("implementation"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_5implementation, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_3vbo_3VBO_4implementation)}, + {__Pyx_NAMESTR("set_array"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_7set_array, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_3vbo_3VBO_6set_array)}, + {__Pyx_NAMESTR("__getattr__"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_13__getattr__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("create_buffers"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_17create_buffers, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_3vbo_3VBO_16create_buffers)}, + {__Pyx_NAMESTR("copy_data"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_19copy_data, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_3vbo_3VBO_18copy_data)}, + {__Pyx_NAMESTR("delete"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_21delete, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_3vbo_3VBO_20delete)}, + {__Pyx_NAMESTR("bind"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_23bind, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_3vbo_3VBO_22bind)}, + {__Pyx_NAMESTR("unbind"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_25unbind, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_3vbo_3VBO_24unbind)}, + {__Pyx_NAMESTR("__exit__"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_29__exit__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_3vbo_3VBO_28__exit__)}, {0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_VBOOffsetHandler = { - 0, /*nb_add*/ +static struct PyGetSetDef __pyx_getsets_17OpenGL_accelerate_3vbo_VBO[] = { + {(char *)"copied", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_copied, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_copied, 0, 0}, + {(char *)"created", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_created, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_created, 0, 0}, + {(char *)"buffer", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_buffer, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_buffer, 0, 0}, + {(char *)"data", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_data, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_data, 0, 0}, + {(char *)"size", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_size, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_size, 0, 0}, + {(char *)"target", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_target, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_target, 0, 0}, + {(char *)"usage", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_usage, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_usage, 0, 0}, + {(char *)"resolved", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_resolved, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_resolved, 0, 0}, + {(char *)"target_spec", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_target_spec, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_target_spec, 0, 0}, + {(char *)"usage_spec", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_usage_spec, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_usage_spec, 0, 0}, + {(char *)"_copy_segments", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO__copy_segments, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO__copy_segments, 0, 0}, + {(char *)"_I_", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO__I_, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO__I_, 0, 0}, + {(char *)"arrayType", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_arrayType, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_arrayType, 0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyNumberMethods __pyx_tp_as_number_VBO = { + __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_27__add__, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ #if PY_MAJOR_VERSION < 3 @@ -7897,9 +7685,9 @@ static PyNumberMethods __pyx_tp_as_number_VBOOffsetHandler = { #if PY_MAJOR_VERSION < 3 0, /*nb_coerce*/ #endif - 0, /*nb_int*/ + __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_15__int__, /*nb_int*/ #if PY_MAJOR_VERSION < 3 - 0, /*nb_long*/ + __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_15__int__, /*nb_long*/ #else 0, /*reserved*/ #endif @@ -7932,8 +7720,8 @@ static PyNumberMethods __pyx_tp_as_number_VBOOffsetHandler = { #endif }; -static PySequenceMethods __pyx_tp_as_sequence_VBOOffsetHandler = { - 0, /*sq_length*/ +static PySequenceMethods __pyx_tp_as_sequence_VBO = { + __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_11__len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ @@ -7945,39 +7733,125 @@ static PySequenceMethods __pyx_tp_as_sequence_VBOOffsetHandler = { 0, /*sq_inplace_repeat*/ }; -static PyMappingMethods __pyx_tp_as_mapping_VBOOffsetHandler = { - 0, /*mp_length*/ +static PyMappingMethods __pyx_tp_as_mapping_VBO = { + __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_11__len__, /*mp_length*/ 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ + __pyx_mp_ass_subscript_17OpenGL_accelerate_3vbo_VBO, /*mp_ass_subscript*/ }; -static PyBufferProcs __pyx_tp_as_buffer_VBOOffsetHandler = { - #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 +static PyTypeObject __pyx_type_17OpenGL_accelerate_3vbo_VBO = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("OpenGL_accelerate.vbo.VBO"), /*tp_name*/ + sizeof(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBO, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 - 0, /*bf_getcharbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_getbuffer*/ + 0, /*tp_compare*/ + #else + 0, /*reserved*/ #endif + 0, /*tp_repr*/ + &__pyx_tp_as_number_VBO, /*tp_as_number*/ + &__pyx_tp_as_sequence_VBO, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_VBO, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + __pyx_tp_getattro_17OpenGL_accelerate_3vbo_VBO, /*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*/ + __Pyx_DOCSTR("Instances can be passed into array-handling routines\n\n You can check for whether VBOs are supported by accessing the implementation\n attribute of the VBO, which will raise a RuntimeError if there is no available\n implementation.\n\n Attributes:\n\n int copied -- whether we are copied to back-end yet\n int created -- whether we've created a buffer yet\n unsigned int buffer -- our buffer once created\n object data -- our data-holding array-compatible object\n target -- our resolved GL constant target\n target_spec -- our (unresolved) GL constant specifier\n usage -- our resolved GL constant usage\n usage_spec -- our (unresolved) GL constant usage specifier\n _copy_segments -- slices of data to copy to back-end\n _I_ -- our implementation object\n arrayType -- our reference to arraydatatype.ArrayDatatype\n "), /*tp_doc*/ + __pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBO, /*tp_traverse*/ + __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBO, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_17OpenGL_accelerate_3vbo_VBO, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_17OpenGL_accelerate_3vbo_VBO, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_17OpenGL_accelerate_3vbo_VBO, /*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, /*bf_releasebuffer*/ + 0, /*tp_version_tag*/ #endif }; +static struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBOHandler __pyx_vtable_17OpenGL_accelerate_3vbo_VBOHandler; -static PyTypeObject __pyx_type_17OpenGL_accelerate_3vbo_VBOOffsetHandler = { +static PyObject *__pyx_tp_new_17OpenGL_accelerate_3vbo_VBOHandler(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *p; + PyObject *o = __pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_new(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler*)__pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOHandler; + p->vp0 = Py_None; Py_INCREF(Py_None); + p->arrayType = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBOHandler(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->vp0); + Py_CLEAR(p->arrayType); + PyObject_GC_Track(o); + if (likely(__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)) __pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBOHandler); +} + +static int __pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBOHandler(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *)o; + e = ((likely(__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)) ? ((__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_traverse) ? __pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBOHandler)); if (e) return e; + if (p->vp0) { + e = (*v)(p->vp0, a); if (e) return e; + } + if (p->arrayType) { + e = (*v)(p->arrayType, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBOHandler(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *)o; + PyObject* tmp; + if (likely(__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)) { if (__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_clear) __pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBOHandler); + tmp = ((PyObject*)p->vp0); + p->vp0 = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->arrayType); + p->arrayType = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_17OpenGL_accelerate_3vbo_VBOHandler[] = { + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_17OpenGL_accelerate_3vbo_VBOHandler = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("OpenGL_accelerate.vbo.VBOOffsetHandler"), /*tp_name*/ - sizeof(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler), /*tp_basicsize*/ + __Pyx_NAMESTR("OpenGL_accelerate.vbo.VBOHandler"), /*tp_name*/ + sizeof(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBOOffsetHandler, /*tp_dealloc*/ + __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBOHandler, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -7987,24 +7861,24 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_3vbo_VBOOffsetHandler = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_VBOOffsetHandler, /*tp_as_number*/ - &__pyx_tp_as_sequence_VBOOffsetHandler, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_VBOOffsetHandler, /*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_VBOOffsetHandler, /*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_17OpenGL_accelerate_3vbo_VBOOffsetHandler, /*tp_traverse*/ - __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBOOffsetHandler, /*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("Handles VBO instances passed in as array data"), /*tp_doc*/ + __pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBOHandler, /*tp_traverse*/ + __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBOHandler, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_17OpenGL_accelerate_3vbo_VBOOffsetHandler, /*tp_methods*/ + __pyx_methods_17OpenGL_accelerate_3vbo_VBOHandler, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -8012,9 +7886,9 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_3vbo_VBOOffsetHandler = { 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_1__init__, /*tp_init*/ + __pyx_pw_17OpenGL_accelerate_3vbo_10VBOHandler_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_17OpenGL_accelerate_3vbo_VBOOffsetHandler, /*tp_new*/ + __pyx_tp_new_17OpenGL_accelerate_3vbo_VBOHandler, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -8076,7 +7950,9 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s___I_, __pyx_k___I_, sizeof(__pyx_k___I_), 0, 0, 1, 1}, {&__pyx_n_s___NULL, __pyx_k___NULL, sizeof(__pyx_k___NULL), 0, 0, 1, 1}, {&__pyx_n_s____enter__, __pyx_k____enter__, sizeof(__pyx_k____enter__), 0, 0, 1, 1}, + {&__pyx_n_s____import__, __pyx_k____import__, sizeof(__pyx_k____import__), 0, 0, 1, 1}, {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 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____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1}, {&__pyx_n_s___copy_segments, __pyx_k___copy_segments, sizeof(__pyx_k___copy_segments), 0, 0, 1, 1}, {&__pyx_n_s___no_cache_, __pyx_k___no_cache_, sizeof(__pyx_k___no_cache_), 0, 0, 1, 1}, @@ -8131,16 +8007,16 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_object = __Pyx_GetName(__pyx_b, __pyx_n_s__object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_property = __Pyx_GetName(__pyx_b, __pyx_n_s__property); if (!__pyx_builtin_property) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_NotImplemented = __Pyx_GetName(__pyx_b, __pyx_n_s__NotImplemented); if (!__pyx_builtin_NotImplemented) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_max = __Pyx_GetName(__pyx_b, __pyx_n_s__max); if (!__pyx_builtin_max) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_AttributeError = __Pyx_GetName(__pyx_b, __pyx_n_s__AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __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[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __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 = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_KeyError = __Pyx_GetName(__pyx_b, __pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s__object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_n_s__property); if (!__pyx_builtin_property) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s__NotImplemented); if (!__pyx_builtin_NotImplemented) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_n_s__max); if (!__pyx_builtin_max) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s__AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __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 = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; @@ -8230,6 +8106,9 @@ PyMODINIT_FUNC PyInit_vbo(void) { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); @@ -8267,6 +8146,8 @@ PyMODINIT_FUNC PyInit_vbo(void) __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __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;} @@ -8282,6 +8163,9 @@ PyMODINIT_FUNC PyInit_vbo(void) 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_OpenGL_accelerate__vbo) { 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;}; } @@ -8293,6 +8177,29 @@ PyMODINIT_FUNC PyInit_vbo(void) /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ + __pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler = __Pyx_ImportType("OpenGL_accelerate.formathandler", "FormatHandler", sizeof(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler), 1); if (unlikely(!__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_vtabptr_17OpenGL_accelerate_13formathandler_FormatHandler = (struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler*)__Pyx_GetVtable(__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_dict); if (unlikely(!__pyx_vtabptr_17OpenGL_accelerate_13formathandler_FormatHandler)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOOffsetHandler = &__pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffsetHandler; + __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffsetHandler.__pyx_base = *__pyx_vtabptr_17OpenGL_accelerate_13formathandler_FormatHandler; + __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffsetHandler.__pyx_base.c_from_param = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_from_param; + __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffsetHandler.__pyx_base.c_dataPointer = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *))__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_dataPointer; + __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffsetHandler.__pyx_base.c_arraySize = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_arraySize; + __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffsetHandler.__pyx_base.c_arrayByteCount = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *))__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_arrayByteCount; + __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffsetHandler.__pyx_base.c_arrayToGLType = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *))__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_arrayToGLType; + __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffsetHandler.__pyx_base.c_asArray = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_asArray; + __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffsetHandler.__pyx_base.c_unitSize = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_unitSize; + __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffsetHandler.__pyx_base.c_dimensions = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *))__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_dimensions; + __pyx_type_17OpenGL_accelerate_3vbo_VBOOffsetHandler.tp_base = __pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler; + if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_3vbo_VBOOffsetHandler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_3vbo_VBOOffsetHandler.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOOffsetHandler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "VBOOffsetHandler", (PyObject *)&__pyx_type_17OpenGL_accelerate_3vbo_VBOOffsetHandler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_17OpenGL_accelerate_3vbo_VBOOffsetHandler = &__pyx_type_17OpenGL_accelerate_3vbo_VBOOffsetHandler; + __pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOOffset = &__pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffset; + __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffset.check_live = (int (*)(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *))__pyx_f_17OpenGL_accelerate_3vbo_9VBOOffset_check_live; + if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_3vbo_VBOOffset) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_3vbo_VBOOffset.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOOffset) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "VBOOffset", (PyObject *)&__pyx_type_17OpenGL_accelerate_3vbo_VBOOffset) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_17OpenGL_accelerate_3vbo_VBOOffset = &__pyx_type_17OpenGL_accelerate_3vbo_VBOOffset; __pyx_vtabptr_17OpenGL_accelerate_3vbo_VBO = &__pyx_vtable_17OpenGL_accelerate_3vbo_VBO; __pyx_vtable_17OpenGL_accelerate_3vbo_VBO.get_implementation = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *))__pyx_f_17OpenGL_accelerate_3vbo_3VBO_get_implementation; __pyx_vtable_17OpenGL_accelerate_3vbo_VBO.c_resolve = (unsigned int (*)(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *, PyObject *))__pyx_f_17OpenGL_accelerate_3vbo_3VBO_c_resolve; @@ -8343,14 +8250,6 @@ PyMODINIT_FUNC PyInit_vbo(void) if (__Pyx_SetAttrString(__pyx_m, "VBO", (PyObject *)&__pyx_type_17OpenGL_accelerate_3vbo_VBO) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_type_17OpenGL_accelerate_3vbo_VBO.tp_weaklistoffset == 0) __pyx_type_17OpenGL_accelerate_3vbo_VBO.tp_weaklistoffset = offsetof(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO, __weakref__); __pyx_ptype_17OpenGL_accelerate_3vbo_VBO = &__pyx_type_17OpenGL_accelerate_3vbo_VBO; - __pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOOffset = &__pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffset; - __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffset.check_live = (int (*)(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *))__pyx_f_17OpenGL_accelerate_3vbo_9VBOOffset_check_live; - if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_3vbo_VBOOffset) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_3vbo_VBOOffset.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOOffset) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "VBOOffset", (PyObject *)&__pyx_type_17OpenGL_accelerate_3vbo_VBOOffset) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_17OpenGL_accelerate_3vbo_VBOOffset = &__pyx_type_17OpenGL_accelerate_3vbo_VBOOffset; - __pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler = __Pyx_ImportType("OpenGL_accelerate.formathandler", "FormatHandler", sizeof(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler), 1); if (unlikely(!__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_vtabptr_17OpenGL_accelerate_13formathandler_FormatHandler = (struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler*)__Pyx_GetVtable(__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_dict); if (unlikely(!__pyx_vtabptr_17OpenGL_accelerate_13formathandler_FormatHandler)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOHandler = &__pyx_vtable_17OpenGL_accelerate_3vbo_VBOHandler; __pyx_vtable_17OpenGL_accelerate_3vbo_VBOHandler.__pyx_base = *__pyx_vtabptr_17OpenGL_accelerate_13formathandler_FormatHandler; __pyx_vtable_17OpenGL_accelerate_3vbo_VBOHandler.__pyx_base.c_from_param = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_from_param; @@ -8366,21 +8265,6 @@ PyMODINIT_FUNC PyInit_vbo(void) if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_3vbo_VBOHandler.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOHandler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "VBOHandler", (PyObject *)&__pyx_type_17OpenGL_accelerate_3vbo_VBOHandler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_17OpenGL_accelerate_3vbo_VBOHandler = &__pyx_type_17OpenGL_accelerate_3vbo_VBOHandler; - __pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOOffsetHandler = &__pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffsetHandler; - __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffsetHandler.__pyx_base = *__pyx_vtabptr_17OpenGL_accelerate_13formathandler_FormatHandler; - __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffsetHandler.__pyx_base.c_from_param = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_from_param; - __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffsetHandler.__pyx_base.c_dataPointer = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *))__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_dataPointer; - __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffsetHandler.__pyx_base.c_arraySize = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_arraySize; - __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffsetHandler.__pyx_base.c_arrayByteCount = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *))__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_arrayByteCount; - __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffsetHandler.__pyx_base.c_arrayToGLType = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *))__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_arrayToGLType; - __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffsetHandler.__pyx_base.c_asArray = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_asArray; - __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffsetHandler.__pyx_base.c_unitSize = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_unitSize; - __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffsetHandler.__pyx_base.c_dimensions = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *))__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_dimensions; - __pyx_type_17OpenGL_accelerate_3vbo_VBOOffsetHandler.tp_base = __pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler; - if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_3vbo_VBOOffsetHandler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_3vbo_VBOOffsetHandler.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOOffsetHandler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "VBOOffsetHandler", (PyObject *)&__pyx_type_17OpenGL_accelerate_3vbo_VBOOffsetHandler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_17OpenGL_accelerate_3vbo_VBOOffsetHandler = &__pyx_type_17OpenGL_accelerate_3vbo_VBOOffsetHandler; /*--- Type import code ---*/ /*--- Variable import code ---*/ /*--- Function import code ---*/ @@ -8394,11 +8278,11 @@ PyMODINIT_FUNC PyInit_vbo(void) */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__ctypes), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ctypes, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__ctypes, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__weakref), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__weakref, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__weakref, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/vbo.pyx":4 @@ -8416,13 +8300,9 @@ PyMODINIT_FUNC PyInit_vbo(void) __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__OpenGL), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __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__error); - if (__pyx_t_1 == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__error); - if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__error, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__error, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -8444,21 +8324,13 @@ PyMODINIT_FUNC PyInit_vbo(void) __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s_16), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__bytes); - if (__pyx_t_2 == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__bytes); - if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s__bytes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__bytes, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__bytes, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__unicode); - if (__pyx_t_2 == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__unicode); - if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s__unicode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__unicode, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__unicode, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -8471,7 +8343,7 @@ PyMODINIT_FUNC PyInit_vbo(void) */ __pyx_t_1 = PyObject_Call(__pyx_builtin_object, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s___NULL, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s___NULL, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/vbo.pyx":48 @@ -8494,7 +8366,7 @@ PyMODINIT_FUNC PyInit_vbo(void) * """Retrieve our implementation reference""" * return self.get_implementation() */ - __pyx_t_1 = __Pyx_GetName((PyObject *)__pyx_ptype_17OpenGL_accelerate_3vbo_VBO, __pyx_n_s__implementation); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_17OpenGL_accelerate_3vbo_VBO, __pyx_n_s__implementation); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -8515,7 +8387,7 @@ PyMODINIT_FUNC PyInit_vbo(void) * def __exit__( self, exc_type=None, exc_val=None, exc_tb=None ): * """Context manager exit""" */ - __pyx_t_1 = __Pyx_GetName((PyObject *)__pyx_ptype_17OpenGL_accelerate_3vbo_VBO, __pyx_n_s__bind); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_17OpenGL_accelerate_3vbo_VBO, __pyx_n_s__bind); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_17OpenGL_accelerate_3vbo_VBO->tp_dict, __pyx_n_s____enter__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -8554,7 +8426,7 @@ PyMODINIT_FUNC PyInit_vbo(void) */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; goto __pyx_L0; __pyx_L1_error:; @@ -8592,17 +8464,15 @@ static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { } #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; } @@ -8746,6 +8616,48 @@ static void __Pyx_RaiseArgtupleInvalid( (num_expected == 1) ? "" : "s", num_found); } +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Format(PyExc_ImportError, + #if PY_MAJOR_VERSION < 3 + "cannot import name %.230s", PyString_AS_STRING(name)); + #else + "cannot import name %S", name); + #endif + } + return value; +} + +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 PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { +#if CYTHON_COMPILING_IN_CPYTHON +#if PY_MAJOR_VERSION >= 3 + if (likely(PyUnicode_Check(n))) +#else + if (likely(PyString_Check(n))) +#endif + return __Pyx_PyObject_GetAttrStr(o, n); +#endif + return PyObject_GetAttr(o, n); +} + static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; @@ -8777,6 +8689,25 @@ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyOb #endif } +static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, + CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename) { + PyObject *old_exc, *old_val, *old_tb; + PyObject *ctx; + __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); + #if PY_MAJOR_VERSION < 3 + ctx = PyString_FromString(name); + #else + ctx = PyUnicode_FromString(name); + #endif + __Pyx_ErrRestore(old_exc, old_val, old_tb); + if (!ctx) { + PyErr_WriteUnraisable(Py_None); + } else { + PyErr_WriteUnraisable(ctx); + Py_DECREF(ctx); + } +} + #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { @@ -8815,24 +8746,23 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, } 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); @@ -8870,8 +8800,7 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; - } - else + } else args = PyTuple_Pack(1, value); if (!args) goto bad; @@ -8892,18 +8821,22 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject "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"); @@ -8984,6 +8917,111 @@ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) 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 PyObject* __Pyx_PyObject_PopIndex(PyObject* L, Py_ssize_t ix) { + PyObject *r, *py_ix; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(PyList_CheckExact(L))) { + Py_ssize_t size = PyList_GET_SIZE(L); + if (likely(size > (((PyListObject*)L)->allocated >> 1))) { + Py_ssize_t cix = ix; + if (cix < 0) { + cix += size; + } + if (likely(0 <= cix && cix < size)) { + PyObject* v = PyList_GET_ITEM(L, cix); + Py_SIZE(L) -= 1; + size -= 1; + memmove(&PyList_GET_ITEM(L, cix), &PyList_GET_ITEM(L, cix+1), (size-cix)*sizeof(PyObject*)); + return v; + } + } + } +#endif + py_ix = PyInt_FromSsize_t(ix); + if (!py_ix) return NULL; + r = __Pyx_PyObject_CallMethod1(L, __pyx_n_s__pop, py_ix); + Py_DECREF(py_ix); + return r; +} + static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); @@ -9142,6 +9180,50 @@ static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) { type->tp_clear(obj); } +static void* __Pyx_GetVtable(PyObject *dict) { + void* ptr; + PyObject *ob = PyObject_GetItem(dict, __pyx_n_s____pyx_vtable__); + if (!ob) + goto bad; +#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) + ptr = PyCapsule_GetPointer(ob, 0); +#else + ptr = PyCObject_AsVoidPtr(ob); +#endif + if (!ptr && !PyErr_Occurred()) + PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); + Py_DECREF(ob); + return ptr; +bad: + Py_XDECREF(ob); + return NULL; +} + +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_GetNameInClass(PyObject *nmspace, PyObject *name) { + PyObject *result; + result = __Pyx_PyObject_GetAttrStr(nmspace, name); + if (!result) + result = __Pyx_GetModuleGlobalName(name); + return result; +} + static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); @@ -9180,8 +9262,8 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 - PyObject *py_import = 0; - py_import = __Pyx_GetAttrString(__pyx_b, "__import__"); + PyObject *py_import; + py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s____import__); if (!py_import) goto bad; #endif @@ -9255,15 +9337,6 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { return module; } -static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name) { -#if PY_MAJOR_VERSION < 3 - PyErr_Format(PyExc_ImportError, "cannot import name %.230s", - PyString_AsString(name)); -#else - PyErr_Format(PyExc_ImportError, "cannot import name %S", name); -#endif -} - static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { const unsigned char neg_one = (unsigned char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; @@ -9454,10 +9527,15 @@ static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) { 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)) { @@ -9470,6 +9548,16 @@ static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { #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"); @@ -9477,6 +9565,17 @@ static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { } 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 { @@ -9489,10 +9588,15 @@ static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { } } +#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)) { @@ -9505,6 +9609,16 @@ static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObje #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"); @@ -9512,6 +9626,17 @@ static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObje } 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 { @@ -9524,10 +9649,15 @@ static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObje } } +#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)) { @@ -9540,6 +9670,16 @@ static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { #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"); @@ -9547,6 +9687,17 @@ static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { } 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 { @@ -9559,10 +9710,15 @@ static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { } } +#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)) { @@ -9575,6 +9731,16 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { #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"); @@ -9582,6 +9748,17 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { } 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 { @@ -9594,10 +9771,15 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { } } +#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)) { @@ -9610,6 +9792,16 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { #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"); @@ -9617,6 +9809,17 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { } 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 { @@ -9629,10 +9832,15 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { } } +#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)) { @@ -9645,6 +9853,16 @@ static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* #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"); @@ -9652,6 +9870,17 @@ static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* } 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 { @@ -9664,25 +9893,6 @@ static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* } } -static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, - CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename) { - PyObject *old_exc, *old_val, *old_tb; - PyObject *ctx; - __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); - #if PY_MAJOR_VERSION < 3 - ctx = PyString_FromString(name); - #else - ctx = PyUnicode_FromString(name); - #endif - __Pyx_ErrRestore(old_exc, old_val, old_tb); - if (!ctx) { - PyErr_WriteUnraisable(Py_None); - } else { - PyErr_WriteUnraisable(ctx); - Py_DECREF(ctx); - } -} - static int __Pyx_check_binary_version(void) { char ctversion[4], rtversion[4]; PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); @@ -9702,23 +9912,6 @@ static int __Pyx_check_binary_version(void) { 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; -} - #ifndef __PYX_HAVE_RT_ImportModule #define __PYX_HAVE_RT_ImportModule static PyObject *__Pyx_ImportModule(const char *name) { @@ -9804,25 +9997,6 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class } #endif -static void* __Pyx_GetVtable(PyObject *dict) { - void* ptr; - PyObject *ob = PyMapping_GetItemString(dict, (char *)"__pyx_vtable__"); - if (!ob) - goto bad; -#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) - ptr = PyCapsule_GetPointer(ob, 0); -#else - ptr = PyCObject_AsVoidPtr(ob); -#endif - if (!ptr && !PyErr_Occurred()) - PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); - Py_DECREF(ob); - return ptr; -bad: - Py_XDECREF(ob); - return NULL; -} - 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) { @@ -10015,6 +10189,65 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { return 0; } +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; @@ -10024,14 +10257,14 @@ 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); @@ -10047,7 +10280,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { } #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)) { @@ -10088,11 +10321,10 @@ static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { } 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; diff --git a/OpenGL_accelerate/src/wrapper.c b/OpenGL_accelerate/src/wrapper.c index 9f61c0d1..d7234018 100644 --- a/OpenGL_accelerate/src/wrapper.c +++ b/OpenGL_accelerate/src/wrapper.c @@ -1,6 +1,18 @@ -/* Generated by Cython 0.18 on Mon Apr 15 22:37:35 2013 */ +/* Generated by Cython 0.19.1 on Thu Jul 11 00:05:41 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. @@ -116,6 +128,9 @@ #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)) ? \ @@ -155,6 +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) @@ -227,6 +250,40 @@ #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 @@ -259,17 +316,6 @@ #define CYTHON_WITHOUT_ASSERTIONS #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_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) @@ -283,10 +329,44 @@ # define CYTHON_UNUSED # endif #endif -typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ - -#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s) -#define __Pyx_PyBytes_AsUString(s) ((unsigned char*) PyBytes_AsString(s)) +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*/ + +#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*); @@ -300,6 +380,78 @@ static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #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__ @@ -315,8 +467,9 @@ static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #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; @@ -849,7 +1002,22 @@ static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_returnCArgument *__p #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) -static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ +#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_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*/ @@ -867,11 +1035,28 @@ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*pr static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*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_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ #if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { +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)) { @@ -883,154 +1068,56 @@ static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { return PyList_Append(list, x); } #else -#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) +#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { - PyObject *r; - if (!j) return NULL; - r = PyObject_GetItem(o, j); - Py_DECREF(j); - return r; -} -#define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \ - __Pyx_GetItemInt_List_Fast(o, i) : \ - __Pyx_GetItemInt_Generic(o, to_py_func(i))) -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) { -#if CYTHON_COMPILING_IN_CPYTHON - if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { - PyObject *r = PyList_GET_ITEM(o, i); - Py_INCREF(r); - return r; - } - else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) { - PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i); - Py_INCREF(r); - return r; - } - return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); -#else - return PySequence_GetItem(o, i); -#endif -} -#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \ - __Pyx_GetItemInt_Tuple_Fast(o, i) : \ - __Pyx_GetItemInt_Generic(o, to_py_func(i))) -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) { -#if CYTHON_COMPILING_IN_CPYTHON - if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { - PyObject *r = PyTuple_GET_ITEM(o, i); - Py_INCREF(r); - return r; - } - else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) { - PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i); - Py_INCREF(r); - return r; - } - return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); -#else - return PySequence_GetItem(o, i); -#endif -} -#define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \ - __Pyx_GetItemInt_Fast(o, i) : \ - __Pyx_GetItemInt_Generic(o, to_py_func(i))) -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) { -#if CYTHON_COMPILING_IN_CPYTHON - if (PyList_CheckExact(o)) { - Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); - if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) { - PyObject *r = PyList_GET_ITEM(o, n); - Py_INCREF(r); - return r; - } - } - else if (PyTuple_CheckExact(o)) { - Py_ssize_t n = (likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); - if (likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { - PyObject *r = PyTuple_GET_ITEM(o, n); - Py_INCREF(r); - return r; - } - } else { /* inlined PySequence_GetItem() */ - PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; - if (likely(m && m->sq_item)) { - if (unlikely(i < 0) && likely(m->sq_length)) { - Py_ssize_t l = m->sq_length(o); - if (unlikely(l < 0)) return NULL; - i += l; - } - return m->sq_item(o, i); - } - } -#else - if (PySequence_Check(o)) { - return PySequence_GetItem(o, i); - } -#endif - return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); -} +#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 void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ -#define __Pyx_SetItemInt(o, i, v, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \ - __Pyx_SetItemInt_Fast(o, i, v) : \ - __Pyx_SetItemInt_Generic(o, to_py_func(i), v)) -static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { - int r; - if (!j) return -1; - r = PyObject_SetItem(o, j, v); - Py_DECREF(j); - return r; -} -static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v) { -#if CYTHON_COMPILING_IN_CPYTHON - if (PyList_CheckExact(o)) { - Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); - if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) { - PyObject* old = PyList_GET_ITEM(o, n); - Py_INCREF(v); - PyList_SET_ITEM(o, n, v); - Py_DECREF(old); - return 1; - } - } else { /* inlined PySequence_SetItem() */ - PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; - if (likely(m && m->sq_ass_item)) { - if (unlikely(i < 0) && likely(m->sq_length)) { - Py_ssize_t l = m->sq_length(o); - if (unlikely(l < 0)) return -1; - i += l; - } - return m->sq_ass_item(o, i, v); - } - } -#else -#if CYTHON_COMPILING_IN_PYPY - if (PySequence_Check(o) && !PyDict_Check(o)) { -#else - if (PySequence_Check(o)) { -#endif - return PySequence_SetItem(o, i, v); - } -#endif - return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); -} +#define __Pyx_SetItemInt(o, i, v, size, to_py_func, is_list, wraparound, boundscheck) \ + (((size) <= sizeof(Py_ssize_t)) ? \ + __Pyx_SetItemInt_Fast(o, i, v, is_list, wraparound, boundscheck) : \ + __Pyx_SetItemInt_Generic(o, to_py_func(i), v)) +static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); +static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, + int is_list, int wraparound, int boundscheck); static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /*proto*/ +static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ + static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse); static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc); +static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ + +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /*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, int level); /*proto*/ -static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name); - static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); @@ -1065,8 +1152,6 @@ static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject * static int __Pyx_check_binary_version(void); -static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ - typedef struct { int code_line; PyCodeObject* code_object; @@ -1088,22 +1173,22 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ /* Module declarations from 'OpenGL_accelerate.wrapper' */ -static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter = 0; +static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement = 0; +static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_Wrapper = 0; +static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_CArgCalculator = 0; static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter = 0; -static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_cArgumentConverter = 0; +static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_CallFuncPyConverter = 0; static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter = 0; -static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_CArgCalculatorElement = 0; -static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_CArgCalculator = 0; -static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement = 0; -static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_PyArgCalculator = 0; +static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_returnCArgument = 0; +static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_returnPyArgument = 0; static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_CArgumentCalculator = 0; -static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_CallFuncPyConverter = 0; -static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_DefaultCConverter = 0; -static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_Wrapper = 0; +static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter = 0; static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_getPyArgsName = 0; -static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_returnPyArgument = 0; +static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_cArgumentConverter = 0; static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex = 0; -static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_returnCArgument = 0; +static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_PyArgCalculator = 0; +static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_CArgCalculatorElement = 0; +static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_7wrapper_DefaultCConverter = 0; #define __Pyx_MODULE_NAME "OpenGL_accelerate.wrapper" int __pyx_module_is_main_OpenGL_accelerate__wrapper = 0; @@ -1173,6 +1258,22 @@ static int __pyx_pf_17OpenGL_accelerate_7wrapper_15returnCArgument_5index_2__set static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_15returnCArgument_4name___get__(struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnCArgument *__pyx_v_self); /* proto */ static int __pyx_pf_17OpenGL_accelerate_7wrapper_15returnCArgument_4name_2__set__(struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnCArgument *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_17OpenGL_accelerate_7wrapper_15returnCArgument_4name_4__del__(struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnCArgument *__pyx_v_self); /* proto */ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_Wrapper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_CArgCalculator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_pyArgConverter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_CallFuncPyConverter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_returnConverter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_returnCArgument(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_returnPyArgument(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_CArgumentCalculator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_cArgConverter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_getPyArgsName(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_cArgumentConverter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_PyArgCalculator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_CArgCalculatorElement(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_DefaultCConverter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static char __pyx_k_1[] = "%s requires %r arguments (%s), received %s: %r"; static char __pyx_k_2[] = ", "; static char __pyx_k_3[] = "Expected %s C arguments for resolution, got %s"; @@ -1209,6 +1310,7 @@ static char __pyx_k__converter[] = "converter"; static char __pyx_k__enumerate[] = "enumerate"; static char __pyx_k__IndexError[] = "IndexError"; static char __pyx_k__ValueError[] = "ValueError"; +static char __pyx_k____import__[] = "__import__"; static char __pyx_k__cResolvers[] = "cResolvers"; static char __pyx_k__pyArgIndex[] = "pyArgIndex"; static char __pyx_k__cConverters[] = "cConverters"; @@ -1218,6 +1320,7 @@ static char __pyx_k__returnValues[] = "returnValues"; static char __pyx_k__ArgumentError[] = "ArgumentError"; static char __pyx_k__baseOperation[] = "baseOperation"; static char __pyx_k__AttributeError[] = "AttributeError"; +static char __pyx_k____pyx_vtable__[] = "__pyx_vtable__"; static char __pyx_k__calculate_cArgs[] = "calculate_cArgs"; static char __pyx_k__calculate_pyArgs[] = "calculate_pyArgs"; static char __pyx_k__pyConverterNames[] = "pyConverterNames"; @@ -1238,8 +1341,10 @@ static PyObject *__pyx_n_s__TypeError; static PyObject *__pyx_n_s__ValueError; static PyObject *__pyx_n_s____call__; static PyObject *__pyx_n_s____class__; +static PyObject *__pyx_n_s____import__; static PyObject *__pyx_n_s____main__; static PyObject *__pyx_n_s____name__; +static PyObject *__pyx_n_s____pyx_vtable__; static PyObject *__pyx_n_s____test__; static PyObject *__pyx_n_s__args; static PyObject *__pyx_n_s__arguments; @@ -1283,6 +1388,9 @@ static PyObject *__pyx_pw_17OpenGL_accelerate_7wrapper_13cArgConverter_1__call__ PyObject *__pyx_v_pyArgs = 0; int __pyx_v_index; PyObject *__pyx_v_wrapper = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); @@ -1419,6 +1527,9 @@ static PyObject *__pyx_pw_17OpenGL_accelerate_7wrapper_14pyArgConverter_1__call_ PyObject *__pyx_v_incoming = 0; PyObject *__pyx_v_function = 0; PyObject *__pyx_v_arguments = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); @@ -1553,6 +1664,9 @@ struct wrapperbase __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_18cArgumentCon #endif static PyObject *__pyx_pw_17OpenGL_accelerate_7wrapper_18cArgumentConverter_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_element = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); @@ -1669,6 +1783,9 @@ static PyObject *__pyx_pw_17OpenGL_accelerate_7wrapper_15returnConverter_1__call PyObject *__pyx_v_baseOperation = 0; PyObject *__pyx_v_pyArgs = 0; PyObject *__pyx_v_cArgs = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); @@ -1810,6 +1927,9 @@ static int __pyx_pw_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement_1__init PyObject *__pyx_v_wrapper = 0; PyObject *__pyx_v_index = 0; PyObject *__pyx_v_converter = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -1882,6 +2002,7 @@ static int __pyx_pf_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement___init_ __Pyx_RefNannyDeclarations long __pyx_t_1; int __pyx_t_2; + int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -1918,7 +2039,8 @@ static int __pyx_pf_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement___init_ * self.doCAPI = True */ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_converter, ((PyObject*)__pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter)); - if (__pyx_t_2) { + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { /* "src/wrapper.pyx":50 * self.index = index @@ -1984,8 +2106,8 @@ static int __pyx_pf_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement___init_ * def __call__( self, tuple pyArgs ): * """If callable, call converter( pyArgs, index, wrapper ), else return converter""" */ - __pyx_t_2 = PyObject_HasAttr(__pyx_v_converter, ((PyObject *)__pyx_n_s____call__)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_self->callable = __pyx_t_2; + __pyx_t_3 = PyObject_HasAttr(__pyx_v_converter, ((PyObject *)__pyx_n_s____call__)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->callable = __pyx_t_3; } __pyx_L3:; @@ -2007,6 +2129,9 @@ struct wrapperbase __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_21CArgCalculat #endif static PyObject *__pyx_pw_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_pyArgs = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); @@ -2113,13 +2238,14 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement_c_ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; + int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; - PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; 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; @@ -2146,7 +2272,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement_c_ * return self.c_converter.c_call( pyArgs, self.index, self.wrapper ) * elif self.callable: */ - if (__pyx_v_self->doCAPI) { + __pyx_t_4 = (__pyx_v_self->doCAPI != 0); + if (__pyx_t_4) { /* "src/wrapper.pyx":63 * try: @@ -2156,13 +2283,13 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement_c_ * return self.converter.__call__( pyArgs, self.index, self.wrapper ) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_v_self->wrapper; - __Pyx_INCREF(__pyx_t_4); - __pyx_t_5 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_cArgConverter *)__pyx_v_self->c_converter->__pyx_vtab)->c_call(__pyx_v_self->c_converter, __pyx_v_pyArgs, __pyx_v_self->index, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_r = __pyx_t_5; - __pyx_t_5 = 0; + __pyx_t_5 = __pyx_v_self->wrapper; + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_cArgConverter *)__pyx_v_self->c_converter->__pyx_vtab)->c_call(__pyx_v_self->c_converter, __pyx_v_pyArgs, __pyx_v_self->index, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; goto __pyx_L7_try_return; goto __pyx_L11; } @@ -2174,7 +2301,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement_c_ * return self.converter.__call__( pyArgs, self.index, self.wrapper ) * except Exception, err: */ - if (__pyx_v_self->callable) { + __pyx_t_4 = (__pyx_v_self->callable != 0); + if (__pyx_t_4) { /* "src/wrapper.pyx":65 * return self.c_converter.c_call( pyArgs, self.index, self.wrapper ) @@ -2184,27 +2312,27 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement_c_ * err.args += ( self.index, self.wrapper ) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = PyObject_GetAttr(__pyx_v_self->converter, __pyx_n_s____call__); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyInt_FromLong(__pyx_v_self->index); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->converter, __pyx_n_s____call__); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyInt_FromLong(__pyx_v_self->index); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(((PyObject *)__pyx_v_pyArgs)); - PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_pyArgs)); + PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_pyArgs)); __Pyx_GIVEREF(((PyObject *)__pyx_v_pyArgs)); - PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_self->wrapper); - PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_self->wrapper); + PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_self->wrapper); __Pyx_GIVEREF(__pyx_v_self->wrapper); - __pyx_t_4 = 0; - __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __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_r = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_t_5 = 0; + __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; goto __pyx_L7_try_return; goto __pyx_L11; } @@ -2221,9 +2349,9 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement_c_ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L3_error:; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "src/wrapper.pyx":66 * elif self.callable: @@ -2232,15 +2360,15 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement_c_ * err.args += ( self.index, self.wrapper ) * raise */ - __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_Exception); - if (__pyx_t_7) { + __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_Exception); + if (__pyx_t_8) { __Pyx_AddTraceback("OpenGL_accelerate.wrapper.CArgCalculatorElement.c_call", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_7, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_INCREF(__pyx_t_6); - __pyx_v_err = __pyx_t_6; + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __pyx_v_err = __pyx_t_7; /* "src/wrapper.pyx":67 * return self.converter.__call__( pyArgs, self.index, self.wrapper ) @@ -2249,24 +2377,24 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement_c_ * raise * return self.converter */ - __pyx_t_8 = PyObject_GetAttr(__pyx_v_err, __pyx_n_s__args); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = PyInt_FromLong(__pyx_v_self->index); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_err, __pyx_n_s__args); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __pyx_t_10 = PyInt_FromLong(__pyx_v_self->index); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); - PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); - __Pyx_GIVEREF(__pyx_t_9); - __Pyx_INCREF(__pyx_v_self->wrapper); - PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_self->wrapper); + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __Pyx_GOTREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + __Pyx_INCREF(__pyx_v_self->wrapper); + PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_self->wrapper); __Pyx_GIVEREF(__pyx_v_self->wrapper); - __pyx_t_9 = 0; - __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_t_8, ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} - __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; - if (PyObject_SetAttr(__pyx_v_err, __pyx_n_s__args, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __pyx_t_10 = 0; + __pyx_t_10 = PyNumber_InPlaceAdd(__pyx_t_9, ((PyObject *)__pyx_t_11)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_err, __pyx_n_s__args, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "src/wrapper.pyx":68 * except Exception, err: @@ -2275,15 +2403,15 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement_c_ * return self.converter * */ - __Pyx_GIVEREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); - __Pyx_ErrRestore(__pyx_t_4, __pyx_t_6, __pyx_t_5); - __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0; + __Pyx_GIVEREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_6); + __Pyx_ErrRestore(__pyx_t_5, __pyx_t_7, __pyx_t_6); + __pyx_t_5 = 0; __pyx_t_7 = 0; __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; @@ -2315,12 +2443,12 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement_c_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("OpenGL_accelerate.wrapper.CArgCalculatorElement.c_call", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -2335,6 +2463,9 @@ static int __pyx_pw_17OpenGL_accelerate_7wrapper_14CArgCalculator_1__init__(PyOb static int __pyx_pw_17OpenGL_accelerate_7wrapper_14CArgCalculator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_wrapper = 0; PyObject *__pyx_v_cConverters = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -2497,14 +2628,11 @@ static int __pyx_pf_17OpenGL_accelerate_7wrapper_14CArgCalculator___init__(struc __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_17OpenGL_accelerate_7wrapper_CArgCalculatorElement)), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; - if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __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_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = ((PyObject *)__pyx_t_1); - __Pyx_INCREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; /* "src/wrapper.pyx":79 * cConverters @@ -2513,11 +2641,11 @@ static int __pyx_pf_17OpenGL_accelerate_7wrapper_14CArgCalculator___init__(struc * CArgCalculatorElement(wrapper,i,converter) * for (i,converter) in enumerate( cConverters ) */ - __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __Pyx_GOTREF(__pyx_v_self->mapping); __Pyx_DECREF(((PyObject *)__pyx_v_self->mapping)); - __pyx_v_self->mapping = ((PyObject*)__pyx_t_2); - __pyx_t_2 = 0; + __pyx_v_self->mapping = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; __pyx_r = 0; goto __pyx_L0; @@ -2540,6 +2668,9 @@ static int __pyx_pf_17OpenGL_accelerate_7wrapper_14CArgCalculator___init__(struc static PyObject *__pyx_pw_17OpenGL_accelerate_7wrapper_14CArgCalculator_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_17OpenGL_accelerate_7wrapper_14CArgCalculator_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_pyArgs = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); @@ -2695,13 +2826,12 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_14CArgCalculator_c_call(st */ __pyx_t_4 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_CArgCalculatorElement *)((struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculatorElement *)__pyx_v_calc)->__pyx_vtab)->c_call(((struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculatorElement *)__pyx_v_calc), __pyx_v_pyArgs); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __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; - __Pyx_INCREF(((PyObject *)__pyx_t_1)); - __pyx_r = __pyx_t_1; - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __pyx_r = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); @@ -2725,6 +2855,9 @@ static int __pyx_pw_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_1__ini PyObject *__pyx_v_wrapper = 0; PyObject *__pyx_v_index = 0; PyObject *__pyx_v_converter = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -2797,6 +2930,7 @@ static int __pyx_pf_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement___init __Pyx_RefNannyDeclarations long __pyx_t_1; int __pyx_t_2; + int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -2833,7 +2967,8 @@ static int __pyx_pf_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement___init * self.c_converter = converter */ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_converter, ((PyObject*)__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter)); - if (__pyx_t_2) { + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { /* "src/wrapper.pyx":102 * self.index = index @@ -2903,6 +3038,9 @@ struct wrapperbase __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_22PyArgCalcula #endif static PyObject *__pyx_pw_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); @@ -3009,14 +3147,15 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_c PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; + int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; + PyObject *__pyx_t_7 = NULL; int __pyx_t_8; - PyObject *__pyx_t_9 = NULL; + int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -3043,7 +3182,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_c * return self.c_converter.c_call( * args[self.index], self.wrapper, args, */ - if (__pyx_v_self->doCAPI) { + __pyx_t_4 = (__pyx_v_self->doCAPI != 0); + if (__pyx_t_4) { /* "src/wrapper.pyx":113 * try: @@ -3065,16 +3205,16 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_c PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } - __pyx_t_4 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_args), __pyx_v_self->index, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __pyx_v_self->wrapper; - __Pyx_INCREF(__pyx_t_5); - __pyx_t_6 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_pyArgConverter *)__pyx_v_self->c_converter->__pyx_vtab)->c_call(__pyx_v_self->c_converter, __pyx_t_4, __pyx_t_5, __pyx_v_args); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_args), __pyx_v_self->index, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __pyx_v_self->wrapper; + __Pyx_INCREF(__pyx_t_6); + __pyx_t_7 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_pyArgConverter *)__pyx_v_self->c_converter->__pyx_vtab)->c_call(__pyx_v_self->c_converter, __pyx_t_5, __pyx_t_6, __pyx_v_args); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_r = __pyx_t_6; - __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; goto __pyx_L7_try_return; goto __pyx_L11; } @@ -3087,8 +3227,9 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_c * return args[self.index] * return self.converter( */ - __pyx_t_7 = (__pyx_v_self->converter == Py_None); - if (__pyx_t_7) { + __pyx_t_4 = (__pyx_v_self->converter == Py_None); + __pyx_t_8 = (__pyx_t_4 != 0); + if (__pyx_t_8) { /* "src/wrapper.pyx":118 * else: @@ -3102,10 +3243,10 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_c PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } - __pyx_t_6 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_args), __pyx_v_self->index, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_6); - __pyx_r = __pyx_t_6; - __pyx_t_6 = 0; + __pyx_t_7 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_args), __pyx_v_self->index, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; goto __pyx_L7_try_return; goto __pyx_L12; } @@ -3131,8 +3272,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_c PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } - __pyx_t_6 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_args), __pyx_v_self->index, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_args), __pyx_v_self->index, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_7); /* "src/wrapper.pyx":121 * return self.converter( @@ -3141,22 +3282,22 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_c * except Exception, err: * if hasattr( err, 'args' ): */ - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_self->wrapper); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_self->wrapper); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_self->wrapper); __Pyx_GIVEREF(__pyx_v_self->wrapper); __Pyx_INCREF(((PyObject *)__pyx_v_args)); - PyTuple_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_v_args)); + PyTuple_SET_ITEM(__pyx_t_6, 2, ((PyObject *)__pyx_v_args)); __Pyx_GIVEREF(((PyObject *)__pyx_v_args)); - __pyx_t_6 = 0; - __pyx_t_6 = PyObject_Call(__pyx_v_self->converter, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; - __pyx_r = __pyx_t_6; - __pyx_t_6 = 0; + __pyx_t_7 = 0; + __pyx_t_7 = PyObject_Call(__pyx_v_self->converter, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; goto __pyx_L7_try_return; } __pyx_L11:; @@ -3172,9 +3313,9 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_c __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L3_error:; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "src/wrapper.pyx":122 * args[self.index], self.wrapper, args @@ -3183,15 +3324,15 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_c * if hasattr( err, 'args' ): * err.args += ( self.converter, ) */ - __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_Exception); - if (__pyx_t_8) { + __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_Exception); + if (__pyx_t_9) { __Pyx_AddTraceback("OpenGL_accelerate.wrapper.PyArgCalculatorElement.c_call", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); - __pyx_v_err = __pyx_t_5; + __Pyx_INCREF(__pyx_t_6); + __pyx_v_err = __pyx_t_6; /* "src/wrapper.pyx":123 * ) @@ -3200,8 +3341,9 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_c * err.args += ( self.converter, ) * raise */ - __pyx_t_7 = PyObject_HasAttr(__pyx_v_err, ((PyObject *)__pyx_n_s__args)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} - if (__pyx_t_7) { + __pyx_t_8 = PyObject_HasAttr(__pyx_v_err, ((PyObject *)__pyx_n_s__args)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __pyx_t_4 = (__pyx_t_8 != 0); + if (__pyx_t_4) { /* "src/wrapper.pyx":124 * except Exception, err: @@ -3210,19 +3352,19 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_c * raise * */ - __pyx_t_9 = PyObject_GetAttr(__pyx_v_err, __pyx_n_s__args); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_err, __pyx_n_s__args); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_v_self->converter); - PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_self->converter); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_self->converter); __Pyx_GIVEREF(__pyx_v_self->converter); - __pyx_t_11 = PyNumber_InPlaceAdd(__pyx_t_9, ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} - __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; - if (PyObject_SetAttr(__pyx_v_err, __pyx_n_s__args, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_12 = PyNumber_InPlaceAdd(__pyx_t_10, ((PyObject *)__pyx_t_11)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_err, __pyx_n_s__args, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L15; } __pyx_L15:; @@ -3234,15 +3376,15 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_c * * cdef class PyArgCalculator: */ + __Pyx_GIVEREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); - __Pyx_ErrRestore(__pyx_t_6, __pyx_t_5, __pyx_t_4); - __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; + __Pyx_ErrRestore(__pyx_t_7, __pyx_t_6, __pyx_t_5); + __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; @@ -3262,12 +3404,12 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_c __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("OpenGL_accelerate.wrapper.PyArgCalculatorElement.c_call", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -3282,6 +3424,9 @@ static int __pyx_pw_17OpenGL_accelerate_7wrapper_15PyArgCalculator_1__init__(PyO static int __pyx_pw_17OpenGL_accelerate_7wrapper_15PyArgCalculator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_wrapper = 0; PyObject *__pyx_v_pyConverters = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -3457,14 +3602,11 @@ static int __pyx_pf_17OpenGL_accelerate_7wrapper_15PyArgCalculator___init__(stru __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement)), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; - if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __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_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = ((PyObject *)__pyx_t_1); - __Pyx_INCREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; /* "src/wrapper.pyx":138 * ): @@ -3473,11 +3615,11 @@ static int __pyx_pf_17OpenGL_accelerate_7wrapper_15PyArgCalculator___init__(stru * PyArgCalculatorElement(self,i,converter) * for (i,converter) in enumerate( pyConverters ) */ - __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __Pyx_GOTREF(__pyx_v_self->mapping); __Pyx_DECREF(((PyObject *)__pyx_v_self->mapping)); - __pyx_v_self->mapping = ((PyObject*)__pyx_t_2); - __pyx_t_2 = 0; + __pyx_v_self->mapping = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; /* "src/wrapper.pyx":142 * for (i,converter) in enumerate( pyConverters ) @@ -3510,6 +3652,9 @@ static int __pyx_pf_17OpenGL_accelerate_7wrapper_15PyArgCalculator___init__(stru static PyObject *__pyx_pw_17OpenGL_accelerate_7wrapper_15PyArgCalculator_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_17OpenGL_accelerate_7wrapper_15PyArgCalculator_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); @@ -3637,7 +3782,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_15PyArgCalculator_c_call(s {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyTuple_GET_SIZE(((PyObject *)__pyx_v_args)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = (__pyx_v_self->length != __pyx_t_1); + __pyx_t_2 = ((__pyx_v_self->length != __pyx_t_1) != 0); if (__pyx_t_2) { /* "src/wrapper.pyx":150 @@ -3647,9 +3792,9 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_15PyArgCalculator_c_call(s * self.length, * ", ".join( self.wrapper.pyConverterNames ), */ - __pyx_t_3 = PyObject_GetAttr(__pyx_v_self->wrapper, __pyx_n_s__wrappedOperation); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->wrapper, __pyx_n_s__wrappedOperation); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s____name__); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s____name__); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -3670,9 +3815,9 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_15PyArgCalculator_c_call(s * len(args), * args */ - __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_2), __pyx_n_s__join); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_2), __pyx_n_s__join); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyObject_GetAttr(__pyx_v_self->wrapper, __pyx_n_s__pyConverterNames); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->wrapper, __pyx_n_s__pyConverterNames); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); @@ -3784,13 +3929,12 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_15PyArgCalculator_c_call(s */ __pyx_t_6 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement *)((struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement *)__pyx_v_calc)->__pyx_vtab)->c_call(((struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement *)__pyx_v_calc), __pyx_v_args); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - if (unlikely(__Pyx_PyList_Append(__pyx_t_7, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_INCREF(((PyObject *)__pyx_t_7)); - __pyx_r = __pyx_t_7; - __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; + __pyx_r = ((PyObject*)__pyx_t_7); + __pyx_t_7 = 0; goto __pyx_L0; __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); @@ -3814,6 +3958,9 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_15PyArgCalculator_c_call(s static int __pyx_pw_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_cResolvers = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -3921,6 +4068,9 @@ static int __pyx_pf_17OpenGL_accelerate_7wrapper_19CArgumentCalculator___init__( static PyObject *__pyx_pw_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_cArgs = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); @@ -4034,13 +4184,14 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_c_ca PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; - PyObject *__pyx_t_8 = NULL; + int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; - int __pyx_t_11; - PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -4058,7 +4209,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_c_ca {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyTuple_GET_SIZE(((PyObject *)__pyx_v_cArgs)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = (__pyx_t_1 != __pyx_v_self->resolver_length); + __pyx_t_2 = ((__pyx_t_1 != __pyx_v_self->resolver_length) != 0); if (__pyx_t_2) { /* "src/wrapper.pyx":177 @@ -4144,7 +4295,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_c_ca PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_self->cResolvers), __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_self->cResolvers), __pyx_v_i, sizeof(int), PyInt_FromLong, 1, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF(__pyx_v_converter); __pyx_v_converter = __pyx_t_4; @@ -4158,7 +4309,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_c_ca * elif isinstance( converter, cArgumentConverter ): */ __pyx_t_2 = (__pyx_v_converter == Py_None); - if (__pyx_t_2) { + __pyx_t_8 = (__pyx_t_2 != 0); + if (__pyx_t_8) { /* "src/wrapper.pyx":184 * converter = self.cResolvers[i] @@ -4171,9 +4323,9 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_c_ca PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_cArgs), __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_cArgs), __pyx_v_i, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetItemInt(((PyObject *)__pyx_v_result), __pyx_v_i, __pyx_t_4, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetItemInt(((PyObject *)__pyx_v_result), __pyx_v_i, __pyx_t_4, sizeof(int), PyInt_FromLong, 1, 1, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L6; } @@ -4185,7 +4337,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_c_ca * # TODO: should pre-calculate this, isinstance is a very * # heavy operation. */ - __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_converter, ((PyObject*)__pyx_ptype_17OpenGL_accelerate_7wrapper_cArgumentConverter)); + __pyx_t_8 = __Pyx_TypeCheck(__pyx_v_converter, ((PyObject*)__pyx_ptype_17OpenGL_accelerate_7wrapper_cArgumentConverter)); + __pyx_t_2 = (__pyx_t_8 != 0); if (__pyx_t_2) { /* "src/wrapper.pyx":188 @@ -4196,10 +4349,10 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_c_ca * except Exception, err: */ { - __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_8); + __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); /*try:*/ { /* "src/wrapper.pyx":189 @@ -4213,17 +4366,17 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_c_ca PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L7_error;} } - __pyx_t_4 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_cArgs), __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L7_error;} + __pyx_t_4 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_cArgs), __pyx_v_i, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_cArgumentConverter *)((struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgumentConverter *)__pyx_v_converter)->__pyx_vtab)->c_call(((struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgumentConverter *)__pyx_v_converter), __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__Pyx_SetItemInt(((PyObject *)__pyx_v_result), __pyx_v_i, __pyx_t_5, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L7_error;} + if (__Pyx_SetItemInt(((PyObject *)__pyx_v_result), __pyx_v_i, __pyx_t_5, sizeof(int), PyInt_FromLong, 1, 1, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L14_try_end; __pyx_L7_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -4237,8 +4390,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_c_ca * err.args += (converter,) * raise */ - __pyx_t_11 = PyErr_ExceptionMatches(__pyx_builtin_Exception); - if (__pyx_t_11) { + __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_Exception); + if (__pyx_t_12) { __Pyx_AddTraceback("OpenGL_accelerate.wrapper.CArgumentCalculator.c_call", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} __Pyx_GOTREF(__pyx_t_5); @@ -4254,19 +4407,19 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_c_ca * raise * else: */ - __pyx_t_12 = PyObject_GetAttr(__pyx_v_err, __pyx_n_s__args); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_err, __pyx_n_s__args); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} __Pyx_GOTREF(__pyx_t_13); + __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} + __Pyx_GOTREF(__pyx_t_14); __Pyx_INCREF(__pyx_v_converter); - PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_converter); + PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_converter); __Pyx_GIVEREF(__pyx_v_converter); - __pyx_t_14 = PyNumber_InPlaceAdd(__pyx_t_12, ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; - if (PyObject_SetAttr(__pyx_v_err, __pyx_n_s__args, __pyx_t_14) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_15 = PyNumber_InPlaceAdd(__pyx_t_13, ((PyObject *)__pyx_t_14)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_err, __pyx_n_s__args, __pyx_t_15) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; /* "src/wrapper.pyx":192 * except Exception, err: @@ -4287,16 +4440,16 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_c_ca goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; - __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); goto __pyx_L1_error; __pyx_L8_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); __pyx_L14_try_end:; } goto __pyx_L6; @@ -4311,10 +4464,10 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_c_ca * except Exception, err: */ { - __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); + __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); - __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "src/wrapper.pyx":195 @@ -4328,7 +4481,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_c_ca PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L17_error;} } - __pyx_t_3 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_cArgs), __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L17_error;} + __pyx_t_3 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_cArgs), __pyx_v_i, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L17_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L17_error;} __Pyx_GOTREF(__pyx_t_4); @@ -4338,17 +4491,17 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_c_ca __pyx_t_3 = PyObject_Call(__pyx_v_converter, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L17_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; - if (__Pyx_SetItemInt(((PyObject *)__pyx_v_result), __pyx_v_i, __pyx_t_3, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L17_error;} + if (__Pyx_SetItemInt(((PyObject *)__pyx_v_result), __pyx_v_i, __pyx_t_3, sizeof(int), PyInt_FromLong, 1, 1, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L17_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L24_try_end; __pyx_L17_error:; - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -4360,8 +4513,8 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_c_ca * err.args += (converter,) * raise */ - __pyx_t_11 = PyErr_ExceptionMatches(__pyx_builtin_Exception); - if (__pyx_t_11) { + __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_Exception); + if (__pyx_t_12) { __Pyx_AddTraceback("OpenGL_accelerate.wrapper.CArgumentCalculator.c_call", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;} __Pyx_GOTREF(__pyx_t_3); @@ -4377,19 +4530,19 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_c_ca * raise * return result */ - __pyx_t_14 = PyObject_GetAttr(__pyx_v_err, __pyx_n_s__args); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;} + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_err, __pyx_n_s__args); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;} + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;} __Pyx_GOTREF(__pyx_t_14); - __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;} - __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_v_converter); - PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_converter); + PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_converter); __Pyx_GIVEREF(__pyx_v_converter); - __pyx_t_12 = PyNumber_InPlaceAdd(__pyx_t_14, ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;} - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; - if (PyObject_SetAttr(__pyx_v_err, __pyx_n_s__args, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;} - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_13 = PyNumber_InPlaceAdd(__pyx_t_15, ((PyObject *)__pyx_t_14)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;} + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_err, __pyx_n_s__args, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;} + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "src/wrapper.pyx":198 * except Exception, err: @@ -4410,16 +4563,16 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_c_ca goto __pyx_L18_exception_handled; } __pyx_L19_except_error:; + __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); goto __pyx_L1_error; __pyx_L18_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); __pyx_L24_try_end:; } } @@ -4444,9 +4597,9 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_c_ca __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_15); __Pyx_AddTraceback("OpenGL_accelerate.wrapper.CArgumentCalculator.c_call", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -4466,6 +4619,9 @@ struct wrapperbase __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_19CallFuncPyCo #endif static int __pyx_pw_17OpenGL_accelerate_7wrapper_19CallFuncPyConverter_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_function = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -4640,9 +4796,9 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_19CallFuncPyConverter_2__ * self.function, * ) */ - __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____class__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s____class__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____name__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s____name__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -4689,6 +4845,9 @@ struct wrapperbase __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_17DefaultCConv #endif static int __pyx_pw_17OpenGL_accelerate_7wrapper_17DefaultCConverter_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_index = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -4823,7 +4982,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_17DefaultCConverter_c_call PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } - __pyx_t_4 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_pyArgs), __pyx_v_self->index, sizeof(int), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_4 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_pyArgs), __pyx_v_self->index, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; @@ -4988,9 +5147,9 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_17DefaultCConverter_2__re * self.index, * ) */ - __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____class__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s____class__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____name__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s____name__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -5041,6 +5200,9 @@ static int __pyx_pw_17OpenGL_accelerate_7wrapper_7Wrapper_1__init__(PyObject *__ PyObject *__pyx_v_calculate_cArguments = 0; PyObject *__pyx_v_storeValues = 0; PyObject *__pyx_v_returnValues = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -5186,7 +5348,8 @@ static int __pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper___init__(struct __pyx_ * calculate_pyArgs = PyArgCalculator( self, calculate_pyArgs ) */ __pyx_t_1 = (__pyx_v_calculate_pyArgs != Py_None); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { /* "src/wrapper.pyx":260 * ): @@ -5195,9 +5358,9 @@ static int __pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper___init__(struct __pyx_ * calculate_pyArgs = PyArgCalculator( self, calculate_pyArgs ) * self.calculate_pyArgs = calculate_pyArgs */ - __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_calculate_pyArgs, ((PyObject*)__pyx_ptype_17OpenGL_accelerate_7wrapper_PyArgCalculator)); - __pyx_t_2 = (!__pyx_t_1); - if (__pyx_t_2) { + __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_calculate_pyArgs, ((PyObject*)__pyx_ptype_17OpenGL_accelerate_7wrapper_PyArgCalculator)); + __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); + if (__pyx_t_1) { /* "src/wrapper.pyx":261 * if calculate_pyArgs is not None: @@ -5268,7 +5431,8 @@ static int __pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper___init__(struct __pyx_ * if not isinstance( calculate_cArgs, CArgCalculator ): * calculate_cArgs = CArgCalculator( self, calculate_cArgs ) */ - __pyx_t_2 = (__pyx_v_calculate_cArgs != Py_None); + __pyx_t_1 = (__pyx_v_calculate_cArgs != Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "src/wrapper.pyx":267 @@ -5279,7 +5443,7 @@ static int __pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper___init__(struct __pyx_ * self.calculate_cArgs = calculate_cArgs */ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_calculate_cArgs, ((PyObject*)__pyx_ptype_17OpenGL_accelerate_7wrapper_CArgCalculator)); - __pyx_t_1 = (!__pyx_t_2); + __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); if (__pyx_t_1) { /* "src/wrapper.pyx":268 @@ -5352,7 +5516,8 @@ static int __pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper___init__(struct __pyx_ * calculate_cArguments = CArgumentCalculator( self, calculate_cArguments ) */ __pyx_t_1 = (__pyx_v_calculate_cArguments != Py_None); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { /* "src/wrapper.pyx":274 * self.doCargs = False @@ -5361,9 +5526,9 @@ static int __pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper___init__(struct __pyx_ * calculate_cArguments = CArgumentCalculator( self, calculate_cArguments ) * self.calculate_cArguments = calculate_cArguments */ - __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_calculate_cArguments, ((PyObject*)__pyx_ptype_17OpenGL_accelerate_7wrapper_CArgumentCalculator)); - __pyx_t_2 = (!__pyx_t_1); - if (__pyx_t_2) { + __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_calculate_cArguments, ((PyObject*)__pyx_ptype_17OpenGL_accelerate_7wrapper_CArgumentCalculator)); + __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); + if (__pyx_t_1) { /* "src/wrapper.pyx":275 * if calculate_cArguments is not None: @@ -5460,7 +5625,8 @@ static int __pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper___init__(struct __pyx_ * self.doCReturnAPI = True * self.doReturnValues = True */ - __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_returnValues, ((PyObject*)__pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter)); + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_returnValues, ((PyObject*)__pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter)); + __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "src/wrapper.pyx":283 @@ -5505,7 +5671,8 @@ static int __pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper___init__(struct __pyx_ * else: */ __pyx_t_2 = (__pyx_v_returnValues == Py_None); - if (__pyx_t_2) { + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { /* "src/wrapper.pyx":287 * self.c_returnValues = returnValues @@ -5599,17 +5766,18 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper_2__call__(struct PyObject *__pyx_v_err = NULL; 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; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; - PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; - int __pyx_t_11; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -5622,7 +5790,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper_2__call__(struct * pyArgs = tuple(self.calculate_pyArgs.c_call( args )) * else: */ - if (__pyx_v_self->doPyargs) { + __pyx_t_1 = (__pyx_v_self->doPyargs != 0); + if (__pyx_t_1) { /* "src/wrapper.pyx":296 * cdef tuple pyArgs, cArgs, cArguments @@ -5631,17 +5800,17 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper_2__call__(struct * else: * pyArgs = args */ - __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_PyArgCalculator *)__pyx_v_self->calculate_pyArgs->__pyx_vtab)->c_call(__pyx_v_self->calculate_pyArgs, __pyx_v_args)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - if (unlikely(__pyx_t_1 == Py_None)) { + __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_PyArgCalculator *)__pyx_v_self->calculate_pyArgs->__pyx_vtab)->c_call(__pyx_v_self->calculate_pyArgs, __pyx_v_args)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (unlikely(__pyx_t_2 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = ((PyObject *)PyList_AsTuple(((PyObject*)__pyx_t_1))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_pyArgs = ((PyObject*)__pyx_t_2); - __pyx_t_2 = 0; + __pyx_t_3 = ((PyObject *)PyList_AsTuple(((PyObject*)__pyx_t_2))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_pyArgs = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; goto __pyx_L3; } /*else*/ { @@ -5665,7 +5834,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper_2__call__(struct * cArgs = tuple(self.calculate_cArgs.c_call( pyArgs )) * else: */ - if (__pyx_v_self->doCargs) { + __pyx_t_1 = (__pyx_v_self->doCargs != 0); + if (__pyx_t_1) { /* "src/wrapper.pyx":300 * pyArgs = args @@ -5674,17 +5844,17 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper_2__call__(struct * else: * cArgs = pyArgs */ - __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_CArgCalculator *)__pyx_v_self->calculate_cArgs->__pyx_vtab)->c_call(__pyx_v_self->calculate_cArgs, __pyx_v_pyArgs)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - if (unlikely(__pyx_t_2 == Py_None)) { + __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_CArgCalculator *)__pyx_v_self->calculate_cArgs->__pyx_vtab)->c_call(__pyx_v_self->calculate_cArgs, __pyx_v_pyArgs)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(__pyx_t_3 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = ((PyObject *)PyList_AsTuple(((PyObject*)__pyx_t_2))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_v_cArgs = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; + __pyx_t_2 = ((PyObject *)PyList_AsTuple(((PyObject*)__pyx_t_3))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_cArgs = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; goto __pyx_L4; } /*else*/ { @@ -5708,7 +5878,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper_2__call__(struct * cArguments = tuple(self.calculate_cArguments( cArgs )) * else: */ - if (__pyx_v_self->doCarguments) { + __pyx_t_1 = (__pyx_v_self->doCarguments != 0); + if (__pyx_t_1) { /* "src/wrapper.pyx":304 * cArgs = pyArgs @@ -5717,24 +5888,24 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper_2__call__(struct * else: * cArguments = cArgs */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_cArgs)); - PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_cArgs)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_cArgs)); __Pyx_GIVEREF(((PyObject *)__pyx_v_cArgs)); - __pyx_t_2 = PyObject_Call(((PyObject *)__pyx_v_self->calculate_cArguments), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)__pyx_v_self->calculate_cArguments), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__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 = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_v_cArguments = ((PyObject*)__pyx_t_2); - __pyx_t_2 = 0; + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __pyx_v_cArguments = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; goto __pyx_L5; } /*else*/ { @@ -5759,10 +5930,10 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper_2__call__(struct * except (ctypes.ArgumentError,TypeError,AttributeError), err: */ { - __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); - __Pyx_XGOTREF(__pyx_t_3); + __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "src/wrapper.pyx":308 @@ -5772,21 +5943,21 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper_2__call__(struct * except (ctypes.ArgumentError,TypeError,AttributeError), err: * err.args = err.args + (cArguments,) */ - __pyx_t_2 = PySequence_Tuple(((PyObject *)__pyx_v_cArguments)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L6_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __pyx_t_1 = PyObject_Call(__pyx_v_self->wrappedOperation, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L6_error;} - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_v_result = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_t_3 = PySequence_Tuple(((PyObject *)__pyx_v_cArguments)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __pyx_t_2 = PyObject_Call(__pyx_v_self->wrappedOperation, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __pyx_v_result = __pyx_t_2; + __pyx_t_2 = 0; } - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L13_try_end; __pyx_L6_error:; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/wrapper.pyx":309 * try: @@ -5795,21 +5966,21 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper_2__call__(struct * err.args = err.args + (cArguments,) * raise err */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__ArgumentError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__ctypes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = PyErr_ExceptionMatches(__pyx_t_2) || PyErr_ExceptionMatches(__pyx_builtin_TypeError) || PyErr_ExceptionMatches(__pyx_builtin_AttributeError); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__ArgumentError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__pyx_t_6) { + __pyx_t_7 = PyErr_ExceptionMatches(__pyx_t_3) || PyErr_ExceptionMatches(__pyx_builtin_TypeError) || PyErr_ExceptionMatches(__pyx_builtin_AttributeError); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_7) { __Pyx_AddTraceback("OpenGL_accelerate.wrapper.Wrapper.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_t_7); - __Pyx_INCREF(__pyx_t_1); - __pyx_v_err = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_t_2); + __pyx_v_err = __pyx_t_2; /* "src/wrapper.pyx":310 * result = self.wrappedOperation( *cArguments ) @@ -5818,19 +5989,19 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper_2__call__(struct * raise err * except error.GLError, err: */ - __pyx_t_8 = PyObject_GetAttr(__pyx_v_err, __pyx_n_s__args); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_err, __pyx_n_s__args); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} + __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(((PyObject *)__pyx_v_cArguments)); - PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_cArguments)); + PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_cArguments)); __Pyx_GIVEREF(((PyObject *)__pyx_v_cArguments)); - __pyx_t_10 = PyNumber_Add(__pyx_t_8, ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L8_except_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; - if (PyObject_SetAttr(__pyx_v_err, __pyx_n_s__args, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_11 = PyNumber_Add(__pyx_t_9, ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_err, __pyx_n_s__args, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "src/wrapper.pyx":311 * except (ctypes.ArgumentError,TypeError,AttributeError), err: @@ -5841,9 +6012,9 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper_2__call__(struct */ __Pyx_Raise(__pyx_v_err, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} + __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; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_exception_handled; } @@ -5854,21 +6025,21 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper_2__call__(struct * err.cArgs = cArgs * err.pyArgs = pyArgs */ - __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__error); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__GLError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_6 = PyErr_ExceptionMatches(__pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_6) { + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__error); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__GLError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_7 = PyErr_ExceptionMatches(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_7) { __Pyx_AddTraceback("OpenGL_accelerate.wrapper.Wrapper.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_8, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_t_7); - __pyx_v_err = __pyx_t_7; + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_8); + __pyx_v_err = __pyx_t_8; /* "src/wrapper.pyx":313 * raise err @@ -5877,7 +6048,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper_2__call__(struct * err.pyArgs = pyArgs * raise err */ - if (PyObject_SetAttr(__pyx_v_err, __pyx_n_s__cArgs, ((PyObject *)__pyx_v_cArgs)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} + if (__Pyx_PyObject_SetAttrStr(__pyx_v_err, __pyx_n_s__cArgs, ((PyObject *)__pyx_v_cArgs)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} /* "src/wrapper.pyx":314 * except error.GLError, err: @@ -5886,7 +6057,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper_2__call__(struct * raise err * # handle storage of persistent argument values... */ - if (PyObject_SetAttr(__pyx_v_err, __pyx_n_s__pyArgs, ((PyObject *)__pyx_v_pyArgs)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} + if (__Pyx_PyObject_SetAttrStr(__pyx_v_err, __pyx_n_s__pyArgs, ((PyObject *)__pyx_v_pyArgs)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} /* "src/wrapper.pyx":315 * err.cArgs = cArgs @@ -5897,22 +6068,22 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper_2__call__(struct */ __Pyx_Raise(__pyx_v_err, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L7_exception_handled; } __pyx_L8_except_error:; - __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); - __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L1_error; __pyx_L7_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); - __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); __pyx_L13_try_end:; } @@ -5923,8 +6094,9 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper_2__call__(struct * self.storeValues( * result, */ - __pyx_t_11 = (__pyx_v_self->storeValues != Py_None); - if (__pyx_t_11) { + __pyx_t_1 = (__pyx_v_self->storeValues != Py_None); + __pyx_t_12 = (__pyx_t_1 != 0); + if (__pyx_t_12) { /* "src/wrapper.pyx":322 * self, @@ -5933,24 +6105,24 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper_2__call__(struct * ) * if self.doReturnValues: */ - __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_result); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_result); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_INCREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); + PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); __Pyx_INCREF(((PyObject *)__pyx_v_pyArgs)); - PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_v_pyArgs)); + PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_v_pyArgs)); __Pyx_GIVEREF(((PyObject *)__pyx_v_pyArgs)); __Pyx_INCREF(((PyObject *)__pyx_v_cArgs)); - PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_v_cArgs)); + PyTuple_SET_ITEM(__pyx_t_3, 3, ((PyObject *)__pyx_v_cArgs)); __Pyx_GIVEREF(((PyObject *)__pyx_v_cArgs)); - __pyx_t_7 = PyObject_Call(__pyx_v_self->storeValues, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_8 = PyObject_Call(__pyx_v_self->storeValues, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L18; } __pyx_L18:; @@ -5962,7 +6134,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper_2__call__(struct * if self.doCReturnAPI: * return self.c_returnValues.c_call( */ - if (__pyx_v_self->doReturnValues) { + __pyx_t_12 = (__pyx_v_self->doReturnValues != 0); + if (__pyx_t_12) { /* "src/wrapper.pyx":325 * ) @@ -5971,7 +6144,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper_2__call__(struct * return self.c_returnValues.c_call( * result, self, pyArgs, cArgs, */ - if (__pyx_v_self->doCReturnAPI) { + __pyx_t_12 = (__pyx_v_self->doCReturnAPI != 0); + if (__pyx_t_12) { /* "src/wrapper.pyx":326 * if self.doReturnValues: @@ -5989,10 +6163,10 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper_2__call__(struct * ) * else: */ - __pyx_t_7 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_returnConverter *)__pyx_v_self->c_returnValues->__pyx_vtab)->c_call(__pyx_v_self->c_returnValues, __pyx_v_result, ((PyObject *)__pyx_v_self), __pyx_v_pyArgs, __pyx_v_cArgs); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_7); - __pyx_r = __pyx_t_7; - __pyx_t_7 = 0; + __pyx_t_8 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_returnConverter *)__pyx_v_self->c_returnValues->__pyx_vtab)->c_call(__pyx_v_self->c_returnValues, __pyx_v_result, ((PyObject *)__pyx_v_self), __pyx_v_pyArgs, __pyx_v_cArgs); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; goto __pyx_L0; goto __pyx_L20; } @@ -6014,25 +6188,25 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper_2__call__(struct * ) * else: */ - __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_result); - PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_result); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_INCREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_self)); + PyTuple_SET_ITEM(__pyx_t_8, 1, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); __Pyx_INCREF(((PyObject *)__pyx_v_pyArgs)); - PyTuple_SET_ITEM(__pyx_t_7, 2, ((PyObject *)__pyx_v_pyArgs)); + PyTuple_SET_ITEM(__pyx_t_8, 2, ((PyObject *)__pyx_v_pyArgs)); __Pyx_GIVEREF(((PyObject *)__pyx_v_pyArgs)); __Pyx_INCREF(((PyObject *)__pyx_v_cArgs)); - PyTuple_SET_ITEM(__pyx_t_7, 3, ((PyObject *)__pyx_v_cArgs)); + PyTuple_SET_ITEM(__pyx_t_8, 3, ((PyObject *)__pyx_v_cArgs)); __Pyx_GIVEREF(((PyObject *)__pyx_v_cArgs)); - __pyx_t_2 = PyObject_Call(__pyx_v_self->returnValues, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_3 = PyObject_Call(__pyx_v_self->returnValues, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L0; } __pyx_L20:; @@ -6057,12 +6231,12 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper_2__call__(struct __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_7); + __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("OpenGL_accelerate.wrapper.Wrapper.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -6325,6 +6499,9 @@ static int __pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper_12returnValues_4__del_ static int __pyx_pw_17OpenGL_accelerate_7wrapper_13getPyArgsName_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_17OpenGL_accelerate_7wrapper_13getPyArgsName_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -6442,7 +6619,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_13getPyArgsName_2finalise * cdef object c_call( self, tuple pyArgs, int index, object baseOperation ): * return pyArgs[ self.index ] */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_wrapper, __pyx_n_s__pyArgIndex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_wrapper, __pyx_n_s__pyArgIndex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -6500,7 +6677,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_13getPyArgsName_c_call(str PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_pyArgs), __pyx_v_self->index, sizeof(unsigned int)+1, PyLong_FromUnsignedLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_pyArgs), __pyx_v_self->index, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -6563,9 +6740,9 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_13getPyArgsName_4__repr__ * self.name, * ) */ - __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____class__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s____class__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____name__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s____name__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -6782,6 +6959,9 @@ static int __pyx_pf_17OpenGL_accelerate_7wrapper_13getPyArgsName_4name_4__del__( static int __pyx_pw_17OpenGL_accelerate_7wrapper_16returnPyArgument_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_17OpenGL_accelerate_7wrapper_16returnPyArgument_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -6899,7 +7079,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_16returnPyArgument_2final * cdef c_call( self, object result, object baseOperation, tuple pyArgs, tuple cArgs ): * """Retrieve pyArgs[ self.index ]""" */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_wrapper, __pyx_n_s__pyArgIndex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_wrapper, __pyx_n_s__pyArgIndex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -6957,7 +7137,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_16returnPyArgument_c_call( PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_pyArgs), __pyx_v_self->index, sizeof(unsigned int)+1, PyLong_FromUnsignedLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_pyArgs), __pyx_v_self->index, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -7020,9 +7200,9 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_16returnPyArgument_4__rep * self.name, * ) */ - __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____class__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s____class__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____name__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s____name__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -7239,6 +7419,9 @@ static int __pyx_pf_17OpenGL_accelerate_7wrapper_16returnPyArgument_4name_4__del static int __pyx_pw_17OpenGL_accelerate_7wrapper_21returnPyArgumentIndex_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_17OpenGL_accelerate_7wrapper_21returnPyArgumentIndex_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_index; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -7369,7 +7552,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_21returnPyArgumentIndex_c_ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_pyArgs), __pyx_v_self->index, sizeof(unsigned int)+1, PyLong_FromUnsignedLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_pyArgs), __pyx_v_self->index, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -7433,9 +7616,9 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_21returnPyArgumentIndex_4 * self.index, * ) */ - __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____class__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s____class__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____name__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s____name__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -7559,6 +7742,9 @@ static int __pyx_pf_17OpenGL_accelerate_7wrapper_21returnPyArgumentIndex_5index_ static int __pyx_pw_17OpenGL_accelerate_7wrapper_15returnCArgument_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_17OpenGL_accelerate_7wrapper_15returnCArgument_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -7676,7 +7862,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_15returnCArgument_2finali * cdef c_call( self, object result, object baseOperation, tuple pyArgs, tuple cArgs ): * """Retrieve cArgs[ self.index ]""" */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_wrapper, __pyx_n_s__cArgIndex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_wrapper, __pyx_n_s__cArgIndex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -7734,7 +7920,7 @@ static PyObject *__pyx_f_17OpenGL_accelerate_7wrapper_15returnCArgument_c_call(s PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_cArgs), __pyx_v_self->index, sizeof(unsigned int)+1, PyLong_FromUnsignedLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_cArgs), __pyx_v_self->index, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -7797,9 +7983,9 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_7wrapper_15returnCArgument_4__repr * self.name, * ) */ - __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____class__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s____class__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____name__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s____name__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -8011,129 +8197,70 @@ static int __pyx_pf_17OpenGL_accelerate_7wrapper_15returnCArgument_4name_4__del_ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_cArgConverter __pyx_vtable_17OpenGL_accelerate_7wrapper_cArgConverter; +static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement __pyx_vtable_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement; -static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_cArgConverter(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgConverter *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; - p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgConverter *)o); - p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_7wrapper_cArgConverter; +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement *p; + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement *)o); + p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement; + p->wrapper = Py_None; Py_INCREF(Py_None); + p->converter = Py_None; Py_INCREF(Py_None); + p->c_converter = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_pyArgConverter *)Py_None); Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_cArgConverter(PyObject *o) { +static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->wrapper); + Py_CLEAR(p->converter); + Py_CLEAR(p->c_converter); (*Py_TYPE(o)->tp_free)(o); } -static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_cArgConverter[] = { - {0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number_cArgConverter = { - 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_cArgConverter = { - 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_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement *)o; + if (p->wrapper) { + e = (*v)(p->wrapper, a); if (e) return e; + } + if (p->converter) { + e = (*v)(p->converter, a); if (e) return e; + } + if (p->c_converter) { + e = (*v)(((PyObject*)p->c_converter), a); if (e) return e; + } + return 0; +} -static PyMappingMethods __pyx_tp_as_mapping_cArgConverter = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; +static int __pyx_tp_clear_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement *)o; + PyObject* tmp; + tmp = ((PyObject*)p->wrapper); + p->wrapper = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->converter); + p->converter = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->c_converter); + p->c_converter = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_pyArgConverter *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} -static PyBufferProcs __pyx_tp_as_buffer_cArgConverter = { - #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_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement[] = { + {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_cArgConverter = { +static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("OpenGL_accelerate.wrapper.cArgConverter"), /*tp_name*/ - sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgConverter), /*tp_basicsize*/ + __Pyx_NAMESTR("OpenGL_accelerate.wrapper.PyArgCalculatorElement"), /*tp_name*/ + sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_cArgConverter, /*tp_dealloc*/ + __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -8143,24 +8270,24 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_cArgConverter = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_cArgConverter, /*tp_as_number*/ - &__pyx_tp_as_sequence_cArgConverter, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_cArgConverter, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ - __pyx_pw_17OpenGL_accelerate_7wrapper_13cArgConverter_1__call__, /*tp_call*/ + __pyx_pw_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_3__call__, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_cArgConverter, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ - __Pyx_DOCSTR("C-level API definition for cConverter objects"), /*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*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement, /*tp_traverse*/ + __pyx_tp_clear_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_17OpenGL_accelerate_7wrapper_cArgConverter, /*tp_methods*/ + __pyx_methods_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -8168,9 +8295,9 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_cArgConverter = { 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - 0, /*tp_init*/ + __pyx_pw_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_17OpenGL_accelerate_7wrapper_cArgConverter, /*tp_new*/ + __pyx_tp_new_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -8183,129 +8310,146 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_cArgConverter = { 0, /*tp_version_tag*/ #endif }; -static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_pyArgConverter __pyx_vtable_17OpenGL_accelerate_7wrapper_pyArgConverter; -static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_pyArgConverter(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_pyArgConverter *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; - p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_pyArgConverter *)o); - p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_7wrapper_pyArgConverter; +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_Wrapper(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_Wrapper *p; + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_Wrapper *)o); + p->calculate_cArgs = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculator *)Py_None); Py_INCREF(Py_None); + p->calculate_cArguments = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgumentCalculator *)Py_None); Py_INCREF(Py_None); + p->calculate_pyArgs = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculator *)Py_None); Py_INCREF(Py_None); + p->wrappedOperation = Py_None; Py_INCREF(Py_None); + p->storeValues = Py_None; Py_INCREF(Py_None); + p->returnValues = Py_None; Py_INCREF(Py_None); + p->c_returnValues = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnConverter *)Py_None); Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_pyArgConverter(PyObject *o) { +static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_Wrapper(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_Wrapper *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_Wrapper *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->calculate_cArgs); + Py_CLEAR(p->calculate_cArguments); + Py_CLEAR(p->calculate_pyArgs); + Py_CLEAR(p->wrappedOperation); + Py_CLEAR(p->storeValues); + Py_CLEAR(p->returnValues); + Py_CLEAR(p->c_returnValues); (*Py_TYPE(o)->tp_free)(o); } -static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_pyArgConverter[] = { - {0, 0, 0, 0} -}; +static int __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_Wrapper(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_17OpenGL_accelerate_7wrapper_Wrapper *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_Wrapper *)o; + if (p->calculate_cArgs) { + e = (*v)(((PyObject*)p->calculate_cArgs), a); if (e) return e; + } + if (p->calculate_cArguments) { + e = (*v)(((PyObject*)p->calculate_cArguments), a); if (e) return e; + } + if (p->calculate_pyArgs) { + e = (*v)(((PyObject*)p->calculate_pyArgs), a); if (e) return e; + } + if (p->wrappedOperation) { + e = (*v)(p->wrappedOperation, a); if (e) return e; + } + if (p->storeValues) { + e = (*v)(p->storeValues, a); if (e) return e; + } + if (p->returnValues) { + e = (*v)(p->returnValues, a); if (e) return e; + } + if (p->c_returnValues) { + e = (*v)(((PyObject*)p->c_returnValues), a); if (e) return e; + } + return 0; +} -static PyNumberMethods __pyx_tp_as_number_pyArgConverter = { - 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 int __pyx_tp_clear_17OpenGL_accelerate_7wrapper_Wrapper(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_Wrapper *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_Wrapper *)o; + PyObject* tmp; + tmp = ((PyObject*)p->calculate_cArgs); + p->calculate_cArgs = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculator *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->calculate_cArguments); + p->calculate_cArguments = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgumentCalculator *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->calculate_pyArgs); + p->calculate_pyArgs = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculator *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->wrappedOperation); + p->wrappedOperation = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->storeValues); + p->storeValues = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->returnValues); + p->returnValues = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->c_returnValues); + p->c_returnValues = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnConverter *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} -static PySequenceMethods __pyx_tp_as_sequence_pyArgConverter = { - 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_17OpenGL_accelerate_7wrapper_7Wrapper_wrappedOperation(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_7wrapper_7Wrapper_16wrappedOperation_1__get__(o); +} + +static int __pyx_setprop_17OpenGL_accelerate_7wrapper_7Wrapper_wrappedOperation(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_17OpenGL_accelerate_7wrapper_7Wrapper_16wrappedOperation_3__set__(o, v); + } + else { + return __pyx_pw_17OpenGL_accelerate_7wrapper_7Wrapper_16wrappedOperation_5__del__(o); + } +} + +static PyObject *__pyx_getprop_17OpenGL_accelerate_7wrapper_7Wrapper_storeValues(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_7wrapper_7Wrapper_11storeValues_1__get__(o); +} + +static int __pyx_setprop_17OpenGL_accelerate_7wrapper_7Wrapper_storeValues(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_17OpenGL_accelerate_7wrapper_7Wrapper_11storeValues_3__set__(o, v); + } + else { + return __pyx_pw_17OpenGL_accelerate_7wrapper_7Wrapper_11storeValues_5__del__(o); + } +} + +static PyObject *__pyx_getprop_17OpenGL_accelerate_7wrapper_7Wrapper_returnValues(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_7wrapper_7Wrapper_12returnValues_1__get__(o); +} + +static int __pyx_setprop_17OpenGL_accelerate_7wrapper_7Wrapper_returnValues(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_17OpenGL_accelerate_7wrapper_7Wrapper_12returnValues_3__set__(o, v); + } + else { + return __pyx_pw_17OpenGL_accelerate_7wrapper_7Wrapper_12returnValues_5__del__(o); + } +} -static PyMappingMethods __pyx_tp_as_mapping_pyArgConverter = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ +static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_Wrapper[] = { + {0, 0, 0, 0} }; -static PyBufferProcs __pyx_tp_as_buffer_pyArgConverter = { - #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_17OpenGL_accelerate_7wrapper_Wrapper[] = { + {(char *)"wrappedOperation", __pyx_getprop_17OpenGL_accelerate_7wrapper_7Wrapper_wrappedOperation, __pyx_setprop_17OpenGL_accelerate_7wrapper_7Wrapper_wrappedOperation, 0, 0}, + {(char *)"storeValues", __pyx_getprop_17OpenGL_accelerate_7wrapper_7Wrapper_storeValues, __pyx_setprop_17OpenGL_accelerate_7wrapper_7Wrapper_storeValues, 0, 0}, + {(char *)"returnValues", __pyx_getprop_17OpenGL_accelerate_7wrapper_7Wrapper_returnValues, __pyx_setprop_17OpenGL_accelerate_7wrapper_7Wrapper_returnValues, 0, 0}, + {0, 0, 0, 0, 0} }; -static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_pyArgConverter = { +static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_Wrapper = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("OpenGL_accelerate.wrapper.pyArgConverter"), /*tp_name*/ - sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_pyArgConverter), /*tp_basicsize*/ + __Pyx_NAMESTR("OpenGL_accelerate.wrapper.Wrapper"), /*tp_name*/ + sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_Wrapper), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_pyArgConverter, /*tp_dealloc*/ + __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_Wrapper, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -8315,34 +8459,34 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_pyArgConverter = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_pyArgConverter, /*tp_as_number*/ - &__pyx_tp_as_sequence_pyArgConverter, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_pyArgConverter, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ - __pyx_pw_17OpenGL_accelerate_7wrapper_14pyArgConverter_1__call__, /*tp_call*/ + __pyx_pw_17OpenGL_accelerate_7wrapper_7Wrapper_3__call__, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_pyArgConverter, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ - __Pyx_DOCSTR("C-level API definition for pyArg converter objects"), /*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("C-coded most-generic form of the wrapper's core function\n\t\n\tApplies a series of wrapper stages to the core function in order \n\tto expand and/or convert parameters into formats which are compatible\n\twith the underlying (ctypes) library. Requires the use of the \n\tCalculator objects defined later in this module in order to provide \n\tefficient operations.\n\t"), /*tp_doc*/ + __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_Wrapper, /*tp_traverse*/ + __pyx_tp_clear_17OpenGL_accelerate_7wrapper_Wrapper, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_17OpenGL_accelerate_7wrapper_pyArgConverter, /*tp_methods*/ + __pyx_methods_17OpenGL_accelerate_7wrapper_Wrapper, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_17OpenGL_accelerate_7wrapper_Wrapper, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - 0, /*tp_init*/ + __pyx_pw_17OpenGL_accelerate_7wrapper_7Wrapper_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_17OpenGL_accelerate_7wrapper_pyArgConverter, /*tp_new*/ + __pyx_tp_new_17OpenGL_accelerate_7wrapper_Wrapper, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -8355,129 +8499,129 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_pyArgConverter = { 0, /*tp_version_tag*/ #endif }; -static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_cArgumentConverter __pyx_vtable_17OpenGL_accelerate_7wrapper_cArgumentConverter; +static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_CArgCalculator __pyx_vtable_17OpenGL_accelerate_7wrapper_CArgCalculator; -static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_cArgumentConverter(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgumentConverter *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; - p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgumentConverter *)o); - p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_7wrapper_cArgumentConverter; +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_CArgCalculator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculator *p; + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculator *)o); + p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_7wrapper_CArgCalculator; + p->mapping = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_cArgumentConverter(PyObject *o) { +static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_CArgCalculator(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculator *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculator *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->mapping); (*Py_TYPE(o)->tp_free)(o); } -static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_cArgumentConverter[] = { +static int __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_CArgCalculator(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculator *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculator *)o; + if (p->mapping) { + e = (*v)(p->mapping, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_17OpenGL_accelerate_7wrapper_CArgCalculator(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculator *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculator *)o; + PyObject* tmp; + tmp = ((PyObject*)p->mapping); + p->mapping = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_CArgCalculator[] = { {0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_cArgumentConverter = { - 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_17OpenGL_accelerate_7wrapper_CArgCalculator = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("OpenGL_accelerate.wrapper.CArgCalculator"), /*tp_name*/ + sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculator), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_CArgCalculator, /*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*/ - #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_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + __pyx_pw_17OpenGL_accelerate_7wrapper_14CArgCalculator_3__call__, /*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*/ + __Pyx_DOCSTR("C-coded version of the c-arg calculator pattern"), /*tp_doc*/ + __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_CArgCalculator, /*tp_traverse*/ + __pyx_tp_clear_17OpenGL_accelerate_7wrapper_CArgCalculator, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_17OpenGL_accelerate_7wrapper_CArgCalculator, /*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*/ + __pyx_pw_17OpenGL_accelerate_7wrapper_14CArgCalculator_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_17OpenGL_accelerate_7wrapper_CArgCalculator, /*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_17OpenGL_accelerate_7wrapper_pyArgConverter __pyx_vtable_17OpenGL_accelerate_7wrapper_pyArgConverter; -static PySequenceMethods __pyx_tp_as_sequence_cArgumentConverter = { - 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_17OpenGL_accelerate_7wrapper_pyArgConverter(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_pyArgConverter *p; + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_pyArgConverter *)o); + p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_7wrapper_pyArgConverter; + return o; +} -static PyMappingMethods __pyx_tp_as_mapping_cArgumentConverter = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; +static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_pyArgConverter(PyObject *o) { + (*Py_TYPE(o)->tp_free)(o); +} -static PyBufferProcs __pyx_tp_as_buffer_cArgumentConverter = { - #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_17OpenGL_accelerate_7wrapper_pyArgConverter[] = { + {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_cArgumentConverter = { +static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_pyArgConverter = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("OpenGL_accelerate.wrapper.cArgumentConverter"), /*tp_name*/ - sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgumentConverter), /*tp_basicsize*/ + __Pyx_NAMESTR("OpenGL_accelerate.wrapper.pyArgConverter"), /*tp_name*/ + sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_pyArgConverter), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_cArgumentConverter, /*tp_dealloc*/ + __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_pyArgConverter, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -8487,24 +8631,24 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_cArgumentConverter = 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_cArgumentConverter, /*tp_as_number*/ - &__pyx_tp_as_sequence_cArgumentConverter, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_cArgumentConverter, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ - __pyx_pw_17OpenGL_accelerate_7wrapper_18cArgumentConverter_1__call__, /*tp_call*/ + __pyx_pw_17OpenGL_accelerate_7wrapper_14pyArgConverter_1__call__, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_cArgumentConverter, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ - __Pyx_DOCSTR("C-level API definition for cArgument convert objects"), /*tp_doc*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + __Pyx_DOCSTR("C-level API definition for pyArg converter objects"), /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_17OpenGL_accelerate_7wrapper_cArgumentConverter, /*tp_methods*/ + __pyx_methods_17OpenGL_accelerate_7wrapper_pyArgConverter, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -8514,7 +8658,7 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_cArgumentConverter = 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_17OpenGL_accelerate_7wrapper_cArgumentConverter, /*tp_new*/ + __pyx_tp_new_17OpenGL_accelerate_7wrapper_pyArgConverter, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -8527,121 +8671,127 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_cArgumentConverter = 0, /*tp_version_tag*/ #endif }; -static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_returnConverter __pyx_vtable_17OpenGL_accelerate_7wrapper_returnConverter; +static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_CallFuncPyConverter __pyx_vtable_17OpenGL_accelerate_7wrapper_CallFuncPyConverter; -static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_returnConverter(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnConverter *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; - p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnConverter *)o); - p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnConverter; +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_CallFuncPyConverter(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_CallFuncPyConverter *p; + PyObject *o = __pyx_tp_new_17OpenGL_accelerate_7wrapper_pyArgConverter(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_CallFuncPyConverter *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_pyArgConverter*)__pyx_vtabptr_17OpenGL_accelerate_7wrapper_CallFuncPyConverter; + p->function = Py_None; Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_returnConverter(PyObject *o) { - (*Py_TYPE(o)->tp_free)(o); +static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_CallFuncPyConverter(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_CallFuncPyConverter *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_CallFuncPyConverter *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->function); + PyObject_GC_Track(o); + __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_pyArgConverter(o); } -static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_returnConverter[] = { +static int __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_CallFuncPyConverter(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_17OpenGL_accelerate_7wrapper_CallFuncPyConverter *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_CallFuncPyConverter *)o; + e = ((likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter)) ? ((__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_traverse) ? __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_CallFuncPyConverter)); if (e) return e; + if (p->function) { + e = (*v)(p->function, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_17OpenGL_accelerate_7wrapper_CallFuncPyConverter(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_CallFuncPyConverter *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_CallFuncPyConverter *)o; + PyObject* tmp; + if (likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter)) { if (__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_clear) __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_17OpenGL_accelerate_7wrapper_CallFuncPyConverter); + tmp = ((PyObject*)p->function); + p->function = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_CallFuncPyConverter[] = { {0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_returnConverter = { - 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_17OpenGL_accelerate_7wrapper_CallFuncPyConverter = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("OpenGL_accelerate.wrapper.CallFuncPyConverter"), /*tp_name*/ + sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_CallFuncPyConverter), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_CallFuncPyConverter, /*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*/ + __pyx_pw_17OpenGL_accelerate_7wrapper_19CallFuncPyConverter_3__repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + #if CYTHON_COMPILING_IN_PYPY + __pyx_pw_17OpenGL_accelerate_7wrapper_14pyArgConverter_1__call__, /*tp_call*/ + #else + 0, /*tp_call*/ #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_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*/ + __Pyx_DOCSTR("PyConverter that takes a callable and calls it on incoming"), /*tp_doc*/ + __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_CallFuncPyConverter, /*tp_traverse*/ + __pyx_tp_clear_17OpenGL_accelerate_7wrapper_CallFuncPyConverter, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_17OpenGL_accelerate_7wrapper_CallFuncPyConverter, /*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*/ + __pyx_pw_17OpenGL_accelerate_7wrapper_19CallFuncPyConverter_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_17OpenGL_accelerate_7wrapper_CallFuncPyConverter, /*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_17OpenGL_accelerate_7wrapper_returnConverter __pyx_vtable_17OpenGL_accelerate_7wrapper_returnConverter; -static PySequenceMethods __pyx_tp_as_sequence_returnConverter = { - 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_17OpenGL_accelerate_7wrapper_returnConverter(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnConverter *p; + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnConverter *)o); + p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnConverter; + return o; +} -static PyMappingMethods __pyx_tp_as_mapping_returnConverter = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; +static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_returnConverter(PyObject *o) { + (*Py_TYPE(o)->tp_free)(o); +} -static PyBufferProcs __pyx_tp_as_buffer_returnConverter = { - #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_17OpenGL_accelerate_7wrapper_returnConverter[] = { + {0, 0, 0, 0} }; static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_returnConverter = { @@ -8659,16 +8809,16 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_returnConverter = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_returnConverter, /*tp_as_number*/ - &__pyx_tp_as_sequence_returnConverter, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_returnConverter, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ __pyx_pw_17OpenGL_accelerate_7wrapper_15returnConverter_1__call__, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_returnConverter, /*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*/ __Pyx_DOCSTR("C-level API definition for cArgument convert objects"), /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ @@ -8699,168 +8849,90 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_returnConverter = { 0, /*tp_version_tag*/ #endif }; -static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_CArgCalculatorElement __pyx_vtable_17OpenGL_accelerate_7wrapper_CArgCalculatorElement; +static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_returnCArgument __pyx_vtable_17OpenGL_accelerate_7wrapper_returnCArgument; -static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_CArgCalculatorElement(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculatorElement *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; - p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculatorElement *)o); - p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_7wrapper_CArgCalculatorElement; - p->wrapper = Py_None; Py_INCREF(Py_None); - p->converter = Py_None; Py_INCREF(Py_None); - p->c_converter = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgConverter *)Py_None); Py_INCREF(Py_None); +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_returnCArgument(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnCArgument *p; + PyObject *o = __pyx_tp_new_17OpenGL_accelerate_7wrapper_returnConverter(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnCArgument *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_returnConverter*)__pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnCArgument; + p->name = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_CArgCalculatorElement(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculatorElement *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculatorElement *)o; +static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_returnCArgument(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnCArgument *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnCArgument *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->wrapper); - Py_CLEAR(p->converter); - Py_CLEAR(p->c_converter); + Py_CLEAR(p->name); PyObject_GC_Track(o); - (*Py_TYPE(o)->tp_free)(o); + __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_returnConverter(o); } -static int __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_CArgCalculatorElement(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_returnCArgument(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculatorElement *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculatorElement *)o; - if (p->wrapper) { - e = (*v)(p->wrapper, a); if (e) return e; - } - if (p->converter) { - e = (*v)(p->converter, a); if (e) return e; - } - if (p->c_converter) { - e = (*v)(((PyObject*)p->c_converter), a); if (e) return e; + struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnCArgument *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnCArgument *)o; + e = ((likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter)) ? ((__pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter->tp_traverse) ? __pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_returnCArgument)); if (e) return e; + if (p->name) { + e = (*v)(p->name, a); if (e) return e; } return 0; } -static int __pyx_tp_clear_17OpenGL_accelerate_7wrapper_CArgCalculatorElement(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculatorElement *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculatorElement *)o; +static int __pyx_tp_clear_17OpenGL_accelerate_7wrapper_returnCArgument(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnCArgument *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnCArgument *)o; PyObject* tmp; - tmp = ((PyObject*)p->wrapper); - p->wrapper = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->converter); - p->converter = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->c_converter); - p->c_converter = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgConverter *)Py_None); Py_INCREF(Py_None); + if (likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter)) { if (__pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter->tp_clear) __pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_17OpenGL_accelerate_7wrapper_returnCArgument); + tmp = ((PyObject*)p->name); + p->name = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_CArgCalculatorElement[] = { - {0, 0, 0, 0} -}; +static PyObject *__pyx_getprop_17OpenGL_accelerate_7wrapper_15returnCArgument_index(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_7wrapper_15returnCArgument_5index_1__get__(o); +} -static PyNumberMethods __pyx_tp_as_number_CArgCalculatorElement = { - 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 int __pyx_setprop_17OpenGL_accelerate_7wrapper_15returnCArgument_index(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_17OpenGL_accelerate_7wrapper_15returnCArgument_5index_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} -static PySequenceMethods __pyx_tp_as_sequence_CArgCalculatorElement = { - 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_17OpenGL_accelerate_7wrapper_15returnCArgument_name(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_7wrapper_15returnCArgument_4name_1__get__(o); +} + +static int __pyx_setprop_17OpenGL_accelerate_7wrapper_15returnCArgument_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_17OpenGL_accelerate_7wrapper_15returnCArgument_4name_3__set__(o, v); + } + else { + return __pyx_pw_17OpenGL_accelerate_7wrapper_15returnCArgument_4name_5__del__(o); + } +} -static PyMappingMethods __pyx_tp_as_mapping_CArgCalculatorElement = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ +static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_returnCArgument[] = { + {__Pyx_NAMESTR("finalise"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_7wrapper_15returnCArgument_3finalise, METH_O, __Pyx_DOCSTR(0)}, + {0, 0, 0, 0} }; -static PyBufferProcs __pyx_tp_as_buffer_CArgCalculatorElement = { - #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_17OpenGL_accelerate_7wrapper_returnCArgument[] = { + {(char *)"index", __pyx_getprop_17OpenGL_accelerate_7wrapper_15returnCArgument_index, __pyx_setprop_17OpenGL_accelerate_7wrapper_15returnCArgument_index, 0, 0}, + {(char *)"name", __pyx_getprop_17OpenGL_accelerate_7wrapper_15returnCArgument_name, __pyx_setprop_17OpenGL_accelerate_7wrapper_15returnCArgument_name, 0, 0}, + {0, 0, 0, 0, 0} }; -static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_CArgCalculatorElement = { +static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_returnCArgument = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("OpenGL_accelerate.wrapper.CArgCalculatorElement"), /*tp_name*/ - sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculatorElement), /*tp_basicsize*/ + __Pyx_NAMESTR("OpenGL_accelerate.wrapper.returnCArgument"), /*tp_name*/ + sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnCArgument), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_CArgCalculatorElement, /*tp_dealloc*/ + __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_returnCArgument, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -8869,35 +8941,39 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_CArgCalculatorElemen #else 0, /*reserved*/ #endif - 0, /*tp_repr*/ - &__pyx_tp_as_number_CArgCalculatorElement, /*tp_as_number*/ - &__pyx_tp_as_sequence_CArgCalculatorElement, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_CArgCalculatorElement, /*tp_as_mapping*/ + __pyx_pw_17OpenGL_accelerate_7wrapper_15returnCArgument_5__repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ - __pyx_pw_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement_3__call__, /*tp_call*/ + #if CYTHON_COMPILING_IN_PYPY + __pyx_pw_17OpenGL_accelerate_7wrapper_15returnConverter_1__call__, /*tp_call*/ + #else + 0, /*tp_call*/ + #endif 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_CArgCalculatorElement, /*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_17OpenGL_accelerate_7wrapper_CArgCalculatorElement, /*tp_traverse*/ - __pyx_tp_clear_17OpenGL_accelerate_7wrapper_CArgCalculatorElement, /*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("ReturnValues returning the named pyArgs value"), /*tp_doc*/ + __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_returnCArgument, /*tp_traverse*/ + __pyx_tp_clear_17OpenGL_accelerate_7wrapper_returnCArgument, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_17OpenGL_accelerate_7wrapper_CArgCalculatorElement, /*tp_methods*/ + __pyx_methods_17OpenGL_accelerate_7wrapper_returnCArgument, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_17OpenGL_accelerate_7wrapper_returnCArgument, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement_1__init__, /*tp_init*/ + __pyx_pw_17OpenGL_accelerate_7wrapper_15returnCArgument_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_17OpenGL_accelerate_7wrapper_CArgCalculatorElement, /*tp_new*/ + __pyx_tp_new_17OpenGL_accelerate_7wrapper_returnCArgument, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -8910,152 +8986,90 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_CArgCalculatorElemen 0, /*tp_version_tag*/ #endif }; -static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_CArgCalculator __pyx_vtable_17OpenGL_accelerate_7wrapper_CArgCalculator; +static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_returnPyArgument __pyx_vtable_17OpenGL_accelerate_7wrapper_returnPyArgument; -static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_CArgCalculator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculator *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; - p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculator *)o); - p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_7wrapper_CArgCalculator; - p->mapping = ((PyObject*)Py_None); Py_INCREF(Py_None); +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_returnPyArgument(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnPyArgument *p; + PyObject *o = __pyx_tp_new_17OpenGL_accelerate_7wrapper_returnConverter(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnPyArgument *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_returnConverter*)__pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnPyArgument; + p->name = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_CArgCalculator(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculator *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculator *)o; +static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_returnPyArgument(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnPyArgument *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnPyArgument *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->mapping); + Py_CLEAR(p->name); PyObject_GC_Track(o); - (*Py_TYPE(o)->tp_free)(o); + __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_returnConverter(o); } -static int __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_CArgCalculator(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_returnPyArgument(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculator *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculator *)o; - if (p->mapping) { - e = (*v)(p->mapping, a); if (e) return e; + struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnPyArgument *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnPyArgument *)o; + e = ((likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter)) ? ((__pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter->tp_traverse) ? __pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_returnPyArgument)); if (e) return e; + if (p->name) { + e = (*v)(p->name, a); if (e) return e; } return 0; } -static int __pyx_tp_clear_17OpenGL_accelerate_7wrapper_CArgCalculator(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculator *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculator *)o; +static int __pyx_tp_clear_17OpenGL_accelerate_7wrapper_returnPyArgument(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnPyArgument *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnPyArgument *)o; PyObject* tmp; - tmp = ((PyObject*)p->mapping); - p->mapping = ((PyObject*)Py_None); Py_INCREF(Py_None); + if (likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter)) { if (__pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter->tp_clear) __pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_17OpenGL_accelerate_7wrapper_returnPyArgument); + tmp = ((PyObject*)p->name); + p->name = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_CArgCalculator[] = { - {0, 0, 0, 0} -}; +static PyObject *__pyx_getprop_17OpenGL_accelerate_7wrapper_16returnPyArgument_index(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_7wrapper_16returnPyArgument_5index_1__get__(o); +} -static PyNumberMethods __pyx_tp_as_number_CArgCalculator = { - 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 int __pyx_setprop_17OpenGL_accelerate_7wrapper_16returnPyArgument_index(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_17OpenGL_accelerate_7wrapper_16returnPyArgument_5index_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} -static PySequenceMethods __pyx_tp_as_sequence_CArgCalculator = { - 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_17OpenGL_accelerate_7wrapper_16returnPyArgument_name(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_7wrapper_16returnPyArgument_4name_1__get__(o); +} + +static int __pyx_setprop_17OpenGL_accelerate_7wrapper_16returnPyArgument_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_17OpenGL_accelerate_7wrapper_16returnPyArgument_4name_3__set__(o, v); + } + else { + return __pyx_pw_17OpenGL_accelerate_7wrapper_16returnPyArgument_4name_5__del__(o); + } +} -static PyMappingMethods __pyx_tp_as_mapping_CArgCalculator = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ +static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_returnPyArgument[] = { + {__Pyx_NAMESTR("finalise"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_7wrapper_16returnPyArgument_3finalise, METH_O, __Pyx_DOCSTR(0)}, + {0, 0, 0, 0} }; -static PyBufferProcs __pyx_tp_as_buffer_CArgCalculator = { - #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_17OpenGL_accelerate_7wrapper_returnPyArgument[] = { + {(char *)"index", __pyx_getprop_17OpenGL_accelerate_7wrapper_16returnPyArgument_index, __pyx_setprop_17OpenGL_accelerate_7wrapper_16returnPyArgument_index, 0, 0}, + {(char *)"name", __pyx_getprop_17OpenGL_accelerate_7wrapper_16returnPyArgument_name, __pyx_setprop_17OpenGL_accelerate_7wrapper_16returnPyArgument_name, 0, 0}, + {0, 0, 0, 0, 0} }; -static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_CArgCalculator = { +static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_returnPyArgument = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("OpenGL_accelerate.wrapper.CArgCalculator"), /*tp_name*/ - sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculator), /*tp_basicsize*/ + __Pyx_NAMESTR("OpenGL_accelerate.wrapper.returnPyArgument"), /*tp_name*/ + sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnPyArgument), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_CArgCalculator, /*tp_dealloc*/ + __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_returnPyArgument, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -9064,35 +9078,39 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_CArgCalculator = { #else 0, /*reserved*/ #endif - 0, /*tp_repr*/ - &__pyx_tp_as_number_CArgCalculator, /*tp_as_number*/ - &__pyx_tp_as_sequence_CArgCalculator, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_CArgCalculator, /*tp_as_mapping*/ + __pyx_pw_17OpenGL_accelerate_7wrapper_16returnPyArgument_5__repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ - __pyx_pw_17OpenGL_accelerate_7wrapper_14CArgCalculator_3__call__, /*tp_call*/ + #if CYTHON_COMPILING_IN_PYPY + __pyx_pw_17OpenGL_accelerate_7wrapper_15returnConverter_1__call__, /*tp_call*/ + #else + 0, /*tp_call*/ + #endif 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_CArgCalculator, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - __Pyx_DOCSTR("C-coded version of the c-arg calculator pattern"), /*tp_doc*/ - __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_CArgCalculator, /*tp_traverse*/ - __pyx_tp_clear_17OpenGL_accelerate_7wrapper_CArgCalculator, /*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("ReturnValues returning the named pyArgs value"), /*tp_doc*/ + __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_returnPyArgument, /*tp_traverse*/ + __pyx_tp_clear_17OpenGL_accelerate_7wrapper_returnPyArgument, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_17OpenGL_accelerate_7wrapper_CArgCalculator, /*tp_methods*/ + __pyx_methods_17OpenGL_accelerate_7wrapper_returnPyArgument, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_17OpenGL_accelerate_7wrapper_returnPyArgument, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_17OpenGL_accelerate_7wrapper_14CArgCalculator_1__init__, /*tp_init*/ + __pyx_pw_17OpenGL_accelerate_7wrapper_16returnPyArgument_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_17OpenGL_accelerate_7wrapper_CArgCalculator, /*tp_new*/ + __pyx_tp_new_17OpenGL_accelerate_7wrapper_returnPyArgument, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -9105,168 +9123,54 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_CArgCalculator = { 0, /*tp_version_tag*/ #endif }; -static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement __pyx_vtable_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement; +static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_CArgumentCalculator __pyx_vtable_17OpenGL_accelerate_7wrapper_CArgumentCalculator; -static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; - p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement *)o); - p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement; - p->wrapper = Py_None; Py_INCREF(Py_None); - p->converter = Py_None; Py_INCREF(Py_None); - p->c_converter = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_pyArgConverter *)Py_None); Py_INCREF(Py_None); +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_CArgumentCalculator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgumentCalculator *p; + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgumentCalculator *)o); + p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_7wrapper_CArgumentCalculator; + p->cResolvers = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement *)o; +static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_CArgumentCalculator(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgumentCalculator *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgumentCalculator *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->wrapper); - Py_CLEAR(p->converter); - Py_CLEAR(p->c_converter); - PyObject_GC_Track(o); + Py_CLEAR(p->cResolvers); (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_CArgumentCalculator(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement *)o; - if (p->wrapper) { - e = (*v)(p->wrapper, a); if (e) return e; - } - if (p->converter) { - e = (*v)(p->converter, a); if (e) return e; - } - if (p->c_converter) { - e = (*v)(((PyObject*)p->c_converter), a); if (e) return e; + struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgumentCalculator *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgumentCalculator *)o; + if (p->cResolvers) { + e = (*v)(p->cResolvers, a); if (e) return e; } return 0; } -static int __pyx_tp_clear_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement *)o; +static int __pyx_tp_clear_17OpenGL_accelerate_7wrapper_CArgumentCalculator(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgumentCalculator *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgumentCalculator *)o; PyObject* tmp; - tmp = ((PyObject*)p->wrapper); - p->wrapper = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->converter); - p->converter = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->c_converter); - p->c_converter = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_pyArgConverter *)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->cResolvers); + p->cResolvers = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement[] = { +static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_CArgumentCalculator[] = { {0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_PyArgCalculatorElement = { - 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_PyArgCalculatorElement = { - 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_PyArgCalculatorElement = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_PyArgCalculatorElement = { - #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_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement = { +static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_CArgumentCalculator = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("OpenGL_accelerate.wrapper.PyArgCalculatorElement"), /*tp_name*/ - sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement), /*tp_basicsize*/ + __Pyx_NAMESTR("OpenGL_accelerate.wrapper.CArgumentCalculator"), /*tp_name*/ + sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgumentCalculator), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement, /*tp_dealloc*/ + __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_CArgumentCalculator, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -9276,24 +9180,24 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_PyArgCalculatorEleme 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_PyArgCalculatorElement, /*tp_as_number*/ - &__pyx_tp_as_sequence_PyArgCalculatorElement, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_PyArgCalculatorElement, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ - __pyx_pw_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_3__call__, /*tp_call*/ + __pyx_pw_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_3__call__, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_PyArgCalculatorElement, /*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*/ 0, /*tp_doc*/ - __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement, /*tp_traverse*/ - __pyx_tp_clear_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement, /*tp_clear*/ + __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_CArgumentCalculator, /*tp_traverse*/ + __pyx_tp_clear_17OpenGL_accelerate_7wrapper_CArgumentCalculator, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement, /*tp_methods*/ + __pyx_methods_17OpenGL_accelerate_7wrapper_CArgumentCalculator, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -9301,9 +9205,9 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_PyArgCalculatorEleme 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_1__init__, /*tp_init*/ + __pyx_pw_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement, /*tp_new*/ + __pyx_tp_new_17OpenGL_accelerate_7wrapper_CArgumentCalculator, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -9316,160 +9220,32 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_PyArgCalculatorEleme 0, /*tp_version_tag*/ #endif }; -static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_PyArgCalculator __pyx_vtable_17OpenGL_accelerate_7wrapper_PyArgCalculator; +static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_cArgConverter __pyx_vtable_17OpenGL_accelerate_7wrapper_cArgConverter; -static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_PyArgCalculator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculator *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; - p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculator *)o); - p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_7wrapper_PyArgCalculator; - p->mapping = ((PyObject*)Py_None); Py_INCREF(Py_None); - p->wrapper = Py_None; Py_INCREF(Py_None); +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_cArgConverter(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgConverter *p; + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgConverter *)o); + p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_7wrapper_cArgConverter; return o; } -static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_PyArgCalculator(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculator *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculator *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->mapping); - Py_CLEAR(p->wrapper); - PyObject_GC_Track(o); +static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_cArgConverter(PyObject *o) { (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_PyArgCalculator(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculator *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculator *)o; - if (p->mapping) { - e = (*v)(p->mapping, a); if (e) return e; - } - if (p->wrapper) { - e = (*v)(p->wrapper, a); if (e) return e; - } - return 0; -} - -static int __pyx_tp_clear_17OpenGL_accelerate_7wrapper_PyArgCalculator(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculator *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculator *)o; - PyObject* tmp; - tmp = ((PyObject*)p->mapping); - p->mapping = ((PyObject*)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->wrapper); - p->wrapper = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; -} - -static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_PyArgCalculator[] = { +static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_cArgConverter[] = { {0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_PyArgCalculator = { - 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_PyArgCalculator = { - 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_PyArgCalculator = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_PyArgCalculator = { - #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_17OpenGL_accelerate_7wrapper_PyArgCalculator = { +static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_cArgConverter = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("OpenGL_accelerate.wrapper.PyArgCalculator"), /*tp_name*/ - sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculator), /*tp_basicsize*/ + __Pyx_NAMESTR("OpenGL_accelerate.wrapper.cArgConverter"), /*tp_name*/ + sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgConverter), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_PyArgCalculator, /*tp_dealloc*/ + __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_cArgConverter, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -9479,24 +9255,24 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_PyArgCalculator = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_PyArgCalculator, /*tp_as_number*/ - &__pyx_tp_as_sequence_PyArgCalculator, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_PyArgCalculator, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ - __pyx_pw_17OpenGL_accelerate_7wrapper_15PyArgCalculator_3__call__, /*tp_call*/ + __pyx_pw_17OpenGL_accelerate_7wrapper_13cArgConverter_1__call__, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_PyArgCalculator, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - __Pyx_DOCSTR("C-coded version of the py-arg calculator pattern"), /*tp_doc*/ - __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_PyArgCalculator, /*tp_traverse*/ - __pyx_tp_clear_17OpenGL_accelerate_7wrapper_PyArgCalculator, /*tp_clear*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + __Pyx_DOCSTR("C-level API definition for cConverter objects"), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_17OpenGL_accelerate_7wrapper_PyArgCalculator, /*tp_methods*/ + __pyx_methods_17OpenGL_accelerate_7wrapper_cArgConverter, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -9504,9 +9280,9 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_PyArgCalculator = { 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_17OpenGL_accelerate_7wrapper_15PyArgCalculator_1__init__, /*tp_init*/ + 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_17OpenGL_accelerate_7wrapper_PyArgCalculator, /*tp_new*/ + __pyx_tp_new_17OpenGL_accelerate_7wrapper_cArgConverter, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -9519,152 +9295,90 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_PyArgCalculator = { 0, /*tp_version_tag*/ #endif }; -static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_CArgumentCalculator __pyx_vtable_17OpenGL_accelerate_7wrapper_CArgumentCalculator; +static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_getPyArgsName __pyx_vtable_17OpenGL_accelerate_7wrapper_getPyArgsName; -static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_CArgumentCalculator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgumentCalculator *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; - p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgumentCalculator *)o); - p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_7wrapper_CArgumentCalculator; - p->cResolvers = ((PyObject*)Py_None); Py_INCREF(Py_None); +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_getPyArgsName(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_getPyArgsName *p; + PyObject *o = __pyx_tp_new_17OpenGL_accelerate_7wrapper_cArgConverter(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_getPyArgsName *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_cArgConverter*)__pyx_vtabptr_17OpenGL_accelerate_7wrapper_getPyArgsName; + p->name = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_CArgumentCalculator(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgumentCalculator *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgumentCalculator *)o; +static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_getPyArgsName(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_getPyArgsName *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_getPyArgsName *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->cResolvers); + Py_CLEAR(p->name); PyObject_GC_Track(o); - (*Py_TYPE(o)->tp_free)(o); + __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_cArgConverter(o); } -static int __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_CArgumentCalculator(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_getPyArgsName(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgumentCalculator *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgumentCalculator *)o; - if (p->cResolvers) { - e = (*v)(p->cResolvers, a); if (e) return e; + struct __pyx_obj_17OpenGL_accelerate_7wrapper_getPyArgsName *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_getPyArgsName *)o; + e = ((likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter)) ? ((__pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter->tp_traverse) ? __pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_getPyArgsName)); if (e) return e; + if (p->name) { + e = (*v)(p->name, a); if (e) return e; } return 0; } -static int __pyx_tp_clear_17OpenGL_accelerate_7wrapper_CArgumentCalculator(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgumentCalculator *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgumentCalculator *)o; +static int __pyx_tp_clear_17OpenGL_accelerate_7wrapper_getPyArgsName(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_getPyArgsName *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_getPyArgsName *)o; PyObject* tmp; - tmp = ((PyObject*)p->cResolvers); - p->cResolvers = ((PyObject*)Py_None); Py_INCREF(Py_None); + if (likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter)) { if (__pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter->tp_clear) __pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_17OpenGL_accelerate_7wrapper_getPyArgsName); + tmp = ((PyObject*)p->name); + p->name = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_CArgumentCalculator[] = { - {0, 0, 0, 0} -}; +static PyObject *__pyx_getprop_17OpenGL_accelerate_7wrapper_13getPyArgsName_index(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_7wrapper_13getPyArgsName_5index_1__get__(o); +} -static PyNumberMethods __pyx_tp_as_number_CArgumentCalculator = { - 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 int __pyx_setprop_17OpenGL_accelerate_7wrapper_13getPyArgsName_index(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_17OpenGL_accelerate_7wrapper_13getPyArgsName_5index_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} -static PySequenceMethods __pyx_tp_as_sequence_CArgumentCalculator = { - 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_17OpenGL_accelerate_7wrapper_13getPyArgsName_name(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_7wrapper_13getPyArgsName_4name_1__get__(o); +} -static PyMappingMethods __pyx_tp_as_mapping_CArgumentCalculator = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ +static int __pyx_setprop_17OpenGL_accelerate_7wrapper_13getPyArgsName_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_17OpenGL_accelerate_7wrapper_13getPyArgsName_4name_3__set__(o, v); + } + else { + return __pyx_pw_17OpenGL_accelerate_7wrapper_13getPyArgsName_4name_5__del__(o); + } +} + +static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_getPyArgsName[] = { + {__Pyx_NAMESTR("finalise"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_7wrapper_13getPyArgsName_3finalise, METH_O, __Pyx_DOCSTR(0)}, + {0, 0, 0, 0} }; -static PyBufferProcs __pyx_tp_as_buffer_CArgumentCalculator = { - #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_17OpenGL_accelerate_7wrapper_getPyArgsName[] = { + {(char *)"index", __pyx_getprop_17OpenGL_accelerate_7wrapper_13getPyArgsName_index, __pyx_setprop_17OpenGL_accelerate_7wrapper_13getPyArgsName_index, 0, 0}, + {(char *)"name", __pyx_getprop_17OpenGL_accelerate_7wrapper_13getPyArgsName_name, __pyx_setprop_17OpenGL_accelerate_7wrapper_13getPyArgsName_name, 0, 0}, + {0, 0, 0, 0, 0} }; -static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_CArgumentCalculator = { +static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_getPyArgsName = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("OpenGL_accelerate.wrapper.CArgumentCalculator"), /*tp_name*/ - sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgumentCalculator), /*tp_basicsize*/ + __Pyx_NAMESTR("OpenGL_accelerate.wrapper.getPyArgsName"), /*tp_name*/ + sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_getPyArgsName), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_CArgumentCalculator, /*tp_dealloc*/ + __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_getPyArgsName, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -9673,35 +9387,39 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_CArgumentCalculator #else 0, /*reserved*/ #endif - 0, /*tp_repr*/ - &__pyx_tp_as_number_CArgumentCalculator, /*tp_as_number*/ - &__pyx_tp_as_sequence_CArgumentCalculator, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_CArgumentCalculator, /*tp_as_mapping*/ + __pyx_pw_17OpenGL_accelerate_7wrapper_13getPyArgsName_5__repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ - __pyx_pw_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_3__call__, /*tp_call*/ + #if CYTHON_COMPILING_IN_PYPY + __pyx_pw_17OpenGL_accelerate_7wrapper_13cArgConverter_1__call__, /*tp_call*/ + #else + 0, /*tp_call*/ + #endif 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_CArgumentCalculator, /*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_17OpenGL_accelerate_7wrapper_CArgumentCalculator, /*tp_traverse*/ - __pyx_tp_clear_17OpenGL_accelerate_7wrapper_CArgumentCalculator, /*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("CConverter returning named Python argument\n\t\n\tIntended for use in cConverters, the function returned \n\tretrieves the named pyArg and returns it when called.\n\t"), /*tp_doc*/ + __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_getPyArgsName, /*tp_traverse*/ + __pyx_tp_clear_17OpenGL_accelerate_7wrapper_getPyArgsName, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_17OpenGL_accelerate_7wrapper_CArgumentCalculator, /*tp_methods*/ + __pyx_methods_17OpenGL_accelerate_7wrapper_getPyArgsName, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_17OpenGL_accelerate_7wrapper_getPyArgsName, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_1__init__, /*tp_init*/ + __pyx_pw_17OpenGL_accelerate_7wrapper_13getPyArgsName_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_17OpenGL_accelerate_7wrapper_CArgumentCalculator, /*tp_new*/ + __pyx_tp_new_17OpenGL_accelerate_7wrapper_getPyArgsName, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -9714,154 +9432,32 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_CArgumentCalculator 0, /*tp_version_tag*/ #endif }; -static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_CallFuncPyConverter __pyx_vtable_17OpenGL_accelerate_7wrapper_CallFuncPyConverter; +static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_cArgumentConverter __pyx_vtable_17OpenGL_accelerate_7wrapper_cArgumentConverter; -static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_CallFuncPyConverter(PyTypeObject *t, PyObject *a, PyObject *k) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_CallFuncPyConverter *p; - PyObject *o = __pyx_tp_new_17OpenGL_accelerate_7wrapper_pyArgConverter(t, a, k); - if (!o) return 0; - p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_CallFuncPyConverter *)o); - p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_pyArgConverter*)__pyx_vtabptr_17OpenGL_accelerate_7wrapper_CallFuncPyConverter; - p->function = Py_None; Py_INCREF(Py_None); +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_cArgumentConverter(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgumentConverter *p; + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgumentConverter *)o); + p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_7wrapper_cArgumentConverter; return o; } -static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_CallFuncPyConverter(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_CallFuncPyConverter *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_CallFuncPyConverter *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->function); - PyObject_GC_Track(o); - __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_pyArgConverter(o); -} - -static int __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_CallFuncPyConverter(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_17OpenGL_accelerate_7wrapper_CallFuncPyConverter *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_CallFuncPyConverter *)o; - e = ((likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter)) ? ((__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_traverse) ? __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_CallFuncPyConverter)); if (e) return e; - if (p->function) { - e = (*v)(p->function, a); if (e) return e; - } - return 0; -} - -static int __pyx_tp_clear_17OpenGL_accelerate_7wrapper_CallFuncPyConverter(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_CallFuncPyConverter *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_CallFuncPyConverter *)o; - PyObject* tmp; - if (likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter)) { if (__pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_clear) __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_17OpenGL_accelerate_7wrapper_CallFuncPyConverter); - tmp = ((PyObject*)p->function); - p->function = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; +static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_cArgumentConverter(PyObject *o) { + (*Py_TYPE(o)->tp_free)(o); } -static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_CallFuncPyConverter[] = { +static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_cArgumentConverter[] = { {0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_CallFuncPyConverter = { - 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_CallFuncPyConverter = { - 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_CallFuncPyConverter = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_CallFuncPyConverter = { - #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_17OpenGL_accelerate_7wrapper_CallFuncPyConverter = { +static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_cArgumentConverter = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("OpenGL_accelerate.wrapper.CallFuncPyConverter"), /*tp_name*/ - sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_CallFuncPyConverter), /*tp_basicsize*/ + __Pyx_NAMESTR("OpenGL_accelerate.wrapper.cArgumentConverter"), /*tp_name*/ + sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgumentConverter), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_CallFuncPyConverter, /*tp_dealloc*/ + __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_cArgumentConverter, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -9870,29 +9466,25 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_CallFuncPyConverter #else 0, /*reserved*/ #endif - __pyx_pw_17OpenGL_accelerate_7wrapper_19CallFuncPyConverter_3__repr__, /*tp_repr*/ - &__pyx_tp_as_number_CallFuncPyConverter, /*tp_as_number*/ - &__pyx_tp_as_sequence_CallFuncPyConverter, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_CallFuncPyConverter, /*tp_as_mapping*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ - #if CYTHON_COMPILING_IN_PYPY - __pyx_pw_17OpenGL_accelerate_7wrapper_14pyArgConverter_1__call__, /*tp_call*/ - #else - 0, /*tp_call*/ - #endif + __pyx_pw_17OpenGL_accelerate_7wrapper_18cArgumentConverter_1__call__, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_CallFuncPyConverter, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - __Pyx_DOCSTR("PyConverter that takes a callable and calls it on incoming"), /*tp_doc*/ - __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_CallFuncPyConverter, /*tp_traverse*/ - __pyx_tp_clear_17OpenGL_accelerate_7wrapper_CallFuncPyConverter, /*tp_clear*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + __Pyx_DOCSTR("C-level API definition for cArgument convert objects"), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_17OpenGL_accelerate_7wrapper_CallFuncPyConverter, /*tp_methods*/ + __pyx_methods_17OpenGL_accelerate_7wrapper_cArgumentConverter, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -9900,9 +9492,9 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_CallFuncPyConverter 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_17OpenGL_accelerate_7wrapper_19CallFuncPyConverter_1__init__, /*tp_init*/ + 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_17OpenGL_accelerate_7wrapper_CallFuncPyConverter, /*tp_new*/ + __pyx_tp_new_17OpenGL_accelerate_7wrapper_cArgumentConverter, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -9915,148 +9507,70 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_CallFuncPyConverter 0, /*tp_version_tag*/ #endif }; -static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_DefaultCConverter __pyx_vtable_17OpenGL_accelerate_7wrapper_DefaultCConverter; +static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex __pyx_vtable_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex; -static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_DefaultCConverter(PyTypeObject *t, PyObject *a, PyObject *k) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_DefaultCConverter *p; - PyObject *o = __pyx_tp_new_17OpenGL_accelerate_7wrapper_cArgConverter(t, a, k); - if (!o) return 0; - p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_DefaultCConverter *)o); - p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_cArgConverter*)__pyx_vtabptr_17OpenGL_accelerate_7wrapper_DefaultCConverter; +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex *p; + PyObject *o = __pyx_tp_new_17OpenGL_accelerate_7wrapper_returnConverter(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_returnConverter*)__pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex; return o; } -static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_DefaultCConverter[] = { +static PyObject *__pyx_getprop_17OpenGL_accelerate_7wrapper_21returnPyArgumentIndex_index(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_17OpenGL_accelerate_7wrapper_21returnPyArgumentIndex_5index_1__get__(o); +} + +static int __pyx_setprop_17OpenGL_accelerate_7wrapper_21returnPyArgumentIndex_index(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_17OpenGL_accelerate_7wrapper_21returnPyArgumentIndex_5index_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex[] = { + {__Pyx_NAMESTR("finalise"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_7wrapper_21returnPyArgumentIndex_3finalise, METH_O, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_7wrapper_21returnPyArgumentIndex_2finalise)}, {0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_DefaultCConverter = { - 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_DefaultCConverter = { - 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_DefaultCConverter = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_DefaultCConverter = { - #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_17OpenGL_accelerate_7wrapper_DefaultCConverter = { - PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("OpenGL_accelerate.wrapper.DefaultCConverter"), /*tp_name*/ - sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_DefaultCConverter), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_cArgConverter, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ +static struct PyGetSetDef __pyx_getsets_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex[] = { + {(char *)"index", __pyx_getprop_17OpenGL_accelerate_7wrapper_21returnPyArgumentIndex_index, __pyx_setprop_17OpenGL_accelerate_7wrapper_21returnPyArgumentIndex_index, 0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("OpenGL_accelerate.wrapper.returnPyArgumentIndex"), /*tp_name*/ + sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_returnConverter, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif - __pyx_pw_17OpenGL_accelerate_7wrapper_17DefaultCConverter_3__repr__, /*tp_repr*/ - &__pyx_tp_as_number_DefaultCConverter, /*tp_as_number*/ - &__pyx_tp_as_sequence_DefaultCConverter, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_DefaultCConverter, /*tp_as_mapping*/ + __pyx_pw_17OpenGL_accelerate_7wrapper_21returnPyArgumentIndex_5__repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ #if CYTHON_COMPILING_IN_PYPY - __pyx_pw_17OpenGL_accelerate_7wrapper_13cArgConverter_1__call__, /*tp_call*/ + __pyx_pw_17OpenGL_accelerate_7wrapper_15returnConverter_1__call__, /*tp_call*/ #else 0, /*tp_call*/ #endif 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_DefaultCConverter, /*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*/ @@ -10064,17 +9578,17 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_DefaultCConverter = 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_17OpenGL_accelerate_7wrapper_DefaultCConverter, /*tp_methods*/ + __pyx_methods_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_17OpenGL_accelerate_7wrapper_17DefaultCConverter_1__init__, /*tp_init*/ + __pyx_pw_17OpenGL_accelerate_7wrapper_21returnPyArgumentIndex_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_17OpenGL_accelerate_7wrapper_DefaultCConverter, /*tp_new*/ + __pyx_tp_new_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -10087,244 +9601,62 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_DefaultCConverter = 0, /*tp_version_tag*/ #endif }; +static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_PyArgCalculator __pyx_vtable_17OpenGL_accelerate_7wrapper_PyArgCalculator; -static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_Wrapper(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_Wrapper *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; - p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_Wrapper *)o); - p->calculate_cArgs = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculator *)Py_None); Py_INCREF(Py_None); - p->calculate_cArguments = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgumentCalculator *)Py_None); Py_INCREF(Py_None); - p->calculate_pyArgs = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculator *)Py_None); Py_INCREF(Py_None); - p->wrappedOperation = Py_None; Py_INCREF(Py_None); - p->storeValues = Py_None; Py_INCREF(Py_None); - p->returnValues = Py_None; Py_INCREF(Py_None); - p->c_returnValues = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnConverter *)Py_None); Py_INCREF(Py_None); +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_PyArgCalculator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculator *p; + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculator *)o); + p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_7wrapper_PyArgCalculator; + p->mapping = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->wrapper = Py_None; Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_Wrapper(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_Wrapper *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_Wrapper *)o; +static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_PyArgCalculator(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculator *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculator *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->calculate_cArgs); - Py_CLEAR(p->calculate_cArguments); - Py_CLEAR(p->calculate_pyArgs); - Py_CLEAR(p->wrappedOperation); - Py_CLEAR(p->storeValues); - Py_CLEAR(p->returnValues); - Py_CLEAR(p->c_returnValues); - PyObject_GC_Track(o); + Py_CLEAR(p->mapping); + Py_CLEAR(p->wrapper); (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_Wrapper(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_PyArgCalculator(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_17OpenGL_accelerate_7wrapper_Wrapper *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_Wrapper *)o; - if (p->calculate_cArgs) { - e = (*v)(((PyObject*)p->calculate_cArgs), a); if (e) return e; - } - if (p->calculate_cArguments) { - e = (*v)(((PyObject*)p->calculate_cArguments), a); if (e) return e; - } - if (p->calculate_pyArgs) { - e = (*v)(((PyObject*)p->calculate_pyArgs), a); if (e) return e; - } - if (p->wrappedOperation) { - e = (*v)(p->wrappedOperation, a); if (e) return e; - } - if (p->storeValues) { - e = (*v)(p->storeValues, a); if (e) return e; - } - if (p->returnValues) { - e = (*v)(p->returnValues, a); if (e) return e; + struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculator *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculator *)o; + if (p->mapping) { + e = (*v)(p->mapping, a); if (e) return e; } - if (p->c_returnValues) { - e = (*v)(((PyObject*)p->c_returnValues), a); if (e) return e; + if (p->wrapper) { + e = (*v)(p->wrapper, a); if (e) return e; } return 0; } -static int __pyx_tp_clear_17OpenGL_accelerate_7wrapper_Wrapper(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_Wrapper *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_Wrapper *)o; +static int __pyx_tp_clear_17OpenGL_accelerate_7wrapper_PyArgCalculator(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculator *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculator *)o; PyObject* tmp; - tmp = ((PyObject*)p->calculate_cArgs); - p->calculate_cArgs = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculator *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->calculate_cArguments); - p->calculate_cArguments = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgumentCalculator *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->calculate_pyArgs); - p->calculate_pyArgs = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculator *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->wrappedOperation); - p->wrappedOperation = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->storeValues); - p->storeValues = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->returnValues); - p->returnValues = Py_None; Py_INCREF(Py_None); + tmp = ((PyObject*)p->mapping); + p->mapping = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); - tmp = ((PyObject*)p->c_returnValues); - p->c_returnValues = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnConverter *)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->wrapper); + p->wrapper = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyObject *__pyx_getprop_17OpenGL_accelerate_7wrapper_7Wrapper_wrappedOperation(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_7wrapper_7Wrapper_16wrappedOperation_1__get__(o); -} - -static int __pyx_setprop_17OpenGL_accelerate_7wrapper_7Wrapper_wrappedOperation(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_17OpenGL_accelerate_7wrapper_7Wrapper_16wrappedOperation_3__set__(o, v); - } - else { - return __pyx_pw_17OpenGL_accelerate_7wrapper_7Wrapper_16wrappedOperation_5__del__(o); - } -} - -static PyObject *__pyx_getprop_17OpenGL_accelerate_7wrapper_7Wrapper_storeValues(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_7wrapper_7Wrapper_11storeValues_1__get__(o); -} - -static int __pyx_setprop_17OpenGL_accelerate_7wrapper_7Wrapper_storeValues(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_17OpenGL_accelerate_7wrapper_7Wrapper_11storeValues_3__set__(o, v); - } - else { - return __pyx_pw_17OpenGL_accelerate_7wrapper_7Wrapper_11storeValues_5__del__(o); - } -} - -static PyObject *__pyx_getprop_17OpenGL_accelerate_7wrapper_7Wrapper_returnValues(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_7wrapper_7Wrapper_12returnValues_1__get__(o); -} - -static int __pyx_setprop_17OpenGL_accelerate_7wrapper_7Wrapper_returnValues(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_17OpenGL_accelerate_7wrapper_7Wrapper_12returnValues_3__set__(o, v); - } - else { - return __pyx_pw_17OpenGL_accelerate_7wrapper_7Wrapper_12returnValues_5__del__(o); - } -} - -static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_Wrapper[] = { +static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_PyArgCalculator[] = { {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_17OpenGL_accelerate_7wrapper_Wrapper[] = { - {(char *)"wrappedOperation", __pyx_getprop_17OpenGL_accelerate_7wrapper_7Wrapper_wrappedOperation, __pyx_setprop_17OpenGL_accelerate_7wrapper_7Wrapper_wrappedOperation, 0, 0}, - {(char *)"storeValues", __pyx_getprop_17OpenGL_accelerate_7wrapper_7Wrapper_storeValues, __pyx_setprop_17OpenGL_accelerate_7wrapper_7Wrapper_storeValues, 0, 0}, - {(char *)"returnValues", __pyx_getprop_17OpenGL_accelerate_7wrapper_7Wrapper_returnValues, __pyx_setprop_17OpenGL_accelerate_7wrapper_7Wrapper_returnValues, 0, 0}, - {0, 0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number_Wrapper = { - 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_Wrapper = { - 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_Wrapper = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_Wrapper = { - #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_17OpenGL_accelerate_7wrapper_Wrapper = { +static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_PyArgCalculator = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("OpenGL_accelerate.wrapper.Wrapper"), /*tp_name*/ - sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_Wrapper), /*tp_basicsize*/ + __Pyx_NAMESTR("OpenGL_accelerate.wrapper.PyArgCalculator"), /*tp_name*/ + sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculator), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_Wrapper, /*tp_dealloc*/ + __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_PyArgCalculator, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -10334,34 +9666,34 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_Wrapper = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_Wrapper, /*tp_as_number*/ - &__pyx_tp_as_sequence_Wrapper, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_Wrapper, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ - __pyx_pw_17OpenGL_accelerate_7wrapper_7Wrapper_3__call__, /*tp_call*/ + __pyx_pw_17OpenGL_accelerate_7wrapper_15PyArgCalculator_3__call__, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_Wrapper, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - __Pyx_DOCSTR("C-coded most-generic form of the wrapper's core function\n\t\n\tApplies a series of wrapper stages to the core function in order \n\tto expand and/or convert parameters into formats which are compatible\n\twith the underlying (ctypes) library. Requires the use of the \n\tCalculator objects defined later in this module in order to provide \n\tefficient operations.\n\t"), /*tp_doc*/ - __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_Wrapper, /*tp_traverse*/ - __pyx_tp_clear_17OpenGL_accelerate_7wrapper_Wrapper, /*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("C-coded version of the py-arg calculator pattern"), /*tp_doc*/ + __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_PyArgCalculator, /*tp_traverse*/ + __pyx_tp_clear_17OpenGL_accelerate_7wrapper_PyArgCalculator, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_17OpenGL_accelerate_7wrapper_Wrapper, /*tp_methods*/ + __pyx_methods_17OpenGL_accelerate_7wrapper_PyArgCalculator, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_17OpenGL_accelerate_7wrapper_Wrapper, /*tp_getset*/ + 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_17OpenGL_accelerate_7wrapper_7Wrapper_1__init__, /*tp_init*/ + __pyx_pw_17OpenGL_accelerate_7wrapper_15PyArgCalculator_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_17OpenGL_accelerate_7wrapper_Wrapper, /*tp_new*/ + __pyx_tp_new_17OpenGL_accelerate_7wrapper_PyArgCalculator, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -10374,188 +9706,70 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_Wrapper = { 0, /*tp_version_tag*/ #endif }; -static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_getPyArgsName __pyx_vtable_17OpenGL_accelerate_7wrapper_getPyArgsName; +static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_CArgCalculatorElement __pyx_vtable_17OpenGL_accelerate_7wrapper_CArgCalculatorElement; -static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_getPyArgsName(PyTypeObject *t, PyObject *a, PyObject *k) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_getPyArgsName *p; - PyObject *o = __pyx_tp_new_17OpenGL_accelerate_7wrapper_cArgConverter(t, a, k); - if (!o) return 0; - p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_getPyArgsName *)o); - p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_cArgConverter*)__pyx_vtabptr_17OpenGL_accelerate_7wrapper_getPyArgsName; - p->name = ((PyObject*)Py_None); Py_INCREF(Py_None); - return o; -} +static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_CArgCalculatorElement(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculatorElement *p; + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculatorElement *)o); + p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_7wrapper_CArgCalculatorElement; + p->wrapper = Py_None; Py_INCREF(Py_None); + p->converter = Py_None; Py_INCREF(Py_None); + p->c_converter = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgConverter *)Py_None); Py_INCREF(Py_None); + return o; +} -static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_getPyArgsName(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_getPyArgsName *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_getPyArgsName *)o; +static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_CArgCalculatorElement(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculatorElement *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculatorElement *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->name); - PyObject_GC_Track(o); - __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_cArgConverter(o); + Py_CLEAR(p->wrapper); + Py_CLEAR(p->converter); + Py_CLEAR(p->c_converter); + (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_getPyArgsName(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_CArgCalculatorElement(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_17OpenGL_accelerate_7wrapper_getPyArgsName *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_getPyArgsName *)o; - e = ((likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter)) ? ((__pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter->tp_traverse) ? __pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_getPyArgsName)); if (e) return e; - if (p->name) { - e = (*v)(p->name, a); if (e) return e; + struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculatorElement *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculatorElement *)o; + if (p->wrapper) { + e = (*v)(p->wrapper, a); if (e) return e; + } + if (p->converter) { + e = (*v)(p->converter, a); if (e) return e; + } + if (p->c_converter) { + e = (*v)(((PyObject*)p->c_converter), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_17OpenGL_accelerate_7wrapper_getPyArgsName(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_getPyArgsName *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_getPyArgsName *)o; +static int __pyx_tp_clear_17OpenGL_accelerate_7wrapper_CArgCalculatorElement(PyObject *o) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculatorElement *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculatorElement *)o; PyObject* tmp; - if (likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter)) { if (__pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter->tp_clear) __pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_17OpenGL_accelerate_7wrapper_getPyArgsName); - tmp = ((PyObject*)p->name); - p->name = ((PyObject*)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->wrapper); + p->wrapper = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->converter); + p->converter = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->c_converter); + p->c_converter = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgConverter *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyObject *__pyx_getprop_17OpenGL_accelerate_7wrapper_13getPyArgsName_index(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_7wrapper_13getPyArgsName_5index_1__get__(o); -} - -static int __pyx_setprop_17OpenGL_accelerate_7wrapper_13getPyArgsName_index(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_17OpenGL_accelerate_7wrapper_13getPyArgsName_5index_3__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; - } -} - -static PyObject *__pyx_getprop_17OpenGL_accelerate_7wrapper_13getPyArgsName_name(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_7wrapper_13getPyArgsName_4name_1__get__(o); -} - -static int __pyx_setprop_17OpenGL_accelerate_7wrapper_13getPyArgsName_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_17OpenGL_accelerate_7wrapper_13getPyArgsName_4name_3__set__(o, v); - } - else { - return __pyx_pw_17OpenGL_accelerate_7wrapper_13getPyArgsName_4name_5__del__(o); - } -} - -static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_getPyArgsName[] = { - {__Pyx_NAMESTR("finalise"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_7wrapper_13getPyArgsName_3finalise, METH_O, __Pyx_DOCSTR(0)}, +static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_CArgCalculatorElement[] = { {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_17OpenGL_accelerate_7wrapper_getPyArgsName[] = { - {(char *)"index", __pyx_getprop_17OpenGL_accelerate_7wrapper_13getPyArgsName_index, __pyx_setprop_17OpenGL_accelerate_7wrapper_13getPyArgsName_index, 0, 0}, - {(char *)"name", __pyx_getprop_17OpenGL_accelerate_7wrapper_13getPyArgsName_name, __pyx_setprop_17OpenGL_accelerate_7wrapper_13getPyArgsName_name, 0, 0}, - {0, 0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number_getPyArgsName = { - 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_getPyArgsName = { - 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_getPyArgsName = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_getPyArgsName = { - #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_17OpenGL_accelerate_7wrapper_getPyArgsName = { +static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_CArgCalculatorElement = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("OpenGL_accelerate.wrapper.getPyArgsName"), /*tp_name*/ - sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_getPyArgsName), /*tp_basicsize*/ + __Pyx_NAMESTR("OpenGL_accelerate.wrapper.CArgCalculatorElement"), /*tp_name*/ + sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculatorElement), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_getPyArgsName, /*tp_dealloc*/ + __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_CArgCalculatorElement, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -10564,39 +9778,35 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_getPyArgsName = { #else 0, /*reserved*/ #endif - __pyx_pw_17OpenGL_accelerate_7wrapper_13getPyArgsName_5__repr__, /*tp_repr*/ - &__pyx_tp_as_number_getPyArgsName, /*tp_as_number*/ - &__pyx_tp_as_sequence_getPyArgsName, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_getPyArgsName, /*tp_as_mapping*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ - #if CYTHON_COMPILING_IN_PYPY - __pyx_pw_17OpenGL_accelerate_7wrapper_13cArgConverter_1__call__, /*tp_call*/ - #else - 0, /*tp_call*/ - #endif + __pyx_pw_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement_3__call__, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_getPyArgsName, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - __Pyx_DOCSTR("CConverter returning named Python argument\n\t\n\tIntended for use in cConverters, the function returned \n\tretrieves the named pyArg and returns it when called.\n\t"), /*tp_doc*/ - __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_getPyArgsName, /*tp_traverse*/ - __pyx_tp_clear_17OpenGL_accelerate_7wrapper_getPyArgsName, /*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*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_CArgCalculatorElement, /*tp_traverse*/ + __pyx_tp_clear_17OpenGL_accelerate_7wrapper_CArgCalculatorElement, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_17OpenGL_accelerate_7wrapper_getPyArgsName, /*tp_methods*/ + __pyx_methods_17OpenGL_accelerate_7wrapper_CArgCalculatorElement, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_17OpenGL_accelerate_7wrapper_getPyArgsName, /*tp_getset*/ + 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_17OpenGL_accelerate_7wrapper_13getPyArgsName_1__init__, /*tp_init*/ + __pyx_pw_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_17OpenGL_accelerate_7wrapper_getPyArgsName, /*tp_new*/ + __pyx_tp_new_17OpenGL_accelerate_7wrapper_CArgCalculatorElement, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -10609,615 +9819,27 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_getPyArgsName = { 0, /*tp_version_tag*/ #endif }; -static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_returnPyArgument __pyx_vtable_17OpenGL_accelerate_7wrapper_returnPyArgument; - -static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_returnPyArgument(PyTypeObject *t, PyObject *a, PyObject *k) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnPyArgument *p; - PyObject *o = __pyx_tp_new_17OpenGL_accelerate_7wrapper_returnConverter(t, a, k); - if (!o) return 0; - p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnPyArgument *)o); - p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_returnConverter*)__pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnPyArgument; - p->name = ((PyObject*)Py_None); Py_INCREF(Py_None); - return o; -} - -static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_returnPyArgument(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnPyArgument *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnPyArgument *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->name); - PyObject_GC_Track(o); - __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_returnConverter(o); -} - -static int __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_returnPyArgument(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnPyArgument *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnPyArgument *)o; - e = ((likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter)) ? ((__pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter->tp_traverse) ? __pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_returnPyArgument)); if (e) return e; - if (p->name) { - e = (*v)(p->name, a); if (e) return e; - } - return 0; -} - -static int __pyx_tp_clear_17OpenGL_accelerate_7wrapper_returnPyArgument(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnPyArgument *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnPyArgument *)o; - PyObject* tmp; - if (likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter)) { if (__pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter->tp_clear) __pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_17OpenGL_accelerate_7wrapper_returnPyArgument); - tmp = ((PyObject*)p->name); - p->name = ((PyObject*)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; -} - -static PyObject *__pyx_getprop_17OpenGL_accelerate_7wrapper_16returnPyArgument_index(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_7wrapper_16returnPyArgument_5index_1__get__(o); -} - -static int __pyx_setprop_17OpenGL_accelerate_7wrapper_16returnPyArgument_index(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_17OpenGL_accelerate_7wrapper_16returnPyArgument_5index_3__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; - } -} - -static PyObject *__pyx_getprop_17OpenGL_accelerate_7wrapper_16returnPyArgument_name(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_7wrapper_16returnPyArgument_4name_1__get__(o); -} - -static int __pyx_setprop_17OpenGL_accelerate_7wrapper_16returnPyArgument_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_17OpenGL_accelerate_7wrapper_16returnPyArgument_4name_3__set__(o, v); - } - else { - return __pyx_pw_17OpenGL_accelerate_7wrapper_16returnPyArgument_4name_5__del__(o); - } -} - -static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_returnPyArgument[] = { - {__Pyx_NAMESTR("finalise"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_7wrapper_16returnPyArgument_3finalise, METH_O, __Pyx_DOCSTR(0)}, - {0, 0, 0, 0} -}; - -static struct PyGetSetDef __pyx_getsets_17OpenGL_accelerate_7wrapper_returnPyArgument[] = { - {(char *)"index", __pyx_getprop_17OpenGL_accelerate_7wrapper_16returnPyArgument_index, __pyx_setprop_17OpenGL_accelerate_7wrapper_16returnPyArgument_index, 0, 0}, - {(char *)"name", __pyx_getprop_17OpenGL_accelerate_7wrapper_16returnPyArgument_name, __pyx_setprop_17OpenGL_accelerate_7wrapper_16returnPyArgument_name, 0, 0}, - {0, 0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number_returnPyArgument = { - 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_returnPyArgument = { - 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_returnPyArgument = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; +static struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_DefaultCConverter __pyx_vtable_17OpenGL_accelerate_7wrapper_DefaultCConverter; -static PyBufferProcs __pyx_tp_as_buffer_returnPyArgument = { - #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_17OpenGL_accelerate_7wrapper_returnPyArgument = { - PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("OpenGL_accelerate.wrapper.returnPyArgument"), /*tp_name*/ - sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnPyArgument), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_returnPyArgument, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 - 0, /*tp_compare*/ - #else - 0, /*reserved*/ - #endif - __pyx_pw_17OpenGL_accelerate_7wrapper_16returnPyArgument_5__repr__, /*tp_repr*/ - &__pyx_tp_as_number_returnPyArgument, /*tp_as_number*/ - &__pyx_tp_as_sequence_returnPyArgument, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_returnPyArgument, /*tp_as_mapping*/ - 0, /*tp_hash*/ - #if CYTHON_COMPILING_IN_PYPY - __pyx_pw_17OpenGL_accelerate_7wrapper_15returnConverter_1__call__, /*tp_call*/ - #else - 0, /*tp_call*/ - #endif - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_returnPyArgument, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - __Pyx_DOCSTR("ReturnValues returning the named pyArgs value"), /*tp_doc*/ - __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_returnPyArgument, /*tp_traverse*/ - __pyx_tp_clear_17OpenGL_accelerate_7wrapper_returnPyArgument, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - __pyx_methods_17OpenGL_accelerate_7wrapper_returnPyArgument, /*tp_methods*/ - 0, /*tp_members*/ - __pyx_getsets_17OpenGL_accelerate_7wrapper_returnPyArgument, /*tp_getset*/ - 0, /*tp_base*/ - 0, /*tp_dict*/ - 0, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - 0, /*tp_dictoffset*/ - __pyx_pw_17OpenGL_accelerate_7wrapper_16returnPyArgument_1__init__, /*tp_init*/ - 0, /*tp_alloc*/ - __pyx_tp_new_17OpenGL_accelerate_7wrapper_returnPyArgument, /*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_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex __pyx_vtable_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex; - -static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex(PyTypeObject *t, PyObject *a, PyObject *k) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex *p; - PyObject *o = __pyx_tp_new_17OpenGL_accelerate_7wrapper_returnConverter(t, a, k); - if (!o) return 0; - p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex *)o); - p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_returnConverter*)__pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex; - return o; -} - -static PyObject *__pyx_getprop_17OpenGL_accelerate_7wrapper_21returnPyArgumentIndex_index(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_7wrapper_21returnPyArgumentIndex_5index_1__get__(o); -} - -static int __pyx_setprop_17OpenGL_accelerate_7wrapper_21returnPyArgumentIndex_index(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_17OpenGL_accelerate_7wrapper_21returnPyArgumentIndex_5index_3__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; - } -} - -static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex[] = { - {__Pyx_NAMESTR("finalise"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_7wrapper_21returnPyArgumentIndex_3finalise, METH_O, __Pyx_DOCSTR(__pyx_doc_17OpenGL_accelerate_7wrapper_21returnPyArgumentIndex_2finalise)}, - {0, 0, 0, 0} -}; - -static struct PyGetSetDef __pyx_getsets_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex[] = { - {(char *)"index", __pyx_getprop_17OpenGL_accelerate_7wrapper_21returnPyArgumentIndex_index, __pyx_setprop_17OpenGL_accelerate_7wrapper_21returnPyArgumentIndex_index, 0, 0}, - {0, 0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number_returnPyArgumentIndex = { - 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_returnPyArgumentIndex = { - 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_returnPyArgumentIndex = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_returnPyArgumentIndex = { - #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_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex = { - PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("OpenGL_accelerate.wrapper.returnPyArgumentIndex"), /*tp_name*/ - sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_returnConverter, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 - 0, /*tp_compare*/ - #else - 0, /*reserved*/ - #endif - __pyx_pw_17OpenGL_accelerate_7wrapper_21returnPyArgumentIndex_5__repr__, /*tp_repr*/ - &__pyx_tp_as_number_returnPyArgumentIndex, /*tp_as_number*/ - &__pyx_tp_as_sequence_returnPyArgumentIndex, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_returnPyArgumentIndex, /*tp_as_mapping*/ - 0, /*tp_hash*/ - #if CYTHON_COMPILING_IN_PYPY - __pyx_pw_17OpenGL_accelerate_7wrapper_15returnConverter_1__call__, /*tp_call*/ - #else - 0, /*tp_call*/ - #endif - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_returnPyArgumentIndex, /*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_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - __pyx_methods_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex, /*tp_methods*/ - 0, /*tp_members*/ - __pyx_getsets_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex, /*tp_getset*/ - 0, /*tp_base*/ - 0, /*tp_dict*/ - 0, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - 0, /*tp_dictoffset*/ - __pyx_pw_17OpenGL_accelerate_7wrapper_21returnPyArgumentIndex_1__init__, /*tp_init*/ - 0, /*tp_alloc*/ - __pyx_tp_new_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex, /*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_17OpenGL_accelerate_7wrapper_returnCArgument __pyx_vtable_17OpenGL_accelerate_7wrapper_returnCArgument; - -static PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_returnCArgument(PyTypeObject *t, PyObject *a, PyObject *k) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnCArgument *p; - PyObject *o = __pyx_tp_new_17OpenGL_accelerate_7wrapper_returnConverter(t, a, k); - if (!o) return 0; - p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnCArgument *)o); - p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_returnConverter*)__pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnCArgument; - p->name = ((PyObject*)Py_None); Py_INCREF(Py_None); - return o; -} - -static void __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_returnCArgument(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnCArgument *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnCArgument *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->name); - PyObject_GC_Track(o); - __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_returnConverter(o); -} - -static int __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_returnCArgument(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnCArgument *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnCArgument *)o; - e = ((likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter)) ? ((__pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter->tp_traverse) ? __pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_returnCArgument)); if (e) return e; - if (p->name) { - e = (*v)(p->name, a); if (e) return e; - } - return 0; -} - -static int __pyx_tp_clear_17OpenGL_accelerate_7wrapper_returnCArgument(PyObject *o) { - struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnCArgument *p = (struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnCArgument *)o; - PyObject* tmp; - if (likely(__pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter)) { if (__pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter->tp_clear) __pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_17OpenGL_accelerate_7wrapper_returnCArgument); - tmp = ((PyObject*)p->name); - p->name = ((PyObject*)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; -} - -static PyObject *__pyx_getprop_17OpenGL_accelerate_7wrapper_15returnCArgument_index(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_7wrapper_15returnCArgument_5index_1__get__(o); -} - -static int __pyx_setprop_17OpenGL_accelerate_7wrapper_15returnCArgument_index(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_17OpenGL_accelerate_7wrapper_15returnCArgument_5index_3__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; - } -} - -static PyObject *__pyx_getprop_17OpenGL_accelerate_7wrapper_15returnCArgument_name(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_17OpenGL_accelerate_7wrapper_15returnCArgument_4name_1__get__(o); -} - -static int __pyx_setprop_17OpenGL_accelerate_7wrapper_15returnCArgument_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_17OpenGL_accelerate_7wrapper_15returnCArgument_4name_3__set__(o, v); - } - else { - return __pyx_pw_17OpenGL_accelerate_7wrapper_15returnCArgument_4name_5__del__(o); - } -} - -static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_returnCArgument[] = { - {__Pyx_NAMESTR("finalise"), (PyCFunction)__pyx_pw_17OpenGL_accelerate_7wrapper_15returnCArgument_3finalise, METH_O, __Pyx_DOCSTR(0)}, - {0, 0, 0, 0} -}; - -static struct PyGetSetDef __pyx_getsets_17OpenGL_accelerate_7wrapper_returnCArgument[] = { - {(char *)"index", __pyx_getprop_17OpenGL_accelerate_7wrapper_15returnCArgument_index, __pyx_setprop_17OpenGL_accelerate_7wrapper_15returnCArgument_index, 0, 0}, - {(char *)"name", __pyx_getprop_17OpenGL_accelerate_7wrapper_15returnCArgument_name, __pyx_setprop_17OpenGL_accelerate_7wrapper_15returnCArgument_name, 0, 0}, - {0, 0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number_returnCArgument = { - 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_returnCArgument = { - 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_returnCArgument = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_returnCArgument = { - #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 PyObject *__pyx_tp_new_17OpenGL_accelerate_7wrapper_DefaultCConverter(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_17OpenGL_accelerate_7wrapper_DefaultCConverter *p; + PyObject *o = __pyx_tp_new_17OpenGL_accelerate_7wrapper_cArgConverter(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_17OpenGL_accelerate_7wrapper_DefaultCConverter *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_7wrapper_cArgConverter*)__pyx_vtabptr_17OpenGL_accelerate_7wrapper_DefaultCConverter; + return o; +} + +static PyMethodDef __pyx_methods_17OpenGL_accelerate_7wrapper_DefaultCConverter[] = { + {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_returnCArgument = { +static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_DefaultCConverter = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("OpenGL_accelerate.wrapper.returnCArgument"), /*tp_name*/ - sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnCArgument), /*tp_basicsize*/ + __Pyx_NAMESTR("OpenGL_accelerate.wrapper.DefaultCConverter"), /*tp_name*/ + sizeof(struct __pyx_obj_17OpenGL_accelerate_7wrapper_DefaultCConverter), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_returnCArgument, /*tp_dealloc*/ + __pyx_tp_dealloc_17OpenGL_accelerate_7wrapper_cArgConverter, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -11226,39 +9848,39 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_7wrapper_returnCArgument = { #else 0, /*reserved*/ #endif - __pyx_pw_17OpenGL_accelerate_7wrapper_15returnCArgument_5__repr__, /*tp_repr*/ - &__pyx_tp_as_number_returnCArgument, /*tp_as_number*/ - &__pyx_tp_as_sequence_returnCArgument, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_returnCArgument, /*tp_as_mapping*/ + __pyx_pw_17OpenGL_accelerate_7wrapper_17DefaultCConverter_3__repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ #if CYTHON_COMPILING_IN_PYPY - __pyx_pw_17OpenGL_accelerate_7wrapper_15returnConverter_1__call__, /*tp_call*/ + __pyx_pw_17OpenGL_accelerate_7wrapper_13cArgConverter_1__call__, /*tp_call*/ #else 0, /*tp_call*/ #endif 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_returnCArgument, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - __Pyx_DOCSTR("ReturnValues returning the named pyArgs value"), /*tp_doc*/ - __pyx_tp_traverse_17OpenGL_accelerate_7wrapper_returnCArgument, /*tp_traverse*/ - __pyx_tp_clear_17OpenGL_accelerate_7wrapper_returnCArgument, /*tp_clear*/ + 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*/ 0, /*tp_iternext*/ - __pyx_methods_17OpenGL_accelerate_7wrapper_returnCArgument, /*tp_methods*/ + __pyx_methods_17OpenGL_accelerate_7wrapper_DefaultCConverter, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_17OpenGL_accelerate_7wrapper_returnCArgument, /*tp_getset*/ + 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_17OpenGL_accelerate_7wrapper_15returnCArgument_1__init__, /*tp_init*/ + __pyx_pw_17OpenGL_accelerate_7wrapper_17DefaultCConverter_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_17OpenGL_accelerate_7wrapper_returnCArgument, /*tp_new*/ + __pyx_tp_new_17OpenGL_accelerate_7wrapper_DefaultCConverter, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -11311,8 +9933,10 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1}, {&__pyx_n_s____call__, __pyx_k____call__, sizeof(__pyx_k____call__), 0, 0, 1, 1}, {&__pyx_n_s____class__, __pyx_k____class__, sizeof(__pyx_k____class__), 0, 0, 1, 1}, + {&__pyx_n_s____import__, __pyx_k____import__, sizeof(__pyx_k____import__), 0, 0, 1, 1}, {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 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____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1}, {&__pyx_n_s__args, __pyx_k__args, sizeof(__pyx_k__args), 0, 0, 1, 1}, {&__pyx_n_s__arguments, __pyx_k__arguments, sizeof(__pyx_k__arguments), 0, 0, 1, 1}, @@ -11346,13 +9970,13 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_Exception = __Pyx_GetName(__pyx_b, __pyx_n_s__Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_enumerate = __Pyx_GetName(__pyx_b, __pyx_n_s__enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __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[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_IndexError = __Pyx_GetName(__pyx_b, __pyx_n_s__IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_AttributeError = __Pyx_GetName(__pyx_b, __pyx_n_s__AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s__Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s__enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s__IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s__AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; @@ -11384,6 +10008,9 @@ PyMODINIT_FUNC PyInit_wrapper(void) { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); @@ -11421,6 +10048,8 @@ PyMODINIT_FUNC PyInit_wrapper(void) __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __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;} @@ -11436,6 +10065,9 @@ PyMODINIT_FUNC PyInit_wrapper(void) 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_OpenGL_accelerate__wrapper) { 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;}; } @@ -11447,22 +10079,31 @@ PyMODINIT_FUNC PyInit_wrapper(void) /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ - __pyx_vtabptr_17OpenGL_accelerate_7wrapper_cArgConverter = &__pyx_vtable_17OpenGL_accelerate_7wrapper_cArgConverter; - __pyx_vtable_17OpenGL_accelerate_7wrapper_cArgConverter.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgConverter *, PyObject *, int, PyObject *))__pyx_f_17OpenGL_accelerate_7wrapper_13cArgConverter_c_call; - if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_7wrapper_cArgConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_vtabptr_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement = &__pyx_vtable_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement; + __pyx_vtable_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement *, PyObject *))__pyx_f_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_c_call; + if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_cArgConverter, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_13cArgConverter___call__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_13cArgConverter___call__.doc = __pyx_doc_17OpenGL_accelerate_7wrapper_13cArgConverter___call__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_17OpenGL_accelerate_7wrapper_13cArgConverter___call__; + __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_2__call__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_2__call__.doc = __pyx_doc_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_2__call__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_2__call__; } } #endif - if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_7wrapper_cArgConverter.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_7wrapper_cArgConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "cArgConverter", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_cArgConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter = &__pyx_type_17OpenGL_accelerate_7wrapper_cArgConverter; + if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "PyArgCalculatorElement", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement = &__pyx_type_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement; + if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_7wrapper_Wrapper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "Wrapper", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_Wrapper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_17OpenGL_accelerate_7wrapper_Wrapper = &__pyx_type_17OpenGL_accelerate_7wrapper_Wrapper; + __pyx_vtabptr_17OpenGL_accelerate_7wrapper_CArgCalculator = &__pyx_vtable_17OpenGL_accelerate_7wrapper_CArgCalculator; + __pyx_vtable_17OpenGL_accelerate_7wrapper_CArgCalculator.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculator *, PyObject *))__pyx_f_17OpenGL_accelerate_7wrapper_14CArgCalculator_c_call; + if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_7wrapper_CArgCalculator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_7wrapper_CArgCalculator.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_7wrapper_CArgCalculator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "CArgCalculator", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_CArgCalculator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_17OpenGL_accelerate_7wrapper_CArgCalculator = &__pyx_type_17OpenGL_accelerate_7wrapper_CArgCalculator; __pyx_vtabptr_17OpenGL_accelerate_7wrapper_pyArgConverter = &__pyx_vtable_17OpenGL_accelerate_7wrapper_pyArgConverter; __pyx_vtable_17OpenGL_accelerate_7wrapper_pyArgConverter.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_pyArgConverter *, PyObject *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_7wrapper_14pyArgConverter_c_call; if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_7wrapper_pyArgConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -11479,22 +10120,34 @@ PyMODINIT_FUNC PyInit_wrapper(void) if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_7wrapper_pyArgConverter.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_7wrapper_pyArgConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "pyArgConverter", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_pyArgConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter = &__pyx_type_17OpenGL_accelerate_7wrapper_pyArgConverter; - __pyx_vtabptr_17OpenGL_accelerate_7wrapper_cArgumentConverter = &__pyx_vtable_17OpenGL_accelerate_7wrapper_cArgumentConverter; - __pyx_vtable_17OpenGL_accelerate_7wrapper_cArgumentConverter.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgumentConverter *, PyObject *))__pyx_f_17OpenGL_accelerate_7wrapper_18cArgumentConverter_c_call; - if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_7wrapper_cArgumentConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_vtabptr_17OpenGL_accelerate_7wrapper_CallFuncPyConverter = &__pyx_vtable_17OpenGL_accelerate_7wrapper_CallFuncPyConverter; + __pyx_vtable_17OpenGL_accelerate_7wrapper_CallFuncPyConverter.__pyx_base = *__pyx_vtabptr_17OpenGL_accelerate_7wrapper_pyArgConverter; + __pyx_vtable_17OpenGL_accelerate_7wrapper_CallFuncPyConverter.__pyx_base.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_pyArgConverter *, PyObject *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_7wrapper_19CallFuncPyConverter_c_call; + __pyx_type_17OpenGL_accelerate_7wrapper_CallFuncPyConverter.tp_base = __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter; + if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_7wrapper_CallFuncPyConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_cArgumentConverter, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_CallFuncPyConverter, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_18cArgumentConverter___call__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_18cArgumentConverter___call__.doc = __pyx_doc_17OpenGL_accelerate_7wrapper_18cArgumentConverter___call__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_17OpenGL_accelerate_7wrapper_18cArgumentConverter___call__; + __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_19CallFuncPyConverter___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_19CallFuncPyConverter___init__.doc = __pyx_doc_17OpenGL_accelerate_7wrapper_19CallFuncPyConverter___init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_17OpenGL_accelerate_7wrapper_19CallFuncPyConverter___init__; } } #endif - if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_7wrapper_cArgumentConverter.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_7wrapper_cArgumentConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "cArgumentConverter", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_cArgumentConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_17OpenGL_accelerate_7wrapper_cArgumentConverter = &__pyx_type_17OpenGL_accelerate_7wrapper_cArgumentConverter; + #if CYTHON_COMPILING_IN_CPYTHON + { + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_CallFuncPyConverter, "__repr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { + __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_19CallFuncPyConverter_2__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_19CallFuncPyConverter_2__repr__.doc = __pyx_doc_17OpenGL_accelerate_7wrapper_19CallFuncPyConverter_2__repr__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_17OpenGL_accelerate_7wrapper_19CallFuncPyConverter_2__repr__; + } + } + #endif + if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_7wrapper_CallFuncPyConverter.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_7wrapper_CallFuncPyConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "CallFuncPyConverter", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_CallFuncPyConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_17OpenGL_accelerate_7wrapper_CallFuncPyConverter = &__pyx_type_17OpenGL_accelerate_7wrapper_CallFuncPyConverter; __pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnConverter = &__pyx_vtable_17OpenGL_accelerate_7wrapper_returnConverter; __pyx_vtable_17OpenGL_accelerate_7wrapper_returnConverter.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnConverter *, PyObject *, PyObject *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_7wrapper_15returnConverter_c_call; if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_7wrapper_returnConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -11511,84 +10164,98 @@ PyMODINIT_FUNC PyInit_wrapper(void) if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_7wrapper_returnConverter.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "returnConverter", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_returnConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter = &__pyx_type_17OpenGL_accelerate_7wrapper_returnConverter; - __pyx_vtabptr_17OpenGL_accelerate_7wrapper_CArgCalculatorElement = &__pyx_vtable_17OpenGL_accelerate_7wrapper_CArgCalculatorElement; - __pyx_vtable_17OpenGL_accelerate_7wrapper_CArgCalculatorElement.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculatorElement *, PyObject *))__pyx_f_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement_c_call; - if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_7wrapper_CArgCalculatorElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnCArgument = &__pyx_vtable_17OpenGL_accelerate_7wrapper_returnCArgument; + __pyx_vtable_17OpenGL_accelerate_7wrapper_returnCArgument.__pyx_base = *__pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnConverter; + __pyx_vtable_17OpenGL_accelerate_7wrapper_returnCArgument.__pyx_base.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnConverter *, PyObject *, PyObject *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_7wrapper_15returnCArgument_c_call; + __pyx_type_17OpenGL_accelerate_7wrapper_returnCArgument.tp_base = __pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter; + if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_7wrapper_returnCArgument) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_7wrapper_returnCArgument.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnCArgument) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "returnCArgument", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_returnCArgument) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_17OpenGL_accelerate_7wrapper_returnCArgument = &__pyx_type_17OpenGL_accelerate_7wrapper_returnCArgument; + __pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnPyArgument = &__pyx_vtable_17OpenGL_accelerate_7wrapper_returnPyArgument; + __pyx_vtable_17OpenGL_accelerate_7wrapper_returnPyArgument.__pyx_base = *__pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnConverter; + __pyx_vtable_17OpenGL_accelerate_7wrapper_returnPyArgument.__pyx_base.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnConverter *, PyObject *, PyObject *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_7wrapper_16returnPyArgument_c_call; + __pyx_type_17OpenGL_accelerate_7wrapper_returnPyArgument.tp_base = __pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter; + if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_7wrapper_returnPyArgument) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_7wrapper_returnPyArgument.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnPyArgument) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "returnPyArgument", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_returnPyArgument) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_17OpenGL_accelerate_7wrapper_returnPyArgument = &__pyx_type_17OpenGL_accelerate_7wrapper_returnPyArgument; + __pyx_vtabptr_17OpenGL_accelerate_7wrapper_CArgumentCalculator = &__pyx_vtable_17OpenGL_accelerate_7wrapper_CArgumentCalculator; + __pyx_vtable_17OpenGL_accelerate_7wrapper_CArgumentCalculator.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgumentCalculator *, PyObject *))__pyx_f_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_c_call; + if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_7wrapper_CArgumentCalculator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_7wrapper_CArgumentCalculator.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_7wrapper_CArgumentCalculator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "CArgumentCalculator", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_CArgumentCalculator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_17OpenGL_accelerate_7wrapper_CArgumentCalculator = &__pyx_type_17OpenGL_accelerate_7wrapper_CArgumentCalculator; + __pyx_vtabptr_17OpenGL_accelerate_7wrapper_cArgConverter = &__pyx_vtable_17OpenGL_accelerate_7wrapper_cArgConverter; + __pyx_vtable_17OpenGL_accelerate_7wrapper_cArgConverter.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgConverter *, PyObject *, int, PyObject *))__pyx_f_17OpenGL_accelerate_7wrapper_13cArgConverter_c_call; + if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_7wrapper_cArgConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_CArgCalculatorElement, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_cArgConverter, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement_2__call__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement_2__call__.doc = __pyx_doc_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement_2__call__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement_2__call__; + __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_13cArgConverter___call__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_13cArgConverter___call__.doc = __pyx_doc_17OpenGL_accelerate_7wrapper_13cArgConverter___call__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_17OpenGL_accelerate_7wrapper_13cArgConverter___call__; } } #endif - if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_7wrapper_CArgCalculatorElement.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_7wrapper_CArgCalculatorElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "CArgCalculatorElement", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_CArgCalculatorElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_17OpenGL_accelerate_7wrapper_CArgCalculatorElement = &__pyx_type_17OpenGL_accelerate_7wrapper_CArgCalculatorElement; - __pyx_vtabptr_17OpenGL_accelerate_7wrapper_CArgCalculator = &__pyx_vtable_17OpenGL_accelerate_7wrapper_CArgCalculator; - __pyx_vtable_17OpenGL_accelerate_7wrapper_CArgCalculator.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculator *, PyObject *))__pyx_f_17OpenGL_accelerate_7wrapper_14CArgCalculator_c_call; - if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_7wrapper_CArgCalculator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_7wrapper_CArgCalculator.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_7wrapper_CArgCalculator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "CArgCalculator", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_CArgCalculator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_17OpenGL_accelerate_7wrapper_CArgCalculator = &__pyx_type_17OpenGL_accelerate_7wrapper_CArgCalculator; - __pyx_vtabptr_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement = &__pyx_vtable_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement; - __pyx_vtable_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement *, PyObject *))__pyx_f_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_c_call; - if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_7wrapper_cArgConverter.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_7wrapper_cArgConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "cArgConverter", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_cArgConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter = &__pyx_type_17OpenGL_accelerate_7wrapper_cArgConverter; + __pyx_vtabptr_17OpenGL_accelerate_7wrapper_getPyArgsName = &__pyx_vtable_17OpenGL_accelerate_7wrapper_getPyArgsName; + __pyx_vtable_17OpenGL_accelerate_7wrapper_getPyArgsName.__pyx_base = *__pyx_vtabptr_17OpenGL_accelerate_7wrapper_cArgConverter; + __pyx_vtable_17OpenGL_accelerate_7wrapper_getPyArgsName.__pyx_base.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgConverter *, PyObject *, int, PyObject *))__pyx_f_17OpenGL_accelerate_7wrapper_13getPyArgsName_c_call; + __pyx_type_17OpenGL_accelerate_7wrapper_getPyArgsName.tp_base = __pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter; + if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_7wrapper_getPyArgsName) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_7wrapper_getPyArgsName.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_7wrapper_getPyArgsName) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "getPyArgsName", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_getPyArgsName) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_17OpenGL_accelerate_7wrapper_getPyArgsName = &__pyx_type_17OpenGL_accelerate_7wrapper_getPyArgsName; + __pyx_vtabptr_17OpenGL_accelerate_7wrapper_cArgumentConverter = &__pyx_vtable_17OpenGL_accelerate_7wrapper_cArgumentConverter; + __pyx_vtable_17OpenGL_accelerate_7wrapper_cArgumentConverter.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgumentConverter *, PyObject *))__pyx_f_17OpenGL_accelerate_7wrapper_18cArgumentConverter_c_call; + if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_7wrapper_cArgumentConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_cArgumentConverter, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_2__call__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_2__call__.doc = __pyx_doc_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_2__call__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_17OpenGL_accelerate_7wrapper_22PyArgCalculatorElement_2__call__; + __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_18cArgumentConverter___call__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_18cArgumentConverter___call__.doc = __pyx_doc_17OpenGL_accelerate_7wrapper_18cArgumentConverter___call__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_17OpenGL_accelerate_7wrapper_18cArgumentConverter___call__; } } #endif - if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "PyArgCalculatorElement", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement = &__pyx_type_17OpenGL_accelerate_7wrapper_PyArgCalculatorElement; + if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_7wrapper_cArgumentConverter.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_7wrapper_cArgumentConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "cArgumentConverter", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_cArgumentConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_17OpenGL_accelerate_7wrapper_cArgumentConverter = &__pyx_type_17OpenGL_accelerate_7wrapper_cArgumentConverter; + __pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex = &__pyx_vtable_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex; + __pyx_vtable_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex.__pyx_base = *__pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnConverter; + __pyx_vtable_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex.__pyx_base.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnConverter *, PyObject *, PyObject *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_7wrapper_21returnPyArgumentIndex_c_call; + __pyx_type_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex.tp_base = __pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter; + if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "returnPyArgumentIndex", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex = &__pyx_type_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex; __pyx_vtabptr_17OpenGL_accelerate_7wrapper_PyArgCalculator = &__pyx_vtable_17OpenGL_accelerate_7wrapper_PyArgCalculator; __pyx_vtable_17OpenGL_accelerate_7wrapper_PyArgCalculator.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_PyArgCalculator *, PyObject *))__pyx_f_17OpenGL_accelerate_7wrapper_15PyArgCalculator_c_call; if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_7wrapper_PyArgCalculator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_7wrapper_PyArgCalculator.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_7wrapper_PyArgCalculator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "PyArgCalculator", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_PyArgCalculator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_17OpenGL_accelerate_7wrapper_PyArgCalculator = &__pyx_type_17OpenGL_accelerate_7wrapper_PyArgCalculator; - __pyx_vtabptr_17OpenGL_accelerate_7wrapper_CArgumentCalculator = &__pyx_vtable_17OpenGL_accelerate_7wrapper_CArgumentCalculator; - __pyx_vtable_17OpenGL_accelerate_7wrapper_CArgumentCalculator.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgumentCalculator *, PyObject *))__pyx_f_17OpenGL_accelerate_7wrapper_19CArgumentCalculator_c_call; - if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_7wrapper_CArgumentCalculator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_7wrapper_CArgumentCalculator.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_7wrapper_CArgumentCalculator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "CArgumentCalculator", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_CArgumentCalculator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_17OpenGL_accelerate_7wrapper_CArgumentCalculator = &__pyx_type_17OpenGL_accelerate_7wrapper_CArgumentCalculator; - __pyx_vtabptr_17OpenGL_accelerate_7wrapper_CallFuncPyConverter = &__pyx_vtable_17OpenGL_accelerate_7wrapper_CallFuncPyConverter; - __pyx_vtable_17OpenGL_accelerate_7wrapper_CallFuncPyConverter.__pyx_base = *__pyx_vtabptr_17OpenGL_accelerate_7wrapper_pyArgConverter; - __pyx_vtable_17OpenGL_accelerate_7wrapper_CallFuncPyConverter.__pyx_base.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_pyArgConverter *, PyObject *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_7wrapper_19CallFuncPyConverter_c_call; - __pyx_type_17OpenGL_accelerate_7wrapper_CallFuncPyConverter.tp_base = __pyx_ptype_17OpenGL_accelerate_7wrapper_pyArgConverter; - if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_7wrapper_CallFuncPyConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #if CYTHON_COMPILING_IN_CPYTHON - { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_CallFuncPyConverter, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_19CallFuncPyConverter___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_19CallFuncPyConverter___init__.doc = __pyx_doc_17OpenGL_accelerate_7wrapper_19CallFuncPyConverter___init__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_17OpenGL_accelerate_7wrapper_19CallFuncPyConverter___init__; - } - } - #endif + __pyx_vtabptr_17OpenGL_accelerate_7wrapper_CArgCalculatorElement = &__pyx_vtable_17OpenGL_accelerate_7wrapper_CArgCalculatorElement; + __pyx_vtable_17OpenGL_accelerate_7wrapper_CArgCalculatorElement.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_CArgCalculatorElement *, PyObject *))__pyx_f_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement_c_call; + if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_7wrapper_CArgCalculatorElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_CallFuncPyConverter, "__repr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_CArgCalculatorElement, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_19CallFuncPyConverter_2__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_19CallFuncPyConverter_2__repr__.doc = __pyx_doc_17OpenGL_accelerate_7wrapper_19CallFuncPyConverter_2__repr__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_17OpenGL_accelerate_7wrapper_19CallFuncPyConverter_2__repr__; + __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement_2__call__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement_2__call__.doc = __pyx_doc_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement_2__call__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_17OpenGL_accelerate_7wrapper_21CArgCalculatorElement_2__call__; } } #endif - if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_7wrapper_CallFuncPyConverter.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_7wrapper_CallFuncPyConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "CallFuncPyConverter", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_CallFuncPyConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_17OpenGL_accelerate_7wrapper_CallFuncPyConverter = &__pyx_type_17OpenGL_accelerate_7wrapper_CallFuncPyConverter; + if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_7wrapper_CArgCalculatorElement.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_7wrapper_CArgCalculatorElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "CArgCalculatorElement", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_CArgCalculatorElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_17OpenGL_accelerate_7wrapper_CArgCalculatorElement = &__pyx_type_17OpenGL_accelerate_7wrapper_CArgCalculatorElement; __pyx_vtabptr_17OpenGL_accelerate_7wrapper_DefaultCConverter = &__pyx_vtable_17OpenGL_accelerate_7wrapper_DefaultCConverter; __pyx_vtable_17OpenGL_accelerate_7wrapper_DefaultCConverter.__pyx_base = *__pyx_vtabptr_17OpenGL_accelerate_7wrapper_cArgConverter; __pyx_vtable_17OpenGL_accelerate_7wrapper_DefaultCConverter.__pyx_base.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgConverter *, PyObject *, int, PyObject *))__pyx_f_17OpenGL_accelerate_7wrapper_17DefaultCConverter_c_call; @@ -11604,44 +10271,9 @@ PyMODINIT_FUNC PyInit_wrapper(void) } } #endif - if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_7wrapper_DefaultCConverter.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_7wrapper_DefaultCConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "DefaultCConverter", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_DefaultCConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_17OpenGL_accelerate_7wrapper_DefaultCConverter = &__pyx_type_17OpenGL_accelerate_7wrapper_DefaultCConverter; - if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_7wrapper_Wrapper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "Wrapper", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_Wrapper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_17OpenGL_accelerate_7wrapper_Wrapper = &__pyx_type_17OpenGL_accelerate_7wrapper_Wrapper; - __pyx_vtabptr_17OpenGL_accelerate_7wrapper_getPyArgsName = &__pyx_vtable_17OpenGL_accelerate_7wrapper_getPyArgsName; - __pyx_vtable_17OpenGL_accelerate_7wrapper_getPyArgsName.__pyx_base = *__pyx_vtabptr_17OpenGL_accelerate_7wrapper_cArgConverter; - __pyx_vtable_17OpenGL_accelerate_7wrapper_getPyArgsName.__pyx_base.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_cArgConverter *, PyObject *, int, PyObject *))__pyx_f_17OpenGL_accelerate_7wrapper_13getPyArgsName_c_call; - __pyx_type_17OpenGL_accelerate_7wrapper_getPyArgsName.tp_base = __pyx_ptype_17OpenGL_accelerate_7wrapper_cArgConverter; - if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_7wrapper_getPyArgsName) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_7wrapper_getPyArgsName.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_7wrapper_getPyArgsName) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "getPyArgsName", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_getPyArgsName) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_17OpenGL_accelerate_7wrapper_getPyArgsName = &__pyx_type_17OpenGL_accelerate_7wrapper_getPyArgsName; - __pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnPyArgument = &__pyx_vtable_17OpenGL_accelerate_7wrapper_returnPyArgument; - __pyx_vtable_17OpenGL_accelerate_7wrapper_returnPyArgument.__pyx_base = *__pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnConverter; - __pyx_vtable_17OpenGL_accelerate_7wrapper_returnPyArgument.__pyx_base.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnConverter *, PyObject *, PyObject *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_7wrapper_16returnPyArgument_c_call; - __pyx_type_17OpenGL_accelerate_7wrapper_returnPyArgument.tp_base = __pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter; - if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_7wrapper_returnPyArgument) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_7wrapper_returnPyArgument.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnPyArgument) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "returnPyArgument", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_returnPyArgument) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_17OpenGL_accelerate_7wrapper_returnPyArgument = &__pyx_type_17OpenGL_accelerate_7wrapper_returnPyArgument; - __pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex = &__pyx_vtable_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex; - __pyx_vtable_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex.__pyx_base = *__pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnConverter; - __pyx_vtable_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex.__pyx_base.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnConverter *, PyObject *, PyObject *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_7wrapper_21returnPyArgumentIndex_c_call; - __pyx_type_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex.tp_base = __pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter; - if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "returnPyArgumentIndex", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex = &__pyx_type_17OpenGL_accelerate_7wrapper_returnPyArgumentIndex; - __pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnCArgument = &__pyx_vtable_17OpenGL_accelerate_7wrapper_returnCArgument; - __pyx_vtable_17OpenGL_accelerate_7wrapper_returnCArgument.__pyx_base = *__pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnConverter; - __pyx_vtable_17OpenGL_accelerate_7wrapper_returnCArgument.__pyx_base.c_call = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_7wrapper_returnConverter *, PyObject *, PyObject *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_7wrapper_15returnCArgument_c_call; - __pyx_type_17OpenGL_accelerate_7wrapper_returnCArgument.tp_base = __pyx_ptype_17OpenGL_accelerate_7wrapper_returnConverter; - if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_7wrapper_returnCArgument) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_7wrapper_returnCArgument.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_7wrapper_returnCArgument) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "returnCArgument", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_returnCArgument) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_17OpenGL_accelerate_7wrapper_returnCArgument = &__pyx_type_17OpenGL_accelerate_7wrapper_returnCArgument; + if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_7wrapper_DefaultCConverter.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_7wrapper_DefaultCConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "DefaultCConverter", (PyObject *)&__pyx_type_17OpenGL_accelerate_7wrapper_DefaultCConverter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_17OpenGL_accelerate_7wrapper_DefaultCConverter = &__pyx_type_17OpenGL_accelerate_7wrapper_DefaultCConverter; /*--- Type import code ---*/ /*--- Variable import code ---*/ /*--- Function import code ---*/ @@ -11655,7 +10287,7 @@ PyMODINIT_FUNC PyInit_wrapper(void) */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__ctypes), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ctypes, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__ctypes, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/wrapper.pyx":3 @@ -11673,13 +10305,9 @@ PyMODINIT_FUNC PyInit_wrapper(void) __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__OpenGL), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __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__error); - if (__pyx_t_1 == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__error); - if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__error, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__error, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -11690,7 +10318,7 @@ PyMODINIT_FUNC PyInit_wrapper(void) */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_2)) < 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_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; goto __pyx_L0; __pyx_L1_error:; @@ -11728,17 +10356,15 @@ static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { } #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; } @@ -12002,6 +10628,84 @@ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyOb #endif } +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)); +} + #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { @@ -12040,24 +10744,23 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, } 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); @@ -12095,8 +10798,7 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; - } - else + } else args = PyTuple_Pack(1, value); if (!args) goto bad; @@ -12117,18 +10819,22 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject "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"); @@ -12152,6 +10858,54 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject } #endif +static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { + int r; + if (!j) return -1; + r = PyObject_SetItem(o, j, v); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, + int is_list, int wraparound, int boundscheck) { +#if CYTHON_COMPILING_IN_CPYTHON + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); + if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) { + PyObject* old = PyList_GET_ITEM(o, n); + Py_INCREF(v); + PyList_SET_ITEM(o, n, v); + Py_DECREF(old); + return 1; + } + } else { + PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; + if (likely(m && m->sq_ass_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 -1; + } + } + return m->sq_ass_item(o, i, v); + } + } +#else +#if CYTHON_COMPILING_IN_PYPY + if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) { +#else + if (is_list || PySequence_Check(o)) { +#endif + return PySequence_SetItem(o, i, v); + } +#endif + return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); +} + static CYTHON_INLINE int __Pyx_CheckKeywordStrings( PyObject *kwdict, const char* function_name, @@ -12191,6 +10945,23 @@ static CYTHON_INLINE int __Pyx_CheckKeywordStrings( return 0; } +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 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) @@ -12212,6 +10983,36 @@ static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_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_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Format(PyExc_ImportError, + #if PY_MAJOR_VERSION < 3 + "cannot import name %.230s", PyString_AS_STRING(name)); + #else + "cannot import name %S", name); + #endif + } + return value; +} + static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); @@ -12250,8 +11051,8 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 - PyObject *py_import = 0; - py_import = __Pyx_GetAttrString(__pyx_b, "__import__"); + PyObject *py_import; + py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s____import__); if (!py_import) goto bad; #endif @@ -12325,15 +11126,6 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { return module; } -static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name) { -#if PY_MAJOR_VERSION < 3 - PyErr_Format(PyExc_ImportError, "cannot import name %.230s", - PyString_AsString(name)); -#else - PyErr_Format(PyExc_ImportError, "cannot import name %S", name); -#endif -} - static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { const unsigned char neg_one = (unsigned char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; @@ -12524,10 +11316,15 @@ static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) { 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)) { @@ -12540,6 +11337,16 @@ static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { #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"); @@ -12547,6 +11354,17 @@ static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { } 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 { @@ -12559,10 +11377,15 @@ static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { } } +#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)) { @@ -12575,6 +11398,16 @@ static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObje #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"); @@ -12582,6 +11415,17 @@ static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObje } 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 { @@ -12594,10 +11438,15 @@ static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObje } } +#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)) { @@ -12610,6 +11459,16 @@ static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { #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"); @@ -12617,6 +11476,17 @@ static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { } 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 { @@ -12629,10 +11499,15 @@ static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { } } +#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)) { @@ -12645,6 +11520,16 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { #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"); @@ -12652,6 +11537,17 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { } 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 { @@ -12664,10 +11560,15 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { } } +#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)) { @@ -12680,6 +11581,16 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { #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"); @@ -12687,6 +11598,17 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { } 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 { @@ -12699,10 +11621,15 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { } } +#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)) { @@ -12715,6 +11642,16 @@ static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* #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"); @@ -12722,6 +11659,17 @@ static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* } 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 { @@ -12753,23 +11701,6 @@ static int __Pyx_check_binary_version(void) { 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) { @@ -12962,6 +11893,65 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { return 0; } +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; @@ -12971,14 +11961,14 @@ 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); @@ -12994,7 +11984,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { } #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)) { @@ -13035,11 +12025,10 @@ static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { } 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;