diff --git a/accelerate/src/latebind.c b/accelerate/src/latebind.c index 87d69078..e8edce4f 100644 --- a/accelerate/src/latebind.c +++ b/accelerate/src/latebind.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.4 */ +/* Generated by Cython 0.29.10 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -7,8 +7,8 @@ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_4" -#define CYTHON_HEX_VERSION 0x001D04F0 +#define CYTHON_ABI "0_29_10" +#define CYTHON_HEX_VERSION 0x001D0AF0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof @@ -310,8 +310,13 @@ #define __Pyx_DefaultClassType PyClass_Type #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" +#if PY_VERSION_HEX < 0x030800A4 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif #define __Pyx_DefaultClassType PyType_Type #endif #ifndef Py_TPFLAGS_CHECKTYPES @@ -346,26 +351,6 @@ #else #define __Pyx_PyFastCFunction_Check(func) 0 #endif -#if CYTHON_USE_DICT_VERSIONS -#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) -#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ - (version_var) = __PYX_GET_DICT_VERSION(dict);\ - (cache_var) = (value); -#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ - static PY_UINT64_T __pyx_dict_version = 0;\ - static PyObject *__pyx_dict_cached_value = NULL;\ - if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ - (VAR) = __pyx_dict_cached_value;\ - } else {\ - (VAR) = __pyx_dict_cached_value = (LOOKUP);\ - __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ - }\ - } -#else -#define __PYX_GET_DICT_VERSION(dict) (0) -#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) -#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); -#endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) #define PyObject_Malloc(s) PyMem_Malloc(s) #define PyObject_Free(p) PyMem_Free(p) @@ -620,7 +605,8 @@ typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* enc const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 -#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize @@ -836,7 +822,7 @@ struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind { }; -/* "src/latebind.pyx":34 +/* "src/latebind.pyx":41 * return self._finalCall( *args, **named ) * * cdef class Curry(object): # <<<<<<<<<<<<<< @@ -1029,6 +1015,32 @@ static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject * /* GetBuiltinName.proto */ static PyObject *__Pyx_GetBuiltinName(PyObject *name); +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + /* GetModuleGlobalName.proto */ #if CYTHON_USE_DICT_VERSIONS #define __Pyx_GetModuleGlobalName(var, name) {\ @@ -1201,6 +1213,7 @@ static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; static const char __pyx_k_pyx_result[] = "__pyx_result"; static const char __pyx_k_PickleError[] = "PickleError"; static const char __pyx_k_baseFunction[] = "baseFunction"; +static const char __pyx_k_getFinalCall[] = "getFinalCall"; static const char __pyx_k_pyx_checksum[] = "__pyx_checksum"; static const char __pyx_k_stringsource[] = "stringsource"; static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; @@ -1224,6 +1237,7 @@ static PyObject *__pyx_n_s_baseFunction; static PyObject *__pyx_n_s_cline_in_traceback; static PyObject *__pyx_n_s_dict; static PyObject *__pyx_n_s_finalise; +static PyObject *__pyx_n_s_getFinalCall; static PyObject *__pyx_n_s_getstate; static PyObject *__pyx_n_s_import; static PyObject *__pyx_n_s_main; @@ -1248,10 +1262,12 @@ static PyObject *__pyx_n_s_update; static PyObject *__pyx_n_s_wrapperFunction; static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_setFinalCall(struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *__pyx_v_self, PyObject *__pyx_v_finalCall); /* proto */ static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_2finalise(CYTHON_UNUSED struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_4getFinalCall(struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *__pyx_v_self); /* proto */ -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 PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_8__reduce_cython__(struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_10__setstate_cython__(struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_4__nonzero__(struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *__pyx_v_self); /* proto */ +static int __pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_6__bool__(struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_8getFinalCall(struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_10__call__(struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_named); /* proto */ +static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_12__reduce_cython__(struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_14__setstate_cython__(struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* 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_pf_17OpenGL_accelerate_8latebind_5Curry_4__reduce_cython__(struct __pyx_obj_17OpenGL_accelerate_8latebind_Curry *__pyx_v_self); /* proto */ @@ -1360,26 +1376,184 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_2finalise(CYTH /* "src/latebind.pyx":17 * """Finalise our target to our final callable object""" * + * def __nonzero__(self): # <<<<<<<<<<<<<< + * """Resolve our final call and check for empty/nonzero on it""" + * return bool(self.getFinalCall()) + */ + +/* Python wrapper */ +static int __pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_5__nonzero__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_5__nonzero__(PyObject *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0); + __pyx_r = __pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_4__nonzero__(((struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_4__nonzero__(struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + __Pyx_RefNannySetupContext("__nonzero__", 0); + + /* "src/latebind.pyx":19 + * def __nonzero__(self): + * """Resolve our final call and check for empty/nonzero on it""" + * return bool(self.getFinalCall()) # <<<<<<<<<<<<<< + * def __bool__(self): + * """Resolve our final call and check for empty/nonzero on it""" + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getFinalCall); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = (!(!__pyx_t_4)); + goto __pyx_L0; + + /* "src/latebind.pyx":17 + * """Finalise our target to our final callable object""" + * + * def __nonzero__(self): # <<<<<<<<<<<<<< + * """Resolve our final call and check for empty/nonzero on it""" + * return bool(self.getFinalCall()) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("OpenGL_accelerate.latebind.LateBind.__nonzero__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "src/latebind.pyx":20 + * """Resolve our final call and check for empty/nonzero on it""" + * return bool(self.getFinalCall()) + * def __bool__(self): # <<<<<<<<<<<<<< + * """Resolve our final call and check for empty/nonzero on it""" + * return bool(self.getFinalCall()) + */ + +/* Python wrapper */ +static int __pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_7__bool__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_7__bool__(PyObject *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0); + __pyx_r = __pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_6__bool__(((struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_6__bool__(struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + __Pyx_RefNannySetupContext("__bool__", 0); + + /* "src/latebind.pyx":22 + * def __bool__(self): + * """Resolve our final call and check for empty/nonzero on it""" + * return bool(self.getFinalCall()) # <<<<<<<<<<<<<< + * + * def getFinalCall( self ): + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getFinalCall); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 22, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = (!(!__pyx_t_4)); + goto __pyx_L0; + + /* "src/latebind.pyx":20 + * """Resolve our final call and check for empty/nonzero on it""" + * return bool(self.getFinalCall()) + * def __bool__(self): # <<<<<<<<<<<<<< + * """Resolve our final call and check for empty/nonzero on it""" + * return bool(self.getFinalCall()) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("OpenGL_accelerate.latebind.LateBind.__bool__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "src/latebind.pyx":24 + * return bool(self.getFinalCall()) + * * def getFinalCall( self ): # <<<<<<<<<<<<<< * """Retrieve and/or bind and retrieve final call""" * if not self._finalCall: */ /* Python wrapper */ -static PyObject *__pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_5getFinalCall(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_17OpenGL_accelerate_8latebind_8LateBind_4getFinalCall[] = "Retrieve and/or bind and retrieve final call"; -static PyObject *__pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_5getFinalCall(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_9getFinalCall(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_17OpenGL_accelerate_8latebind_8LateBind_8getFinalCall[] = "Retrieve and/or bind and retrieve final call"; +static PyObject *__pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_9getFinalCall(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getFinalCall (wrapper)", 0); - __pyx_r = __pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_4getFinalCall(((struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *)__pyx_v_self)); + __pyx_r = __pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_8getFinalCall(((struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_4getFinalCall(struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *__pyx_v_self) { +static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_8getFinalCall(struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -1389,25 +1563,25 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_4getFinalCall( PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("getFinalCall", 0); - /* "src/latebind.pyx":19 + /* "src/latebind.pyx":26 * def getFinalCall( self ): * """Retrieve and/or bind and retrieve final call""" * if not self._finalCall: # <<<<<<<<<<<<<< * self._finalCall = self.finalise() * return self._finalCall */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_finalCall); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 19, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_finalCall); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 26, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "src/latebind.pyx":20 + /* "src/latebind.pyx":27 * """Retrieve and/or bind and retrieve final call""" * if not self._finalCall: * self._finalCall = self.finalise() # <<<<<<<<<<<<<< * return self._finalCall * */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_finalise); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 20, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_finalise); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -1421,7 +1595,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_4getFinalCall( } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GIVEREF(__pyx_t_3); @@ -1430,7 +1604,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_4getFinalCall( __pyx_v_self->_finalCall = __pyx_t_3; __pyx_t_3 = 0; - /* "src/latebind.pyx":19 + /* "src/latebind.pyx":26 * def getFinalCall( self ): * """Retrieve and/or bind and retrieve final call""" * if not self._finalCall: # <<<<<<<<<<<<<< @@ -1439,7 +1613,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_4getFinalCall( */ } - /* "src/latebind.pyx":21 + /* "src/latebind.pyx":28 * if not self._finalCall: * self._finalCall = self.finalise() * return self._finalCall # <<<<<<<<<<<<<< @@ -1451,8 +1625,8 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_4getFinalCall( __pyx_r = __pyx_v_self->_finalCall; goto __pyx_L0; - /* "src/latebind.pyx":17 - * """Finalise our target to our final callable object""" + /* "src/latebind.pyx":24 + * return bool(self.getFinalCall()) * * def getFinalCall( self ): # <<<<<<<<<<<<<< * """Retrieve and/or bind and retrieve final call""" @@ -1472,7 +1646,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_4getFinalCall( return __pyx_r; } -/* "src/latebind.pyx":23 +/* "src/latebind.pyx":30 * return self._finalCall * * def __call__( self, *args, **named ): # <<<<<<<<<<<<<< @@ -1481,12 +1655,12 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_4getFinalCall( */ /* Python wrapper */ -static PyObject *__pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_7__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_17OpenGL_accelerate_8latebind_8LateBind_6__call__[] = "Call self._finalCall, calling finalise() first if not already called\n\n There's actually *no* reason to unpack and repack the arguments,\n but unfortunately I don't know of a Cython syntax to specify\n that.\n "; +static PyObject *__pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_11__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_17OpenGL_accelerate_8latebind_8LateBind_10__call__[] = "Call self._finalCall, calling finalise() first if not already called\n\n There's actually *no* reason to unpack and repack the arguments,\n but unfortunately I don't know of a Cython syntax to specify\n that.\n "; #if CYTHON_COMPILING_IN_CPYTHON -struct wrapperbase __pyx_wrapperbase_17OpenGL_accelerate_8latebind_8LateBind_6__call__; +struct wrapperbase __pyx_wrapperbase_17OpenGL_accelerate_8latebind_8LateBind_10__call__; #endif -static PyObject *__pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_7__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_11__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_v_named = 0; PyObject *__pyx_r = 0; @@ -1501,7 +1675,7 @@ static PyObject *__pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_7__call__(PyOb } __Pyx_INCREF(__pyx_args); __pyx_v_args = __pyx_args; - __pyx_r = __pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_6__call__(((struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *)__pyx_v_self), __pyx_v_args, __pyx_v_named); + __pyx_r = __pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_10__call__(((struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *)__pyx_v_self), __pyx_v_args, __pyx_v_named); /* function exit code */ __Pyx_XDECREF(__pyx_v_args); @@ -1510,7 +1684,7 @@ static PyObject *__pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_7__call__(PyOb return __pyx_r; } -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) { +static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_10__call__(struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_named) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -1520,25 +1694,25 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_6__call__(stru PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__call__", 0); - /* "src/latebind.pyx":30 + /* "src/latebind.pyx":37 * that. * """ * if not self._finalCall: # <<<<<<<<<<<<<< * self._finalCall = self.finalise() * return self._finalCall( *args, **named ) */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_finalCall); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 30, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_finalCall); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 37, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "src/latebind.pyx":31 + /* "src/latebind.pyx":38 * """ * if not self._finalCall: * self._finalCall = self.finalise() # <<<<<<<<<<<<<< * return self._finalCall( *args, **named ) * */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_finalise); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 31, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_finalise); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -1552,7 +1726,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_6__call__(stru } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GIVEREF(__pyx_t_3); @@ -1561,7 +1735,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_6__call__(stru __pyx_v_self->_finalCall = __pyx_t_3; __pyx_t_3 = 0; - /* "src/latebind.pyx":30 + /* "src/latebind.pyx":37 * that. * """ * if not self._finalCall: # <<<<<<<<<<<<<< @@ -1570,7 +1744,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_6__call__(stru */ } - /* "src/latebind.pyx":32 + /* "src/latebind.pyx":39 * if not self._finalCall: * self._finalCall = self.finalise() * return self._finalCall( *args, **named ) # <<<<<<<<<<<<<< @@ -1578,13 +1752,13 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_6__call__(stru * cdef class Curry(object): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_self->_finalCall, __pyx_v_args, __pyx_v_named); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_self->_finalCall, __pyx_v_args, __pyx_v_named); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "src/latebind.pyx":23 + /* "src/latebind.pyx":30 * return self._finalCall * * def __call__( self, *args, **named ): # <<<<<<<<<<<<<< @@ -1612,19 +1786,19 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_6__call__(stru */ /* Python wrapper */ -static PyObject *__pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_8__reduce_cython__(((struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *)__pyx_v_self)); + __pyx_r = __pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_12__reduce_cython__(((struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_8__reduce_cython__(struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *__pyx_v_self) { +static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_12__reduce_cython__(struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; @@ -1844,19 +2018,19 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_8__reduce_cyth */ /* Python wrapper */ -static PyObject *__pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ -static PyObject *__pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_10__setstate_cython__(((struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + __pyx_r = __pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_14__setstate_cython__(((struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_10__setstate_cython__(struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_14__setstate_cython__(struct __pyx_obj_17OpenGL_accelerate_8latebind_LateBind *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -1892,7 +2066,7 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind_10__setstate_c return __pyx_r; } -/* "src/latebind.pyx":38 +/* "src/latebind.pyx":45 * cdef object wrapperFunction * cdef object baseFunction * def __init__( self, wrapperFunction, baseFunction ): # <<<<<<<<<<<<<< @@ -1935,11 +2109,11 @@ static int __pyx_pw_17OpenGL_accelerate_8latebind_5Curry_1__init__(PyObject *__p case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_baseFunction)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 38, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 45, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 38, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 45, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -1952,7 +2126,7 @@ static int __pyx_pw_17OpenGL_accelerate_8latebind_5Curry_1__init__(PyObject *__p } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 38, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 45, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("OpenGL_accelerate.latebind.Curry.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -1970,7 +2144,7 @@ static int __pyx_pf_17OpenGL_accelerate_8latebind_5Curry___init__(struct __pyx_o __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); - /* "src/latebind.pyx":40 + /* "src/latebind.pyx":47 * def __init__( self, wrapperFunction, baseFunction ): * """Stores self.wrapperFunction and self.baseFunction""" * self.baseFunction = baseFunction # <<<<<<<<<<<<<< @@ -1983,7 +2157,7 @@ static int __pyx_pf_17OpenGL_accelerate_8latebind_5Curry___init__(struct __pyx_o __Pyx_DECREF(__pyx_v_self->baseFunction); __pyx_v_self->baseFunction = __pyx_v_baseFunction; - /* "src/latebind.pyx":41 + /* "src/latebind.pyx":48 * """Stores self.wrapperFunction and self.baseFunction""" * self.baseFunction = baseFunction * self.wrapperFunction = wrapperFunction # <<<<<<<<<<<<<< @@ -1996,7 +2170,7 @@ static int __pyx_pf_17OpenGL_accelerate_8latebind_5Curry___init__(struct __pyx_o __Pyx_DECREF(__pyx_v_self->wrapperFunction); __pyx_v_self->wrapperFunction = __pyx_v_wrapperFunction; - /* "src/latebind.pyx":38 + /* "src/latebind.pyx":45 * cdef object wrapperFunction * cdef object baseFunction * def __init__( self, wrapperFunction, baseFunction ): # <<<<<<<<<<<<<< @@ -2010,7 +2184,7 @@ static int __pyx_pf_17OpenGL_accelerate_8latebind_5Curry___init__(struct __pyx_o return __pyx_r; } -/* "src/latebind.pyx":42 +/* "src/latebind.pyx":49 * self.baseFunction = baseFunction * self.wrapperFunction = wrapperFunction * def __call__( self, *args, **named ): # <<<<<<<<<<<<<< @@ -2055,28 +2229,28 @@ static PyObject *__pyx_pf_17OpenGL_accelerate_8latebind_5Curry_2__call__(struct PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__call__", 0); - /* "src/latebind.pyx":44 + /* "src/latebind.pyx":51 * def __call__( self, *args, **named ): * """returns self.wrapperFunction( self.baseFunction, *args, **named )""" * return self.wrapperFunction( self.baseFunction, *args, **named ) # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->baseFunction); __Pyx_GIVEREF(__pyx_v_self->baseFunction); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->baseFunction); - __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_self->wrapperFunction, __pyx_t_2, __pyx_v_named); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_self->wrapperFunction, __pyx_t_2, __pyx_v_named); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "src/latebind.pyx":42 + /* "src/latebind.pyx":49 * self.baseFunction = baseFunction * self.wrapperFunction = wrapperFunction * def __call__( self, *args, **named ): # <<<<<<<<<<<<<< @@ -3231,12 +3405,74 @@ static int __pyx_tp_clear_17OpenGL_accelerate_8latebind_LateBind(PyObject *o) { static PyMethodDef __pyx_methods_17OpenGL_accelerate_8latebind_LateBind[] = { {"setFinalCall", (PyCFunction)__pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_1setFinalCall, METH_O, __pyx_doc_17OpenGL_accelerate_8latebind_8LateBind_setFinalCall}, {"finalise", (PyCFunction)__pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_3finalise, METH_NOARGS, __pyx_doc_17OpenGL_accelerate_8latebind_8LateBind_2finalise}, - {"getFinalCall", (PyCFunction)__pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_5getFinalCall, METH_NOARGS, __pyx_doc_17OpenGL_accelerate_8latebind_8LateBind_4getFinalCall}, - {"__reduce_cython__", (PyCFunction)__pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_9__reduce_cython__, METH_NOARGS, 0}, - {"__setstate_cython__", (PyCFunction)__pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_11__setstate_cython__, METH_O, 0}, + {"getFinalCall", (PyCFunction)__pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_9getFinalCall, METH_NOARGS, __pyx_doc_17OpenGL_accelerate_8latebind_8LateBind_8getFinalCall}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_13__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_15__setstate_cython__, METH_O, 0}, {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 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) + 0, /*nb_divide*/ + #endif + 0, /*nb_remainder*/ + 0, /*nb_divmod*/ + 0, /*nb_power*/ + 0, /*nb_negative*/ + 0, /*nb_positive*/ + 0, /*nb_absolute*/ + __pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_5__nonzero__, /*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 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) + 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 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) + 0, /*nb_oct*/ + #endif + #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) + 0, /*nb_hex*/ + #endif + 0, /*nb_inplace_add*/ + 0, /*nb_inplace_subtract*/ + 0, /*nb_inplace_multiply*/ + #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) + 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*/ + 0, /*nb_index*/ + #if PY_VERSION_HEX >= 0x03050000 + 0, /*nb_matrix_multiply*/ + #endif + #if PY_VERSION_HEX >= 0x03050000 + 0, /*nb_inplace_matrix_multiply*/ + #endif +}; + static PyTypeObject __pyx_type_17OpenGL_accelerate_8latebind_LateBind = { PyVarObject_HEAD_INIT(0, 0) "OpenGL_accelerate.latebind.LateBind", /*tp_name*/ @@ -3253,11 +3489,11 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_8latebind_LateBind = { 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ - 0, /*tp_as_number*/ + &__pyx_tp_as_number_LateBind, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ - __pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_7__call__, /*tp_call*/ + __pyx_pw_17OpenGL_accelerate_8latebind_8LateBind_11__call__, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ @@ -3293,6 +3529,9 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_8latebind_LateBind = { #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif }; static PyObject *__pyx_tp_new_17OpenGL_accelerate_8latebind_Curry(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { @@ -3409,6 +3648,9 @@ static PyTypeObject __pyx_type_17OpenGL_accelerate_8latebind_Curry = { #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif }; static PyMethodDef __pyx_methods[] = { @@ -3467,6 +3709,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1}, {&__pyx_n_s_finalise, __pyx_k_finalise, sizeof(__pyx_k_finalise), 0, 0, 1, 1}, + {&__pyx_n_s_getFinalCall, __pyx_k_getFinalCall, sizeof(__pyx_k_getFinalCall), 0, 0, 1, 1}, {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 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}, @@ -3565,7 +3808,9 @@ static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_8latebind_LateBind) < 0) __PYX_ERR(0, 3, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 __pyx_type_17OpenGL_accelerate_8latebind_LateBind.tp_print = 0; + #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_17OpenGL_accelerate_8latebind_LateBind.tp_dictoffset && __pyx_type_17OpenGL_accelerate_8latebind_LateBind.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_17OpenGL_accelerate_8latebind_LateBind.tp_getattro = __Pyx_PyObject_GenericGetAttr; } @@ -3573,23 +3818,25 @@ static int __Pyx_modinit_type_init_code(void) { { PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_17OpenGL_accelerate_8latebind_LateBind, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 3, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_17OpenGL_accelerate_8latebind_8LateBind_6__call__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_17OpenGL_accelerate_8latebind_8LateBind_6__call__.doc = __pyx_doc_17OpenGL_accelerate_8latebind_8LateBind_6__call__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_17OpenGL_accelerate_8latebind_8LateBind_6__call__; + __pyx_wrapperbase_17OpenGL_accelerate_8latebind_8LateBind_10__call__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_17OpenGL_accelerate_8latebind_8LateBind_10__call__.doc = __pyx_doc_17OpenGL_accelerate_8latebind_8LateBind_10__call__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_17OpenGL_accelerate_8latebind_8LateBind_10__call__; } } #endif if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LateBind, (PyObject *)&__pyx_type_17OpenGL_accelerate_8latebind_LateBind) < 0) __PYX_ERR(0, 3, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_17OpenGL_accelerate_8latebind_LateBind) < 0) __PYX_ERR(0, 3, __pyx_L1_error) __pyx_ptype_17OpenGL_accelerate_8latebind_LateBind = &__pyx_type_17OpenGL_accelerate_8latebind_LateBind; - if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_8latebind_Curry) < 0) __PYX_ERR(0, 34, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_8latebind_Curry) < 0) __PYX_ERR(0, 41, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 __pyx_type_17OpenGL_accelerate_8latebind_Curry.tp_print = 0; + #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_17OpenGL_accelerate_8latebind_Curry.tp_dictoffset && __pyx_type_17OpenGL_accelerate_8latebind_Curry.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_17OpenGL_accelerate_8latebind_Curry.tp_getattro = __Pyx_PyObject_GenericGetAttr; } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_17OpenGL_accelerate_8latebind_Curry, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 34, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_17OpenGL_accelerate_8latebind_Curry, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 41, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_17OpenGL_accelerate_8latebind_5Curry___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_17OpenGL_accelerate_8latebind_5Curry___init__.doc = __pyx_doc_17OpenGL_accelerate_8latebind_5Curry___init__; @@ -3599,7 +3846,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_17OpenGL_accelerate_8latebind_Curry, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 34, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_17OpenGL_accelerate_8latebind_Curry, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 41, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_17OpenGL_accelerate_8latebind_5Curry_2__call__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_17OpenGL_accelerate_8latebind_5Curry_2__call__.doc = __pyx_doc_17OpenGL_accelerate_8latebind_5Curry_2__call__; @@ -3607,8 +3854,8 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Curry, (PyObject *)&__pyx_type_17OpenGL_accelerate_8latebind_Curry) < 0) __PYX_ERR(0, 34, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_17OpenGL_accelerate_8latebind_Curry) < 0) __PYX_ERR(0, 34, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Curry, (PyObject *)&__pyx_type_17OpenGL_accelerate_8latebind_Curry) < 0) __PYX_ERR(0, 41, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_17OpenGL_accelerate_8latebind_Curry) < 0) __PYX_ERR(0, 41, __pyx_L1_error) __pyx_ptype_17OpenGL_accelerate_8latebind_Curry = &__pyx_type_17OpenGL_accelerate_8latebind_Curry; __Pyx_RefNannyFinishContext(); return 0; @@ -3801,10 +4048,9 @@ if (!__Pyx_RefNanny) { __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) - #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); - #endif + __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_cython_runtime); if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error); /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) @@ -4302,6 +4548,32 @@ static PyObject *__Pyx_GetBuiltinName(PyObject *name) { return result; } +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + /* GetModuleGlobalName */ #if CYTHON_USE_DICT_VERSIONS static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) diff --git a/accelerate/src/latebind.pyx b/accelerate/src/latebind.pyx index f009a76e..7d55da8d 100644 --- a/accelerate/src/latebind.pyx +++ b/accelerate/src/latebind.pyx @@ -17,7 +17,9 @@ cdef class LateBind: def __nonzero__(self): """Resolve our final call and check for empty/nonzero on it""" return bool(self.getFinalCall()) - __bool__ = __nonzero__ + def __bool__(self): + """Resolve our final call and check for empty/nonzero on it""" + return bool(self.getFinalCall()) def getFinalCall( self ): """Retrieve and/or bind and retrieve final call"""