1 /* Generated by Cython 0.29.14 */
2
3 #define PY_SSIZE_T_CLEAN
4 #include "Python.h"
5 #ifndef Py_PYTHON_H
6 #error Python headers needed to compile C extensions, please install development version of Python.
7 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
8 #error Cython requires Python 2.6+ or Python 3.3+.
9 #else
10 #define CYTHON_ABI "0_29_14"
11 #define CYTHON_HEX_VERSION 0x001D0EF0
12 #define CYTHON_FUTURE_DIVISION 0
13 #include <stddef.h>
14 #ifndef offsetof
15 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
16 #endif
17 #if !defined(WIN32) && !defined(MS_WINDOWS)
18 #ifndef __stdcall
19 #define __stdcall
20 #endif
21 #ifndef __cdecl
22 #define __cdecl
23 #endif
24 #ifndef __fastcall
25 #define __fastcall
26 #endif
27 #endif
28 #ifndef DL_IMPORT
29 #define DL_IMPORT(t) t
30 #endif
31 #ifndef DL_EXPORT
32 #define DL_EXPORT(t) t
33 #endif
34 #define __PYX_COMMA ,
35 #ifndef HAVE_LONG_LONG
36 #if PY_VERSION_HEX >= 0x02070000
37 #define HAVE_LONG_LONG
38 #endif
39 #endif
40 #ifndef PY_LONG_LONG
41 #define PY_LONG_LONG LONG_LONG
42 #endif
43 #ifndef Py_HUGE_VAL
44 #define Py_HUGE_VAL HUGE_VAL
45 #endif
46 #ifdef PYPY_VERSION
47 #define CYTHON_COMPILING_IN_PYPY 1
48 #define CYTHON_COMPILING_IN_PYSTON 0
49 #define CYTHON_COMPILING_IN_CPYTHON 0
50 #undef CYTHON_USE_TYPE_SLOTS
51 #define CYTHON_USE_TYPE_SLOTS 0
52 #undef CYTHON_USE_PYTYPE_LOOKUP
53 #define CYTHON_USE_PYTYPE_LOOKUP 0
54 #if PY_VERSION_HEX < 0x03050000
55 #undef CYTHON_USE_ASYNC_SLOTS
56 #define CYTHON_USE_ASYNC_SLOTS 0
57 #elif !defined(CYTHON_USE_ASYNC_SLOTS)
58 #define CYTHON_USE_ASYNC_SLOTS 1
59 #endif
60 #undef CYTHON_USE_PYLIST_INTERNALS
61 #define CYTHON_USE_PYLIST_INTERNALS 0
62 #undef CYTHON_USE_UNICODE_INTERNALS
63 #define CYTHON_USE_UNICODE_INTERNALS 0
64 #undef CYTHON_USE_UNICODE_WRITER
65 #define CYTHON_USE_UNICODE_WRITER 0
66 #undef CYTHON_USE_PYLONG_INTERNALS
67 #define CYTHON_USE_PYLONG_INTERNALS 0
68 #undef CYTHON_AVOID_BORROWED_REFS
69 #define CYTHON_AVOID_BORROWED_REFS 1
70 #undef CYTHON_ASSUME_SAFE_MACROS
71 #define CYTHON_ASSUME_SAFE_MACROS 0
72 #undef CYTHON_UNPACK_METHODS
73 #define CYTHON_UNPACK_METHODS 0
74 #undef CYTHON_FAST_THREAD_STATE
75 #define CYTHON_FAST_THREAD_STATE 0
76 #undef CYTHON_FAST_PYCALL
77 #define CYTHON_FAST_PYCALL 0
78 #undef CYTHON_PEP489_MULTI_PHASE_INIT
79 #define CYTHON_PEP489_MULTI_PHASE_INIT 0
80 #undef CYTHON_USE_TP_FINALIZE
81 #define CYTHON_USE_TP_FINALIZE 0
82 #undef CYTHON_USE_DICT_VERSIONS
83 #define CYTHON_USE_DICT_VERSIONS 0
84 #undef CYTHON_USE_EXC_INFO_STACK
85 #define CYTHON_USE_EXC_INFO_STACK 0
86 #elif defined(PYSTON_VERSION)
87 #define CYTHON_COMPILING_IN_PYPY 0
88 #define CYTHON_COMPILING_IN_PYSTON 1
89 #define CYTHON_COMPILING_IN_CPYTHON 0
90 #ifndef CYTHON_USE_TYPE_SLOTS
91 #define CYTHON_USE_TYPE_SLOTS 1
92 #endif
93 #undef CYTHON_USE_PYTYPE_LOOKUP
94 #define CYTHON_USE_PYTYPE_LOOKUP 0
95 #undef CYTHON_USE_ASYNC_SLOTS
96 #define CYTHON_USE_ASYNC_SLOTS 0
97 #undef CYTHON_USE_PYLIST_INTERNALS
98 #define CYTHON_USE_PYLIST_INTERNALS 0
99 #ifndef CYTHON_USE_UNICODE_INTERNALS
100 #define CYTHON_USE_UNICODE_INTERNALS 1
101 #endif
102 #undef CYTHON_USE_UNICODE_WRITER
103 #define CYTHON_USE_UNICODE_WRITER 0
104 #undef CYTHON_USE_PYLONG_INTERNALS
105 #define CYTHON_USE_PYLONG_INTERNALS 0
106 #ifndef CYTHON_AVOID_BORROWED_REFS
107 #define CYTHON_AVOID_BORROWED_REFS 0
108 #endif
109 #ifndef CYTHON_ASSUME_SAFE_MACROS
110 #define CYTHON_ASSUME_SAFE_MACROS 1
111 #endif
112 #ifndef CYTHON_UNPACK_METHODS
113 #define CYTHON_UNPACK_METHODS 1
114 #endif
115 #undef CYTHON_FAST_THREAD_STATE
116 #define CYTHON_FAST_THREAD_STATE 0
117 #undef CYTHON_FAST_PYCALL
118 #define CYTHON_FAST_PYCALL 0
119 #undef CYTHON_PEP489_MULTI_PHASE_INIT
120 #define CYTHON_PEP489_MULTI_PHASE_INIT 0
121 #undef CYTHON_USE_TP_FINALIZE
122 #define CYTHON_USE_TP_FINALIZE 0
123 #undef CYTHON_USE_DICT_VERSIONS
124 #define CYTHON_USE_DICT_VERSIONS 0
125 #undef CYTHON_USE_EXC_INFO_STACK
126 #define CYTHON_USE_EXC_INFO_STACK 0
127 #else
128 #define CYTHON_COMPILING_IN_PYPY 0
129 #define CYTHON_COMPILING_IN_PYSTON 0
130 #define CYTHON_COMPILING_IN_CPYTHON 1
131 #ifndef CYTHON_USE_TYPE_SLOTS
132 #define CYTHON_USE_TYPE_SLOTS 1
133 #endif
134 #if PY_VERSION_HEX < 0x02070000
135 #undef CYTHON_USE_PYTYPE_LOOKUP
136 #define CYTHON_USE_PYTYPE_LOOKUP 0
137 #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
138 #define CYTHON_USE_PYTYPE_LOOKUP 1
139 #endif
140 #if PY_MAJOR_VERSION < 3
141 #undef CYTHON_USE_ASYNC_SLOTS
142 #define CYTHON_USE_ASYNC_SLOTS 0
143 #elif !defined(CYTHON_USE_ASYNC_SLOTS)
144 #define CYTHON_USE_ASYNC_SLOTS 1
145 #endif
146 #if PY_VERSION_HEX < 0x02070000
147 #undef CYTHON_USE_PYLONG_INTERNALS
148 #define CYTHON_USE_PYLONG_INTERNALS 0
149 #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
150 #define CYTHON_USE_PYLONG_INTERNALS 1
151 #endif
152 #ifndef CYTHON_USE_PYLIST_INTERNALS
153 #define CYTHON_USE_PYLIST_INTERNALS 1
154 #endif
155 #ifndef CYTHON_USE_UNICODE_INTERNALS
156 #define CYTHON_USE_UNICODE_INTERNALS 1
157 #endif
158 #if PY_VERSION_HEX < 0x030300F0
159 #undef CYTHON_USE_UNICODE_WRITER
160 #define CYTHON_USE_UNICODE_WRITER 0
161 #elif !defined(CYTHON_USE_UNICODE_WRITER)
162 #define CYTHON_USE_UNICODE_WRITER 1
163 #endif
164 #ifndef CYTHON_AVOID_BORROWED_REFS
165 #define CYTHON_AVOID_BORROWED_REFS 0
166 #endif
167 #ifndef CYTHON_ASSUME_SAFE_MACROS
168 #define CYTHON_ASSUME_SAFE_MACROS 1
169 #endif
170 #ifndef CYTHON_UNPACK_METHODS
171 #define CYTHON_UNPACK_METHODS 1
172 #endif
173 #ifndef CYTHON_FAST_THREAD_STATE
174 #define CYTHON_FAST_THREAD_STATE 1
175 #endif
176 #ifndef CYTHON_FAST_PYCALL
177 #define CYTHON_FAST_PYCALL 1
178 #endif
179 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
180 #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
181 #endif
182 #ifndef CYTHON_USE_TP_FINALIZE
183 #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
184 #endif
185 #ifndef CYTHON_USE_DICT_VERSIONS
186 #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
187 #endif
188 #ifndef CYTHON_USE_EXC_INFO_STACK
189 #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
190 #endif
191 #endif
192 #if !defined(CYTHON_FAST_PYCCALL)
193 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
194 #endif
195 #if CYTHON_USE_PYLONG_INTERNALS
196 #include "longintrepr.h"
197 #undef SHIFT
198 #undef BASE
199 #undef MASK
200 #ifdef SIZEOF_VOID_P
201 enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
202 #endif
203 #endif
204 #ifndef __has_attribute
205 #define __has_attribute(x) 0
206 #endif
207 #ifndef __has_cpp_attribute
208 #define __has_cpp_attribute(x) 0
209 #endif
210 #ifndef CYTHON_RESTRICT
211 #if defined(__GNUC__)
212 #define CYTHON_RESTRICT __restrict__
213 #elif defined(_MSC_VER) && _MSC_VER >= 1400
214 #define CYTHON_RESTRICT __restrict
215 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
216 #define CYTHON_RESTRICT restrict
217 #else
218 #define CYTHON_RESTRICT
219 #endif
220 #endif
221 #ifndef CYTHON_UNUSED
222 # if defined(__GNUC__)
223 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
224 # define CYTHON_UNUSED __attribute__ ((__unused__))
225 # else
226 # define CYTHON_UNUSED
227 # endif
228 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
229 # define CYTHON_UNUSED __attribute__ ((__unused__))
230 # else
231 # define CYTHON_UNUSED
232 # endif
233 #endif
234 #ifndef CYTHON_MAYBE_UNUSED_VAR
235 # if defined(__cplusplus)
CYTHON_MAYBE_UNUSED_VAR(const T &)236 template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
237 # else
238 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
239 # endif
240 #endif
241 #ifndef CYTHON_NCP_UNUSED
242 # if CYTHON_COMPILING_IN_CPYTHON
243 # define CYTHON_NCP_UNUSED
244 # else
245 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
246 # endif
247 #endif
248 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
249 #ifdef _MSC_VER
250 #ifndef _MSC_STDINT_H_
251 #if _MSC_VER < 1300
252 typedef unsigned char uint8_t;
253 typedef unsigned int uint32_t;
254 #else
255 typedef unsigned __int8 uint8_t;
256 typedef unsigned __int32 uint32_t;
257 #endif
258 #endif
259 #else
260 #include <stdint.h>
261 #endif
262 #ifndef CYTHON_FALLTHROUGH
263 #if defined(__cplusplus) && __cplusplus >= 201103L
264 #if __has_cpp_attribute(fallthrough)
265 #define CYTHON_FALLTHROUGH [[fallthrough]]
266 #elif __has_cpp_attribute(clang::fallthrough)
267 #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
268 #elif __has_cpp_attribute(gnu::fallthrough)
269 #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
270 #endif
271 #endif
272 #ifndef CYTHON_FALLTHROUGH
273 #if __has_attribute(fallthrough)
274 #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
275 #else
276 #define CYTHON_FALLTHROUGH
277 #endif
278 #endif
279 #if defined(__clang__ ) && defined(__apple_build_version__)
280 #if __apple_build_version__ < 7000000
281 #undef CYTHON_FALLTHROUGH
282 #define CYTHON_FALLTHROUGH
283 #endif
284 #endif
285 #endif
286
287 #ifndef CYTHON_INLINE
288 #if defined(__clang__)
289 #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
290 #elif defined(__GNUC__)
291 #define CYTHON_INLINE __inline__
292 #elif defined(_MSC_VER)
293 #define CYTHON_INLINE __inline
294 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
295 #define CYTHON_INLINE inline
296 #else
297 #define CYTHON_INLINE
298 #endif
299 #endif
300
301 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
302 #define Py_OptimizeFlag 0
303 #endif
304 #define __PYX_BUILD_PY_SSIZE_T "n"
305 #define CYTHON_FORMAT_SSIZE_T "z"
306 #if PY_MAJOR_VERSION < 3
307 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
308 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
309 PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
310 #define __Pyx_DefaultClassType PyClass_Type
311 #else
312 #define __Pyx_BUILTIN_MODULE_NAME "builtins"
313 #if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
314 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
315 PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
316 #else
317 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
318 PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
319 #endif
320 #define __Pyx_DefaultClassType PyType_Type
321 #endif
322 #ifndef Py_TPFLAGS_CHECKTYPES
323 #define Py_TPFLAGS_CHECKTYPES 0
324 #endif
325 #ifndef Py_TPFLAGS_HAVE_INDEX
326 #define Py_TPFLAGS_HAVE_INDEX 0
327 #endif
328 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
329 #define Py_TPFLAGS_HAVE_NEWBUFFER 0
330 #endif
331 #ifndef Py_TPFLAGS_HAVE_FINALIZE
332 #define Py_TPFLAGS_HAVE_FINALIZE 0
333 #endif
334 #ifndef METH_STACKLESS
335 #define METH_STACKLESS 0
336 #endif
337 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
338 #ifndef METH_FASTCALL
339 #define METH_FASTCALL 0x80
340 #endif
341 typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
342 typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
343 Py_ssize_t nargs, PyObject *kwnames);
344 #else
345 #define __Pyx_PyCFunctionFast _PyCFunctionFast
346 #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
347 #endif
348 #if CYTHON_FAST_PYCCALL
349 #define __Pyx_PyFastCFunction_Check(func)\
350 ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
351 #else
352 #define __Pyx_PyFastCFunction_Check(func) 0
353 #endif
354 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
355 #define PyObject_Malloc(s) PyMem_Malloc(s)
356 #define PyObject_Free(p) PyMem_Free(p)
357 #define PyObject_Realloc(p) PyMem_Realloc(p)
358 #endif
359 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
360 #define PyMem_RawMalloc(n) PyMem_Malloc(n)
361 #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
362 #define PyMem_RawFree(p) PyMem_Free(p)
363 #endif
364 #if CYTHON_COMPILING_IN_PYSTON
365 #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
366 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
367 #else
368 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
369 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
370 #endif
371 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
372 #define __Pyx_PyThreadState_Current PyThreadState_GET()
373 #elif PY_VERSION_HEX >= 0x03060000
374 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
375 #elif PY_VERSION_HEX >= 0x03000000
376 #define __Pyx_PyThreadState_Current PyThreadState_GET()
377 #else
378 #define __Pyx_PyThreadState_Current _PyThreadState_Current
379 #endif
380 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
381 #include "pythread.h"
382 #define Py_tss_NEEDS_INIT 0
383 typedef int Py_tss_t;
PyThread_tss_create(Py_tss_t * key)384 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
385 *key = PyThread_create_key();
386 return 0;
387 }
PyThread_tss_alloc(void)388 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
389 Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
390 *key = Py_tss_NEEDS_INIT;
391 return key;
392 }
PyThread_tss_free(Py_tss_t * key)393 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
394 PyObject_Free(key);
395 }
PyThread_tss_is_created(Py_tss_t * key)396 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
397 return *key != Py_tss_NEEDS_INIT;
398 }
PyThread_tss_delete(Py_tss_t * key)399 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
400 PyThread_delete_key(*key);
401 *key = Py_tss_NEEDS_INIT;
402 }
PyThread_tss_set(Py_tss_t * key,void * value)403 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
404 return PyThread_set_key_value(*key, value);
405 }
PyThread_tss_get(Py_tss_t * key)406 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
407 return PyThread_get_key_value(*key);
408 }
409 #endif
410 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
411 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
412 #else
413 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
414 #endif
415 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
416 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
417 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
418 #else
419 #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
420 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
421 #endif
422 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
423 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
424 #else
425 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
426 #endif
427 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
428 #define CYTHON_PEP393_ENABLED 1
429 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
430 0 : _PyUnicode_Ready((PyObject *)(op)))
431 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
432 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
433 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
434 #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
435 #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
436 #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
437 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
438 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
439 #else
440 #define CYTHON_PEP393_ENABLED 0
441 #define PyUnicode_1BYTE_KIND 1
442 #define PyUnicode_2BYTE_KIND 2
443 #define PyUnicode_4BYTE_KIND 4
444 #define __Pyx_PyUnicode_READY(op) (0)
445 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
446 #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
447 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
448 #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
449 #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
450 #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
451 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
452 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
453 #endif
454 #if CYTHON_COMPILING_IN_PYPY
455 #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
456 #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
457 #else
458 #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
459 #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
460 PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
461 #endif
462 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
463 #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
464 #endif
465 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
466 #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
467 #endif
468 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
469 #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
470 #endif
471 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
472 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
473 #if PY_MAJOR_VERSION >= 3
474 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
475 #else
476 #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
477 #endif
478 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
479 #define PyObject_ASCII(o) PyObject_Repr(o)
480 #endif
481 #if PY_MAJOR_VERSION >= 3
482 #define PyBaseString_Type PyUnicode_Type
483 #define PyStringObject PyUnicodeObject
484 #define PyString_Type PyUnicode_Type
485 #define PyString_Check PyUnicode_Check
486 #define PyString_CheckExact PyUnicode_CheckExact
487 #define PyObject_Unicode PyObject_Str
488 #endif
489 #if PY_MAJOR_VERSION >= 3
490 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
491 #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
492 #else
493 #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
494 #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
495 #endif
496 #ifndef PySet_CheckExact
497 #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
498 #endif
499 #if CYTHON_ASSUME_SAFE_MACROS
500 #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
501 #else
502 #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
503 #endif
504 #if PY_MAJOR_VERSION >= 3
505 #define PyIntObject PyLongObject
506 #define PyInt_Type PyLong_Type
507 #define PyInt_Check(op) PyLong_Check(op)
508 #define PyInt_CheckExact(op) PyLong_CheckExact(op)
509 #define PyInt_FromString PyLong_FromString
510 #define PyInt_FromUnicode PyLong_FromUnicode
511 #define PyInt_FromLong PyLong_FromLong
512 #define PyInt_FromSize_t PyLong_FromSize_t
513 #define PyInt_FromSsize_t PyLong_FromSsize_t
514 #define PyInt_AsLong PyLong_AsLong
515 #define PyInt_AS_LONG PyLong_AS_LONG
516 #define PyInt_AsSsize_t PyLong_AsSsize_t
517 #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
518 #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
519 #define PyNumber_Int PyNumber_Long
520 #endif
521 #if PY_MAJOR_VERSION >= 3
522 #define PyBoolObject PyLongObject
523 #endif
524 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
525 #ifndef PyUnicode_InternFromString
526 #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
527 #endif
528 #endif
529 #if PY_VERSION_HEX < 0x030200A4
530 typedef long Py_hash_t;
531 #define __Pyx_PyInt_FromHash_t PyInt_FromLong
532 #define __Pyx_PyInt_AsHash_t PyInt_AsLong
533 #else
534 #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
535 #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
536 #endif
537 #if PY_MAJOR_VERSION >= 3
538 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
539 #else
540 #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
541 #endif
542 #if CYTHON_USE_ASYNC_SLOTS
543 #if PY_VERSION_HEX >= 0x030500B1
544 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
545 #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
546 #else
547 #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
548 #endif
549 #else
550 #define __Pyx_PyType_AsAsync(obj) NULL
551 #endif
552 #ifndef __Pyx_PyAsyncMethodsStruct
553 typedef struct {
554 unaryfunc am_await;
555 unaryfunc am_aiter;
556 unaryfunc am_anext;
557 } __Pyx_PyAsyncMethodsStruct;
558 #endif
559
560 #if defined(WIN32) || defined(MS_WINDOWS)
561 #define _USE_MATH_DEFINES
562 #endif
563 #include <math.h>
564 #ifdef NAN
565 #define __PYX_NAN() ((float) NAN)
566 #else
__PYX_NAN()567 static CYTHON_INLINE float __PYX_NAN() {
568 float value;
569 memset(&value, 0xFF, sizeof(value));
570 return value;
571 }
572 #endif
573 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
574 #define __Pyx_truncl trunc
575 #else
576 #define __Pyx_truncl truncl
577 #endif
578
579
580 #define __PYX_ERR(f_index, lineno, Ln_error) \
581 { \
582 __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
583 }
584
585 #ifndef __PYX_EXTERN_C
586 #ifdef __cplusplus
587 #define __PYX_EXTERN_C extern "C"
588 #else
589 #define __PYX_EXTERN_C extern
590 #endif
591 #endif
592
593 #define __PYX_HAVE__OpenGL_accelerate__vbo
594 #define __PYX_HAVE_API__OpenGL_accelerate__vbo
595 /* Early includes */
596 #ifdef _OPENMP
597 #include <omp.h>
598 #endif /* _OPENMP */
599
600 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
601 #define CYTHON_WITHOUT_ASSERTIONS
602 #endif
603
604 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
605 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
606
607 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
608 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
609 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
610 #define __PYX_DEFAULT_STRING_ENCODING ""
611 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
612 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
613 #define __Pyx_uchar_cast(c) ((unsigned char)c)
614 #define __Pyx_long_cast(x) ((long)x)
615 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
616 (sizeof(type) < sizeof(Py_ssize_t)) ||\
617 (sizeof(type) > sizeof(Py_ssize_t) &&\
618 likely(v < (type)PY_SSIZE_T_MAX ||\
619 v == (type)PY_SSIZE_T_MAX) &&\
620 (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
621 v == (type)PY_SSIZE_T_MIN))) ||\
622 (sizeof(type) == sizeof(Py_ssize_t) &&\
623 (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
624 v == (type)PY_SSIZE_T_MAX))) )
__Pyx_is_valid_index(Py_ssize_t i,Py_ssize_t limit)625 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
626 return (size_t) i < (size_t) limit;
627 }
628 #if defined (__cplusplus) && __cplusplus >= 201103L
629 #include <cstdlib>
630 #define __Pyx_sst_abs(value) std::abs(value)
631 #elif SIZEOF_INT >= SIZEOF_SIZE_T
632 #define __Pyx_sst_abs(value) abs(value)
633 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
634 #define __Pyx_sst_abs(value) labs(value)
635 #elif defined (_MSC_VER)
636 #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
637 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
638 #define __Pyx_sst_abs(value) llabs(value)
639 #elif defined (__GNUC__)
640 #define __Pyx_sst_abs(value) __builtin_llabs(value)
641 #else
642 #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
643 #endif
644 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
645 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
646 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
647 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
648 #define __Pyx_PyBytes_FromString PyBytes_FromString
649 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
650 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
651 #if PY_MAJOR_VERSION < 3
652 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
653 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
654 #else
655 #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
656 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
657 #endif
658 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
659 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
660 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
661 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
662 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
663 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
664 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
665 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
666 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
667 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
668 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
669 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
670 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
671 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
672 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
673 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
__Pyx_Py_UNICODE_strlen(const Py_UNICODE * u)674 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
675 const Py_UNICODE *u_end = u;
676 while (*u_end++) ;
677 return (size_t)(u_end - u - 1);
678 }
679 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
680 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
681 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
682 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
683 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
684 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
685 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
686 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
687 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
688 #define __Pyx_PySequence_Tuple(obj)\
689 (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
690 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
691 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
692 #if CYTHON_ASSUME_SAFE_MACROS
693 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
694 #else
695 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
696 #endif
697 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
698 #if PY_MAJOR_VERSION >= 3
699 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
700 #else
701 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
702 #endif
703 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
704 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
705 static int __Pyx_sys_getdefaultencoding_not_ascii;
__Pyx_init_sys_getdefaultencoding_params(void)706 static int __Pyx_init_sys_getdefaultencoding_params(void) {
707 PyObject* sys;
708 PyObject* default_encoding = NULL;
709 PyObject* ascii_chars_u = NULL;
710 PyObject* ascii_chars_b = NULL;
711 const char* default_encoding_c;
712 sys = PyImport_ImportModule("sys");
713 if (!sys) goto bad;
714 default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
715 Py_DECREF(sys);
716 if (!default_encoding) goto bad;
717 default_encoding_c = PyBytes_AsString(default_encoding);
718 if (!default_encoding_c) goto bad;
719 if (strcmp(default_encoding_c, "ascii") == 0) {
720 __Pyx_sys_getdefaultencoding_not_ascii = 0;
721 } else {
722 char ascii_chars[128];
723 int c;
724 for (c = 0; c < 128; c++) {
725 ascii_chars[c] = c;
726 }
727 __Pyx_sys_getdefaultencoding_not_ascii = 1;
728 ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
729 if (!ascii_chars_u) goto bad;
730 ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
731 if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
732 PyErr_Format(
733 PyExc_ValueError,
734 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
735 default_encoding_c);
736 goto bad;
737 }
738 Py_DECREF(ascii_chars_u);
739 Py_DECREF(ascii_chars_b);
740 }
741 Py_DECREF(default_encoding);
742 return 0;
743 bad:
744 Py_XDECREF(default_encoding);
745 Py_XDECREF(ascii_chars_u);
746 Py_XDECREF(ascii_chars_b);
747 return -1;
748 }
749 #endif
750 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
751 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
752 #else
753 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
754 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
755 static char* __PYX_DEFAULT_STRING_ENCODING;
__Pyx_init_sys_getdefaultencoding_params(void)756 static int __Pyx_init_sys_getdefaultencoding_params(void) {
757 PyObject* sys;
758 PyObject* default_encoding = NULL;
759 char* default_encoding_c;
760 sys = PyImport_ImportModule("sys");
761 if (!sys) goto bad;
762 default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
763 Py_DECREF(sys);
764 if (!default_encoding) goto bad;
765 default_encoding_c = PyBytes_AsString(default_encoding);
766 if (!default_encoding_c) goto bad;
767 __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
768 if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
769 strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
770 Py_DECREF(default_encoding);
771 return 0;
772 bad:
773 Py_XDECREF(default_encoding);
774 return -1;
775 }
776 #endif
777 #endif
778
779
780 /* Test for GCC > 2.95 */
781 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
782 #define likely(x) __builtin_expect(!!(x), 1)
783 #define unlikely(x) __builtin_expect(!!(x), 0)
784 #else /* !__GNUC__ or GCC < 2.95 */
785 #define likely(x) (x)
786 #define unlikely(x) (x)
787 #endif /* __GNUC__ */
__Pyx_pretend_to_initialize(void * ptr)788 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
789
790 static PyObject *__pyx_m = NULL;
791 static PyObject *__pyx_d;
792 static PyObject *__pyx_b;
793 static PyObject *__pyx_cython_runtime = NULL;
794 static PyObject *__pyx_empty_tuple;
795 static PyObject *__pyx_empty_bytes;
796 static PyObject *__pyx_empty_unicode;
797 static int __pyx_lineno;
798 static int __pyx_clineno = 0;
799 static const char * __pyx_cfilenm= __FILE__;
800 static const char *__pyx_filename;
801
802
803 static const char *__pyx_f[] = {
804 "src/vbo.pyx",
805 "stringsource",
806 };
807
808 /*--- Type declarations ---*/
809 struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler;
810 struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO;
811 struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset;
812 struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler;
813 struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler;
814
815 /* "OpenGL_accelerate/formathandler.pxd":3
816 * """Cython import description for formathandler types"""
817 *
818 * cdef class FormatHandler: # <<<<<<<<<<<<<<
819 * cdef public int ERROR_ON_COPY
820 * cdef object c_from_param( self, object instance, object typeCode)
821 */
822 struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler {
823 PyObject_HEAD
824 struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler *__pyx_vtab;
825 int ERROR_ON_COPY;
826 };
827
828
829 /* "src/vbo.pyx":13
830 * _NULL = object()
831 *
832 * cdef class VBO: # <<<<<<<<<<<<<<
833 * """Instances can be passed into array-handling routines
834 *
835 */
836 struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO {
837 PyObject_HEAD
838 struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *__pyx_vtab;
839 PyObject *__weakref__;
840 int copied;
841 int created;
842 unsigned int buffer;
843 PyObject *data;
844 int size;
845 PyObject *target;
846 PyObject *usage;
847 int resolved;
848 PyObject *target_spec;
849 PyObject *usage_spec;
850 PyObject *_copy_segments;
851 PyObject *_I_;
852 PyObject *arrayType;
853 };
854
855
856 /* "src/vbo.pyx":257
857 *
858 *
859 * cdef class VBOOffset: # <<<<<<<<<<<<<<
860 * """Offset into a VBO instance
861 *
862 */
863 struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset {
864 PyObject_HEAD
865 struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBOOffset *__pyx_vtab;
866 struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *vbo;
867 unsigned int offset;
868 };
869
870
871 /* "src/vbo.pyx":290
872 * raise RuntimeError( """Attempting to use offset into deleted VBO""" )
873 *
874 * cdef class VBOHandler(FormatHandler): # <<<<<<<<<<<<<<
875 * """Handles VBO instances passed in as array data"""
876 * cdef object vp0
877 */
878 struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler {
879 struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler __pyx_base;
880 PyObject *vp0;
881 PyObject *arrayType;
882 };
883
884
885 /* "src/vbo.pyx":332
886 * return self.arrayType.dimensions( (<VBO>instance).data )
887 *
888 * cdef class VBOOffsetHandler(FormatHandler): # <<<<<<<<<<<<<<
889 * cdef object arrayType # import and use explicit reference...
890 * isOutput = False
891 */
892 struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler {
893 struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler __pyx_base;
894 PyObject *arrayType;
895 };
896
897
898
899 /* "OpenGL_accelerate/formathandler.pxd":3
900 * """Cython import description for formathandler types"""
901 *
902 * cdef class FormatHandler: # <<<<<<<<<<<<<<
903 * cdef public int ERROR_ON_COPY
904 * cdef object c_from_param( self, object instance, object typeCode)
905 */
906
907 struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler {
908 PyObject *(*c_from_param)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *, PyObject *);
909 PyObject *(*c_dataPointer)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *);
910 PyObject *(*c_zeros)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *, PyObject *);
911 PyObject *(*c_arraySize)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *, PyObject *);
912 PyObject *(*c_arrayByteCount)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *);
913 PyObject *(*c_arrayToGLType)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *);
914 PyObject *(*c_asArray)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *, PyObject *);
915 PyObject *(*c_unitSize)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *, PyObject *);
916 PyObject *(*c_dimensions)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *);
917 };
918 static struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler *__pyx_vtabptr_17OpenGL_accelerate_13formathandler_FormatHandler;
919
920
921 /* "src/vbo.pyx":13
922 * _NULL = object()
923 *
924 * cdef class VBO: # <<<<<<<<<<<<<<
925 * """Instances can be passed into array-handling routines
926 *
927 */
928
929 struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO {
930 PyObject *(*get_implementation)(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *);
931 unsigned int (*c_resolve)(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *, PyObject *);
932 PyObject *(*c_set_array)(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *, PyObject *, PyObject *);
933 int (*check_live)(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *);
934 };
935 static struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *__pyx_vtabptr_17OpenGL_accelerate_3vbo_VBO;
936
937
938 /* "src/vbo.pyx":257
939 *
940 *
941 * cdef class VBOOffset: # <<<<<<<<<<<<<<
942 * """Offset into a VBO instance
943 *
944 */
945
946 struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBOOffset {
947 int (*check_live)(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *);
948 };
949 static struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBOOffset *__pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOOffset;
950
951
952 /* "src/vbo.pyx":290
953 * raise RuntimeError( """Attempting to use offset into deleted VBO""" )
954 *
955 * cdef class VBOHandler(FormatHandler): # <<<<<<<<<<<<<<
956 * """Handles VBO instances passed in as array data"""
957 * cdef object vp0
958 */
959
960 struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBOHandler {
961 struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler __pyx_base;
962 };
963 static struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBOHandler *__pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOHandler;
964
965
966 /* "src/vbo.pyx":332
967 * return self.arrayType.dimensions( (<VBO>instance).data )
968 *
969 * cdef class VBOOffsetHandler(FormatHandler): # <<<<<<<<<<<<<<
970 * cdef object arrayType # import and use explicit reference...
971 * isOutput = False
972 */
973
974 struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBOOffsetHandler {
975 struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler __pyx_base;
976 };
977 static struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBOOffsetHandler *__pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOOffsetHandler;
978
979 /* --- Runtime support code (head) --- */
980 /* Refnanny.proto */
981 #ifndef CYTHON_REFNANNY
982 #define CYTHON_REFNANNY 0
983 #endif
984 #if CYTHON_REFNANNY
985 typedef struct {
986 void (*INCREF)(void*, PyObject*, int);
987 void (*DECREF)(void*, PyObject*, int);
988 void (*GOTREF)(void*, PyObject*, int);
989 void (*GIVEREF)(void*, PyObject*, int);
990 void* (*SetupContext)(const char*, int, const char*);
991 void (*FinishContext)(void**);
992 } __Pyx_RefNannyAPIStruct;
993 static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
994 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
995 #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
996 #ifdef WITH_THREAD
997 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
998 if (acquire_gil) {\
999 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1000 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1001 PyGILState_Release(__pyx_gilstate_save);\
1002 } else {\
1003 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1004 }
1005 #else
1006 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1007 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1008 #endif
1009 #define __Pyx_RefNannyFinishContext()\
1010 __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1011 #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1012 #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1013 #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1014 #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1015 #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1016 #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1017 #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1018 #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1019 #else
1020 #define __Pyx_RefNannyDeclarations
1021 #define __Pyx_RefNannySetupContext(name, acquire_gil)
1022 #define __Pyx_RefNannyFinishContext()
1023 #define __Pyx_INCREF(r) Py_INCREF(r)
1024 #define __Pyx_DECREF(r) Py_DECREF(r)
1025 #define __Pyx_GOTREF(r)
1026 #define __Pyx_GIVEREF(r)
1027 #define __Pyx_XINCREF(r) Py_XINCREF(r)
1028 #define __Pyx_XDECREF(r) Py_XDECREF(r)
1029 #define __Pyx_XGOTREF(r)
1030 #define __Pyx_XGIVEREF(r)
1031 #endif
1032 #define __Pyx_XDECREF_SET(r, v) do {\
1033 PyObject *tmp = (PyObject *) r;\
1034 r = v; __Pyx_XDECREF(tmp);\
1035 } while (0)
1036 #define __Pyx_DECREF_SET(r, v) do {\
1037 PyObject *tmp = (PyObject *) r;\
1038 r = v; __Pyx_DECREF(tmp);\
1039 } while (0)
1040 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1041 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1042
1043 /* PyObjectGetAttrStr.proto */
1044 #if CYTHON_USE_TYPE_SLOTS
1045 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1046 #else
1047 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1048 #endif
1049
1050 /* GetBuiltinName.proto */
1051 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1052
1053 /* RaiseDoubleKeywords.proto */
1054 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1055
1056 /* ParseKeywords.proto */
1057 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1058 PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1059 const char* function_name);
1060
1061 /* RaiseArgTupleInvalid.proto */
1062 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1063 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1064
1065 /* Import.proto */
1066 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1067
1068 /* ImportFrom.proto */
1069 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
1070
1071 /* PyFunctionFastCall.proto */
1072 #if CYTHON_FAST_PYCALL
1073 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1074 __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1075 #if 1 || PY_VERSION_HEX < 0x030600B1
1076 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
1077 #else
1078 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1079 #endif
1080 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1081 (sizeof(char [1 - 2*!(cond)]) - 1)
1082 #ifndef Py_MEMBER_SIZE
1083 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1084 #endif
1085 static size_t __pyx_pyframe_localsplus_offset = 0;
1086 #include "frameobject.h"
1087 #define __Pxy_PyFrame_Initialize_Offsets()\
1088 ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1089 (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1090 #define __Pyx_PyFrame_GetLocalsplus(frame)\
1091 (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1092 #endif
1093
1094 /* PyObjectCall.proto */
1095 #if CYTHON_COMPILING_IN_CPYTHON
1096 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1097 #else
1098 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1099 #endif
1100
1101 /* PyObjectCallMethO.proto */
1102 #if CYTHON_COMPILING_IN_CPYTHON
1103 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1104 #endif
1105
1106 /* PyObjectCallNoArg.proto */
1107 #if CYTHON_COMPILING_IN_CPYTHON
1108 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1109 #else
1110 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1111 #endif
1112
1113 /* PyCFunctionFastCall.proto */
1114 #if CYTHON_FAST_PYCCALL
1115 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1116 #else
1117 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1118 #endif
1119
1120 /* PyObjectCallOneArg.proto */
1121 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1122
1123 /* PyDictVersioning.proto */
1124 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1125 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
1126 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
1127 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1128 (version_var) = __PYX_GET_DICT_VERSION(dict);\
1129 (cache_var) = (value);
1130 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1131 static PY_UINT64_T __pyx_dict_version = 0;\
1132 static PyObject *__pyx_dict_cached_value = NULL;\
1133 if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1134 (VAR) = __pyx_dict_cached_value;\
1135 } else {\
1136 (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1137 __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1138 }\
1139 }
1140 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1141 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1142 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1143 #else
1144 #define __PYX_GET_DICT_VERSION(dict) (0)
1145 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1146 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
1147 #endif
1148
1149 /* GetModuleGlobalName.proto */
1150 #if CYTHON_USE_DICT_VERSIONS
1151 #define __Pyx_GetModuleGlobalName(var, name) {\
1152 static PY_UINT64_T __pyx_dict_version = 0;\
1153 static PyObject *__pyx_dict_cached_value = NULL;\
1154 (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1155 (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1156 __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1157 }
1158 #define __Pyx_GetModuleGlobalNameUncached(var, name) {\
1159 PY_UINT64_T __pyx_dict_version;\
1160 PyObject *__pyx_dict_cached_value;\
1161 (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1162 }
1163 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1164 #else
1165 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1166 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1167 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1168 #endif
1169
1170 /* GetAttr.proto */
1171 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
1172
1173 /* PyObjectCall2Args.proto */
1174 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1175
1176 /* PyThreadStateGet.proto */
1177 #if CYTHON_FAST_THREAD_STATE
1178 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1179 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1180 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1181 #else
1182 #define __Pyx_PyThreadState_declare
1183 #define __Pyx_PyThreadState_assign
1184 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1185 #endif
1186
1187 /* PyErrFetchRestore.proto */
1188 #if CYTHON_FAST_THREAD_STATE
1189 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1190 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1191 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1192 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1193 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1194 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1195 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1196 #if CYTHON_COMPILING_IN_CPYTHON
1197 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1198 #else
1199 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1200 #endif
1201 #else
1202 #define __Pyx_PyErr_Clear() PyErr_Clear()
1203 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1204 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1205 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1206 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1207 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1208 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1209 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1210 #endif
1211
1212 /* WriteUnraisableException.proto */
1213 static void __Pyx_WriteUnraisable(const char *name, int clineno,
1214 int lineno, const char *filename,
1215 int full_traceback, int nogil);
1216
1217 /* PyIntCompare.proto */
1218 static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);
1219
1220 /* RaiseException.proto */
1221 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1222
1223 /* GetItemInt.proto */
1224 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1225 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1226 __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
1227 (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
1228 __Pyx_GetItemInt_Generic(o, to_py_func(i))))
1229 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1230 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1231 __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1232 (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
1233 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
1234 int wraparound, int boundscheck);
1235 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1236 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1237 __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1238 (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
1239 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
1240 int wraparound, int boundscheck);
1241 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
1242 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
1243 int is_list, int wraparound, int boundscheck);
1244
1245 /* ListAppend.proto */
1246 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
__Pyx_PyList_Append(PyObject * list,PyObject * x)1247 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
1248 PyListObject* L = (PyListObject*) list;
1249 Py_ssize_t len = Py_SIZE(list);
1250 if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
1251 Py_INCREF(x);
1252 PyList_SET_ITEM(list, len, x);
1253 Py_SIZE(list) = len+1;
1254 return 0;
1255 }
1256 return PyList_Append(list, x);
1257 }
1258 #else
1259 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
1260 #endif
1261
1262 /* IncludeStringH.proto */
1263 #include <string.h>
1264
1265 /* BytesEquals.proto */
1266 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1267
1268 /* UnicodeEquals.proto */
1269 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1270
1271 /* StrEquals.proto */
1272 #if PY_MAJOR_VERSION >= 3
1273 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
1274 #else
1275 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
1276 #endif
1277
1278 /* GetTopmostException.proto */
1279 #if CYTHON_USE_EXC_INFO_STACK
1280 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1281 #endif
1282
1283 /* SaveResetException.proto */
1284 #if CYTHON_FAST_THREAD_STATE
1285 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1286 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1287 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1288 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1289 #else
1290 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1291 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1292 #endif
1293
1294 /* PyErrExceptionMatches.proto */
1295 #if CYTHON_FAST_THREAD_STATE
1296 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1297 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1298 #else
1299 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1300 #endif
1301
1302 /* GetException.proto */
1303 #if CYTHON_FAST_THREAD_STATE
1304 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1305 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1306 #else
1307 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1308 #endif
1309
1310 /* PyObjectGetMethod.proto */
1311 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
1312
1313 /* PyObjectCallMethod1.proto */
1314 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
1315
1316 /* pop_index.proto */
1317 static PyObject* __Pyx__PyObject_PopNewIndex(PyObject* L, PyObject* py_ix);
1318 static PyObject* __Pyx__PyObject_PopIndex(PyObject* L, PyObject* py_ix);
1319 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
1320 static PyObject* __Pyx__PyList_PopIndex(PyObject* L, PyObject* py_ix, Py_ssize_t ix);
1321 #define __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\
1322 (likely(PyList_CheckExact(L) && __Pyx_fits_Py_ssize_t(ix, type, is_signed))) ?\
1323 __Pyx__PyList_PopIndex(L, py_ix, ix) : (\
1324 (unlikely((py_ix) == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\
1325 __Pyx__PyObject_PopIndex(L, py_ix)))
1326 #define __Pyx_PyList_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\
1327 __Pyx_fits_Py_ssize_t(ix, type, is_signed) ?\
1328 __Pyx__PyList_PopIndex(L, py_ix, ix) : (\
1329 (unlikely((py_ix) == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\
1330 __Pyx__PyObject_PopIndex(L, py_ix)))
1331 #else
1332 #define __Pyx_PyList_PopIndex(L, py_ix, ix, is_signed, type, to_py_func)\
1333 __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func)
1334 #define __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\
1335 (unlikely((py_ix) == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\
1336 __Pyx__PyObject_PopIndex(L, py_ix))
1337 #endif
1338
1339 /* RaiseTooManyValuesToUnpack.proto */
1340 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
1341
1342 /* RaiseNeedMoreValuesToUnpack.proto */
1343 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
1344
1345 /* IterFinish.proto */
1346 static CYTHON_INLINE int __Pyx_IterFinish(void);
1347
1348 /* UnpackItemEndCheck.proto */
1349 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
1350
1351 /* FastTypeChecks.proto */
1352 #if CYTHON_COMPILING_IN_CPYTHON
1353 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1354 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1355 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1356 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1357 #else
1358 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1359 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1360 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1361 #endif
1362 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1363
1364 /* HasAttr.proto */
1365 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
1366
1367 /* GetAttr3.proto */
1368 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
1369
1370 /* ArgTypeTest.proto */
1371 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1372 ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1373 __Pyx__ArgTypeTest(obj, type, name, exact))
1374 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1375
1376 /* ExtTypeTest.proto */
1377 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
1378
1379 /* KeywordStringCheck.proto */
1380 static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
1381
1382 /* PyObject_GenericGetAttrNoDict.proto */
1383 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1384 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
1385 #else
1386 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
1387 #endif
1388
1389 /* PyObject_GenericGetAttr.proto */
1390 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1391 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
1392 #else
1393 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
1394 #endif
1395
1396 /* CallNextTpDealloc.proto */
1397 static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc);
1398
1399 /* CallNextTpTraverse.proto */
1400 static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse);
1401
1402 /* CallNextTpClear.proto */
1403 static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc);
1404
1405 /* SetVTable.proto */
1406 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
1407
1408 /* SetupReduce.proto */
1409 static int __Pyx_setup_reduce(PyObject* type_obj);
1410
1411 /* TypeImport.proto */
1412 #ifndef __PYX_HAVE_RT_ImportType_proto
1413 #define __PYX_HAVE_RT_ImportType_proto
1414 enum __Pyx_ImportType_CheckSize {
1415 __Pyx_ImportType_CheckSize_Error = 0,
1416 __Pyx_ImportType_CheckSize_Warn = 1,
1417 __Pyx_ImportType_CheckSize_Ignore = 2
1418 };
1419 static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
1420 #endif
1421
1422 /* GetVTable.proto */
1423 static void* __Pyx_GetVtable(PyObject *dict);
1424
1425 /* GetNameInClass.proto */
1426 #define __Pyx_GetNameInClass(var, nmspace, name) (var) = __Pyx__GetNameInClass(nmspace, name)
1427 static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name);
1428
1429 /* CLineInTraceback.proto */
1430 #ifdef CYTHON_CLINE_IN_TRACEBACK
1431 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1432 #else
1433 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1434 #endif
1435
1436 /* CodeObjectCache.proto */
1437 typedef struct {
1438 PyCodeObject* code_object;
1439 int code_line;
1440 } __Pyx_CodeObjectCacheEntry;
1441 struct __Pyx_CodeObjectCache {
1442 int count;
1443 int max_count;
1444 __Pyx_CodeObjectCacheEntry* entries;
1445 };
1446 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1447 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1448 static PyCodeObject *__pyx_find_code_object(int code_line);
1449 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1450
1451 /* AddTraceback.proto */
1452 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1453 int py_line, const char *filename);
1454
1455 /* CIntToPy.proto */
1456 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value);
1457
1458 /* CIntToPy.proto */
1459 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1460
1461 /* CIntToPy.proto */
1462 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1463
1464 /* CIntFromPy.proto */
1465 static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *);
1466
1467 /* CIntFromPy.proto */
1468 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1469
1470 /* CIntFromPy.proto */
1471 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1472
1473 /* CheckBinaryVersion.proto */
1474 static int __Pyx_check_binary_version(void);
1475
1476 /* InitStrings.proto */
1477 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1478
1479 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_3VBO_get_implementation(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto*/
1480 static unsigned int __pyx_f_17OpenGL_accelerate_3vbo_3VBO_c_resolve(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value); /* proto*/
1481 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_3VBO_c_set_array(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size); /* proto*/
1482 static int __pyx_f_17OpenGL_accelerate_3vbo_3VBO_check_live(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto*/
1483 static int __pyx_f_17OpenGL_accelerate_3vbo_9VBOOffset_check_live(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *__pyx_v_self); /* proto*/
1484 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_dataPointer(CYTHON_UNUSED struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *__pyx_v_self, PyObject *__pyx_v_instance); /* proto*/
1485 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_from_param(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *__pyx_v_self, PyObject *__pyx_v_instance, CYTHON_UNUSED PyObject *__pyx_v_typeCode); /* proto*/
1486 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_asArray(CYTHON_UNUSED struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *__pyx_v_self, PyObject *__pyx_v_instance, CYTHON_UNUSED PyObject *__pyx_v_typeCode); /* proto*/
1487 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_arrayByteCount(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *__pyx_v_self, PyObject *__pyx_v_instance); /* proto*/
1488 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_arrayToGLType(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *__pyx_v_self, PyObject *__pyx_v_instance); /* proto*/
1489 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_arraySize(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *__pyx_v_self, PyObject *__pyx_v_instance, CYTHON_UNUSED PyObject *__pyx_v_typeCode); /* proto*/
1490 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_unitSize(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *__pyx_v_self, PyObject *__pyx_v_instance, CYTHON_UNUSED PyObject *__pyx_v_typeCode); /* proto*/
1491 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_dimensions(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *__pyx_v_self, PyObject *__pyx_v_instance); /* proto*/
1492 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_dataPointer(CYTHON_UNUSED struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *__pyx_v_self, PyObject *__pyx_v_instance); /* proto*/
1493 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_from_param(CYTHON_UNUSED struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *__pyx_v_self, PyObject *__pyx_v_instance, CYTHON_UNUSED PyObject *__pyx_v_typeCode); /* proto*/
1494 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_asArray(CYTHON_UNUSED struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *__pyx_v_self, PyObject *__pyx_v_instance, CYTHON_UNUSED PyObject *__pyx_v_typeCode); /* proto*/
1495 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_arrayByteCount(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *__pyx_v_self, PyObject *__pyx_v_instance); /* proto*/
1496 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_arrayToGLType(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *__pyx_v_self, PyObject *__pyx_v_instance); /* proto*/
1497 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_arraySize(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *__pyx_v_self, PyObject *__pyx_v_instance, CYTHON_UNUSED PyObject *__pyx_v_typeCode); /* proto*/
1498 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_unitSize(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *__pyx_v_self, PyObject *__pyx_v_instance, CYTHON_UNUSED PyObject *__pyx_v_typeCode); /* proto*/
1499 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_dimensions(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *__pyx_v_self, PyObject *__pyx_v_instance); /* proto*/
1500
1501 /* Module declarations from 'OpenGL_accelerate.formathandler' */
1502 static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler = 0;
1503
1504 /* Module declarations from 'OpenGL_accelerate.vbo' */
1505 static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_3vbo_VBO = 0;
1506 static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_3vbo_VBOOffset = 0;
1507 static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_3vbo_VBOHandler = 0;
1508 static PyTypeObject *__pyx_ptype_17OpenGL_accelerate_3vbo_VBOOffsetHandler = 0;
1509 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo___pyx_unpickle_VBO__set_state(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *, PyObject *); /*proto*/
1510 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo___pyx_unpickle_VBOHandler__set_state(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *, PyObject *); /*proto*/
1511 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo___pyx_unpickle_VBOOffsetHandler__set_state(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *, PyObject *); /*proto*/
1512 #define __Pyx_MODULE_NAME "OpenGL_accelerate.vbo"
1513 extern int __pyx_module_is_main_OpenGL_accelerate__vbo;
1514 int __pyx_module_is_main_OpenGL_accelerate__vbo = 0;
1515
1516 /* Implementation of 'OpenGL_accelerate.vbo' */
1517 static PyObject *__pyx_builtin_object;
1518 static PyObject *__pyx_builtin_NotImplemented;
1519 static PyObject *__pyx_builtin_AttributeError;
1520 static PyObject *__pyx_builtin_TypeError;
1521 static PyObject *__pyx_builtin_ValueError;
1522 static PyObject *__pyx_builtin_id;
1523 static PyObject *__pyx_builtin_KeyError;
1524 static PyObject *__pyx_builtin_RuntimeError;
1525 static const char __pyx_k_I[] = "_I_";
1526 static const char __pyx_k_id[] = "id";
1527 static const char __pyx_k_VBO[] = "VBO";
1528 static const char __pyx_k_new[] = "__new__";
1529 static const char __pyx_k_pop[] = "pop";
1530 static const char __pyx_k_ref[] = "ref";
1531 static const char __pyx_k_vbo[] = "vbo";
1532 static const char __pyx_k_NULL[] = "_NULL";
1533 static const char __pyx_k_bind[] = "bind";
1534 static const char __pyx_k_data[] = "data";
1535 static const char __pyx_k_dict[] = "__dict__";
1536 static const char __pyx_k_main[] = "__main__";
1537 static const char __pyx_k_name[] = "__name__";
1538 static const char __pyx_k_size[] = "size";
1539 static const char __pyx_k_step[] = "step";
1540 static const char __pyx_k_stop[] = "stop";
1541 static const char __pyx_k_test[] = "__test__";
1542 static const char __pyx_k_bytes[] = "bytes";
1543 static const char __pyx_k_enter[] = "__enter__";
1544 static const char __pyx_k_error[] = "error";
1545 static const char __pyx_k_start[] = "start";
1546 static const char __pyx_k_usage[] = "usage";
1547 static const char __pyx_k_OpenGL[] = "OpenGL";
1548 static const char __pyx_k_buffer[] = "buffer";
1549 static const char __pyx_k_copied[] = "copied";
1550 static const char __pyx_k_ctypes[] = "ctypes";
1551 static const char __pyx_k_exc_tb[] = "exc_tb";
1552 static const char __pyx_k_import[] = "__import__";
1553 static const char __pyx_k_object[] = "object";
1554 static const char __pyx_k_offset[] = "offset";
1555 static const char __pyx_k_pickle[] = "pickle";
1556 static const char __pyx_k_reduce[] = "__reduce__";
1557 static const char __pyx_k_target[] = "target";
1558 static const char __pyx_k_unbind[] = "unbind";
1559 static const char __pyx_k_update[] = "update";
1560 static const char __pyx_k_asArray[] = "asArray";
1561 static const char __pyx_k_deleter[] = "deleter";
1562 static const char __pyx_k_exc_val[] = "exc_val";
1563 static const char __pyx_k_unicode[] = "unicode";
1564 static const char __pyx_k_weakref[] = "weakref";
1565 static const char __pyx_k_DELETERS[] = "_DELETERS_";
1566 static const char __pyx_k_KeyError[] = "KeyError";
1567 static const char __pyx_k_basename[] = "basename";
1568 static const char __pyx_k_c_uint32[] = "c_uint32";
1569 static const char __pyx_k_c_void_p[] = "c_void_p";
1570 static const char __pyx_k_exc_type[] = "exc_type";
1571 static const char __pyx_k_getstate[] = "__getstate__";
1572 static const char __pyx_k_isOutput[] = "isOutput";
1573 static const char __pyx_k_no_cache[] = "_no_cache_";
1574 static const char __pyx_k_pyx_type[] = "__pyx_type";
1575 static const char __pyx_k_setstate[] = "__setstate__";
1576 static const char __pyx_k_unitSize[] = "unitSize";
1577 static const char __pyx_k_TypeError[] = "TypeError";
1578 static const char __pyx_k_VBOOffset[] = "VBOOffset";
1579 static const char __pyx_k_arraySize[] = "arraySize";
1580 static const char __pyx_k_copy_data[] = "copy_data";
1581 static const char __pyx_k_pyx_state[] = "__pyx_state";
1582 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
1583 static const char __pyx_k_VBOHandler[] = "VBOHandler";
1584 static const char __pyx_k_ValueError[] = "ValueError";
1585 static const char __pyx_k_dimensions[] = "dimensions";
1586 static const char __pyx_k_pyx_result[] = "__pyx_result";
1587 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
1588 static const char __pyx_k_PickleError[] = "PickleError";
1589 static const char __pyx_k_RuntimeError[] = "RuntimeError";
1590 static const char __pyx_k_glBindBuffer[] = "glBindBuffer";
1591 static const char __pyx_k_glBufferData[] = "glBufferData";
1592 static const char __pyx_k_glGenBuffers[] = "glGenBuffers";
1593 static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
1594 static const char __pyx_k_stringsource[] = "stringsource";
1595 static const char __pyx_k_ArrayDatatype[] = "ArrayDatatype";
1596 static const char __pyx_k_OpenGL__bytes[] = "OpenGL._bytes";
1597 static const char __pyx_k_arrayToGLType[] = "arrayToGLType";
1598 static const char __pyx_k_copy_segments[] = "_copy_segments";
1599 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
1600 static const char __pyx_k_AttributeError[] = "AttributeError";
1601 static const char __pyx_k_NotImplemented[] = "NotImplemented";
1602 static const char __pyx_k_arrayByteCount[] = "arrayByteCount";
1603 static const char __pyx_k_create_buffers[] = "create_buffers";
1604 static const char __pyx_k_implementation[] = "implementation";
1605 static const char __pyx_k_GL_ARRAY_BUFFER[] = "GL_ARRAY_BUFFER";
1606 static const char __pyx_k_GL_DYNAMIC_DRAW[] = "GL_DYNAMIC_DRAW";
1607 static const char __pyx_k_glBufferSubData[] = "glBufferSubData";
1608 static const char __pyx_k_glDeleteBuffers[] = "glDeleteBuffers";
1609 static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
1610 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
1611 static const char __pyx_k_voidDataPointer[] = "voidDataPointer";
1612 static const char __pyx_k_VBOOffsetHandler[] = "VBOOffsetHandler";
1613 static const char __pyx_k_pyx_unpickle_VBO[] = "__pyx_unpickle_VBO";
1614 static const char __pyx_k_NullFunctionError[] = "NullFunctionError";
1615 static const char __pyx_k_OpenGL_arrays_vbo[] = "OpenGL.arrays.vbo";
1616 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
1617 static const char __pyx_k_get_implementation[] = "get_implementation";
1618 static const char __pyx_k_No_r_key_in_VBOOffset[] = "No %r key in VBOOffset";
1619 static const char __pyx_k_OpenGL_accelerate_vbo[] = "OpenGL_accelerate.vbo";
1620 static const char __pyx_k_pyx_unpickle_VBOHandler[] = "__pyx_unpickle_VBOHandler";
1621 static const char __pyx_k_Already_created_the_buffer[] = "Already created the buffer";
1622 static const char __pyx_k_OpenGL_arrays_arraydatatype[] = "OpenGL.arrays.arraydatatype";
1623 static const char __pyx_k_pyx_unpickle_VBOOffsetHandler[] = "__pyx_unpickle_VBOOffsetHandler";
1624 static const char __pyx_k_Attempting_to_use_a_deleted_VBO[] = "Attempting to use a deleted VBO";
1625 static const char __pyx_k_Cython_coded_VBO_implementation[] = "Cython-coded VBO implementation";
1626 static const char __pyx_k_Should_do_create_buffers_before[] = "Should do create_buffers before copy_data";
1627 static const char __pyx_k_Attempting_to_use_offset_into_de[] = "Attempting to use offset into deleted VBO";
1628 static const char __pyx_k_Don_t_know_how_to_map_stepped_ar[] = "Don't know how to map stepped arrays yet";
1629 static const char __pyx_k_Incompatible_checksums_s_vs_0x0f[] = "Incompatible checksums (%s vs 0x0fed755 = (_I_, _copy_segments, arrayType, buffer, copied, created, data, resolved, size, target, target_spec, usage, usage_spec))";
1630 static const char __pyx_k_Incompatible_checksums_s_vs_0xad[] = "Incompatible checksums (%s vs 0xaddf131 = (ERROR_ON_COPY, arrayType, vp0))";
1631 static const char __pyx_k_Incompatible_checksums_s_vs_0xe0[] = "Incompatible checksums (%s vs 0xe0a0c83 = (ERROR_ON_COPY, arrayType))";
1632 static const char __pyx_k_Only_know_how_to_add_integer_lon[] = "Only know how to add integer/long offsets";
1633 static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
1634 static PyObject *__pyx_kp_s_Already_created_the_buffer;
1635 static PyObject *__pyx_n_s_ArrayDatatype;
1636 static PyObject *__pyx_kp_s_Attempting_to_use_a_deleted_VBO;
1637 static PyObject *__pyx_kp_s_Attempting_to_use_offset_into_de;
1638 static PyObject *__pyx_n_s_AttributeError;
1639 static PyObject *__pyx_n_s_DELETERS;
1640 static PyObject *__pyx_kp_s_Don_t_know_how_to_map_stepped_ar;
1641 static PyObject *__pyx_n_s_GL_ARRAY_BUFFER;
1642 static PyObject *__pyx_n_s_GL_DYNAMIC_DRAW;
1643 static PyObject *__pyx_n_s_I;
1644 static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x0f;
1645 static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xad;
1646 static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xe0;
1647 static PyObject *__pyx_n_s_KeyError;
1648 static PyObject *__pyx_n_s_NULL;
1649 static PyObject *__pyx_kp_s_No_r_key_in_VBOOffset;
1650 static PyObject *__pyx_n_s_NotImplemented;
1651 static PyObject *__pyx_n_s_NullFunctionError;
1652 static PyObject *__pyx_kp_s_Only_know_how_to_add_integer_lon;
1653 static PyObject *__pyx_n_s_OpenGL;
1654 static PyObject *__pyx_n_s_OpenGL__bytes;
1655 static PyObject *__pyx_n_s_OpenGL_accelerate_vbo;
1656 static PyObject *__pyx_n_s_OpenGL_arrays_arraydatatype;
1657 static PyObject *__pyx_n_s_OpenGL_arrays_vbo;
1658 static PyObject *__pyx_n_s_PickleError;
1659 static PyObject *__pyx_n_s_RuntimeError;
1660 static PyObject *__pyx_kp_s_Should_do_create_buffers_before;
1661 static PyObject *__pyx_n_s_TypeError;
1662 static PyObject *__pyx_n_s_VBO;
1663 static PyObject *__pyx_n_s_VBOHandler;
1664 static PyObject *__pyx_n_s_VBOOffset;
1665 static PyObject *__pyx_n_s_VBOOffsetHandler;
1666 static PyObject *__pyx_n_s_ValueError;
1667 static PyObject *__pyx_n_s_arrayByteCount;
1668 static PyObject *__pyx_n_s_arraySize;
1669 static PyObject *__pyx_n_s_arrayToGLType;
1670 static PyObject *__pyx_n_s_asArray;
1671 static PyObject *__pyx_n_s_basename;
1672 static PyObject *__pyx_n_s_bind;
1673 static PyObject *__pyx_n_s_buffer;
1674 static PyObject *__pyx_n_s_bytes;
1675 static PyObject *__pyx_n_s_c_uint32;
1676 static PyObject *__pyx_n_s_c_void_p;
1677 static PyObject *__pyx_n_s_cline_in_traceback;
1678 static PyObject *__pyx_n_s_copied;
1679 static PyObject *__pyx_n_s_copy_data;
1680 static PyObject *__pyx_n_s_copy_segments;
1681 static PyObject *__pyx_n_s_create_buffers;
1682 static PyObject *__pyx_n_s_ctypes;
1683 static PyObject *__pyx_n_s_data;
1684 static PyObject *__pyx_n_s_deleter;
1685 static PyObject *__pyx_n_s_dict;
1686 static PyObject *__pyx_n_s_dimensions;
1687 static PyObject *__pyx_n_s_enter;
1688 static PyObject *__pyx_n_s_error;
1689 static PyObject *__pyx_n_s_exc_tb;
1690 static PyObject *__pyx_n_s_exc_type;
1691 static PyObject *__pyx_n_s_exc_val;
1692 static PyObject *__pyx_n_s_get_implementation;
1693 static PyObject *__pyx_n_s_getstate;
1694 static PyObject *__pyx_n_s_glBindBuffer;
1695 static PyObject *__pyx_n_s_glBufferData;
1696 static PyObject *__pyx_n_s_glBufferSubData;
1697 static PyObject *__pyx_n_s_glDeleteBuffers;
1698 static PyObject *__pyx_n_s_glGenBuffers;
1699 static PyObject *__pyx_n_s_id;
1700 static PyObject *__pyx_n_s_implementation;
1701 static PyObject *__pyx_n_s_import;
1702 static PyObject *__pyx_n_s_isOutput;
1703 static PyObject *__pyx_n_s_main;
1704 static PyObject *__pyx_n_s_name;
1705 static PyObject *__pyx_n_s_new;
1706 static PyObject *__pyx_n_s_no_cache;
1707 static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
1708 static PyObject *__pyx_n_s_object;
1709 static PyObject *__pyx_n_s_offset;
1710 static PyObject *__pyx_n_s_pickle;
1711 static PyObject *__pyx_n_s_pop;
1712 static PyObject *__pyx_n_s_pyx_PickleError;
1713 static PyObject *__pyx_n_s_pyx_checksum;
1714 static PyObject *__pyx_n_s_pyx_result;
1715 static PyObject *__pyx_n_s_pyx_state;
1716 static PyObject *__pyx_n_s_pyx_type;
1717 static PyObject *__pyx_n_s_pyx_unpickle_VBO;
1718 static PyObject *__pyx_n_s_pyx_unpickle_VBOHandler;
1719 static PyObject *__pyx_n_s_pyx_unpickle_VBOOffsetHandler;
1720 static PyObject *__pyx_n_s_pyx_vtable;
1721 static PyObject *__pyx_n_s_reduce;
1722 static PyObject *__pyx_n_s_reduce_cython;
1723 static PyObject *__pyx_n_s_reduce_ex;
1724 static PyObject *__pyx_n_s_ref;
1725 static PyObject *__pyx_n_s_setstate;
1726 static PyObject *__pyx_n_s_setstate_cython;
1727 static PyObject *__pyx_n_s_size;
1728 static PyObject *__pyx_n_s_start;
1729 static PyObject *__pyx_n_s_step;
1730 static PyObject *__pyx_n_s_stop;
1731 static PyObject *__pyx_kp_s_stringsource;
1732 static PyObject *__pyx_n_s_target;
1733 static PyObject *__pyx_n_s_test;
1734 static PyObject *__pyx_n_s_unbind;
1735 static PyObject *__pyx_n_s_unicode;
1736 static PyObject *__pyx_n_s_unitSize;
1737 static PyObject *__pyx_n_s_update;
1738 static PyObject *__pyx_n_s_usage;
1739 static PyObject *__pyx_n_s_vbo;
1740 static PyObject *__pyx_n_s_voidDataPointer;
1741 static PyObject *__pyx_n_s_weakref;
1742 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO___init__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_usage, PyObject *__pyx_v_target, PyObject *__pyx_v_size); /* proto */
1743 static void __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_2__dealloc__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1744 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_14implementation___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1745 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_4set_array(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size); /* proto */
1746 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6__setitem__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_slice, PyObject *__pyx_v_array); /* proto */
1747 static Py_ssize_t __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_8__len__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1748 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_10__getattr__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
1749 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_12__int__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1750 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_14create_buffers(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1751 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_16copy_data(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1752 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_18delete(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1753 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_20bind(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1754 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_22unbind(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1755 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_24__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
1756 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_26__exit__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc_type, CYTHON_UNUSED PyObject *__pyx_v_exc_val, CYTHON_UNUSED PyObject *__pyx_v_exc_tb); /* proto */
1757 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6copied___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1758 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6copied_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
1759 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_7created___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1760 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_7created_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
1761 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6buffer___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1762 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6buffer_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
1763 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_4data___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1764 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_4data_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
1765 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_4data_4__del__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1766 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_4size___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1767 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_4size_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
1768 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6target___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1769 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6target_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
1770 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6target_4__del__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1771 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_5usage___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1772 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_5usage_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
1773 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_5usage_4__del__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1774 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_8resolved___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1775 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_8resolved_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
1776 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_11target_spec___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1777 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_11target_spec_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
1778 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_11target_spec_4__del__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1779 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_10usage_spec___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1780 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_10usage_spec_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
1781 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_10usage_spec_4__del__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1782 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1783 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
1784 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments_4__del__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1785 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_3_I____get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1786 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_3_I__2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
1787 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_3_I__4__del__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1788 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_9arrayType___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1789 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_9arrayType_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
1790 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_9arrayType_4__del__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1791 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_28__reduce_cython__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self); /* proto */
1792 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_30__setstate_cython__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
1793 static int __pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset___cinit__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *__pyx_v_self, struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_vbo, unsigned int __pyx_v_offset); /* proto */
1794 static void __pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_2__dealloc__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *__pyx_v_self); /* proto */
1795 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_4__getattr__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
1796 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_6__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
1797 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *__pyx_v_self); /* proto */
1798 static int __pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
1799 static int __pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo_4__del__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *__pyx_v_self); /* proto */
1800 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_6offset___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *__pyx_v_self); /* proto */
1801 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 */
1802 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *__pyx_v_self); /* proto */
1803 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
1804 static int __pyx_pf_17OpenGL_accelerate_3vbo_10VBOHandler___init__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *__pyx_v_self); /* proto */
1805 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_10VBOHandler_2__reduce_cython__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *__pyx_v_self); /* proto */
1806 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_10VBOHandler_4__setstate_cython__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
1807 static int __pyx_pf_17OpenGL_accelerate_3vbo_16VBOOffsetHandler___init__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *__pyx_v_self); /* proto */
1808 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_2__reduce_cython__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *__pyx_v_self); /* proto */
1809 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_4__setstate_cython__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
1810 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo___pyx_unpickle_VBO(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
1811 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_2__pyx_unpickle_VBOHandler(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
1812 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_4__pyx_unpickle_VBOOffsetHandler(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
1813 static PyObject *__pyx_tp_new_17OpenGL_accelerate_3vbo_VBO(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
1814 static PyObject *__pyx_tp_new_17OpenGL_accelerate_3vbo_VBOOffset(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
1815 static PyObject *__pyx_tp_new_17OpenGL_accelerate_3vbo_VBOHandler(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
1816 static PyObject *__pyx_tp_new_17OpenGL_accelerate_3vbo_VBOOffsetHandler(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
1817 static PyObject *__pyx_int_0;
1818 static PyObject *__pyx_int_1;
1819 static PyObject *__pyx_int_16701269;
1820 static PyObject *__pyx_int_182317361;
1821 static PyObject *__pyx_int_235539587;
1822 static PyObject *__pyx_tuple_;
1823 static PyObject *__pyx_tuple__2;
1824 static PyObject *__pyx_tuple__3;
1825 static PyObject *__pyx_tuple__4;
1826 static PyObject *__pyx_tuple__5;
1827 static PyObject *__pyx_tuple__6;
1828 static PyObject *__pyx_tuple__8;
1829 static PyObject *__pyx_tuple__10;
1830 static PyObject *__pyx_codeobj__7;
1831 static PyObject *__pyx_codeobj__9;
1832 static PyObject *__pyx_codeobj__11;
1833 /* Late includes */
1834
1835 /* "src/vbo.pyx":49
1836 * cdef public object arrayType
1837 * _no_cache_ = True # do not cache in context data arrays
1838 * def __init__( # <<<<<<<<<<<<<<
1839 * self, data, usage='GL_DYNAMIC_DRAW',
1840 * target='GL_ARRAY_BUFFER',
1841 */
1842
1843 /* Python wrapper */
1844 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1845 static char __pyx_doc_17OpenGL_accelerate_3vbo_3VBO___init__[] = "Initialize the VBO\n\n data -- array-compatible data format object\n\n usage -- string/GLenum constant specifying streaming usage\n for the VBO, normal values:\n\n GL_STREAM_DRAW -- updated every frame from client to card\n GL_STREAM_COPY -- read and written from card each frame\n\n GL_STATIC_DRAW -- just written from client (once)\n GL_STATIC_READ -- just read from client\n GL_STATIC_COPY -- read and written from client (once)\n\n GL_DYNAMIC_DRAW -- updated from client every once in a while\n GL_DYNAMIC_COPY -- read and written from client every once in a while\n GL_DYNAMIC_READ -- read from the client every once in a while\n\n target -- string/GLenum constant specifying the role for the buffer\n normal values:\n\n GL_ARRAY_BUFFER -- vertex attribute values\n GL_ELEMENT_ARRAY_BUFFER -- vertex index values\n GL_PIXEL_PACK_BUFFER/GL_PIXEL_UNPACK_BUFFER -- client-side\n image source/sink for image-manipulation operations.\n ";
1846 #if CYTHON_COMPILING_IN_CPYTHON
1847 struct wrapperbase __pyx_wrapperbase_17OpenGL_accelerate_3vbo_3VBO___init__;
1848 #endif
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_1__init__(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)1849 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1850 PyObject *__pyx_v_data = 0;
1851 PyObject *__pyx_v_usage = 0;
1852 PyObject *__pyx_v_target = 0;
1853 PyObject *__pyx_v_size = 0;
1854 int __pyx_r;
1855 __Pyx_RefNannyDeclarations
1856 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
1857 {
1858 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_usage,&__pyx_n_s_target,&__pyx_n_s_size,0};
1859 PyObject* values[4] = {0,0,0,0};
1860 values[1] = ((PyObject *)__pyx_n_s_GL_DYNAMIC_DRAW);
1861 values[2] = ((PyObject *)__pyx_n_s_GL_ARRAY_BUFFER);
1862
1863 /* "src/vbo.pyx":52
1864 * self, data, usage='GL_DYNAMIC_DRAW',
1865 * target='GL_ARRAY_BUFFER',
1866 * size=None, # <<<<<<<<<<<<<<
1867 * ):
1868 * """Initialize the VBO
1869 */
1870 values[3] = ((PyObject *)Py_None);
1871 if (unlikely(__pyx_kwds)) {
1872 Py_ssize_t kw_args;
1873 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
1874 switch (pos_args) {
1875 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
1876 CYTHON_FALLTHROUGH;
1877 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
1878 CYTHON_FALLTHROUGH;
1879 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
1880 CYTHON_FALLTHROUGH;
1881 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1882 CYTHON_FALLTHROUGH;
1883 case 0: break;
1884 default: goto __pyx_L5_argtuple_error;
1885 }
1886 kw_args = PyDict_Size(__pyx_kwds);
1887 switch (pos_args) {
1888 case 0:
1889 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
1890 else goto __pyx_L5_argtuple_error;
1891 CYTHON_FALLTHROUGH;
1892 case 1:
1893 if (kw_args > 0) {
1894 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_usage);
1895 if (value) { values[1] = value; kw_args--; }
1896 }
1897 CYTHON_FALLTHROUGH;
1898 case 2:
1899 if (kw_args > 0) {
1900 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target);
1901 if (value) { values[2] = value; kw_args--; }
1902 }
1903 CYTHON_FALLTHROUGH;
1904 case 3:
1905 if (kw_args > 0) {
1906 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size);
1907 if (value) { values[3] = value; kw_args--; }
1908 }
1909 }
1910 if (unlikely(kw_args > 0)) {
1911 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 49, __pyx_L3_error)
1912 }
1913 } else {
1914 switch (PyTuple_GET_SIZE(__pyx_args)) {
1915 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
1916 CYTHON_FALLTHROUGH;
1917 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
1918 CYTHON_FALLTHROUGH;
1919 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
1920 CYTHON_FALLTHROUGH;
1921 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1922 break;
1923 default: goto __pyx_L5_argtuple_error;
1924 }
1925 }
1926 __pyx_v_data = values[0];
1927 __pyx_v_usage = values[1];
1928 __pyx_v_target = values[2];
1929 __pyx_v_size = values[3];
1930 }
1931 goto __pyx_L4_argument_unpacking_done;
1932 __pyx_L5_argtuple_error:;
1933 __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 49, __pyx_L3_error)
1934 __pyx_L3_error:;
1935 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
1936 __Pyx_RefNannyFinishContext();
1937 return -1;
1938 __pyx_L4_argument_unpacking_done:;
1939 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO___init__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self), __pyx_v_data, __pyx_v_usage, __pyx_v_target, __pyx_v_size);
1940
1941 /* "src/vbo.pyx":49
1942 * cdef public object arrayType
1943 * _no_cache_ = True # do not cache in context data arrays
1944 * def __init__( # <<<<<<<<<<<<<<
1945 * self, data, usage='GL_DYNAMIC_DRAW',
1946 * target='GL_ARRAY_BUFFER',
1947 */
1948
1949 /* function exit code */
1950 __Pyx_RefNannyFinishContext();
1951 return __pyx_r;
1952 }
1953
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO___init__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self,PyObject * __pyx_v_data,PyObject * __pyx_v_usage,PyObject * __pyx_v_target,PyObject * __pyx_v_size)1954 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO___init__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_usage, PyObject *__pyx_v_target, PyObject *__pyx_v_size) {
1955 PyObject *__pyx_v_ArrayDatatype = NULL;
1956 int __pyx_r;
1957 __Pyx_RefNannyDeclarations
1958 PyObject *__pyx_t_1 = NULL;
1959 PyObject *__pyx_t_2 = NULL;
1960 __Pyx_RefNannySetupContext("__init__", 0);
1961
1962 /* "src/vbo.pyx":80
1963 * image source/sink for image-manipulation operations.
1964 * """
1965 * from OpenGL.arrays.arraydatatype import ArrayDatatype # <<<<<<<<<<<<<<
1966 * self.arrayType = ArrayDatatype
1967 * self.c_set_array( data, size )
1968 */
1969 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error)
1970 __Pyx_GOTREF(__pyx_t_1);
1971 __Pyx_INCREF(__pyx_n_s_ArrayDatatype);
1972 __Pyx_GIVEREF(__pyx_n_s_ArrayDatatype);
1973 PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_ArrayDatatype);
1974 __pyx_t_2 = __Pyx_Import(__pyx_n_s_OpenGL_arrays_arraydatatype, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error)
1975 __Pyx_GOTREF(__pyx_t_2);
1976 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1977 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_ArrayDatatype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error)
1978 __Pyx_GOTREF(__pyx_t_1);
1979 __Pyx_INCREF(__pyx_t_1);
1980 __pyx_v_ArrayDatatype = __pyx_t_1;
1981 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1982 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1983
1984 /* "src/vbo.pyx":81
1985 * """
1986 * from OpenGL.arrays.arraydatatype import ArrayDatatype
1987 * self.arrayType = ArrayDatatype # <<<<<<<<<<<<<<
1988 * self.c_set_array( data, size )
1989 * self.resolved = self.created = self.copied = False
1990 */
1991 __Pyx_INCREF(__pyx_v_ArrayDatatype);
1992 __Pyx_GIVEREF(__pyx_v_ArrayDatatype);
1993 __Pyx_GOTREF(__pyx_v_self->arrayType);
1994 __Pyx_DECREF(__pyx_v_self->arrayType);
1995 __pyx_v_self->arrayType = __pyx_v_ArrayDatatype;
1996
1997 /* "src/vbo.pyx":82
1998 * from OpenGL.arrays.arraydatatype import ArrayDatatype
1999 * self.arrayType = ArrayDatatype
2000 * self.c_set_array( data, size ) # <<<<<<<<<<<<<<
2001 * self.resolved = self.created = self.copied = False
2002 * self.usage_spec = usage
2003 */
2004 __pyx_t_2 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self->__pyx_vtab)->c_set_array(__pyx_v_self, __pyx_v_data, __pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error)
2005 __Pyx_GOTREF(__pyx_t_2);
2006 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2007
2008 /* "src/vbo.pyx":83
2009 * self.arrayType = ArrayDatatype
2010 * self.c_set_array( data, size )
2011 * self.resolved = self.created = self.copied = False # <<<<<<<<<<<<<<
2012 * self.usage_spec = usage
2013 * self.target_spec = target
2014 */
2015 __pyx_v_self->resolved = 0;
2016 __pyx_v_self->created = 0;
2017 __pyx_v_self->copied = 0;
2018
2019 /* "src/vbo.pyx":84
2020 * self.c_set_array( data, size )
2021 * self.resolved = self.created = self.copied = False
2022 * self.usage_spec = usage # <<<<<<<<<<<<<<
2023 * self.target_spec = target
2024 * self._copy_segments = []
2025 */
2026 __Pyx_INCREF(__pyx_v_usage);
2027 __Pyx_GIVEREF(__pyx_v_usage);
2028 __Pyx_GOTREF(__pyx_v_self->usage_spec);
2029 __Pyx_DECREF(__pyx_v_self->usage_spec);
2030 __pyx_v_self->usage_spec = __pyx_v_usage;
2031
2032 /* "src/vbo.pyx":85
2033 * self.resolved = self.created = self.copied = False
2034 * self.usage_spec = usage
2035 * self.target_spec = target # <<<<<<<<<<<<<<
2036 * self._copy_segments = []
2037 * self._I_ = None
2038 */
2039 __Pyx_INCREF(__pyx_v_target);
2040 __Pyx_GIVEREF(__pyx_v_target);
2041 __Pyx_GOTREF(__pyx_v_self->target_spec);
2042 __Pyx_DECREF(__pyx_v_self->target_spec);
2043 __pyx_v_self->target_spec = __pyx_v_target;
2044
2045 /* "src/vbo.pyx":86
2046 * self.usage_spec = usage
2047 * self.target_spec = target
2048 * self._copy_segments = [] # <<<<<<<<<<<<<<
2049 * self._I_ = None
2050 * def __dealloc__( self ):
2051 */
2052 __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error)
2053 __Pyx_GOTREF(__pyx_t_2);
2054 __Pyx_GIVEREF(__pyx_t_2);
2055 __Pyx_GOTREF(__pyx_v_self->_copy_segments);
2056 __Pyx_DECREF(__pyx_v_self->_copy_segments);
2057 __pyx_v_self->_copy_segments = ((PyObject*)__pyx_t_2);
2058 __pyx_t_2 = 0;
2059
2060 /* "src/vbo.pyx":87
2061 * self.target_spec = target
2062 * self._copy_segments = []
2063 * self._I_ = None # <<<<<<<<<<<<<<
2064 * def __dealloc__( self ):
2065 * """Deallocate our references"""
2066 */
2067 __Pyx_INCREF(Py_None);
2068 __Pyx_GIVEREF(Py_None);
2069 __Pyx_GOTREF(__pyx_v_self->_I_);
2070 __Pyx_DECREF(__pyx_v_self->_I_);
2071 __pyx_v_self->_I_ = Py_None;
2072
2073 /* "src/vbo.pyx":49
2074 * cdef public object arrayType
2075 * _no_cache_ = True # do not cache in context data arrays
2076 * def __init__( # <<<<<<<<<<<<<<
2077 * self, data, usage='GL_DYNAMIC_DRAW',
2078 * target='GL_ARRAY_BUFFER',
2079 */
2080
2081 /* function exit code */
2082 __pyx_r = 0;
2083 goto __pyx_L0;
2084 __pyx_L1_error:;
2085 __Pyx_XDECREF(__pyx_t_1);
2086 __Pyx_XDECREF(__pyx_t_2);
2087 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2088 __pyx_r = -1;
2089 __pyx_L0:;
2090 __Pyx_XDECREF(__pyx_v_ArrayDatatype);
2091 __Pyx_RefNannyFinishContext();
2092 return __pyx_r;
2093 }
2094
2095 /* "src/vbo.pyx":88
2096 * self._copy_segments = []
2097 * self._I_ = None
2098 * def __dealloc__( self ): # <<<<<<<<<<<<<<
2099 * """Deallocate our references"""
2100 * if self.data is not None:
2101 */
2102
2103 /* Python wrapper */
2104 static void __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_3__dealloc__(PyObject * __pyx_v_self)2105 static void __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_3__dealloc__(PyObject *__pyx_v_self) {
2106 __Pyx_RefNannyDeclarations
2107 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
2108 __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_2__dealloc__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
2109
2110 /* function exit code */
2111 __Pyx_RefNannyFinishContext();
2112 }
2113
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_2__dealloc__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)2114 static void __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_2__dealloc__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
2115 __Pyx_RefNannyDeclarations
2116 int __pyx_t_1;
2117 int __pyx_t_2;
2118 PyObject *__pyx_t_3 = NULL;
2119 __Pyx_RefNannySetupContext("__dealloc__", 0);
2120
2121 /* "src/vbo.pyx":90
2122 * def __dealloc__( self ):
2123 * """Deallocate our references"""
2124 * if self.data is not None: # <<<<<<<<<<<<<<
2125 * Py_XDECREF( self.data )
2126 * self.data = None
2127 */
2128 __pyx_t_1 = (__pyx_v_self->data != Py_None);
2129 __pyx_t_2 = (__pyx_t_1 != 0);
2130 if (__pyx_t_2) {
2131
2132 /* "src/vbo.pyx":91
2133 * """Deallocate our references"""
2134 * if self.data is not None:
2135 * Py_XDECREF( self.data ) # <<<<<<<<<<<<<<
2136 * self.data = None
2137 * @property
2138 */
2139 __pyx_t_3 = __pyx_v_self->data;
2140 __Pyx_INCREF(__pyx_t_3);
2141 Py_XDECREF(__pyx_t_3);
2142 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2143
2144 /* "src/vbo.pyx":92
2145 * if self.data is not None:
2146 * Py_XDECREF( self.data )
2147 * self.data = None # <<<<<<<<<<<<<<
2148 * @property
2149 * def implementation( self ):
2150 */
2151 __Pyx_INCREF(Py_None);
2152 __Pyx_GIVEREF(Py_None);
2153 __Pyx_GOTREF(__pyx_v_self->data);
2154 __Pyx_DECREF(__pyx_v_self->data);
2155 __pyx_v_self->data = Py_None;
2156
2157 /* "src/vbo.pyx":90
2158 * def __dealloc__( self ):
2159 * """Deallocate our references"""
2160 * if self.data is not None: # <<<<<<<<<<<<<<
2161 * Py_XDECREF( self.data )
2162 * self.data = None
2163 */
2164 }
2165
2166 /* "src/vbo.pyx":88
2167 * self._copy_segments = []
2168 * self._I_ = None
2169 * def __dealloc__( self ): # <<<<<<<<<<<<<<
2170 * """Deallocate our references"""
2171 * if self.data is not None:
2172 */
2173
2174 /* function exit code */
2175 __Pyx_RefNannyFinishContext();
2176 }
2177
2178 /* "src/vbo.pyx":94
2179 * self.data = None
2180 * @property
2181 * def implementation( self ): # <<<<<<<<<<<<<<
2182 * """Retrieve our implementation reference"""
2183 * return self.get_implementation()
2184 */
2185
2186 /* Python wrapper */
2187 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_14implementation_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_14implementation_1__get__(PyObject * __pyx_v_self)2188 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_14implementation_1__get__(PyObject *__pyx_v_self) {
2189 PyObject *__pyx_r = 0;
2190 __Pyx_RefNannyDeclarations
2191 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
2192 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_14implementation___get__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
2193
2194 /* function exit code */
2195 __Pyx_RefNannyFinishContext();
2196 return __pyx_r;
2197 }
2198
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_14implementation___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)2199 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_14implementation___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
2200 PyObject *__pyx_r = NULL;
2201 __Pyx_RefNannyDeclarations
2202 PyObject *__pyx_t_1 = NULL;
2203 __Pyx_RefNannySetupContext("__get__", 0);
2204
2205 /* "src/vbo.pyx":96
2206 * def implementation( self ):
2207 * """Retrieve our implementation reference"""
2208 * return self.get_implementation() # <<<<<<<<<<<<<<
2209 * cdef get_implementation( self ):
2210 * """C-level implementation retrieval"""
2211 */
2212 __Pyx_XDECREF(__pyx_r);
2213 __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_ERR(0, 96, __pyx_L1_error)
2214 __Pyx_GOTREF(__pyx_t_1);
2215 __pyx_r = __pyx_t_1;
2216 __pyx_t_1 = 0;
2217 goto __pyx_L0;
2218
2219 /* "src/vbo.pyx":94
2220 * self.data = None
2221 * @property
2222 * def implementation( self ): # <<<<<<<<<<<<<<
2223 * """Retrieve our implementation reference"""
2224 * return self.get_implementation()
2225 */
2226
2227 /* function exit code */
2228 __pyx_L1_error:;
2229 __Pyx_XDECREF(__pyx_t_1);
2230 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.implementation.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2231 __pyx_r = NULL;
2232 __pyx_L0:;
2233 __Pyx_XGIVEREF(__pyx_r);
2234 __Pyx_RefNannyFinishContext();
2235 return __pyx_r;
2236 }
2237
2238 /* "src/vbo.pyx":97
2239 * """Retrieve our implementation reference"""
2240 * return self.get_implementation()
2241 * cdef get_implementation( self ): # <<<<<<<<<<<<<<
2242 * """C-level implementation retrieval"""
2243 * if self._I_ is None:
2244 */
2245
__pyx_f_17OpenGL_accelerate_3vbo_3VBO_get_implementation(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)2246 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_3VBO_get_implementation(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
2247 PyObject *__pyx_v_get_implementation = NULL;
2248 PyObject *__pyx_r = NULL;
2249 __Pyx_RefNannyDeclarations
2250 int __pyx_t_1;
2251 int __pyx_t_2;
2252 PyObject *__pyx_t_3 = NULL;
2253 PyObject *__pyx_t_4 = NULL;
2254 PyObject *__pyx_t_5 = NULL;
2255 __Pyx_RefNannySetupContext("get_implementation", 0);
2256
2257 /* "src/vbo.pyx":99
2258 * cdef get_implementation( self ):
2259 * """C-level implementation retrieval"""
2260 * if self._I_ is None: # <<<<<<<<<<<<<<
2261 * from OpenGL.arrays.vbo import get_implementation
2262 * self._I_ = get_implementation()
2263 */
2264 __pyx_t_1 = (__pyx_v_self->_I_ == Py_None);
2265 __pyx_t_2 = (__pyx_t_1 != 0);
2266 if (__pyx_t_2) {
2267
2268 /* "src/vbo.pyx":100
2269 * """C-level implementation retrieval"""
2270 * if self._I_ is None:
2271 * from OpenGL.arrays.vbo import get_implementation # <<<<<<<<<<<<<<
2272 * self._I_ = get_implementation()
2273 * return self._I_
2274 */
2275 __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 100, __pyx_L1_error)
2276 __Pyx_GOTREF(__pyx_t_3);
2277 __Pyx_INCREF(__pyx_n_s_get_implementation);
2278 __Pyx_GIVEREF(__pyx_n_s_get_implementation);
2279 PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_get_implementation);
2280 __pyx_t_4 = __Pyx_Import(__pyx_n_s_OpenGL_arrays_vbo, __pyx_t_3, -1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 100, __pyx_L1_error)
2281 __Pyx_GOTREF(__pyx_t_4);
2282 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2283 __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_get_implementation); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 100, __pyx_L1_error)
2284 __Pyx_GOTREF(__pyx_t_3);
2285 __Pyx_INCREF(__pyx_t_3);
2286 __pyx_v_get_implementation = __pyx_t_3;
2287 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2288 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2289
2290 /* "src/vbo.pyx":101
2291 * if self._I_ is None:
2292 * from OpenGL.arrays.vbo import get_implementation
2293 * self._I_ = get_implementation() # <<<<<<<<<<<<<<
2294 * return self._I_
2295 * cdef unsigned int c_resolve( self, value ):
2296 */
2297 __Pyx_INCREF(__pyx_v_get_implementation);
2298 __pyx_t_3 = __pyx_v_get_implementation; __pyx_t_5 = NULL;
2299 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
2300 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
2301 if (likely(__pyx_t_5)) {
2302 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
2303 __Pyx_INCREF(__pyx_t_5);
2304 __Pyx_INCREF(function);
2305 __Pyx_DECREF_SET(__pyx_t_3, function);
2306 }
2307 }
2308 __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
2309 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
2310 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 101, __pyx_L1_error)
2311 __Pyx_GOTREF(__pyx_t_4);
2312 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2313 __Pyx_GIVEREF(__pyx_t_4);
2314 __Pyx_GOTREF(__pyx_v_self->_I_);
2315 __Pyx_DECREF(__pyx_v_self->_I_);
2316 __pyx_v_self->_I_ = __pyx_t_4;
2317 __pyx_t_4 = 0;
2318
2319 /* "src/vbo.pyx":99
2320 * cdef get_implementation( self ):
2321 * """C-level implementation retrieval"""
2322 * if self._I_ is None: # <<<<<<<<<<<<<<
2323 * from OpenGL.arrays.vbo import get_implementation
2324 * self._I_ = get_implementation()
2325 */
2326 }
2327
2328 /* "src/vbo.pyx":102
2329 * from OpenGL.arrays.vbo import get_implementation
2330 * self._I_ = get_implementation()
2331 * return self._I_ # <<<<<<<<<<<<<<
2332 * cdef unsigned int c_resolve( self, value ):
2333 * """Resolve string constant to constant"""
2334 */
2335 __Pyx_XDECREF(__pyx_r);
2336 __Pyx_INCREF(__pyx_v_self->_I_);
2337 __pyx_r = __pyx_v_self->_I_;
2338 goto __pyx_L0;
2339
2340 /* "src/vbo.pyx":97
2341 * """Retrieve our implementation reference"""
2342 * return self.get_implementation()
2343 * cdef get_implementation( self ): # <<<<<<<<<<<<<<
2344 * """C-level implementation retrieval"""
2345 * if self._I_ is None:
2346 */
2347
2348 /* function exit code */
2349 __pyx_L1_error:;
2350 __Pyx_XDECREF(__pyx_t_3);
2351 __Pyx_XDECREF(__pyx_t_4);
2352 __Pyx_XDECREF(__pyx_t_5);
2353 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.get_implementation", __pyx_clineno, __pyx_lineno, __pyx_filename);
2354 __pyx_r = 0;
2355 __pyx_L0:;
2356 __Pyx_XDECREF(__pyx_v_get_implementation);
2357 __Pyx_XGIVEREF(__pyx_r);
2358 __Pyx_RefNannyFinishContext();
2359 return __pyx_r;
2360 }
2361
2362 /* "src/vbo.pyx":103
2363 * self._I_ = get_implementation()
2364 * return self._I_
2365 * cdef unsigned int c_resolve( self, value ): # <<<<<<<<<<<<<<
2366 * """Resolve string constant to constant"""
2367 * if isinstance( value, (bytes,unicode)):
2368 */
2369
__pyx_f_17OpenGL_accelerate_3vbo_3VBO_c_resolve(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self,PyObject * __pyx_v_value)2370 static unsigned int __pyx_f_17OpenGL_accelerate_3vbo_3VBO_c_resolve(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value) {
2371 unsigned int __pyx_r;
2372 __Pyx_RefNannyDeclarations
2373 PyObject *__pyx_t_1 = NULL;
2374 PyObject *__pyx_t_2 = NULL;
2375 int __pyx_t_3;
2376 int __pyx_t_4;
2377 int __pyx_t_5;
2378 PyObject *__pyx_t_6 = NULL;
2379 PyObject *__pyx_t_7 = NULL;
2380 unsigned int __pyx_t_8;
2381 __Pyx_RefNannySetupContext("c_resolve", 0);
2382
2383 /* "src/vbo.pyx":105
2384 * cdef unsigned int c_resolve( self, value ):
2385 * """Resolve string constant to constant"""
2386 * if isinstance( value, (bytes,unicode)): # <<<<<<<<<<<<<<
2387 * return getattr(
2388 * self.get_implementation(),
2389 */
2390 __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_bytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error)
2391 __Pyx_GOTREF(__pyx_t_1);
2392 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error)
2393 __Pyx_GOTREF(__pyx_t_2);
2394 __pyx_t_4 = PyObject_IsInstance(__pyx_v_value, __pyx_t_1);
2395 __pyx_t_5 = (__pyx_t_4 != 0);
2396 if (!__pyx_t_5) {
2397 } else {
2398 __pyx_t_3 = __pyx_t_5;
2399 goto __pyx_L4_bool_binop_done;
2400 }
2401 __pyx_t_5 = PyObject_IsInstance(__pyx_v_value, __pyx_t_2);
2402 __pyx_t_4 = (__pyx_t_5 != 0);
2403 __pyx_t_3 = __pyx_t_4;
2404 __pyx_L4_bool_binop_done:;
2405 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2406 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2407 __pyx_t_4 = (__pyx_t_3 != 0);
2408 if (__pyx_t_4) {
2409
2410 /* "src/vbo.pyx":107
2411 * if isinstance( value, (bytes,unicode)):
2412 * return getattr(
2413 * self.get_implementation(), # <<<<<<<<<<<<<<
2414 * self.get_implementation().basename( value )
2415 * )
2416 */
2417 __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_ERR(0, 107, __pyx_L1_error)
2418 __Pyx_GOTREF(__pyx_t_1);
2419
2420 /* "src/vbo.pyx":108
2421 * return getattr(
2422 * self.get_implementation(),
2423 * self.get_implementation().basename( value ) # <<<<<<<<<<<<<<
2424 * )
2425 * return value
2426 */
2427 __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_ERR(0, 108, __pyx_L1_error)
2428 __Pyx_GOTREF(__pyx_t_6);
2429 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_basename); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 108, __pyx_L1_error)
2430 __Pyx_GOTREF(__pyx_t_7);
2431 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
2432 __pyx_t_6 = NULL;
2433 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
2434 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
2435 if (likely(__pyx_t_6)) {
2436 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
2437 __Pyx_INCREF(__pyx_t_6);
2438 __Pyx_INCREF(function);
2439 __Pyx_DECREF_SET(__pyx_t_7, function);
2440 }
2441 }
2442 __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_value);
2443 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
2444 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __pyx_L1_error)
2445 __Pyx_GOTREF(__pyx_t_2);
2446 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2447
2448 /* "src/vbo.pyx":106
2449 * """Resolve string constant to constant"""
2450 * if isinstance( value, (bytes,unicode)):
2451 * return getattr( # <<<<<<<<<<<<<<
2452 * self.get_implementation(),
2453 * self.get_implementation().basename( value )
2454 */
2455 __pyx_t_7 = __Pyx_GetAttr(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 106, __pyx_L1_error)
2456 __Pyx_GOTREF(__pyx_t_7);
2457 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2458 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2459 __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_7); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 106, __pyx_L1_error)
2460 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2461 __pyx_r = __pyx_t_8;
2462 goto __pyx_L0;
2463
2464 /* "src/vbo.pyx":105
2465 * cdef unsigned int c_resolve( self, value ):
2466 * """Resolve string constant to constant"""
2467 * if isinstance( value, (bytes,unicode)): # <<<<<<<<<<<<<<
2468 * return getattr(
2469 * self.get_implementation(),
2470 */
2471 }
2472
2473 /* "src/vbo.pyx":110
2474 * self.get_implementation().basename( value )
2475 * )
2476 * return value # <<<<<<<<<<<<<<
2477 * def set_array( self, data, size=None ):
2478 * """Update our entire array with new data"""
2479 */
2480 __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_v_value); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 110, __pyx_L1_error)
2481 __pyx_r = __pyx_t_8;
2482 goto __pyx_L0;
2483
2484 /* "src/vbo.pyx":103
2485 * self._I_ = get_implementation()
2486 * return self._I_
2487 * cdef unsigned int c_resolve( self, value ): # <<<<<<<<<<<<<<
2488 * """Resolve string constant to constant"""
2489 * if isinstance( value, (bytes,unicode)):
2490 */
2491
2492 /* function exit code */
2493 __pyx_L1_error:;
2494 __Pyx_XDECREF(__pyx_t_1);
2495 __Pyx_XDECREF(__pyx_t_2);
2496 __Pyx_XDECREF(__pyx_t_6);
2497 __Pyx_XDECREF(__pyx_t_7);
2498 __Pyx_WriteUnraisable("OpenGL_accelerate.vbo.VBO.c_resolve", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
2499 __pyx_r = 0;
2500 __pyx_L0:;
2501 __Pyx_RefNannyFinishContext();
2502 return __pyx_r;
2503 }
2504
2505 /* "src/vbo.pyx":111
2506 * )
2507 * return value
2508 * def set_array( self, data, size=None ): # <<<<<<<<<<<<<<
2509 * """Update our entire array with new data"""
2510 * return self.c_set_array( data, size )
2511 */
2512
2513 /* Python wrapper */
2514 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_5set_array(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2515 static char __pyx_doc_17OpenGL_accelerate_3vbo_3VBO_4set_array[] = "Update our entire array with new data";
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_5set_array(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)2516 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_5set_array(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2517 PyObject *__pyx_v_data = 0;
2518 PyObject *__pyx_v_size = 0;
2519 PyObject *__pyx_r = 0;
2520 __Pyx_RefNannyDeclarations
2521 __Pyx_RefNannySetupContext("set_array (wrapper)", 0);
2522 {
2523 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,0};
2524 PyObject* values[2] = {0,0};
2525 values[1] = ((PyObject *)Py_None);
2526 if (unlikely(__pyx_kwds)) {
2527 Py_ssize_t kw_args;
2528 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2529 switch (pos_args) {
2530 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2531 CYTHON_FALLTHROUGH;
2532 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2533 CYTHON_FALLTHROUGH;
2534 case 0: break;
2535 default: goto __pyx_L5_argtuple_error;
2536 }
2537 kw_args = PyDict_Size(__pyx_kwds);
2538 switch (pos_args) {
2539 case 0:
2540 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
2541 else goto __pyx_L5_argtuple_error;
2542 CYTHON_FALLTHROUGH;
2543 case 1:
2544 if (kw_args > 0) {
2545 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size);
2546 if (value) { values[1] = value; kw_args--; }
2547 }
2548 }
2549 if (unlikely(kw_args > 0)) {
2550 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_array") < 0)) __PYX_ERR(0, 111, __pyx_L3_error)
2551 }
2552 } else {
2553 switch (PyTuple_GET_SIZE(__pyx_args)) {
2554 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2555 CYTHON_FALLTHROUGH;
2556 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2557 break;
2558 default: goto __pyx_L5_argtuple_error;
2559 }
2560 }
2561 __pyx_v_data = values[0];
2562 __pyx_v_size = values[1];
2563 }
2564 goto __pyx_L4_argument_unpacking_done;
2565 __pyx_L5_argtuple_error:;
2566 __Pyx_RaiseArgtupleInvalid("set_array", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 111, __pyx_L3_error)
2567 __pyx_L3_error:;
2568 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.set_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
2569 __Pyx_RefNannyFinishContext();
2570 return NULL;
2571 __pyx_L4_argument_unpacking_done:;
2572 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_4set_array(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self), __pyx_v_data, __pyx_v_size);
2573
2574 /* function exit code */
2575 __Pyx_RefNannyFinishContext();
2576 return __pyx_r;
2577 }
2578
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_4set_array(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self,PyObject * __pyx_v_data,PyObject * __pyx_v_size)2579 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_4set_array(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size) {
2580 PyObject *__pyx_r = NULL;
2581 __Pyx_RefNannyDeclarations
2582 PyObject *__pyx_t_1 = NULL;
2583 __Pyx_RefNannySetupContext("set_array", 0);
2584
2585 /* "src/vbo.pyx":113
2586 * def set_array( self, data, size=None ):
2587 * """Update our entire array with new data"""
2588 * return self.c_set_array( data, size ) # <<<<<<<<<<<<<<
2589 * cdef c_set_array( self, data, size ):
2590 * """Set our array pointer with incref/decref support"""
2591 */
2592 __Pyx_XDECREF(__pyx_r);
2593 __pyx_t_1 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self->__pyx_vtab)->c_set_array(__pyx_v_self, __pyx_v_data, __pyx_v_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
2594 __Pyx_GOTREF(__pyx_t_1);
2595 __pyx_r = __pyx_t_1;
2596 __pyx_t_1 = 0;
2597 goto __pyx_L0;
2598
2599 /* "src/vbo.pyx":111
2600 * )
2601 * return value
2602 * def set_array( self, data, size=None ): # <<<<<<<<<<<<<<
2603 * """Update our entire array with new data"""
2604 * return self.c_set_array( data, size )
2605 */
2606
2607 /* function exit code */
2608 __pyx_L1_error:;
2609 __Pyx_XDECREF(__pyx_t_1);
2610 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.set_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
2611 __pyx_r = NULL;
2612 __pyx_L0:;
2613 __Pyx_XGIVEREF(__pyx_r);
2614 __Pyx_RefNannyFinishContext();
2615 return __pyx_r;
2616 }
2617
2618 /* "src/vbo.pyx":114
2619 * """Update our entire array with new data"""
2620 * return self.c_set_array( data, size )
2621 * cdef c_set_array( self, data, size ): # <<<<<<<<<<<<<<
2622 * """Set our array pointer with incref/decref support"""
2623 * if self.data is not None:
2624 */
2625
__pyx_f_17OpenGL_accelerate_3vbo_3VBO_c_set_array(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self,PyObject * __pyx_v_data,PyObject * __pyx_v_size)2626 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_3VBO_c_set_array(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size) {
2627 PyObject *__pyx_r = NULL;
2628 __Pyx_RefNannyDeclarations
2629 int __pyx_t_1;
2630 int __pyx_t_2;
2631 PyObject *__pyx_t_3 = NULL;
2632 int __pyx_t_4;
2633 PyObject *__pyx_t_5 = NULL;
2634 PyObject *__pyx_t_6 = NULL;
2635 int __pyx_t_7;
2636 __Pyx_RefNannySetupContext("c_set_array", 0);
2637 __Pyx_INCREF(__pyx_v_size);
2638
2639 /* "src/vbo.pyx":116
2640 * cdef c_set_array( self, data, size ):
2641 * """Set our array pointer with incref/decref support"""
2642 * if self.data is not None: # <<<<<<<<<<<<<<
2643 * Py_XDECREF( self.data )
2644 * Py_XINCREF( data )
2645 */
2646 __pyx_t_1 = (__pyx_v_self->data != Py_None);
2647 __pyx_t_2 = (__pyx_t_1 != 0);
2648 if (__pyx_t_2) {
2649
2650 /* "src/vbo.pyx":117
2651 * """Set our array pointer with incref/decref support"""
2652 * if self.data is not None:
2653 * Py_XDECREF( self.data ) # <<<<<<<<<<<<<<
2654 * Py_XINCREF( data )
2655 * self.data = data
2656 */
2657 __pyx_t_3 = __pyx_v_self->data;
2658 __Pyx_INCREF(__pyx_t_3);
2659 Py_XDECREF(__pyx_t_3);
2660 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2661
2662 /* "src/vbo.pyx":116
2663 * cdef c_set_array( self, data, size ):
2664 * """Set our array pointer with incref/decref support"""
2665 * if self.data is not None: # <<<<<<<<<<<<<<
2666 * Py_XDECREF( self.data )
2667 * Py_XINCREF( data )
2668 */
2669 }
2670
2671 /* "src/vbo.pyx":118
2672 * if self.data is not None:
2673 * Py_XDECREF( self.data )
2674 * Py_XINCREF( data ) # <<<<<<<<<<<<<<
2675 * self.data = data
2676 * if size is None and self.data is not None:
2677 */
2678 Py_XINCREF(__pyx_v_data);
2679
2680 /* "src/vbo.pyx":119
2681 * Py_XDECREF( self.data )
2682 * Py_XINCREF( data )
2683 * self.data = data # <<<<<<<<<<<<<<
2684 * if size is None and self.data is not None:
2685 * size = self.arrayType.arrayByteCount( self.data )
2686 */
2687 __Pyx_INCREF(__pyx_v_data);
2688 __Pyx_GIVEREF(__pyx_v_data);
2689 __Pyx_GOTREF(__pyx_v_self->data);
2690 __Pyx_DECREF(__pyx_v_self->data);
2691 __pyx_v_self->data = __pyx_v_data;
2692
2693 /* "src/vbo.pyx":120
2694 * Py_XINCREF( data )
2695 * self.data = data
2696 * if size is None and self.data is not None: # <<<<<<<<<<<<<<
2697 * size = self.arrayType.arrayByteCount( self.data )
2698 * self.size = size
2699 */
2700 __pyx_t_1 = (__pyx_v_size == Py_None);
2701 __pyx_t_4 = (__pyx_t_1 != 0);
2702 if (__pyx_t_4) {
2703 } else {
2704 __pyx_t_2 = __pyx_t_4;
2705 goto __pyx_L5_bool_binop_done;
2706 }
2707 __pyx_t_4 = (__pyx_v_self->data != Py_None);
2708 __pyx_t_1 = (__pyx_t_4 != 0);
2709 __pyx_t_2 = __pyx_t_1;
2710 __pyx_L5_bool_binop_done:;
2711 if (__pyx_t_2) {
2712
2713 /* "src/vbo.pyx":121
2714 * self.data = data
2715 * if size is None and self.data is not None:
2716 * size = self.arrayType.arrayByteCount( self.data ) # <<<<<<<<<<<<<<
2717 * self.size = size
2718 * self.copied = False
2719 */
2720 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s_arrayByteCount); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 121, __pyx_L1_error)
2721 __Pyx_GOTREF(__pyx_t_5);
2722 __pyx_t_6 = NULL;
2723 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
2724 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
2725 if (likely(__pyx_t_6)) {
2726 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
2727 __Pyx_INCREF(__pyx_t_6);
2728 __Pyx_INCREF(function);
2729 __Pyx_DECREF_SET(__pyx_t_5, function);
2730 }
2731 }
2732 __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_self->data) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_self->data);
2733 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
2734 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 121, __pyx_L1_error)
2735 __Pyx_GOTREF(__pyx_t_3);
2736 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2737 __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_3);
2738 __pyx_t_3 = 0;
2739
2740 /* "src/vbo.pyx":120
2741 * Py_XINCREF( data )
2742 * self.data = data
2743 * if size is None and self.data is not None: # <<<<<<<<<<<<<<
2744 * size = self.arrayType.arrayByteCount( self.data )
2745 * self.size = size
2746 */
2747 }
2748
2749 /* "src/vbo.pyx":122
2750 * if size is None and self.data is not None:
2751 * size = self.arrayType.arrayByteCount( self.data )
2752 * self.size = size # <<<<<<<<<<<<<<
2753 * self.copied = False
2754 * def __setitem__( self, slice, array):
2755 */
2756 __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 122, __pyx_L1_error)
2757 __pyx_v_self->size = __pyx_t_7;
2758
2759 /* "src/vbo.pyx":123
2760 * size = self.arrayType.arrayByteCount( self.data )
2761 * self.size = size
2762 * self.copied = False # <<<<<<<<<<<<<<
2763 * def __setitem__( self, slice, array):
2764 * """Set slice of data on the array and vbo (if copied already)
2765 */
2766 __pyx_v_self->copied = 0;
2767
2768 /* "src/vbo.pyx":114
2769 * """Update our entire array with new data"""
2770 * return self.c_set_array( data, size )
2771 * cdef c_set_array( self, data, size ): # <<<<<<<<<<<<<<
2772 * """Set our array pointer with incref/decref support"""
2773 * if self.data is not None:
2774 */
2775
2776 /* function exit code */
2777 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2778 goto __pyx_L0;
2779 __pyx_L1_error:;
2780 __Pyx_XDECREF(__pyx_t_3);
2781 __Pyx_XDECREF(__pyx_t_5);
2782 __Pyx_XDECREF(__pyx_t_6);
2783 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.c_set_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
2784 __pyx_r = 0;
2785 __pyx_L0:;
2786 __Pyx_XDECREF(__pyx_v_size);
2787 __Pyx_XGIVEREF(__pyx_r);
2788 __Pyx_RefNannyFinishContext();
2789 return __pyx_r;
2790 }
2791
2792 /* "src/vbo.pyx":124
2793 * self.size = size
2794 * self.copied = False
2795 * def __setitem__( self, slice, array): # <<<<<<<<<<<<<<
2796 * """Set slice of data on the array and vbo (if copied already)
2797 *
2798 */
2799
2800 /* Python wrapper */
2801 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_7__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_slice, PyObject *__pyx_v_array); /*proto*/
2802 static char __pyx_doc_17OpenGL_accelerate_3vbo_3VBO_6__setitem__[] = "Set slice of data on the array and vbo (if copied already)\n\n slice -- the Python slice object determining how the data should\n be copied into the vbo/array\n array -- something array-compatible that will be used as the\n source of the data, note that the data-format will have to\n be the same as the internal data-array to work properly, if\n not, the amount of data copied will be wrong.\n\n This is a reasonably complex operation, it has to have all sorts\n of state-aware changes to correctly map the source into the low-level\n OpenGL view of the buffer (which is just bytes as far as the GL\n is concerned).\n ";
2803 #if CYTHON_COMPILING_IN_CPYTHON
2804 struct wrapperbase __pyx_wrapperbase_17OpenGL_accelerate_3vbo_3VBO_6__setitem__;
2805 #endif
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_7__setitem__(PyObject * __pyx_v_self,PyObject * __pyx_v_slice,PyObject * __pyx_v_array)2806 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_7__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_slice, PyObject *__pyx_v_array) {
2807 int __pyx_r;
2808 __Pyx_RefNannyDeclarations
2809 __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
2810 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6__setitem__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self), ((PyObject *)__pyx_v_slice), ((PyObject *)__pyx_v_array));
2811
2812 /* function exit code */
2813 __Pyx_RefNannyFinishContext();
2814 return __pyx_r;
2815 }
2816
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6__setitem__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self,PyObject * __pyx_v_slice,PyObject * __pyx_v_array)2817 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6__setitem__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_slice, PyObject *__pyx_v_array) {
2818 PyObject *__pyx_v_data = NULL;
2819 PyObject *__pyx_v_start = NULL;
2820 PyObject *__pyx_v_stop = NULL;
2821 PyObject *__pyx_v_size = NULL;
2822 int __pyx_r;
2823 __Pyx_RefNannyDeclarations
2824 int __pyx_t_1;
2825 PyObject *__pyx_t_2 = NULL;
2826 int __pyx_t_3;
2827 PyObject *__pyx_t_4 = NULL;
2828 int __pyx_t_5;
2829 PyObject *__pyx_t_6 = NULL;
2830 Py_ssize_t __pyx_t_7;
2831 long __pyx_t_8;
2832 PyObject *__pyx_t_9 = NULL;
2833 int __pyx_t_10;
2834 __Pyx_RefNannySetupContext("__setitem__", 0);
2835
2836 /* "src/vbo.pyx":139
2837 * is concerned).
2838 * """
2839 * if slice.step and not slice.step == 1: # <<<<<<<<<<<<<<
2840 * raise NotImplemented( """Don't know how to map stepped arrays yet""" )
2841 * # TODO: handle e.g. mapping character data into an integer data-set
2842 */
2843 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_slice, __pyx_n_s_step); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error)
2844 __Pyx_GOTREF(__pyx_t_2);
2845 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 139, __pyx_L1_error)
2846 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2847 if (__pyx_t_3) {
2848 } else {
2849 __pyx_t_1 = __pyx_t_3;
2850 goto __pyx_L4_bool_binop_done;
2851 }
2852 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_slice, __pyx_n_s_step); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error)
2853 __Pyx_GOTREF(__pyx_t_2);
2854 __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error)
2855 __Pyx_GOTREF(__pyx_t_4);
2856 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2857 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 139, __pyx_L1_error)
2858 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2859 __pyx_t_5 = ((!__pyx_t_3) != 0);
2860 __pyx_t_1 = __pyx_t_5;
2861 __pyx_L4_bool_binop_done:;
2862 if (unlikely(__pyx_t_1)) {
2863
2864 /* "src/vbo.pyx":140
2865 * """
2866 * if slice.step and not slice.step == 1:
2867 * raise NotImplemented( """Don't know how to map stepped arrays yet""" ) # <<<<<<<<<<<<<<
2868 * # TODO: handle e.g. mapping character data into an integer data-set
2869 * data = self.arrayType.asArray( array )
2870 */
2871 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_NotImplemented, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 140, __pyx_L1_error)
2872 __Pyx_GOTREF(__pyx_t_4);
2873 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
2874 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2875 __PYX_ERR(0, 140, __pyx_L1_error)
2876
2877 /* "src/vbo.pyx":139
2878 * is concerned).
2879 * """
2880 * if slice.step and not slice.step == 1: # <<<<<<<<<<<<<<
2881 * raise NotImplemented( """Don't know how to map stepped arrays yet""" )
2882 * # TODO: handle e.g. mapping character data into an integer data-set
2883 */
2884 }
2885
2886 /* "src/vbo.pyx":142
2887 * raise NotImplemented( """Don't know how to map stepped arrays yet""" )
2888 * # TODO: handle e.g. mapping character data into an integer data-set
2889 * data = self.arrayType.asArray( array ) # <<<<<<<<<<<<<<
2890 * start = (slice.start or 0)
2891 * stop = (slice.stop or len(self.data))
2892 */
2893 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s_asArray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error)
2894 __Pyx_GOTREF(__pyx_t_2);
2895 __pyx_t_6 = NULL;
2896 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
2897 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
2898 if (likely(__pyx_t_6)) {
2899 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
2900 __Pyx_INCREF(__pyx_t_6);
2901 __Pyx_INCREF(function);
2902 __Pyx_DECREF_SET(__pyx_t_2, function);
2903 }
2904 }
2905 __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_v_array) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_array);
2906 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
2907 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L1_error)
2908 __Pyx_GOTREF(__pyx_t_4);
2909 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2910 __pyx_v_data = __pyx_t_4;
2911 __pyx_t_4 = 0;
2912
2913 /* "src/vbo.pyx":143
2914 * # TODO: handle e.g. mapping character data into an integer data-set
2915 * data = self.arrayType.asArray( array )
2916 * start = (slice.start or 0) # <<<<<<<<<<<<<<
2917 * stop = (slice.stop or len(self.data))
2918 * if start < 0:
2919 */
2920 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_slice, __pyx_n_s_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 143, __pyx_L1_error)
2921 __Pyx_GOTREF(__pyx_t_2);
2922 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 143, __pyx_L1_error)
2923 if (!__pyx_t_1) {
2924 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2925 } else {
2926 __Pyx_INCREF(__pyx_t_2);
2927 __pyx_t_4 = __pyx_t_2;
2928 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2929 goto __pyx_L6_bool_binop_done;
2930 }
2931 __pyx_t_2 = __Pyx_PyInt_From_long(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 143, __pyx_L1_error)
2932 __Pyx_GOTREF(__pyx_t_2);
2933 __pyx_t_4 = __pyx_t_2;
2934 __pyx_t_2 = 0;
2935 __pyx_L6_bool_binop_done:;
2936 __pyx_v_start = __pyx_t_4;
2937 __pyx_t_4 = 0;
2938
2939 /* "src/vbo.pyx":144
2940 * data = self.arrayType.asArray( array )
2941 * start = (slice.start or 0)
2942 * stop = (slice.stop or len(self.data)) # <<<<<<<<<<<<<<
2943 * if start < 0:
2944 * start += len(self.data)
2945 */
2946 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_slice, __pyx_n_s_stop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
2947 __Pyx_GOTREF(__pyx_t_2);
2948 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 144, __pyx_L1_error)
2949 if (!__pyx_t_1) {
2950 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2951 } else {
2952 __Pyx_INCREF(__pyx_t_2);
2953 __pyx_t_4 = __pyx_t_2;
2954 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2955 goto __pyx_L8_bool_binop_done;
2956 }
2957 __pyx_t_2 = __pyx_v_self->data;
2958 __Pyx_INCREF(__pyx_t_2);
2959 __pyx_t_7 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 144, __pyx_L1_error)
2960 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2961 __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
2962 __Pyx_GOTREF(__pyx_t_2);
2963 __pyx_t_4 = __pyx_t_2;
2964 __pyx_t_2 = 0;
2965 __pyx_L8_bool_binop_done:;
2966 __pyx_v_stop = __pyx_t_4;
2967 __pyx_t_4 = 0;
2968
2969 /* "src/vbo.pyx":145
2970 * start = (slice.start or 0)
2971 * stop = (slice.stop or len(self.data))
2972 * if start < 0: # <<<<<<<<<<<<<<
2973 * start += len(self.data)
2974 * start = max((start,0))
2975 */
2976 __pyx_t_4 = PyObject_RichCompare(__pyx_v_start, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 145, __pyx_L1_error)
2977 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 145, __pyx_L1_error)
2978 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2979 if (__pyx_t_1) {
2980
2981 /* "src/vbo.pyx":146
2982 * stop = (slice.stop or len(self.data))
2983 * if start < 0:
2984 * start += len(self.data) # <<<<<<<<<<<<<<
2985 * start = max((start,0))
2986 * if stop < 0:
2987 */
2988 __pyx_t_4 = __pyx_v_self->data;
2989 __Pyx_INCREF(__pyx_t_4);
2990 __pyx_t_7 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 146, __pyx_L1_error)
2991 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2992 __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error)
2993 __Pyx_GOTREF(__pyx_t_4);
2994 __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_start, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error)
2995 __Pyx_GOTREF(__pyx_t_2);
2996 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2997 __Pyx_DECREF_SET(__pyx_v_start, __pyx_t_2);
2998 __pyx_t_2 = 0;
2999
3000 /* "src/vbo.pyx":147
3001 * if start < 0:
3002 * start += len(self.data)
3003 * start = max((start,0)) # <<<<<<<<<<<<<<
3004 * if stop < 0:
3005 * stop += len(self.data)
3006 */
3007 __pyx_t_8 = 0;
3008 __Pyx_INCREF(__pyx_v_start);
3009 __pyx_t_2 = __pyx_v_start;
3010 __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 147, __pyx_L1_error)
3011 __Pyx_GOTREF(__pyx_t_6);
3012 __pyx_t_9 = PyObject_RichCompare(__pyx_t_6, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 147, __pyx_L1_error)
3013 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3014 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 147, __pyx_L1_error)
3015 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
3016 if (__pyx_t_1) {
3017 __pyx_t_9 = __Pyx_PyInt_From_long(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 147, __pyx_L1_error)
3018 __Pyx_GOTREF(__pyx_t_9);
3019 __pyx_t_4 = __pyx_t_9;
3020 __pyx_t_9 = 0;
3021 } else {
3022 __Pyx_INCREF(__pyx_t_2);
3023 __pyx_t_4 = __pyx_t_2;
3024 }
3025 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3026 __pyx_t_2 = __pyx_t_4;
3027 __Pyx_INCREF(__pyx_t_2);
3028 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3029 __Pyx_DECREF_SET(__pyx_v_start, __pyx_t_2);
3030 __pyx_t_2 = 0;
3031
3032 /* "src/vbo.pyx":145
3033 * start = (slice.start or 0)
3034 * stop = (slice.stop or len(self.data))
3035 * if start < 0: # <<<<<<<<<<<<<<
3036 * start += len(self.data)
3037 * start = max((start,0))
3038 */
3039 }
3040
3041 /* "src/vbo.pyx":148
3042 * start += len(self.data)
3043 * start = max((start,0))
3044 * if stop < 0: # <<<<<<<<<<<<<<
3045 * stop += len(self.data)
3046 * stop = max((stop,0))
3047 */
3048 __pyx_t_2 = PyObject_RichCompare(__pyx_v_stop, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 148, __pyx_L1_error)
3049 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 148, __pyx_L1_error)
3050 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3051 if (__pyx_t_1) {
3052
3053 /* "src/vbo.pyx":149
3054 * start = max((start,0))
3055 * if stop < 0:
3056 * stop += len(self.data) # <<<<<<<<<<<<<<
3057 * stop = max((stop,0))
3058 * self.data[ slice ] = data
3059 */
3060 __pyx_t_2 = __pyx_v_self->data;
3061 __Pyx_INCREF(__pyx_t_2);
3062 __pyx_t_7 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 149, __pyx_L1_error)
3063 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3064 __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error)
3065 __Pyx_GOTREF(__pyx_t_2);
3066 __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_stop, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 149, __pyx_L1_error)
3067 __Pyx_GOTREF(__pyx_t_4);
3068 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3069 __Pyx_DECREF_SET(__pyx_v_stop, __pyx_t_4);
3070 __pyx_t_4 = 0;
3071
3072 /* "src/vbo.pyx":150
3073 * if stop < 0:
3074 * stop += len(self.data)
3075 * stop = max((stop,0)) # <<<<<<<<<<<<<<
3076 * self.data[ slice ] = data
3077 * if self.copied and self.created:
3078 */
3079 __pyx_t_8 = 0;
3080 __Pyx_INCREF(__pyx_v_stop);
3081 __pyx_t_4 = __pyx_v_stop;
3082 __pyx_t_9 = __Pyx_PyInt_From_long(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 150, __pyx_L1_error)
3083 __Pyx_GOTREF(__pyx_t_9);
3084 __pyx_t_6 = PyObject_RichCompare(__pyx_t_9, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 150, __pyx_L1_error)
3085 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
3086 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 150, __pyx_L1_error)
3087 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3088 if (__pyx_t_1) {
3089 __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 150, __pyx_L1_error)
3090 __Pyx_GOTREF(__pyx_t_6);
3091 __pyx_t_2 = __pyx_t_6;
3092 __pyx_t_6 = 0;
3093 } else {
3094 __Pyx_INCREF(__pyx_t_4);
3095 __pyx_t_2 = __pyx_t_4;
3096 }
3097 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3098 __pyx_t_4 = __pyx_t_2;
3099 __Pyx_INCREF(__pyx_t_4);
3100 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3101 __Pyx_DECREF_SET(__pyx_v_stop, __pyx_t_4);
3102 __pyx_t_4 = 0;
3103
3104 /* "src/vbo.pyx":148
3105 * start += len(self.data)
3106 * start = max((start,0))
3107 * if stop < 0: # <<<<<<<<<<<<<<
3108 * stop += len(self.data)
3109 * stop = max((stop,0))
3110 */
3111 }
3112
3113 /* "src/vbo.pyx":151
3114 * stop += len(self.data)
3115 * stop = max((stop,0))
3116 * self.data[ slice ] = data # <<<<<<<<<<<<<<
3117 * if self.copied and self.created:
3118 * if start-stop == len(self.data):
3119 */
3120 if (unlikely(PyObject_SetItem(__pyx_v_self->data, __pyx_v_slice, __pyx_v_data) < 0)) __PYX_ERR(0, 151, __pyx_L1_error)
3121
3122 /* "src/vbo.pyx":152
3123 * stop = max((stop,0))
3124 * self.data[ slice ] = data
3125 * if self.copied and self.created: # <<<<<<<<<<<<<<
3126 * if start-stop == len(self.data):
3127 * # re-copy the whole data-set
3128 */
3129 __pyx_t_5 = (__pyx_v_self->copied != 0);
3130 if (__pyx_t_5) {
3131 } else {
3132 __pyx_t_1 = __pyx_t_5;
3133 goto __pyx_L13_bool_binop_done;
3134 }
3135 __pyx_t_5 = (__pyx_v_self->created != 0);
3136 __pyx_t_1 = __pyx_t_5;
3137 __pyx_L13_bool_binop_done:;
3138 if (__pyx_t_1) {
3139
3140 /* "src/vbo.pyx":153
3141 * self.data[ slice ] = data
3142 * if self.copied and self.created:
3143 * if start-stop == len(self.data): # <<<<<<<<<<<<<<
3144 * # re-copy the whole data-set
3145 * self.copied = False
3146 */
3147 __pyx_t_4 = PyNumber_Subtract(__pyx_v_start, __pyx_v_stop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 153, __pyx_L1_error)
3148 __Pyx_GOTREF(__pyx_t_4);
3149 __pyx_t_2 = __pyx_v_self->data;
3150 __Pyx_INCREF(__pyx_t_2);
3151 __pyx_t_7 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 153, __pyx_L1_error)
3152 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3153 __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error)
3154 __Pyx_GOTREF(__pyx_t_2);
3155 __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
3156 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3157 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3158 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 153, __pyx_L1_error)
3159 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3160 if (__pyx_t_1) {
3161
3162 /* "src/vbo.pyx":155
3163 * if start-stop == len(self.data):
3164 * # re-copy the whole data-set
3165 * self.copied = False # <<<<<<<<<<<<<<
3166 * elif len(data):
3167 * # now the fun part, we need to make the array match the
3168 */
3169 __pyx_v_self->copied = 0;
3170
3171 /* "src/vbo.pyx":153
3172 * self.data[ slice ] = data
3173 * if self.copied and self.created:
3174 * if start-stop == len(self.data): # <<<<<<<<<<<<<<
3175 * # re-copy the whole data-set
3176 * self.copied = False
3177 */
3178 goto __pyx_L15;
3179 }
3180
3181 /* "src/vbo.pyx":156
3182 * # re-copy the whole data-set
3183 * self.copied = False
3184 * elif len(data): # <<<<<<<<<<<<<<
3185 * # now the fun part, we need to make the array match the
3186 * # structure of the array we're going to copy into and make
3187 */
3188 __pyx_t_7 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 156, __pyx_L1_error)
3189 __pyx_t_1 = (__pyx_t_7 != 0);
3190 if (__pyx_t_1) {
3191
3192 /* "src/vbo.pyx":164
3193 *
3194 * # find the step size from the dimensions and base size...
3195 * size = self.arrayType.arrayByteCount( self.data[0] ) # <<<<<<<<<<<<<<
3196 * #baseSize = self.arrayType.unitSize( data )
3197 * # now create the start and distance values...
3198 */
3199 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s_arrayByteCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error)
3200 __Pyx_GOTREF(__pyx_t_2);
3201 __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_self->data, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 164, __pyx_L1_error)
3202 __Pyx_GOTREF(__pyx_t_4);
3203 __pyx_t_9 = NULL;
3204 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
3205 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
3206 if (likely(__pyx_t_9)) {
3207 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
3208 __Pyx_INCREF(__pyx_t_9);
3209 __Pyx_INCREF(function);
3210 __Pyx_DECREF_SET(__pyx_t_2, function);
3211 }
3212 }
3213 __pyx_t_6 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_9, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
3214 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3215 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3216 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 164, __pyx_L1_error)
3217 __Pyx_GOTREF(__pyx_t_6);
3218 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3219 __pyx_v_size = __pyx_t_6;
3220 __pyx_t_6 = 0;
3221
3222 /* "src/vbo.pyx":167
3223 * #baseSize = self.arrayType.unitSize( data )
3224 * # now create the start and distance values...
3225 * start *= size # <<<<<<<<<<<<<<
3226 * stop *= size
3227 * # wait until the last moment (bind) to copy the data...
3228 */
3229 __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_start, __pyx_v_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 167, __pyx_L1_error)
3230 __Pyx_GOTREF(__pyx_t_6);
3231 __Pyx_DECREF_SET(__pyx_v_start, __pyx_t_6);
3232 __pyx_t_6 = 0;
3233
3234 /* "src/vbo.pyx":168
3235 * # now create the start and distance values...
3236 * start *= size
3237 * stop *= size # <<<<<<<<<<<<<<
3238 * # wait until the last moment (bind) to copy the data...
3239 * self._copy_segments.append(
3240 */
3241 __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_stop, __pyx_v_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 168, __pyx_L1_error)
3242 __Pyx_GOTREF(__pyx_t_6);
3243 __Pyx_DECREF_SET(__pyx_v_stop, __pyx_t_6);
3244 __pyx_t_6 = 0;
3245
3246 /* "src/vbo.pyx":170
3247 * stop *= size
3248 * # wait until the last moment (bind) to copy the data...
3249 * self._copy_segments.append( # <<<<<<<<<<<<<<
3250 * (start,(stop-start), data)
3251 * )
3252 */
3253 if (unlikely(__pyx_v_self->_copy_segments == Py_None)) {
3254 PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
3255 __PYX_ERR(0, 170, __pyx_L1_error)
3256 }
3257
3258 /* "src/vbo.pyx":171
3259 * # wait until the last moment (bind) to copy the data...
3260 * self._copy_segments.append(
3261 * (start,(stop-start), data) # <<<<<<<<<<<<<<
3262 * )
3263 * def __len__( self ):
3264 */
3265 __pyx_t_6 = PyNumber_Subtract(__pyx_v_stop, __pyx_v_start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 171, __pyx_L1_error)
3266 __Pyx_GOTREF(__pyx_t_6);
3267 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error)
3268 __Pyx_GOTREF(__pyx_t_2);
3269 __Pyx_INCREF(__pyx_v_start);
3270 __Pyx_GIVEREF(__pyx_v_start);
3271 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_start);
3272 __Pyx_GIVEREF(__pyx_t_6);
3273 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_6);
3274 __Pyx_INCREF(__pyx_v_data);
3275 __Pyx_GIVEREF(__pyx_v_data);
3276 PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_data);
3277 __pyx_t_6 = 0;
3278
3279 /* "src/vbo.pyx":170
3280 * stop *= size
3281 * # wait until the last moment (bind) to copy the data...
3282 * self._copy_segments.append( # <<<<<<<<<<<<<<
3283 * (start,(stop-start), data)
3284 * )
3285 */
3286 __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_self->_copy_segments, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 170, __pyx_L1_error)
3287 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3288
3289 /* "src/vbo.pyx":156
3290 * # re-copy the whole data-set
3291 * self.copied = False
3292 * elif len(data): # <<<<<<<<<<<<<<
3293 * # now the fun part, we need to make the array match the
3294 * # structure of the array we're going to copy into and make
3295 */
3296 }
3297 __pyx_L15:;
3298
3299 /* "src/vbo.pyx":152
3300 * stop = max((stop,0))
3301 * self.data[ slice ] = data
3302 * if self.copied and self.created: # <<<<<<<<<<<<<<
3303 * if start-stop == len(self.data):
3304 * # re-copy the whole data-set
3305 */
3306 }
3307
3308 /* "src/vbo.pyx":124
3309 * self.size = size
3310 * self.copied = False
3311 * def __setitem__( self, slice, array): # <<<<<<<<<<<<<<
3312 * """Set slice of data on the array and vbo (if copied already)
3313 *
3314 */
3315
3316 /* function exit code */
3317 __pyx_r = 0;
3318 goto __pyx_L0;
3319 __pyx_L1_error:;
3320 __Pyx_XDECREF(__pyx_t_2);
3321 __Pyx_XDECREF(__pyx_t_4);
3322 __Pyx_XDECREF(__pyx_t_6);
3323 __Pyx_XDECREF(__pyx_t_9);
3324 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3325 __pyx_r = -1;
3326 __pyx_L0:;
3327 __Pyx_XDECREF(__pyx_v_data);
3328 __Pyx_XDECREF(__pyx_v_start);
3329 __Pyx_XDECREF(__pyx_v_stop);
3330 __Pyx_XDECREF(__pyx_v_size);
3331 __Pyx_RefNannyFinishContext();
3332 return __pyx_r;
3333 }
3334
3335 /* "src/vbo.pyx":173
3336 * (start,(stop-start), data)
3337 * )
3338 * def __len__( self ): # <<<<<<<<<<<<<<
3339 * return len( self.data )
3340 * def __getattr__( self, key ):
3341 */
3342
3343 /* Python wrapper */
3344 static Py_ssize_t __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_9__len__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_9__len__(PyObject * __pyx_v_self)3345 static Py_ssize_t __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_9__len__(PyObject *__pyx_v_self) {
3346 Py_ssize_t __pyx_r;
3347 __Pyx_RefNannyDeclarations
3348 __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
3349 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_8__len__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
3350
3351 /* function exit code */
3352 __Pyx_RefNannyFinishContext();
3353 return __pyx_r;
3354 }
3355
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_8__len__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)3356 static Py_ssize_t __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_8__len__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
3357 Py_ssize_t __pyx_r;
3358 __Pyx_RefNannyDeclarations
3359 PyObject *__pyx_t_1 = NULL;
3360 Py_ssize_t __pyx_t_2;
3361 __Pyx_RefNannySetupContext("__len__", 0);
3362
3363 /* "src/vbo.pyx":174
3364 * )
3365 * def __len__( self ):
3366 * return len( self.data ) # <<<<<<<<<<<<<<
3367 * def __getattr__( self, key ):
3368 * if key not in ('data','usage','target','buffer', 'copied','_I_','implementation','_copy_segments' ):
3369 */
3370 __pyx_t_1 = __pyx_v_self->data;
3371 __Pyx_INCREF(__pyx_t_1);
3372 __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 174, __pyx_L1_error)
3373 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3374 __pyx_r = __pyx_t_2;
3375 goto __pyx_L0;
3376
3377 /* "src/vbo.pyx":173
3378 * (start,(stop-start), data)
3379 * )
3380 * def __len__( self ): # <<<<<<<<<<<<<<
3381 * return len( self.data )
3382 * def __getattr__( self, key ):
3383 */
3384
3385 /* function exit code */
3386 __pyx_L1_error:;
3387 __Pyx_XDECREF(__pyx_t_1);
3388 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3389 __pyx_r = -1;
3390 __pyx_L0:;
3391 __Pyx_RefNannyFinishContext();
3392 return __pyx_r;
3393 }
3394
3395 /* "src/vbo.pyx":175
3396 * def __len__( self ):
3397 * return len( self.data )
3398 * def __getattr__( self, key ): # <<<<<<<<<<<<<<
3399 * if key not in ('data','usage','target','buffer', 'copied','_I_','implementation','_copy_segments' ):
3400 * return getattr( self.data, key )
3401 */
3402
3403 /* Python wrapper */
3404 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_11__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_11__getattr__(PyObject * __pyx_v_self,PyObject * __pyx_v_key)3405 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_11__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
3406 PyObject *__pyx_r = 0;
3407 __Pyx_RefNannyDeclarations
3408 __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
3409 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_10__getattr__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self), ((PyObject *)__pyx_v_key));
3410
3411 /* function exit code */
3412 __Pyx_RefNannyFinishContext();
3413 return __pyx_r;
3414 }
3415
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_10__getattr__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self,PyObject * __pyx_v_key)3416 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_10__getattr__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_key) {
3417 PyObject *__pyx_r = NULL;
3418 __Pyx_RefNannyDeclarations
3419 PyObject *__pyx_t_1 = NULL;
3420 int __pyx_t_2;
3421 int __pyx_t_3;
3422 PyObject *__pyx_t_4 = NULL;
3423 __Pyx_RefNannySetupContext("__getattr__", 0);
3424
3425 /* "src/vbo.pyx":176
3426 * return len( self.data )
3427 * def __getattr__( self, key ):
3428 * if key not in ('data','usage','target','buffer', 'copied','_I_','implementation','_copy_segments' ): # <<<<<<<<<<<<<<
3429 * return getattr( self.data, key )
3430 * else:
3431 */
3432 __Pyx_INCREF(__pyx_v_key);
3433 __pyx_t_1 = __pyx_v_key;
3434 __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_data, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 176, __pyx_L1_error)
3435 if (__pyx_t_3) {
3436 } else {
3437 __pyx_t_2 = __pyx_t_3;
3438 goto __pyx_L4_bool_binop_done;
3439 }
3440 __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_usage, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 176, __pyx_L1_error)
3441 if (__pyx_t_3) {
3442 } else {
3443 __pyx_t_2 = __pyx_t_3;
3444 goto __pyx_L4_bool_binop_done;
3445 }
3446 __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_target, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 176, __pyx_L1_error)
3447 if (__pyx_t_3) {
3448 } else {
3449 __pyx_t_2 = __pyx_t_3;
3450 goto __pyx_L4_bool_binop_done;
3451 }
3452 __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_buffer, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 176, __pyx_L1_error)
3453 if (__pyx_t_3) {
3454 } else {
3455 __pyx_t_2 = __pyx_t_3;
3456 goto __pyx_L4_bool_binop_done;
3457 }
3458 __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_copied, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 176, __pyx_L1_error)
3459 if (__pyx_t_3) {
3460 } else {
3461 __pyx_t_2 = __pyx_t_3;
3462 goto __pyx_L4_bool_binop_done;
3463 }
3464 __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_I, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 176, __pyx_L1_error)
3465 if (__pyx_t_3) {
3466 } else {
3467 __pyx_t_2 = __pyx_t_3;
3468 goto __pyx_L4_bool_binop_done;
3469 }
3470 __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_implementation, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 176, __pyx_L1_error)
3471 if (__pyx_t_3) {
3472 } else {
3473 __pyx_t_2 = __pyx_t_3;
3474 goto __pyx_L4_bool_binop_done;
3475 }
3476 __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_copy_segments, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 176, __pyx_L1_error)
3477 __pyx_t_2 = __pyx_t_3;
3478 __pyx_L4_bool_binop_done:;
3479 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3480 __pyx_t_3 = (__pyx_t_2 != 0);
3481 if (likely(__pyx_t_3)) {
3482
3483 /* "src/vbo.pyx":177
3484 * def __getattr__( self, key ):
3485 * if key not in ('data','usage','target','buffer', 'copied','_I_','implementation','_copy_segments' ):
3486 * return getattr( self.data, key ) # <<<<<<<<<<<<<<
3487 * else:
3488 * raise AttributeError( key )
3489 */
3490 __Pyx_XDECREF(__pyx_r);
3491 __pyx_t_1 = __pyx_v_self->data;
3492 __Pyx_INCREF(__pyx_t_1);
3493 __pyx_t_4 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 177, __pyx_L1_error)
3494 __Pyx_GOTREF(__pyx_t_4);
3495 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3496 __pyx_r = __pyx_t_4;
3497 __pyx_t_4 = 0;
3498 goto __pyx_L0;
3499
3500 /* "src/vbo.pyx":176
3501 * return len( self.data )
3502 * def __getattr__( self, key ):
3503 * if key not in ('data','usage','target','buffer', 'copied','_I_','implementation','_copy_segments' ): # <<<<<<<<<<<<<<
3504 * return getattr( self.data, key )
3505 * else:
3506 */
3507 }
3508
3509 /* "src/vbo.pyx":179
3510 * return getattr( self.data, key )
3511 * else:
3512 * raise AttributeError( key ) # <<<<<<<<<<<<<<
3513 * def __int__( self ):
3514 * """Get our VBO id"""
3515 */
3516 /*else*/ {
3517 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_AttributeError, __pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 179, __pyx_L1_error)
3518 __Pyx_GOTREF(__pyx_t_4);
3519 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
3520 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3521 __PYX_ERR(0, 179, __pyx_L1_error)
3522 }
3523
3524 /* "src/vbo.pyx":175
3525 * def __len__( self ):
3526 * return len( self.data )
3527 * def __getattr__( self, key ): # <<<<<<<<<<<<<<
3528 * if key not in ('data','usage','target','buffer', 'copied','_I_','implementation','_copy_segments' ):
3529 * return getattr( self.data, key )
3530 */
3531
3532 /* function exit code */
3533 __pyx_L1_error:;
3534 __Pyx_XDECREF(__pyx_t_1);
3535 __Pyx_XDECREF(__pyx_t_4);
3536 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3537 __pyx_r = NULL;
3538 __pyx_L0:;
3539 __Pyx_XGIVEREF(__pyx_r);
3540 __Pyx_RefNannyFinishContext();
3541 return __pyx_r;
3542 }
3543
3544 /* "src/vbo.pyx":180
3545 * else:
3546 * raise AttributeError( key )
3547 * def __int__( self ): # <<<<<<<<<<<<<<
3548 * """Get our VBO id"""
3549 * if not self.buffer:
3550 */
3551
3552 /* Python wrapper */
3553 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_13__int__(PyObject *__pyx_v_self); /*proto*/
3554 static char __pyx_doc_17OpenGL_accelerate_3vbo_3VBO_12__int__[] = "Get our VBO id";
3555 #if CYTHON_COMPILING_IN_CPYTHON
3556 struct wrapperbase __pyx_wrapperbase_17OpenGL_accelerate_3vbo_3VBO_12__int__;
3557 #endif
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_13__int__(PyObject * __pyx_v_self)3558 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_13__int__(PyObject *__pyx_v_self) {
3559 PyObject *__pyx_r = 0;
3560 __Pyx_RefNannyDeclarations
3561 __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
3562 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_12__int__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
3563
3564 /* function exit code */
3565 __Pyx_RefNannyFinishContext();
3566 return __pyx_r;
3567 }
3568
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_12__int__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)3569 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_12__int__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
3570 PyObject *__pyx_r = NULL;
3571 __Pyx_RefNannyDeclarations
3572 int __pyx_t_1;
3573 PyObject *__pyx_t_2 = NULL;
3574 PyObject *__pyx_t_3 = NULL;
3575 PyObject *__pyx_t_4 = NULL;
3576 __Pyx_RefNannySetupContext("__int__", 0);
3577
3578 /* "src/vbo.pyx":182
3579 * def __int__( self ):
3580 * """Get our VBO id"""
3581 * if not self.buffer: # <<<<<<<<<<<<<<
3582 * self.create_buffers()
3583 * return self.buffer
3584 */
3585 __pyx_t_1 = ((!(__pyx_v_self->buffer != 0)) != 0);
3586 if (__pyx_t_1) {
3587
3588 /* "src/vbo.pyx":183
3589 * """Get our VBO id"""
3590 * if not self.buffer:
3591 * self.create_buffers() # <<<<<<<<<<<<<<
3592 * return self.buffer
3593 * def create_buffers( self ):
3594 */
3595 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_buffers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error)
3596 __Pyx_GOTREF(__pyx_t_3);
3597 __pyx_t_4 = NULL;
3598 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
3599 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
3600 if (likely(__pyx_t_4)) {
3601 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
3602 __Pyx_INCREF(__pyx_t_4);
3603 __Pyx_INCREF(function);
3604 __Pyx_DECREF_SET(__pyx_t_3, function);
3605 }
3606 }
3607 __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
3608 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3609 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error)
3610 __Pyx_GOTREF(__pyx_t_2);
3611 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3612 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3613
3614 /* "src/vbo.pyx":182
3615 * def __int__( self ):
3616 * """Get our VBO id"""
3617 * if not self.buffer: # <<<<<<<<<<<<<<
3618 * self.create_buffers()
3619 * return self.buffer
3620 */
3621 }
3622
3623 /* "src/vbo.pyx":184
3624 * if not self.buffer:
3625 * self.create_buffers()
3626 * return self.buffer # <<<<<<<<<<<<<<
3627 * def create_buffers( self ):
3628 * """Create the internal buffer(s)"""
3629 */
3630 __Pyx_XDECREF(__pyx_r);
3631 __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->buffer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L1_error)
3632 __Pyx_GOTREF(__pyx_t_2);
3633 __pyx_r = __pyx_t_2;
3634 __pyx_t_2 = 0;
3635 goto __pyx_L0;
3636
3637 /* "src/vbo.pyx":180
3638 * else:
3639 * raise AttributeError( key )
3640 * def __int__( self ): # <<<<<<<<<<<<<<
3641 * """Get our VBO id"""
3642 * if not self.buffer:
3643 */
3644
3645 /* function exit code */
3646 __pyx_L1_error:;
3647 __Pyx_XDECREF(__pyx_t_2);
3648 __Pyx_XDECREF(__pyx_t_3);
3649 __Pyx_XDECREF(__pyx_t_4);
3650 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3651 __pyx_r = NULL;
3652 __pyx_L0:;
3653 __Pyx_XGIVEREF(__pyx_r);
3654 __Pyx_RefNannyFinishContext();
3655 return __pyx_r;
3656 }
3657
3658 /* "src/vbo.pyx":185
3659 * self.create_buffers()
3660 * return self.buffer
3661 * def create_buffers( self ): # <<<<<<<<<<<<<<
3662 * """Create the internal buffer(s)"""
3663 * assert not self.created, """Already created the buffer"""
3664 */
3665
3666 /* Python wrapper */
3667 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_15create_buffers(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
3668 static char __pyx_doc_17OpenGL_accelerate_3vbo_3VBO_14create_buffers[] = "Create the internal buffer(s)";
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_15create_buffers(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)3669 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_15create_buffers(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
3670 PyObject *__pyx_r = 0;
3671 __Pyx_RefNannyDeclarations
3672 __Pyx_RefNannySetupContext("create_buffers (wrapper)", 0);
3673 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_14create_buffers(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
3674
3675 /* function exit code */
3676 __Pyx_RefNannyFinishContext();
3677 return __pyx_r;
3678 }
3679
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_14create_buffers(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)3680 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_14create_buffers(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
3681 PyObject *__pyx_v_buffers = NULL;
3682 CYTHON_UNUSED PyObject *__pyx_v_err = NULL;
3683 PyObject *__pyx_r = NULL;
3684 __Pyx_RefNannyDeclarations
3685 PyObject *__pyx_t_1 = NULL;
3686 PyObject *__pyx_t_2 = NULL;
3687 PyObject *__pyx_t_3 = NULL;
3688 PyObject *__pyx_t_4 = NULL;
3689 PyObject *__pyx_t_5 = NULL;
3690 PyObject *__pyx_t_6 = NULL;
3691 unsigned int __pyx_t_7;
3692 int __pyx_t_8;
3693 PyObject *__pyx_t_9 = NULL;
3694 PyObject *__pyx_t_10 = NULL;
3695 PyObject *__pyx_t_11 = NULL;
3696 PyObject *__pyx_t_12 = NULL;
3697 PyObject *__pyx_t_13 = NULL;
3698 __Pyx_RefNannySetupContext("create_buffers", 0);
3699
3700 /* "src/vbo.pyx":187
3701 * def create_buffers( self ):
3702 * """Create the internal buffer(s)"""
3703 * assert not self.created, """Already created the buffer""" # <<<<<<<<<<<<<<
3704 * buffers = self.get_implementation().glGenBuffers(1)
3705 * try:
3706 */
3707 #ifndef CYTHON_WITHOUT_ASSERTIONS
3708 if (unlikely(!Py_OptimizeFlag)) {
3709 if (unlikely(!((!(__pyx_v_self->created != 0)) != 0))) {
3710 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_Already_created_the_buffer);
3711 __PYX_ERR(0, 187, __pyx_L1_error)
3712 }
3713 }
3714 #endif
3715
3716 /* "src/vbo.pyx":188
3717 * """Create the internal buffer(s)"""
3718 * assert not self.created, """Already created the buffer"""
3719 * buffers = self.get_implementation().glGenBuffers(1) # <<<<<<<<<<<<<<
3720 * try:
3721 * self.buffer = long( buffers )
3722 */
3723 __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_ERR(0, 188, __pyx_L1_error)
3724 __Pyx_GOTREF(__pyx_t_2);
3725 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_glGenBuffers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 188, __pyx_L1_error)
3726 __Pyx_GOTREF(__pyx_t_3);
3727 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3728 __pyx_t_2 = NULL;
3729 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
3730 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
3731 if (likely(__pyx_t_2)) {
3732 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
3733 __Pyx_INCREF(__pyx_t_2);
3734 __Pyx_INCREF(function);
3735 __Pyx_DECREF_SET(__pyx_t_3, function);
3736 }
3737 }
3738 __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_int_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_1);
3739 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
3740 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error)
3741 __Pyx_GOTREF(__pyx_t_1);
3742 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3743 __pyx_v_buffers = __pyx_t_1;
3744 __pyx_t_1 = 0;
3745
3746 /* "src/vbo.pyx":189
3747 * assert not self.created, """Already created the buffer"""
3748 * buffers = self.get_implementation().glGenBuffers(1)
3749 * try: # <<<<<<<<<<<<<<
3750 * self.buffer = long( buffers )
3751 * except (TypeError,ValueError), err:
3752 */
3753 {
3754 __Pyx_PyThreadState_declare
3755 __Pyx_PyThreadState_assign
3756 __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
3757 __Pyx_XGOTREF(__pyx_t_4);
3758 __Pyx_XGOTREF(__pyx_t_5);
3759 __Pyx_XGOTREF(__pyx_t_6);
3760 /*try:*/ {
3761
3762 /* "src/vbo.pyx":190
3763 * buffers = self.get_implementation().glGenBuffers(1)
3764 * try:
3765 * self.buffer = long( buffers ) # <<<<<<<<<<<<<<
3766 * except (TypeError,ValueError), err:
3767 * self.buffer = buffers[0]
3768 */
3769 __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyLong_Type)), __pyx_v_buffers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L3_error)
3770 __Pyx_GOTREF(__pyx_t_1);
3771 __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 190, __pyx_L3_error)
3772 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3773 __pyx_v_self->buffer = __pyx_t_7;
3774
3775 /* "src/vbo.pyx":189
3776 * assert not self.created, """Already created the buffer"""
3777 * buffers = self.get_implementation().glGenBuffers(1)
3778 * try: # <<<<<<<<<<<<<<
3779 * self.buffer = long( buffers )
3780 * except (TypeError,ValueError), err:
3781 */
3782 }
3783 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3784 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3785 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
3786 goto __pyx_L8_try_end;
3787 __pyx_L3_error:;
3788 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
3789 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
3790 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
3791
3792 /* "src/vbo.pyx":191
3793 * try:
3794 * self.buffer = long( buffers )
3795 * except (TypeError,ValueError), err: # <<<<<<<<<<<<<<
3796 * self.buffer = buffers[0]
3797 * self.target = self.c_resolve( self.target_spec )
3798 */
3799 __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
3800 if (__pyx_t_8) {
3801 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.create_buffers", __pyx_clineno, __pyx_lineno, __pyx_filename);
3802 if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_2) < 0) __PYX_ERR(0, 191, __pyx_L5_except_error)
3803 __Pyx_GOTREF(__pyx_t_1);
3804 __Pyx_GOTREF(__pyx_t_3);
3805 __Pyx_GOTREF(__pyx_t_2);
3806 __Pyx_INCREF(__pyx_t_3);
3807 __pyx_v_err = __pyx_t_3;
3808
3809 /* "src/vbo.pyx":192
3810 * self.buffer = long( buffers )
3811 * except (TypeError,ValueError), err:
3812 * self.buffer = buffers[0] # <<<<<<<<<<<<<<
3813 * self.target = self.c_resolve( self.target_spec )
3814 * self.usage = self.c_resolve( self.usage_spec )
3815 */
3816 __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_buffers, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 192, __pyx_L5_except_error)
3817 __Pyx_GOTREF(__pyx_t_9);
3818 __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_t_9); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 192, __pyx_L5_except_error)
3819 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
3820 __pyx_v_self->buffer = __pyx_t_7;
3821 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
3822 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
3823 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
3824 goto __pyx_L4_exception_handled;
3825 }
3826 goto __pyx_L5_except_error;
3827 __pyx_L5_except_error:;
3828
3829 /* "src/vbo.pyx":189
3830 * assert not self.created, """Already created the buffer"""
3831 * buffers = self.get_implementation().glGenBuffers(1)
3832 * try: # <<<<<<<<<<<<<<
3833 * self.buffer = long( buffers )
3834 * except (TypeError,ValueError), err:
3835 */
3836 __Pyx_XGIVEREF(__pyx_t_4);
3837 __Pyx_XGIVEREF(__pyx_t_5);
3838 __Pyx_XGIVEREF(__pyx_t_6);
3839 __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
3840 goto __pyx_L1_error;
3841 __pyx_L4_exception_handled:;
3842 __Pyx_XGIVEREF(__pyx_t_4);
3843 __Pyx_XGIVEREF(__pyx_t_5);
3844 __Pyx_XGIVEREF(__pyx_t_6);
3845 __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
3846 __pyx_L8_try_end:;
3847 }
3848
3849 /* "src/vbo.pyx":193
3850 * except (TypeError,ValueError), err:
3851 * self.buffer = buffers[0]
3852 * self.target = self.c_resolve( self.target_spec ) # <<<<<<<<<<<<<<
3853 * self.usage = self.c_resolve( self.usage_spec )
3854 * self.created = True
3855 */
3856 __pyx_t_2 = __pyx_v_self->target_spec;
3857 __Pyx_INCREF(__pyx_t_2);
3858 __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self->__pyx_vtab)->c_resolve(__pyx_v_self, __pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 193, __pyx_L1_error)
3859 __Pyx_GOTREF(__pyx_t_3);
3860 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3861 __Pyx_GIVEREF(__pyx_t_3);
3862 __Pyx_GOTREF(__pyx_v_self->target);
3863 __Pyx_DECREF(__pyx_v_self->target);
3864 __pyx_v_self->target = __pyx_t_3;
3865 __pyx_t_3 = 0;
3866
3867 /* "src/vbo.pyx":194
3868 * self.buffer = buffers[0]
3869 * self.target = self.c_resolve( self.target_spec )
3870 * self.usage = self.c_resolve( self.usage_spec ) # <<<<<<<<<<<<<<
3871 * self.created = True
3872 * self.get_implementation()._DELETERS_[ id(self) ] = weakref.ref(
3873 */
3874 __pyx_t_3 = __pyx_v_self->usage_spec;
3875 __Pyx_INCREF(__pyx_t_3);
3876 __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self->__pyx_vtab)->c_resolve(__pyx_v_self, __pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
3877 __Pyx_GOTREF(__pyx_t_2);
3878 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3879 __Pyx_GIVEREF(__pyx_t_2);
3880 __Pyx_GOTREF(__pyx_v_self->usage);
3881 __Pyx_DECREF(__pyx_v_self->usage);
3882 __pyx_v_self->usage = __pyx_t_2;
3883 __pyx_t_2 = 0;
3884
3885 /* "src/vbo.pyx":195
3886 * self.target = self.c_resolve( self.target_spec )
3887 * self.usage = self.c_resolve( self.usage_spec )
3888 * self.created = True # <<<<<<<<<<<<<<
3889 * self.get_implementation()._DELETERS_[ id(self) ] = weakref.ref(
3890 * # Cython instances can't have weakrefs, sigh...
3891 */
3892 __pyx_v_self->created = 1;
3893
3894 /* "src/vbo.pyx":196
3895 * self.usage = self.c_resolve( self.usage_spec )
3896 * self.created = True
3897 * self.get_implementation()._DELETERS_[ id(self) ] = weakref.ref( # <<<<<<<<<<<<<<
3898 * # Cython instances can't have weakrefs, sigh...
3899 * self,
3900 */
3901 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_weakref); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 196, __pyx_L1_error)
3902 __Pyx_GOTREF(__pyx_t_3);
3903 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ref); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error)
3904 __Pyx_GOTREF(__pyx_t_1);
3905 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3906
3907 /* "src/vbo.pyx":199
3908 * # Cython instances can't have weakrefs, sigh...
3909 * self,
3910 * self.get_implementation().deleter( [self.buffer], id(self) ) # <<<<<<<<<<<<<<
3911 * )
3912 * return self.buffer
3913 */
3914 __pyx_t_9 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self->__pyx_vtab)->get_implementation(__pyx_v_self); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 199, __pyx_L1_error)
3915 __Pyx_GOTREF(__pyx_t_9);
3916 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_deleter); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 199, __pyx_L1_error)
3917 __Pyx_GOTREF(__pyx_t_10);
3918 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
3919 __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->buffer); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 199, __pyx_L1_error)
3920 __Pyx_GOTREF(__pyx_t_9);
3921 __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 199, __pyx_L1_error)
3922 __Pyx_GOTREF(__pyx_t_11);
3923 __Pyx_GIVEREF(__pyx_t_9);
3924 PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_9);
3925 __pyx_t_9 = 0;
3926 __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 199, __pyx_L1_error)
3927 __Pyx_GOTREF(__pyx_t_9);
3928 __pyx_t_12 = NULL;
3929 __pyx_t_8 = 0;
3930 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
3931 __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
3932 if (likely(__pyx_t_12)) {
3933 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
3934 __Pyx_INCREF(__pyx_t_12);
3935 __Pyx_INCREF(function);
3936 __Pyx_DECREF_SET(__pyx_t_10, function);
3937 __pyx_t_8 = 1;
3938 }
3939 }
3940 #if CYTHON_FAST_PYCALL
3941 if (PyFunction_Check(__pyx_t_10)) {
3942 PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_t_11, __pyx_t_9};
3943 __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error)
3944 __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
3945 __Pyx_GOTREF(__pyx_t_3);
3946 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3947 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
3948 } else
3949 #endif
3950 #if CYTHON_FAST_PYCCALL
3951 if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
3952 PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_t_11, __pyx_t_9};
3953 __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error)
3954 __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
3955 __Pyx_GOTREF(__pyx_t_3);
3956 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3957 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
3958 } else
3959 #endif
3960 {
3961 __pyx_t_13 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 199, __pyx_L1_error)
3962 __Pyx_GOTREF(__pyx_t_13);
3963 if (__pyx_t_12) {
3964 __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL;
3965 }
3966 __Pyx_GIVEREF(__pyx_t_11);
3967 PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_8, __pyx_t_11);
3968 __Pyx_GIVEREF(__pyx_t_9);
3969 PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_8, __pyx_t_9);
3970 __pyx_t_11 = 0;
3971 __pyx_t_9 = 0;
3972 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_13, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error)
3973 __Pyx_GOTREF(__pyx_t_3);
3974 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
3975 }
3976 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3977 __pyx_t_10 = NULL;
3978 __pyx_t_8 = 0;
3979 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
3980 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
3981 if (likely(__pyx_t_10)) {
3982 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
3983 __Pyx_INCREF(__pyx_t_10);
3984 __Pyx_INCREF(function);
3985 __Pyx_DECREF_SET(__pyx_t_1, function);
3986 __pyx_t_8 = 1;
3987 }
3988 }
3989 #if CYTHON_FAST_PYCALL
3990 if (PyFunction_Check(__pyx_t_1)) {
3991 PyObject *__pyx_temp[3] = {__pyx_t_10, ((PyObject *)__pyx_v_self), __pyx_t_3};
3992 __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 196, __pyx_L1_error)
3993 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3994 __Pyx_GOTREF(__pyx_t_2);
3995 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3996 } else
3997 #endif
3998 #if CYTHON_FAST_PYCCALL
3999 if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
4000 PyObject *__pyx_temp[3] = {__pyx_t_10, ((PyObject *)__pyx_v_self), __pyx_t_3};
4001 __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 196, __pyx_L1_error)
4002 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
4003 __Pyx_GOTREF(__pyx_t_2);
4004 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4005 } else
4006 #endif
4007 {
4008 __pyx_t_13 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 196, __pyx_L1_error)
4009 __Pyx_GOTREF(__pyx_t_13);
4010 if (__pyx_t_10) {
4011 __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_10); __pyx_t_10 = NULL;
4012 }
4013 __Pyx_INCREF(((PyObject *)__pyx_v_self));
4014 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
4015 PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_8, ((PyObject *)__pyx_v_self));
4016 __Pyx_GIVEREF(__pyx_t_3);
4017 PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_8, __pyx_t_3);
4018 __pyx_t_3 = 0;
4019 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_13, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 196, __pyx_L1_error)
4020 __Pyx_GOTREF(__pyx_t_2);
4021 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
4022 }
4023 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4024
4025 /* "src/vbo.pyx":196
4026 * self.usage = self.c_resolve( self.usage_spec )
4027 * self.created = True
4028 * self.get_implementation()._DELETERS_[ id(self) ] = weakref.ref( # <<<<<<<<<<<<<<
4029 * # Cython instances can't have weakrefs, sigh...
4030 * self,
4031 */
4032 __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_ERR(0, 196, __pyx_L1_error)
4033 __Pyx_GOTREF(__pyx_t_1);
4034 __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_DELETERS); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 196, __pyx_L1_error)
4035 __Pyx_GOTREF(__pyx_t_13);
4036 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4037 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error)
4038 __Pyx_GOTREF(__pyx_t_1);
4039 if (unlikely(PyObject_SetItem(__pyx_t_13, __pyx_t_1, __pyx_t_2) < 0)) __PYX_ERR(0, 196, __pyx_L1_error)
4040 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
4041 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4042 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4043
4044 /* "src/vbo.pyx":201
4045 * self.get_implementation().deleter( [self.buffer], id(self) )
4046 * )
4047 * return self.buffer # <<<<<<<<<<<<<<
4048 * def copy_data( self ):
4049 * """Copy our data into the buffer on the GL side"""
4050 */
4051 __Pyx_XDECREF(__pyx_r);
4052 __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->buffer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
4053 __Pyx_GOTREF(__pyx_t_2);
4054 __pyx_r = __pyx_t_2;
4055 __pyx_t_2 = 0;
4056 goto __pyx_L0;
4057
4058 /* "src/vbo.pyx":185
4059 * self.create_buffers()
4060 * return self.buffer
4061 * def create_buffers( self ): # <<<<<<<<<<<<<<
4062 * """Create the internal buffer(s)"""
4063 * assert not self.created, """Already created the buffer"""
4064 */
4065
4066 /* function exit code */
4067 __pyx_L1_error:;
4068 __Pyx_XDECREF(__pyx_t_1);
4069 __Pyx_XDECREF(__pyx_t_2);
4070 __Pyx_XDECREF(__pyx_t_3);
4071 __Pyx_XDECREF(__pyx_t_9);
4072 __Pyx_XDECREF(__pyx_t_10);
4073 __Pyx_XDECREF(__pyx_t_11);
4074 __Pyx_XDECREF(__pyx_t_12);
4075 __Pyx_XDECREF(__pyx_t_13);
4076 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.create_buffers", __pyx_clineno, __pyx_lineno, __pyx_filename);
4077 __pyx_r = NULL;
4078 __pyx_L0:;
4079 __Pyx_XDECREF(__pyx_v_buffers);
4080 __Pyx_XDECREF(__pyx_v_err);
4081 __Pyx_XGIVEREF(__pyx_r);
4082 __Pyx_RefNannyFinishContext();
4083 return __pyx_r;
4084 }
4085
4086 /* "src/vbo.pyx":202
4087 * )
4088 * return self.buffer
4089 * def copy_data( self ): # <<<<<<<<<<<<<<
4090 * """Copy our data into the buffer on the GL side"""
4091 * assert self.created, """Should do create_buffers before copy_data"""
4092 */
4093
4094 /* Python wrapper */
4095 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_17copy_data(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4096 static char __pyx_doc_17OpenGL_accelerate_3vbo_3VBO_16copy_data[] = "Copy our data into the buffer on the GL side";
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_17copy_data(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)4097 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_17copy_data(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4098 PyObject *__pyx_r = 0;
4099 __Pyx_RefNannyDeclarations
4100 __Pyx_RefNannySetupContext("copy_data (wrapper)", 0);
4101 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_16copy_data(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
4102
4103 /* function exit code */
4104 __Pyx_RefNannyFinishContext();
4105 return __pyx_r;
4106 }
4107
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_16copy_data(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)4108 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_16copy_data(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
4109 PyObject *__pyx_v_start = NULL;
4110 PyObject *__pyx_v_size = NULL;
4111 PyObject *__pyx_v_data = NULL;
4112 PyObject *__pyx_v_dataptr = NULL;
4113 PyObject *__pyx_r = NULL;
4114 __Pyx_RefNannyDeclarations
4115 int __pyx_t_1;
4116 PyObject *__pyx_t_2 = NULL;
4117 PyObject *__pyx_t_3 = NULL;
4118 PyObject *__pyx_t_4 = NULL;
4119 PyObject *__pyx_t_5 = NULL;
4120 PyObject *__pyx_t_6 = NULL;
4121 PyObject *(*__pyx_t_7)(PyObject *);
4122 int __pyx_t_8;
4123 __Pyx_RefNannySetupContext("copy_data", 0);
4124
4125 /* "src/vbo.pyx":204
4126 * def copy_data( self ):
4127 * """Copy our data into the buffer on the GL side"""
4128 * assert self.created, """Should do create_buffers before copy_data""" # <<<<<<<<<<<<<<
4129 * if self.copied:
4130 * if self._copy_segments:
4131 */
4132 #ifndef CYTHON_WITHOUT_ASSERTIONS
4133 if (unlikely(!Py_OptimizeFlag)) {
4134 if (unlikely(!(__pyx_v_self->created != 0))) {
4135 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_Should_do_create_buffers_before);
4136 __PYX_ERR(0, 204, __pyx_L1_error)
4137 }
4138 }
4139 #endif
4140
4141 /* "src/vbo.pyx":205
4142 * """Copy our data into the buffer on the GL side"""
4143 * assert self.created, """Should do create_buffers before copy_data"""
4144 * if self.copied: # <<<<<<<<<<<<<<
4145 * if self._copy_segments:
4146 * while self._copy_segments:
4147 */
4148 __pyx_t_1 = (__pyx_v_self->copied != 0);
4149 if (__pyx_t_1) {
4150
4151 /* "src/vbo.pyx":206
4152 * assert self.created, """Should do create_buffers before copy_data"""
4153 * if self.copied:
4154 * if self._copy_segments: # <<<<<<<<<<<<<<
4155 * while self._copy_segments:
4156 * start,size,data = self._copy_segments.pop(0)
4157 */
4158 __pyx_t_1 = (__pyx_v_self->_copy_segments != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_copy_segments) != 0);
4159 if (__pyx_t_1) {
4160
4161 /* "src/vbo.pyx":207
4162 * if self.copied:
4163 * if self._copy_segments:
4164 * while self._copy_segments: # <<<<<<<<<<<<<<
4165 * start,size,data = self._copy_segments.pop(0)
4166 * dataptr = self.arrayType.voidDataPointer( data )
4167 */
4168 while (1) {
4169 __pyx_t_1 = (__pyx_v_self->_copy_segments != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_copy_segments) != 0);
4170 if (!__pyx_t_1) break;
4171
4172 /* "src/vbo.pyx":208
4173 * if self._copy_segments:
4174 * while self._copy_segments:
4175 * start,size,data = self._copy_segments.pop(0) # <<<<<<<<<<<<<<
4176 * dataptr = self.arrayType.voidDataPointer( data )
4177 * self.get_implementation().glBufferSubData(self.target, start, size, dataptr)
4178 */
4179 if (unlikely(__pyx_v_self->_copy_segments == Py_None)) {
4180 PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop");
4181 __PYX_ERR(0, 208, __pyx_L1_error)
4182 }
4183 __pyx_t_2 = __Pyx_PyList_PopIndex(__pyx_v_self->_copy_segments, __pyx_int_0, 0, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error)
4184 __Pyx_GOTREF(__pyx_t_2);
4185 if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
4186 PyObject* sequence = __pyx_t_2;
4187 Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
4188 if (unlikely(size != 3)) {
4189 if (size > 3) __Pyx_RaiseTooManyValuesError(3);
4190 else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
4191 __PYX_ERR(0, 208, __pyx_L1_error)
4192 }
4193 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4194 if (likely(PyTuple_CheckExact(sequence))) {
4195 __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
4196 __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
4197 __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2);
4198 } else {
4199 __pyx_t_3 = PyList_GET_ITEM(sequence, 0);
4200 __pyx_t_4 = PyList_GET_ITEM(sequence, 1);
4201 __pyx_t_5 = PyList_GET_ITEM(sequence, 2);
4202 }
4203 __Pyx_INCREF(__pyx_t_3);
4204 __Pyx_INCREF(__pyx_t_4);
4205 __Pyx_INCREF(__pyx_t_5);
4206 #else
4207 __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 208, __pyx_L1_error)
4208 __Pyx_GOTREF(__pyx_t_3);
4209 __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 208, __pyx_L1_error)
4210 __Pyx_GOTREF(__pyx_t_4);
4211 __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 208, __pyx_L1_error)
4212 __Pyx_GOTREF(__pyx_t_5);
4213 #endif
4214 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4215 } else {
4216 Py_ssize_t index = -1;
4217 __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 208, __pyx_L1_error)
4218 __Pyx_GOTREF(__pyx_t_6);
4219 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4220 __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
4221 index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L7_unpacking_failed;
4222 __Pyx_GOTREF(__pyx_t_3);
4223 index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L7_unpacking_failed;
4224 __Pyx_GOTREF(__pyx_t_4);
4225 index = 2; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L7_unpacking_failed;
4226 __Pyx_GOTREF(__pyx_t_5);
4227 if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < 0) __PYX_ERR(0, 208, __pyx_L1_error)
4228 __pyx_t_7 = NULL;
4229 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4230 goto __pyx_L8_unpacking_done;
4231 __pyx_L7_unpacking_failed:;
4232 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4233 __pyx_t_7 = NULL;
4234 if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
4235 __PYX_ERR(0, 208, __pyx_L1_error)
4236 __pyx_L8_unpacking_done:;
4237 }
4238 __Pyx_XDECREF_SET(__pyx_v_start, __pyx_t_3);
4239 __pyx_t_3 = 0;
4240 __Pyx_XDECREF_SET(__pyx_v_size, __pyx_t_4);
4241 __pyx_t_4 = 0;
4242 __Pyx_XDECREF_SET(__pyx_v_data, __pyx_t_5);
4243 __pyx_t_5 = 0;
4244
4245 /* "src/vbo.pyx":209
4246 * while self._copy_segments:
4247 * start,size,data = self._copy_segments.pop(0)
4248 * dataptr = self.arrayType.voidDataPointer( data ) # <<<<<<<<<<<<<<
4249 * self.get_implementation().glBufferSubData(self.target, start, size, dataptr)
4250 * else:
4251 */
4252 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s_voidDataPointer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 209, __pyx_L1_error)
4253 __Pyx_GOTREF(__pyx_t_5);
4254 __pyx_t_4 = NULL;
4255 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
4256 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
4257 if (likely(__pyx_t_4)) {
4258 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
4259 __Pyx_INCREF(__pyx_t_4);
4260 __Pyx_INCREF(function);
4261 __Pyx_DECREF_SET(__pyx_t_5, function);
4262 }
4263 }
4264 __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_data);
4265 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4266 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 209, __pyx_L1_error)
4267 __Pyx_GOTREF(__pyx_t_2);
4268 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4269 __Pyx_XDECREF_SET(__pyx_v_dataptr, __pyx_t_2);
4270 __pyx_t_2 = 0;
4271
4272 /* "src/vbo.pyx":210
4273 * start,size,data = self._copy_segments.pop(0)
4274 * dataptr = self.arrayType.voidDataPointer( data )
4275 * self.get_implementation().glBufferSubData(self.target, start, size, dataptr) # <<<<<<<<<<<<<<
4276 * else:
4277 * self.get_implementation().glBufferData(
4278 */
4279 __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_ERR(0, 210, __pyx_L1_error)
4280 __Pyx_GOTREF(__pyx_t_5);
4281 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_glBufferSubData); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 210, __pyx_L1_error)
4282 __Pyx_GOTREF(__pyx_t_4);
4283 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4284 __pyx_t_5 = NULL;
4285 __pyx_t_8 = 0;
4286 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
4287 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
4288 if (likely(__pyx_t_5)) {
4289 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
4290 __Pyx_INCREF(__pyx_t_5);
4291 __Pyx_INCREF(function);
4292 __Pyx_DECREF_SET(__pyx_t_4, function);
4293 __pyx_t_8 = 1;
4294 }
4295 }
4296 #if CYTHON_FAST_PYCALL
4297 if (PyFunction_Check(__pyx_t_4)) {
4298 PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_v_self->target, __pyx_v_start, __pyx_v_size, __pyx_v_dataptr};
4299 __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 210, __pyx_L1_error)
4300 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
4301 __Pyx_GOTREF(__pyx_t_2);
4302 } else
4303 #endif
4304 #if CYTHON_FAST_PYCCALL
4305 if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
4306 PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_v_self->target, __pyx_v_start, __pyx_v_size, __pyx_v_dataptr};
4307 __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 210, __pyx_L1_error)
4308 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
4309 __Pyx_GOTREF(__pyx_t_2);
4310 } else
4311 #endif
4312 {
4313 __pyx_t_3 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 210, __pyx_L1_error)
4314 __Pyx_GOTREF(__pyx_t_3);
4315 if (__pyx_t_5) {
4316 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
4317 }
4318 __Pyx_INCREF(__pyx_v_self->target);
4319 __Pyx_GIVEREF(__pyx_v_self->target);
4320 PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_8, __pyx_v_self->target);
4321 __Pyx_INCREF(__pyx_v_start);
4322 __Pyx_GIVEREF(__pyx_v_start);
4323 PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_8, __pyx_v_start);
4324 __Pyx_INCREF(__pyx_v_size);
4325 __Pyx_GIVEREF(__pyx_v_size);
4326 PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_8, __pyx_v_size);
4327 __Pyx_INCREF(__pyx_v_dataptr);
4328 __Pyx_GIVEREF(__pyx_v_dataptr);
4329 PyTuple_SET_ITEM(__pyx_t_3, 3+__pyx_t_8, __pyx_v_dataptr);
4330 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 210, __pyx_L1_error)
4331 __Pyx_GOTREF(__pyx_t_2);
4332 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4333 }
4334 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4335 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4336 }
4337
4338 /* "src/vbo.pyx":206
4339 * assert self.created, """Should do create_buffers before copy_data"""
4340 * if self.copied:
4341 * if self._copy_segments: # <<<<<<<<<<<<<<
4342 * while self._copy_segments:
4343 * start,size,data = self._copy_segments.pop(0)
4344 */
4345 }
4346
4347 /* "src/vbo.pyx":205
4348 * """Copy our data into the buffer on the GL side"""
4349 * assert self.created, """Should do create_buffers before copy_data"""
4350 * if self.copied: # <<<<<<<<<<<<<<
4351 * if self._copy_segments:
4352 * while self._copy_segments:
4353 */
4354 goto __pyx_L3;
4355 }
4356
4357 /* "src/vbo.pyx":212
4358 * self.get_implementation().glBufferSubData(self.target, start, size, dataptr)
4359 * else:
4360 * self.get_implementation().glBufferData( # <<<<<<<<<<<<<<
4361 * self.target,
4362 * self.size,
4363 */
4364 /*else*/ {
4365 __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_ERR(0, 212, __pyx_L1_error)
4366 __Pyx_GOTREF(__pyx_t_4);
4367 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_glBufferData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 212, __pyx_L1_error)
4368 __Pyx_GOTREF(__pyx_t_3);
4369 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4370
4371 /* "src/vbo.pyx":214
4372 * self.get_implementation().glBufferData(
4373 * self.target,
4374 * self.size, # <<<<<<<<<<<<<<
4375 * self.data,
4376 * self.usage,
4377 */
4378 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 214, __pyx_L1_error)
4379 __Pyx_GOTREF(__pyx_t_4);
4380
4381 /* "src/vbo.pyx":216
4382 * self.size,
4383 * self.data,
4384 * self.usage, # <<<<<<<<<<<<<<
4385 * )
4386 * self.copied = True
4387 */
4388 __pyx_t_5 = NULL;
4389 __pyx_t_8 = 0;
4390 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
4391 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
4392 if (likely(__pyx_t_5)) {
4393 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4394 __Pyx_INCREF(__pyx_t_5);
4395 __Pyx_INCREF(function);
4396 __Pyx_DECREF_SET(__pyx_t_3, function);
4397 __pyx_t_8 = 1;
4398 }
4399 }
4400 #if CYTHON_FAST_PYCALL
4401 if (PyFunction_Check(__pyx_t_3)) {
4402 PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_v_self->target, __pyx_t_4, __pyx_v_self->data, __pyx_v_self->usage};
4403 __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __pyx_L1_error)
4404 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
4405 __Pyx_GOTREF(__pyx_t_2);
4406 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4407 } else
4408 #endif
4409 #if CYTHON_FAST_PYCCALL
4410 if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
4411 PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_v_self->target, __pyx_t_4, __pyx_v_self->data, __pyx_v_self->usage};
4412 __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __pyx_L1_error)
4413 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
4414 __Pyx_GOTREF(__pyx_t_2);
4415 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4416 } else
4417 #endif
4418 {
4419 __pyx_t_6 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 212, __pyx_L1_error)
4420 __Pyx_GOTREF(__pyx_t_6);
4421 if (__pyx_t_5) {
4422 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
4423 }
4424 __Pyx_INCREF(__pyx_v_self->target);
4425 __Pyx_GIVEREF(__pyx_v_self->target);
4426 PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_v_self->target);
4427 __Pyx_GIVEREF(__pyx_t_4);
4428 PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_t_4);
4429 __Pyx_INCREF(__pyx_v_self->data);
4430 __Pyx_GIVEREF(__pyx_v_self->data);
4431 PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_8, __pyx_v_self->data);
4432 __Pyx_INCREF(__pyx_v_self->usage);
4433 __Pyx_GIVEREF(__pyx_v_self->usage);
4434 PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_8, __pyx_v_self->usage);
4435 __pyx_t_4 = 0;
4436 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __pyx_L1_error)
4437 __Pyx_GOTREF(__pyx_t_2);
4438 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4439 }
4440 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4441 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4442
4443 /* "src/vbo.pyx":218
4444 * self.usage,
4445 * )
4446 * self.copied = True # <<<<<<<<<<<<<<
4447 * def delete( self ):
4448 * """Delete this buffer explicitly"""
4449 */
4450 __pyx_v_self->copied = 1;
4451 }
4452 __pyx_L3:;
4453
4454 /* "src/vbo.pyx":202
4455 * )
4456 * return self.buffer
4457 * def copy_data( self ): # <<<<<<<<<<<<<<
4458 * """Copy our data into the buffer on the GL side"""
4459 * assert self.created, """Should do create_buffers before copy_data"""
4460 */
4461
4462 /* function exit code */
4463 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4464 goto __pyx_L0;
4465 __pyx_L1_error:;
4466 __Pyx_XDECREF(__pyx_t_2);
4467 __Pyx_XDECREF(__pyx_t_3);
4468 __Pyx_XDECREF(__pyx_t_4);
4469 __Pyx_XDECREF(__pyx_t_5);
4470 __Pyx_XDECREF(__pyx_t_6);
4471 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.copy_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
4472 __pyx_r = NULL;
4473 __pyx_L0:;
4474 __Pyx_XDECREF(__pyx_v_start);
4475 __Pyx_XDECREF(__pyx_v_size);
4476 __Pyx_XDECREF(__pyx_v_data);
4477 __Pyx_XDECREF(__pyx_v_dataptr);
4478 __Pyx_XGIVEREF(__pyx_r);
4479 __Pyx_RefNannyFinishContext();
4480 return __pyx_r;
4481 }
4482
4483 /* "src/vbo.pyx":219
4484 * )
4485 * self.copied = True
4486 * def delete( self ): # <<<<<<<<<<<<<<
4487 * """Delete this buffer explicitly"""
4488 * if self.created:
4489 */
4490
4491 /* Python wrapper */
4492 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_19delete(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4493 static char __pyx_doc_17OpenGL_accelerate_3vbo_3VBO_18delete[] = "Delete this buffer explicitly";
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_19delete(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)4494 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_19delete(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4495 PyObject *__pyx_r = 0;
4496 __Pyx_RefNannyDeclarations
4497 __Pyx_RefNannySetupContext("delete (wrapper)", 0);
4498 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_18delete(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
4499
4500 /* function exit code */
4501 __Pyx_RefNannyFinishContext();
4502 return __pyx_r;
4503 }
4504
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_18delete(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)4505 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_18delete(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
4506 CYTHON_UNUSED PyObject *__pyx_v_err = NULL;
4507 PyObject *__pyx_r = NULL;
4508 __Pyx_RefNannyDeclarations
4509 int __pyx_t_1;
4510 PyObject *__pyx_t_2 = NULL;
4511 PyObject *__pyx_t_3 = NULL;
4512 PyObject *__pyx_t_4 = NULL;
4513 PyObject *__pyx_t_5 = NULL;
4514 PyObject *__pyx_t_6 = NULL;
4515 PyObject *__pyx_t_7 = NULL;
4516 PyObject *__pyx_t_8 = NULL;
4517 PyObject *__pyx_t_9 = NULL;
4518 PyObject *__pyx_t_10 = NULL;
4519 int __pyx_t_11;
4520 __Pyx_RefNannySetupContext("delete", 0);
4521
4522 /* "src/vbo.pyx":221
4523 * def delete( self ):
4524 * """Delete this buffer explicitly"""
4525 * if self.created: # <<<<<<<<<<<<<<
4526 * self.created = False
4527 * try:
4528 */
4529 __pyx_t_1 = (__pyx_v_self->created != 0);
4530 if (__pyx_t_1) {
4531
4532 /* "src/vbo.pyx":222
4533 * """Delete this buffer explicitly"""
4534 * if self.created:
4535 * self.created = False # <<<<<<<<<<<<<<
4536 * try:
4537 * self.get_implementation().glDeleteBuffers(1, ctypes.c_uint32( self.buffer))
4538 */
4539 __pyx_v_self->created = 0;
4540
4541 /* "src/vbo.pyx":223
4542 * if self.created:
4543 * self.created = False
4544 * try: # <<<<<<<<<<<<<<
4545 * self.get_implementation().glDeleteBuffers(1, ctypes.c_uint32( self.buffer))
4546 * except (AttributeError, error.NullFunctionError), err:
4547 */
4548 {
4549 __Pyx_PyThreadState_declare
4550 __Pyx_PyThreadState_assign
4551 __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
4552 __Pyx_XGOTREF(__pyx_t_2);
4553 __Pyx_XGOTREF(__pyx_t_3);
4554 __Pyx_XGOTREF(__pyx_t_4);
4555 /*try:*/ {
4556
4557 /* "src/vbo.pyx":224
4558 * self.created = False
4559 * try:
4560 * self.get_implementation().glDeleteBuffers(1, ctypes.c_uint32( self.buffer)) # <<<<<<<<<<<<<<
4561 * except (AttributeError, error.NullFunctionError), err:
4562 * pass
4563 */
4564 __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_ERR(0, 224, __pyx_L4_error)
4565 __Pyx_GOTREF(__pyx_t_6);
4566 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_glDeleteBuffers); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 224, __pyx_L4_error)
4567 __Pyx_GOTREF(__pyx_t_7);
4568 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4569 __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 224, __pyx_L4_error)
4570 __Pyx_GOTREF(__pyx_t_8);
4571 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_c_uint32); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 224, __pyx_L4_error)
4572 __Pyx_GOTREF(__pyx_t_9);
4573 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
4574 __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->buffer); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 224, __pyx_L4_error)
4575 __Pyx_GOTREF(__pyx_t_8);
4576 __pyx_t_10 = NULL;
4577 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
4578 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
4579 if (likely(__pyx_t_10)) {
4580 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
4581 __Pyx_INCREF(__pyx_t_10);
4582 __Pyx_INCREF(function);
4583 __Pyx_DECREF_SET(__pyx_t_9, function);
4584 }
4585 }
4586 __pyx_t_6 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8);
4587 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
4588 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
4589 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 224, __pyx_L4_error)
4590 __Pyx_GOTREF(__pyx_t_6);
4591 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
4592 __pyx_t_9 = NULL;
4593 __pyx_t_11 = 0;
4594 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
4595 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
4596 if (likely(__pyx_t_9)) {
4597 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
4598 __Pyx_INCREF(__pyx_t_9);
4599 __Pyx_INCREF(function);
4600 __Pyx_DECREF_SET(__pyx_t_7, function);
4601 __pyx_t_11 = 1;
4602 }
4603 }
4604 #if CYTHON_FAST_PYCALL
4605 if (PyFunction_Check(__pyx_t_7)) {
4606 PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_int_1, __pyx_t_6};
4607 __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 224, __pyx_L4_error)
4608 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
4609 __Pyx_GOTREF(__pyx_t_5);
4610 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4611 } else
4612 #endif
4613 #if CYTHON_FAST_PYCCALL
4614 if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
4615 PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_int_1, __pyx_t_6};
4616 __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 224, __pyx_L4_error)
4617 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
4618 __Pyx_GOTREF(__pyx_t_5);
4619 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4620 } else
4621 #endif
4622 {
4623 __pyx_t_8 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 224, __pyx_L4_error)
4624 __Pyx_GOTREF(__pyx_t_8);
4625 if (__pyx_t_9) {
4626 __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __pyx_t_9 = NULL;
4627 }
4628 __Pyx_INCREF(__pyx_int_1);
4629 __Pyx_GIVEREF(__pyx_int_1);
4630 PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_11, __pyx_int_1);
4631 __Pyx_GIVEREF(__pyx_t_6);
4632 PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_11, __pyx_t_6);
4633 __pyx_t_6 = 0;
4634 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 224, __pyx_L4_error)
4635 __Pyx_GOTREF(__pyx_t_5);
4636 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
4637 }
4638 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4639 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4640
4641 /* "src/vbo.pyx":223
4642 * if self.created:
4643 * self.created = False
4644 * try: # <<<<<<<<<<<<<<
4645 * self.get_implementation().glDeleteBuffers(1, ctypes.c_uint32( self.buffer))
4646 * except (AttributeError, error.NullFunctionError), err:
4647 */
4648 }
4649 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4650 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4651 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4652 goto __pyx_L9_try_end;
4653 __pyx_L4_error:;
4654 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
4655 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
4656 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
4657 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
4658 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
4659 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
4660
4661 /* "src/vbo.pyx":225
4662 * try:
4663 * self.get_implementation().glDeleteBuffers(1, ctypes.c_uint32( self.buffer))
4664 * except (AttributeError, error.NullFunctionError), err: # <<<<<<<<<<<<<<
4665 * pass
4666 * try:
4667 */
4668 __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_7, &__pyx_t_8);
4669 __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 225, __pyx_L6_except_error)
4670 __Pyx_GOTREF(__pyx_t_6);
4671 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_NullFunctionError); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 225, __pyx_L6_except_error)
4672 __Pyx_GOTREF(__pyx_t_9);
4673 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4674 __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_5, __pyx_builtin_AttributeError) || __Pyx_PyErr_GivenExceptionMatches(__pyx_t_5, __pyx_t_9);
4675 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
4676 __Pyx_ErrRestore(__pyx_t_5, __pyx_t_7, __pyx_t_8);
4677 __pyx_t_5 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0;
4678 if (__pyx_t_11) {
4679 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.delete", __pyx_clineno, __pyx_lineno, __pyx_filename);
4680 if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_5) < 0) __PYX_ERR(0, 225, __pyx_L6_except_error)
4681 __Pyx_GOTREF(__pyx_t_8);
4682 __Pyx_GOTREF(__pyx_t_7);
4683 __Pyx_GOTREF(__pyx_t_5);
4684 __Pyx_INCREF(__pyx_t_7);
4685 __pyx_v_err = __pyx_t_7;
4686 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
4687 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
4688 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
4689 goto __pyx_L5_exception_handled;
4690 }
4691 goto __pyx_L6_except_error;
4692 __pyx_L6_except_error:;
4693
4694 /* "src/vbo.pyx":223
4695 * if self.created:
4696 * self.created = False
4697 * try: # <<<<<<<<<<<<<<
4698 * self.get_implementation().glDeleteBuffers(1, ctypes.c_uint32( self.buffer))
4699 * except (AttributeError, error.NullFunctionError), err:
4700 */
4701 __Pyx_XGIVEREF(__pyx_t_2);
4702 __Pyx_XGIVEREF(__pyx_t_3);
4703 __Pyx_XGIVEREF(__pyx_t_4);
4704 __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
4705 goto __pyx_L1_error;
4706 __pyx_L5_exception_handled:;
4707 __Pyx_XGIVEREF(__pyx_t_2);
4708 __Pyx_XGIVEREF(__pyx_t_3);
4709 __Pyx_XGIVEREF(__pyx_t_4);
4710 __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
4711 __pyx_L9_try_end:;
4712 }
4713
4714 /* "src/vbo.pyx":227
4715 * except (AttributeError, error.NullFunctionError), err:
4716 * pass
4717 * try: # <<<<<<<<<<<<<<
4718 * self.get_implementation()._DELETERS_.pop( id(self))
4719 * except KeyError, err:
4720 */
4721 {
4722 __Pyx_PyThreadState_declare
4723 __Pyx_PyThreadState_assign
4724 __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2);
4725 __Pyx_XGOTREF(__pyx_t_4);
4726 __Pyx_XGOTREF(__pyx_t_3);
4727 __Pyx_XGOTREF(__pyx_t_2);
4728 /*try:*/ {
4729
4730 /* "src/vbo.pyx":228
4731 * pass
4732 * try:
4733 * self.get_implementation()._DELETERS_.pop( id(self)) # <<<<<<<<<<<<<<
4734 * except KeyError, err:
4735 * pass
4736 */
4737 __pyx_t_7 = ((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self->__pyx_vtab)->get_implementation(__pyx_v_self); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 228, __pyx_L12_error)
4738 __Pyx_GOTREF(__pyx_t_7);
4739 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_DELETERS); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 228, __pyx_L12_error)
4740 __Pyx_GOTREF(__pyx_t_8);
4741 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4742 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_pop); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 228, __pyx_L12_error)
4743 __Pyx_GOTREF(__pyx_t_7);
4744 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
4745 __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 228, __pyx_L12_error)
4746 __Pyx_GOTREF(__pyx_t_8);
4747 __pyx_t_9 = NULL;
4748 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
4749 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
4750 if (likely(__pyx_t_9)) {
4751 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
4752 __Pyx_INCREF(__pyx_t_9);
4753 __Pyx_INCREF(function);
4754 __Pyx_DECREF_SET(__pyx_t_7, function);
4755 }
4756 }
4757 __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
4758 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
4759 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
4760 if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 228, __pyx_L12_error)
4761 __Pyx_GOTREF(__pyx_t_5);
4762 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4763 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4764
4765 /* "src/vbo.pyx":227
4766 * except (AttributeError, error.NullFunctionError), err:
4767 * pass
4768 * try: # <<<<<<<<<<<<<<
4769 * self.get_implementation()._DELETERS_.pop( id(self))
4770 * except KeyError, err:
4771 */
4772 }
4773 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4774 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4775 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4776 goto __pyx_L17_try_end;
4777 __pyx_L12_error:;
4778 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
4779 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
4780 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
4781 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
4782 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
4783 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
4784
4785 /* "src/vbo.pyx":229
4786 * try:
4787 * self.get_implementation()._DELETERS_.pop( id(self))
4788 * except KeyError, err: # <<<<<<<<<<<<<<
4789 * pass
4790 * def bind( self ):
4791 */
4792 __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
4793 if (__pyx_t_11) {
4794 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.delete", __pyx_clineno, __pyx_lineno, __pyx_filename);
4795 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 229, __pyx_L14_except_error)
4796 __Pyx_GOTREF(__pyx_t_5);
4797 __Pyx_GOTREF(__pyx_t_7);
4798 __Pyx_GOTREF(__pyx_t_8);
4799 __Pyx_INCREF(__pyx_t_7);
4800 __Pyx_XDECREF_SET(__pyx_v_err, __pyx_t_7);
4801 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
4802 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
4803 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
4804 goto __pyx_L13_exception_handled;
4805 }
4806 goto __pyx_L14_except_error;
4807 __pyx_L14_except_error:;
4808
4809 /* "src/vbo.pyx":227
4810 * except (AttributeError, error.NullFunctionError), err:
4811 * pass
4812 * try: # <<<<<<<<<<<<<<
4813 * self.get_implementation()._DELETERS_.pop( id(self))
4814 * except KeyError, err:
4815 */
4816 __Pyx_XGIVEREF(__pyx_t_4);
4817 __Pyx_XGIVEREF(__pyx_t_3);
4818 __Pyx_XGIVEREF(__pyx_t_2);
4819 __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_3, __pyx_t_2);
4820 goto __pyx_L1_error;
4821 __pyx_L13_exception_handled:;
4822 __Pyx_XGIVEREF(__pyx_t_4);
4823 __Pyx_XGIVEREF(__pyx_t_3);
4824 __Pyx_XGIVEREF(__pyx_t_2);
4825 __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_3, __pyx_t_2);
4826 __pyx_L17_try_end:;
4827 }
4828
4829 /* "src/vbo.pyx":221
4830 * def delete( self ):
4831 * """Delete this buffer explicitly"""
4832 * if self.created: # <<<<<<<<<<<<<<
4833 * self.created = False
4834 * try:
4835 */
4836 }
4837
4838 /* "src/vbo.pyx":219
4839 * )
4840 * self.copied = True
4841 * def delete( self ): # <<<<<<<<<<<<<<
4842 * """Delete this buffer explicitly"""
4843 * if self.created:
4844 */
4845
4846 /* function exit code */
4847 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4848 goto __pyx_L0;
4849 __pyx_L1_error:;
4850 __Pyx_XDECREF(__pyx_t_5);
4851 __Pyx_XDECREF(__pyx_t_6);
4852 __Pyx_XDECREF(__pyx_t_7);
4853 __Pyx_XDECREF(__pyx_t_8);
4854 __Pyx_XDECREF(__pyx_t_9);
4855 __Pyx_XDECREF(__pyx_t_10);
4856 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.delete", __pyx_clineno, __pyx_lineno, __pyx_filename);
4857 __pyx_r = NULL;
4858 __pyx_L0:;
4859 __Pyx_XDECREF(__pyx_v_err);
4860 __Pyx_XGIVEREF(__pyx_r);
4861 __Pyx_RefNannyFinishContext();
4862 return __pyx_r;
4863 }
4864
4865 /* "src/vbo.pyx":231
4866 * except KeyError, err:
4867 * pass
4868 * def bind( self ): # <<<<<<<<<<<<<<
4869 * """Bind this buffer for use in vertex calls"""
4870 * if not self.created:
4871 */
4872
4873 /* Python wrapper */
4874 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_21bind(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4875 static char __pyx_doc_17OpenGL_accelerate_3vbo_3VBO_20bind[] = "Bind this buffer for use in vertex calls";
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_21bind(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)4876 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_21bind(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4877 PyObject *__pyx_r = 0;
4878 __Pyx_RefNannyDeclarations
4879 __Pyx_RefNannySetupContext("bind (wrapper)", 0);
4880 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_20bind(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
4881
4882 /* function exit code */
4883 __Pyx_RefNannyFinishContext();
4884 return __pyx_r;
4885 }
4886
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_20bind(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)4887 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_20bind(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
4888 CYTHON_UNUSED PyObject *__pyx_v_buffer = NULL;
4889 PyObject *__pyx_r = NULL;
4890 __Pyx_RefNannyDeclarations
4891 int __pyx_t_1;
4892 PyObject *__pyx_t_2 = NULL;
4893 PyObject *__pyx_t_3 = NULL;
4894 PyObject *__pyx_t_4 = NULL;
4895 PyObject *__pyx_t_5 = NULL;
4896 int __pyx_t_6;
4897 PyObject *__pyx_t_7 = NULL;
4898 __Pyx_RefNannySetupContext("bind", 0);
4899
4900 /* "src/vbo.pyx":233
4901 * def bind( self ):
4902 * """Bind this buffer for use in vertex calls"""
4903 * if not self.created: # <<<<<<<<<<<<<<
4904 * buffer = self.create_buffers()
4905 * self.get_implementation().glBindBuffer( self.target, self.buffer)
4906 */
4907 __pyx_t_1 = ((!(__pyx_v_self->created != 0)) != 0);
4908 if (__pyx_t_1) {
4909
4910 /* "src/vbo.pyx":234
4911 * """Bind this buffer for use in vertex calls"""
4912 * if not self.created:
4913 * buffer = self.create_buffers() # <<<<<<<<<<<<<<
4914 * self.get_implementation().glBindBuffer( self.target, self.buffer)
4915 * self.copy_data()
4916 */
4917 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_buffers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error)
4918 __Pyx_GOTREF(__pyx_t_3);
4919 __pyx_t_4 = NULL;
4920 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
4921 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4922 if (likely(__pyx_t_4)) {
4923 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4924 __Pyx_INCREF(__pyx_t_4);
4925 __Pyx_INCREF(function);
4926 __Pyx_DECREF_SET(__pyx_t_3, function);
4927 }
4928 }
4929 __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
4930 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4931 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4932 __Pyx_GOTREF(__pyx_t_2);
4933 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4934 __pyx_v_buffer = __pyx_t_2;
4935 __pyx_t_2 = 0;
4936
4937 /* "src/vbo.pyx":233
4938 * def bind( self ):
4939 * """Bind this buffer for use in vertex calls"""
4940 * if not self.created: # <<<<<<<<<<<<<<
4941 * buffer = self.create_buffers()
4942 * self.get_implementation().glBindBuffer( self.target, self.buffer)
4943 */
4944 }
4945
4946 /* "src/vbo.pyx":235
4947 * if not self.created:
4948 * buffer = self.create_buffers()
4949 * self.get_implementation().glBindBuffer( self.target, self.buffer) # <<<<<<<<<<<<<<
4950 * self.copy_data()
4951 * def unbind( self ):
4952 */
4953 __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_ERR(0, 235, __pyx_L1_error)
4954 __Pyx_GOTREF(__pyx_t_3);
4955 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_glBindBuffer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 235, __pyx_L1_error)
4956 __Pyx_GOTREF(__pyx_t_4);
4957 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4958 __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->buffer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 235, __pyx_L1_error)
4959 __Pyx_GOTREF(__pyx_t_3);
4960 __pyx_t_5 = NULL;
4961 __pyx_t_6 = 0;
4962 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
4963 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
4964 if (likely(__pyx_t_5)) {
4965 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
4966 __Pyx_INCREF(__pyx_t_5);
4967 __Pyx_INCREF(function);
4968 __Pyx_DECREF_SET(__pyx_t_4, function);
4969 __pyx_t_6 = 1;
4970 }
4971 }
4972 #if CYTHON_FAST_PYCALL
4973 if (PyFunction_Check(__pyx_t_4)) {
4974 PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_self->target, __pyx_t_3};
4975 __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error)
4976 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
4977 __Pyx_GOTREF(__pyx_t_2);
4978 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4979 } else
4980 #endif
4981 #if CYTHON_FAST_PYCCALL
4982 if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
4983 PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_self->target, __pyx_t_3};
4984 __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error)
4985 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
4986 __Pyx_GOTREF(__pyx_t_2);
4987 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4988 } else
4989 #endif
4990 {
4991 __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 235, __pyx_L1_error)
4992 __Pyx_GOTREF(__pyx_t_7);
4993 if (__pyx_t_5) {
4994 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
4995 }
4996 __Pyx_INCREF(__pyx_v_self->target);
4997 __Pyx_GIVEREF(__pyx_v_self->target);
4998 PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_self->target);
4999 __Pyx_GIVEREF(__pyx_t_3);
5000 PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3);
5001 __pyx_t_3 = 0;
5002 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error)
5003 __Pyx_GOTREF(__pyx_t_2);
5004 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5005 }
5006 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5007 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5008
5009 /* "src/vbo.pyx":236
5010 * buffer = self.create_buffers()
5011 * self.get_implementation().glBindBuffer( self.target, self.buffer)
5012 * self.copy_data() # <<<<<<<<<<<<<<
5013 * def unbind( self ):
5014 * """Unbind the buffer (make normal array operations active)"""
5015 */
5016 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 236, __pyx_L1_error)
5017 __Pyx_GOTREF(__pyx_t_4);
5018 __pyx_t_7 = NULL;
5019 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
5020 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
5021 if (likely(__pyx_t_7)) {
5022 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
5023 __Pyx_INCREF(__pyx_t_7);
5024 __Pyx_INCREF(function);
5025 __Pyx_DECREF_SET(__pyx_t_4, function);
5026 }
5027 }
5028 __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
5029 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
5030 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
5031 __Pyx_GOTREF(__pyx_t_2);
5032 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5033 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5034
5035 /* "src/vbo.pyx":231
5036 * except KeyError, err:
5037 * pass
5038 * def bind( self ): # <<<<<<<<<<<<<<
5039 * """Bind this buffer for use in vertex calls"""
5040 * if not self.created:
5041 */
5042
5043 /* function exit code */
5044 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5045 goto __pyx_L0;
5046 __pyx_L1_error:;
5047 __Pyx_XDECREF(__pyx_t_2);
5048 __Pyx_XDECREF(__pyx_t_3);
5049 __Pyx_XDECREF(__pyx_t_4);
5050 __Pyx_XDECREF(__pyx_t_5);
5051 __Pyx_XDECREF(__pyx_t_7);
5052 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.bind", __pyx_clineno, __pyx_lineno, __pyx_filename);
5053 __pyx_r = NULL;
5054 __pyx_L0:;
5055 __Pyx_XDECREF(__pyx_v_buffer);
5056 __Pyx_XGIVEREF(__pyx_r);
5057 __Pyx_RefNannyFinishContext();
5058 return __pyx_r;
5059 }
5060
5061 /* "src/vbo.pyx":237
5062 * self.get_implementation().glBindBuffer( self.target, self.buffer)
5063 * self.copy_data()
5064 * def unbind( self ): # <<<<<<<<<<<<<<
5065 * """Unbind the buffer (make normal array operations active)"""
5066 * self.get_implementation().glBindBuffer( self.target,0 )
5067 */
5068
5069 /* Python wrapper */
5070 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_23unbind(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5071 static char __pyx_doc_17OpenGL_accelerate_3vbo_3VBO_22unbind[] = "Unbind the buffer (make normal array operations active)";
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_23unbind(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)5072 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_23unbind(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5073 PyObject *__pyx_r = 0;
5074 __Pyx_RefNannyDeclarations
5075 __Pyx_RefNannySetupContext("unbind (wrapper)", 0);
5076 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_22unbind(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
5077
5078 /* function exit code */
5079 __Pyx_RefNannyFinishContext();
5080 return __pyx_r;
5081 }
5082
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_22unbind(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)5083 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_22unbind(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
5084 PyObject *__pyx_r = NULL;
5085 __Pyx_RefNannyDeclarations
5086 PyObject *__pyx_t_1 = NULL;
5087 PyObject *__pyx_t_2 = NULL;
5088 PyObject *__pyx_t_3 = NULL;
5089 int __pyx_t_4;
5090 PyObject *__pyx_t_5 = NULL;
5091 __Pyx_RefNannySetupContext("unbind", 0);
5092
5093 /* "src/vbo.pyx":239
5094 * def unbind( self ):
5095 * """Unbind the buffer (make normal array operations active)"""
5096 * self.get_implementation().glBindBuffer( self.target,0 ) # <<<<<<<<<<<<<<
5097 * def __add__( self, other ):
5098 * """Add an integer to this VBO (offset)"""
5099 */
5100 __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_ERR(0, 239, __pyx_L1_error)
5101 __Pyx_GOTREF(__pyx_t_2);
5102 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_glBindBuffer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 239, __pyx_L1_error)
5103 __Pyx_GOTREF(__pyx_t_3);
5104 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5105 __pyx_t_2 = NULL;
5106 __pyx_t_4 = 0;
5107 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
5108 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
5109 if (likely(__pyx_t_2)) {
5110 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
5111 __Pyx_INCREF(__pyx_t_2);
5112 __Pyx_INCREF(function);
5113 __Pyx_DECREF_SET(__pyx_t_3, function);
5114 __pyx_t_4 = 1;
5115 }
5116 }
5117 #if CYTHON_FAST_PYCALL
5118 if (PyFunction_Check(__pyx_t_3)) {
5119 PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self->target, __pyx_int_0};
5120 __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error)
5121 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5122 __Pyx_GOTREF(__pyx_t_1);
5123 } else
5124 #endif
5125 #if CYTHON_FAST_PYCCALL
5126 if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
5127 PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self->target, __pyx_int_0};
5128 __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error)
5129 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5130 __Pyx_GOTREF(__pyx_t_1);
5131 } else
5132 #endif
5133 {
5134 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 239, __pyx_L1_error)
5135 __Pyx_GOTREF(__pyx_t_5);
5136 if (__pyx_t_2) {
5137 __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
5138 }
5139 __Pyx_INCREF(__pyx_v_self->target);
5140 __Pyx_GIVEREF(__pyx_v_self->target);
5141 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_self->target);
5142 __Pyx_INCREF(__pyx_int_0);
5143 __Pyx_GIVEREF(__pyx_int_0);
5144 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_int_0);
5145 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error)
5146 __Pyx_GOTREF(__pyx_t_1);
5147 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5148 }
5149 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5150 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5151
5152 /* "src/vbo.pyx":237
5153 * self.get_implementation().glBindBuffer( self.target, self.buffer)
5154 * self.copy_data()
5155 * def unbind( self ): # <<<<<<<<<<<<<<
5156 * """Unbind the buffer (make normal array operations active)"""
5157 * self.get_implementation().glBindBuffer( self.target,0 )
5158 */
5159
5160 /* function exit code */
5161 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5162 goto __pyx_L0;
5163 __pyx_L1_error:;
5164 __Pyx_XDECREF(__pyx_t_1);
5165 __Pyx_XDECREF(__pyx_t_2);
5166 __Pyx_XDECREF(__pyx_t_3);
5167 __Pyx_XDECREF(__pyx_t_5);
5168 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.unbind", __pyx_clineno, __pyx_lineno, __pyx_filename);
5169 __pyx_r = NULL;
5170 __pyx_L0:;
5171 __Pyx_XGIVEREF(__pyx_r);
5172 __Pyx_RefNannyFinishContext();
5173 return __pyx_r;
5174 }
5175
5176 /* "src/vbo.pyx":240
5177 * """Unbind the buffer (make normal array operations active)"""
5178 * self.get_implementation().glBindBuffer( self.target,0 )
5179 * def __add__( self, other ): # <<<<<<<<<<<<<<
5180 * """Add an integer to this VBO (offset)"""
5181 * if hasattr( other, 'offset' ):
5182 */
5183
5184 /* Python wrapper */
5185 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_25__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
5186 static char __pyx_doc_17OpenGL_accelerate_3vbo_3VBO_24__add__[] = "Add an integer to this VBO (offset)";
5187 #if CYTHON_COMPILING_IN_CPYTHON
5188 struct wrapperbase __pyx_wrapperbase_17OpenGL_accelerate_3vbo_3VBO_24__add__;
5189 #endif
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_25__add__(PyObject * __pyx_v_self,PyObject * __pyx_v_other)5190 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_25__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
5191 PyObject *__pyx_r = 0;
5192 __Pyx_RefNannyDeclarations
5193 __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
5194 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_24__add__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
5195
5196 /* function exit code */
5197 __Pyx_RefNannyFinishContext();
5198 return __pyx_r;
5199 }
5200
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_24__add__(PyObject * __pyx_v_self,PyObject * __pyx_v_other)5201 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_24__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
5202 PyObject *__pyx_r = NULL;
5203 __Pyx_RefNannyDeclarations
5204 int __pyx_t_1;
5205 int __pyx_t_2;
5206 PyObject *__pyx_t_3 = NULL;
5207 int __pyx_t_4;
5208 PyObject *__pyx_t_5 = NULL;
5209 __Pyx_RefNannySetupContext("__add__", 0);
5210 __Pyx_INCREF(__pyx_v_other);
5211
5212 /* "src/vbo.pyx":242
5213 * def __add__( self, other ):
5214 * """Add an integer to this VBO (offset)"""
5215 * if hasattr( other, 'offset' ): # <<<<<<<<<<<<<<
5216 * other = other.offset
5217 * assert isinstance( other, (int,long) ), """Only know how to add integer/long offsets"""
5218 */
5219 __pyx_t_1 = __Pyx_HasAttr(__pyx_v_other, __pyx_n_s_offset); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 242, __pyx_L1_error)
5220 __pyx_t_2 = (__pyx_t_1 != 0);
5221 if (__pyx_t_2) {
5222
5223 /* "src/vbo.pyx":243
5224 * """Add an integer to this VBO (offset)"""
5225 * if hasattr( other, 'offset' ):
5226 * other = other.offset # <<<<<<<<<<<<<<
5227 * assert isinstance( other, (int,long) ), """Only know how to add integer/long offsets"""
5228 * return VBOOffset( self, other )
5229 */
5230 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error)
5231 __Pyx_GOTREF(__pyx_t_3);
5232 __Pyx_DECREF_SET(__pyx_v_other, __pyx_t_3);
5233 __pyx_t_3 = 0;
5234
5235 /* "src/vbo.pyx":242
5236 * def __add__( self, other ):
5237 * """Add an integer to this VBO (offset)"""
5238 * if hasattr( other, 'offset' ): # <<<<<<<<<<<<<<
5239 * other = other.offset
5240 * assert isinstance( other, (int,long) ), """Only know how to add integer/long offsets"""
5241 */
5242 }
5243
5244 /* "src/vbo.pyx":244
5245 * if hasattr( other, 'offset' ):
5246 * other = other.offset
5247 * assert isinstance( other, (int,long) ), """Only know how to add integer/long offsets""" # <<<<<<<<<<<<<<
5248 * return VBOOffset( self, other )
5249 * cdef int check_live( self ):
5250 */
5251 #ifndef CYTHON_WITHOUT_ASSERTIONS
5252 if (unlikely(!Py_OptimizeFlag)) {
5253 __pyx_t_1 = PyInt_Check(__pyx_v_other);
5254 __pyx_t_4 = (__pyx_t_1 != 0);
5255 if (!__pyx_t_4) {
5256 } else {
5257 __pyx_t_2 = __pyx_t_4;
5258 goto __pyx_L4_bool_binop_done;
5259 }
5260 __pyx_t_4 = PyLong_Check(__pyx_v_other);
5261 __pyx_t_1 = (__pyx_t_4 != 0);
5262 __pyx_t_2 = __pyx_t_1;
5263 __pyx_L4_bool_binop_done:;
5264 if (unlikely(!(__pyx_t_2 != 0))) {
5265 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_Only_know_how_to_add_integer_lon);
5266 __PYX_ERR(0, 244, __pyx_L1_error)
5267 }
5268 }
5269 #endif
5270
5271 /* "src/vbo.pyx":245
5272 * other = other.offset
5273 * assert isinstance( other, (int,long) ), """Only know how to add integer/long offsets"""
5274 * return VBOOffset( self, other ) # <<<<<<<<<<<<<<
5275 * cdef int check_live( self ):
5276 * if self.data is _NULL:
5277 */
5278 __Pyx_XDECREF(__pyx_r);
5279 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 245, __pyx_L1_error)
5280 __Pyx_GOTREF(__pyx_t_3);
5281 __Pyx_INCREF(__pyx_v_self);
5282 __Pyx_GIVEREF(__pyx_v_self);
5283 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self);
5284 __Pyx_INCREF(__pyx_v_other);
5285 __Pyx_GIVEREF(__pyx_v_other);
5286 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_other);
5287 __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_17OpenGL_accelerate_3vbo_VBOOffset), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 245, __pyx_L1_error)
5288 __Pyx_GOTREF(__pyx_t_5);
5289 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5290 __pyx_r = __pyx_t_5;
5291 __pyx_t_5 = 0;
5292 goto __pyx_L0;
5293
5294 /* "src/vbo.pyx":240
5295 * """Unbind the buffer (make normal array operations active)"""
5296 * self.get_implementation().glBindBuffer( self.target,0 )
5297 * def __add__( self, other ): # <<<<<<<<<<<<<<
5298 * """Add an integer to this VBO (offset)"""
5299 * if hasattr( other, 'offset' ):
5300 */
5301
5302 /* function exit code */
5303 __pyx_L1_error:;
5304 __Pyx_XDECREF(__pyx_t_3);
5305 __Pyx_XDECREF(__pyx_t_5);
5306 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5307 __pyx_r = NULL;
5308 __pyx_L0:;
5309 __Pyx_XDECREF(__pyx_v_other);
5310 __Pyx_XGIVEREF(__pyx_r);
5311 __Pyx_RefNannyFinishContext();
5312 return __pyx_r;
5313 }
5314
5315 /* "src/vbo.pyx":246
5316 * assert isinstance( other, (int,long) ), """Only know how to add integer/long offsets"""
5317 * return VBOOffset( self, other )
5318 * cdef int check_live( self ): # <<<<<<<<<<<<<<
5319 * if self.data is _NULL:
5320 * raise RuntimeError( """Attempting to use a deleted VBO""" )
5321 */
5322
__pyx_f_17OpenGL_accelerate_3vbo_3VBO_check_live(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)5323 static int __pyx_f_17OpenGL_accelerate_3vbo_3VBO_check_live(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
5324 int __pyx_r;
5325 __Pyx_RefNannyDeclarations
5326 PyObject *__pyx_t_1 = NULL;
5327 int __pyx_t_2;
5328 int __pyx_t_3;
5329 __Pyx_RefNannySetupContext("check_live", 0);
5330
5331 /* "src/vbo.pyx":247
5332 * return VBOOffset( self, other )
5333 * cdef int check_live( self ):
5334 * if self.data is _NULL: # <<<<<<<<<<<<<<
5335 * raise RuntimeError( """Attempting to use a deleted VBO""" )
5336 *
5337 */
5338 __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error)
5339 __Pyx_GOTREF(__pyx_t_1);
5340 __pyx_t_2 = (__pyx_v_self->data == __pyx_t_1);
5341 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5342 __pyx_t_3 = (__pyx_t_2 != 0);
5343 if (unlikely(__pyx_t_3)) {
5344
5345 /* "src/vbo.pyx":248
5346 * cdef int check_live( self ):
5347 * if self.data is _NULL:
5348 * raise RuntimeError( """Attempting to use a deleted VBO""" ) # <<<<<<<<<<<<<<
5349 *
5350 * __enter__ = bind
5351 */
5352 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error)
5353 __Pyx_GOTREF(__pyx_t_1);
5354 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5355 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5356 __PYX_ERR(0, 248, __pyx_L1_error)
5357
5358 /* "src/vbo.pyx":247
5359 * return VBOOffset( self, other )
5360 * cdef int check_live( self ):
5361 * if self.data is _NULL: # <<<<<<<<<<<<<<
5362 * raise RuntimeError( """Attempting to use a deleted VBO""" )
5363 *
5364 */
5365 }
5366
5367 /* "src/vbo.pyx":246
5368 * assert isinstance( other, (int,long) ), """Only know how to add integer/long offsets"""
5369 * return VBOOffset( self, other )
5370 * cdef int check_live( self ): # <<<<<<<<<<<<<<
5371 * if self.data is _NULL:
5372 * raise RuntimeError( """Attempting to use a deleted VBO""" )
5373 */
5374
5375 /* function exit code */
5376 __pyx_r = 0;
5377 goto __pyx_L0;
5378 __pyx_L1_error:;
5379 __Pyx_XDECREF(__pyx_t_1);
5380 __Pyx_WriteUnraisable("OpenGL_accelerate.vbo.VBO.check_live", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
5381 __pyx_r = 0;
5382 __pyx_L0:;
5383 __Pyx_RefNannyFinishContext();
5384 return __pyx_r;
5385 }
5386
5387 /* "src/vbo.pyx":251
5388 *
5389 * __enter__ = bind
5390 * def __exit__( self, exc_type=None, exc_val=None, exc_tb=None ): # <<<<<<<<<<<<<<
5391 * """Context manager exit"""
5392 * self.unbind()
5393 */
5394
5395 /* Python wrapper */
5396 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_27__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5397 static char __pyx_doc_17OpenGL_accelerate_3vbo_3VBO_26__exit__[] = "Context manager exit";
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_27__exit__(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)5398 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_27__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5399 CYTHON_UNUSED PyObject *__pyx_v_exc_type = 0;
5400 CYTHON_UNUSED PyObject *__pyx_v_exc_val = 0;
5401 CYTHON_UNUSED PyObject *__pyx_v_exc_tb = 0;
5402 PyObject *__pyx_r = 0;
5403 __Pyx_RefNannyDeclarations
5404 __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
5405 {
5406 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exc_type,&__pyx_n_s_exc_val,&__pyx_n_s_exc_tb,0};
5407 PyObject* values[3] = {0,0,0};
5408 values[0] = ((PyObject *)Py_None);
5409 values[1] = ((PyObject *)Py_None);
5410 values[2] = ((PyObject *)Py_None);
5411 if (unlikely(__pyx_kwds)) {
5412 Py_ssize_t kw_args;
5413 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5414 switch (pos_args) {
5415 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5416 CYTHON_FALLTHROUGH;
5417 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5418 CYTHON_FALLTHROUGH;
5419 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5420 CYTHON_FALLTHROUGH;
5421 case 0: break;
5422 default: goto __pyx_L5_argtuple_error;
5423 }
5424 kw_args = PyDict_Size(__pyx_kwds);
5425 switch (pos_args) {
5426 case 0:
5427 if (kw_args > 0) {
5428 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exc_type);
5429 if (value) { values[0] = value; kw_args--; }
5430 }
5431 CYTHON_FALLTHROUGH;
5432 case 1:
5433 if (kw_args > 0) {
5434 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exc_val);
5435 if (value) { values[1] = value; kw_args--; }
5436 }
5437 CYTHON_FALLTHROUGH;
5438 case 2:
5439 if (kw_args > 0) {
5440 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exc_tb);
5441 if (value) { values[2] = value; kw_args--; }
5442 }
5443 }
5444 if (unlikely(kw_args > 0)) {
5445 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) __PYX_ERR(0, 251, __pyx_L3_error)
5446 }
5447 } else {
5448 switch (PyTuple_GET_SIZE(__pyx_args)) {
5449 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5450 CYTHON_FALLTHROUGH;
5451 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5452 CYTHON_FALLTHROUGH;
5453 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5454 CYTHON_FALLTHROUGH;
5455 case 0: break;
5456 default: goto __pyx_L5_argtuple_error;
5457 }
5458 }
5459 __pyx_v_exc_type = values[0];
5460 __pyx_v_exc_val = values[1];
5461 __pyx_v_exc_tb = values[2];
5462 }
5463 goto __pyx_L4_argument_unpacking_done;
5464 __pyx_L5_argtuple_error:;
5465 __Pyx_RaiseArgtupleInvalid("__exit__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 251, __pyx_L3_error)
5466 __pyx_L3_error:;
5467 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5468 __Pyx_RefNannyFinishContext();
5469 return NULL;
5470 __pyx_L4_argument_unpacking_done:;
5471 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_26__exit__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self), __pyx_v_exc_type, __pyx_v_exc_val, __pyx_v_exc_tb);
5472
5473 /* function exit code */
5474 __Pyx_RefNannyFinishContext();
5475 return __pyx_r;
5476 }
5477
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_26__exit__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v_exc_type,CYTHON_UNUSED PyObject * __pyx_v_exc_val,CYTHON_UNUSED PyObject * __pyx_v_exc_tb)5478 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_26__exit__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc_type, CYTHON_UNUSED PyObject *__pyx_v_exc_val, CYTHON_UNUSED PyObject *__pyx_v_exc_tb) {
5479 PyObject *__pyx_r = NULL;
5480 __Pyx_RefNannyDeclarations
5481 PyObject *__pyx_t_1 = NULL;
5482 PyObject *__pyx_t_2 = NULL;
5483 PyObject *__pyx_t_3 = NULL;
5484 __Pyx_RefNannySetupContext("__exit__", 0);
5485
5486 /* "src/vbo.pyx":253
5487 * def __exit__( self, exc_type=None, exc_val=None, exc_tb=None ):
5488 * """Context manager exit"""
5489 * self.unbind() # <<<<<<<<<<<<<<
5490 * return False # do not supress exceptions...
5491 *
5492 */
5493 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unbind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 253, __pyx_L1_error)
5494 __Pyx_GOTREF(__pyx_t_2);
5495 __pyx_t_3 = NULL;
5496 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
5497 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
5498 if (likely(__pyx_t_3)) {
5499 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5500 __Pyx_INCREF(__pyx_t_3);
5501 __Pyx_INCREF(function);
5502 __Pyx_DECREF_SET(__pyx_t_2, function);
5503 }
5504 }
5505 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
5506 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5507 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error)
5508 __Pyx_GOTREF(__pyx_t_1);
5509 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5510 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5511
5512 /* "src/vbo.pyx":254
5513 * """Context manager exit"""
5514 * self.unbind()
5515 * return False # do not supress exceptions... # <<<<<<<<<<<<<<
5516 *
5517 *
5518 */
5519 __Pyx_XDECREF(__pyx_r);
5520 __Pyx_INCREF(Py_False);
5521 __pyx_r = Py_False;
5522 goto __pyx_L0;
5523
5524 /* "src/vbo.pyx":251
5525 *
5526 * __enter__ = bind
5527 * def __exit__( self, exc_type=None, exc_val=None, exc_tb=None ): # <<<<<<<<<<<<<<
5528 * """Context manager exit"""
5529 * self.unbind()
5530 */
5531
5532 /* function exit code */
5533 __pyx_L1_error:;
5534 __Pyx_XDECREF(__pyx_t_1);
5535 __Pyx_XDECREF(__pyx_t_2);
5536 __Pyx_XDECREF(__pyx_t_3);
5537 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5538 __pyx_r = NULL;
5539 __pyx_L0:;
5540 __Pyx_XGIVEREF(__pyx_r);
5541 __Pyx_RefNannyFinishContext();
5542 return __pyx_r;
5543 }
5544
5545 /* "src/vbo.pyx":35
5546 * """
5547 * cdef object __weakref__ # allow weak-referencing for cleanups...
5548 * cdef public int copied # <<<<<<<<<<<<<<
5549 * cdef public int created
5550 * cdef public unsigned int buffer
5551 */
5552
5553 /* Python wrapper */
5554 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6copied_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6copied_1__get__(PyObject * __pyx_v_self)5555 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6copied_1__get__(PyObject *__pyx_v_self) {
5556 PyObject *__pyx_r = 0;
5557 __Pyx_RefNannyDeclarations
5558 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
5559 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6copied___get__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
5560
5561 /* function exit code */
5562 __Pyx_RefNannyFinishContext();
5563 return __pyx_r;
5564 }
5565
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6copied___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)5566 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6copied___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
5567 PyObject *__pyx_r = NULL;
5568 __Pyx_RefNannyDeclarations
5569 PyObject *__pyx_t_1 = NULL;
5570 __Pyx_RefNannySetupContext("__get__", 0);
5571 __Pyx_XDECREF(__pyx_r);
5572 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->copied); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
5573 __Pyx_GOTREF(__pyx_t_1);
5574 __pyx_r = __pyx_t_1;
5575 __pyx_t_1 = 0;
5576 goto __pyx_L0;
5577
5578 /* function exit code */
5579 __pyx_L1_error:;
5580 __Pyx_XDECREF(__pyx_t_1);
5581 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.copied.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5582 __pyx_r = NULL;
5583 __pyx_L0:;
5584 __Pyx_XGIVEREF(__pyx_r);
5585 __Pyx_RefNannyFinishContext();
5586 return __pyx_r;
5587 }
5588
5589 /* Python wrapper */
5590 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6copied_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6copied_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)5591 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6copied_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
5592 int __pyx_r;
5593 __Pyx_RefNannyDeclarations
5594 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
5595 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6copied_2__set__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self), ((PyObject *)__pyx_v_value));
5596
5597 /* function exit code */
5598 __Pyx_RefNannyFinishContext();
5599 return __pyx_r;
5600 }
5601
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6copied_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self,PyObject * __pyx_v_value)5602 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6copied_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value) {
5603 int __pyx_r;
5604 __Pyx_RefNannyDeclarations
5605 int __pyx_t_1;
5606 __Pyx_RefNannySetupContext("__set__", 0);
5607 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 35, __pyx_L1_error)
5608 __pyx_v_self->copied = __pyx_t_1;
5609
5610 /* function exit code */
5611 __pyx_r = 0;
5612 goto __pyx_L0;
5613 __pyx_L1_error:;
5614 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.copied.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5615 __pyx_r = -1;
5616 __pyx_L0:;
5617 __Pyx_RefNannyFinishContext();
5618 return __pyx_r;
5619 }
5620
5621 /* "src/vbo.pyx":36
5622 * cdef object __weakref__ # allow weak-referencing for cleanups...
5623 * cdef public int copied
5624 * cdef public int created # <<<<<<<<<<<<<<
5625 * cdef public unsigned int buffer
5626 * cdef public object data
5627 */
5628
5629 /* Python wrapper */
5630 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_7created_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_7created_1__get__(PyObject * __pyx_v_self)5631 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_7created_1__get__(PyObject *__pyx_v_self) {
5632 PyObject *__pyx_r = 0;
5633 __Pyx_RefNannyDeclarations
5634 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
5635 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_7created___get__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
5636
5637 /* function exit code */
5638 __Pyx_RefNannyFinishContext();
5639 return __pyx_r;
5640 }
5641
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_7created___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)5642 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_7created___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
5643 PyObject *__pyx_r = NULL;
5644 __Pyx_RefNannyDeclarations
5645 PyObject *__pyx_t_1 = NULL;
5646 __Pyx_RefNannySetupContext("__get__", 0);
5647 __Pyx_XDECREF(__pyx_r);
5648 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->created); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
5649 __Pyx_GOTREF(__pyx_t_1);
5650 __pyx_r = __pyx_t_1;
5651 __pyx_t_1 = 0;
5652 goto __pyx_L0;
5653
5654 /* function exit code */
5655 __pyx_L1_error:;
5656 __Pyx_XDECREF(__pyx_t_1);
5657 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.created.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5658 __pyx_r = NULL;
5659 __pyx_L0:;
5660 __Pyx_XGIVEREF(__pyx_r);
5661 __Pyx_RefNannyFinishContext();
5662 return __pyx_r;
5663 }
5664
5665 /* Python wrapper */
5666 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_7created_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_7created_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)5667 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_7created_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
5668 int __pyx_r;
5669 __Pyx_RefNannyDeclarations
5670 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
5671 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_7created_2__set__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self), ((PyObject *)__pyx_v_value));
5672
5673 /* function exit code */
5674 __Pyx_RefNannyFinishContext();
5675 return __pyx_r;
5676 }
5677
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_7created_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self,PyObject * __pyx_v_value)5678 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_7created_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value) {
5679 int __pyx_r;
5680 __Pyx_RefNannyDeclarations
5681 int __pyx_t_1;
5682 __Pyx_RefNannySetupContext("__set__", 0);
5683 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 36, __pyx_L1_error)
5684 __pyx_v_self->created = __pyx_t_1;
5685
5686 /* function exit code */
5687 __pyx_r = 0;
5688 goto __pyx_L0;
5689 __pyx_L1_error:;
5690 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.created.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5691 __pyx_r = -1;
5692 __pyx_L0:;
5693 __Pyx_RefNannyFinishContext();
5694 return __pyx_r;
5695 }
5696
5697 /* "src/vbo.pyx":37
5698 * cdef public int copied
5699 * cdef public int created
5700 * cdef public unsigned int buffer # <<<<<<<<<<<<<<
5701 * cdef public object data
5702 * cdef public int size
5703 */
5704
5705 /* Python wrapper */
5706 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6buffer_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6buffer_1__get__(PyObject * __pyx_v_self)5707 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6buffer_1__get__(PyObject *__pyx_v_self) {
5708 PyObject *__pyx_r = 0;
5709 __Pyx_RefNannyDeclarations
5710 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
5711 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6buffer___get__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
5712
5713 /* function exit code */
5714 __Pyx_RefNannyFinishContext();
5715 return __pyx_r;
5716 }
5717
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6buffer___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)5718 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6buffer___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
5719 PyObject *__pyx_r = NULL;
5720 __Pyx_RefNannyDeclarations
5721 PyObject *__pyx_t_1 = NULL;
5722 __Pyx_RefNannySetupContext("__get__", 0);
5723 __Pyx_XDECREF(__pyx_r);
5724 __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->buffer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
5725 __Pyx_GOTREF(__pyx_t_1);
5726 __pyx_r = __pyx_t_1;
5727 __pyx_t_1 = 0;
5728 goto __pyx_L0;
5729
5730 /* function exit code */
5731 __pyx_L1_error:;
5732 __Pyx_XDECREF(__pyx_t_1);
5733 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.buffer.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5734 __pyx_r = NULL;
5735 __pyx_L0:;
5736 __Pyx_XGIVEREF(__pyx_r);
5737 __Pyx_RefNannyFinishContext();
5738 return __pyx_r;
5739 }
5740
5741 /* Python wrapper */
5742 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6buffer_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6buffer_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)5743 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6buffer_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
5744 int __pyx_r;
5745 __Pyx_RefNannyDeclarations
5746 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
5747 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6buffer_2__set__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self), ((PyObject *)__pyx_v_value));
5748
5749 /* function exit code */
5750 __Pyx_RefNannyFinishContext();
5751 return __pyx_r;
5752 }
5753
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6buffer_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self,PyObject * __pyx_v_value)5754 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6buffer_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value) {
5755 int __pyx_r;
5756 __Pyx_RefNannyDeclarations
5757 unsigned int __pyx_t_1;
5758 __Pyx_RefNannySetupContext("__set__", 0);
5759 __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 37, __pyx_L1_error)
5760 __pyx_v_self->buffer = __pyx_t_1;
5761
5762 /* function exit code */
5763 __pyx_r = 0;
5764 goto __pyx_L0;
5765 __pyx_L1_error:;
5766 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.buffer.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5767 __pyx_r = -1;
5768 __pyx_L0:;
5769 __Pyx_RefNannyFinishContext();
5770 return __pyx_r;
5771 }
5772
5773 /* "src/vbo.pyx":38
5774 * cdef public int created
5775 * cdef public unsigned int buffer
5776 * cdef public object data # <<<<<<<<<<<<<<
5777 * cdef public int size
5778 * cdef public object target
5779 */
5780
5781 /* Python wrapper */
5782 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4data_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4data_1__get__(PyObject * __pyx_v_self)5783 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4data_1__get__(PyObject *__pyx_v_self) {
5784 PyObject *__pyx_r = 0;
5785 __Pyx_RefNannyDeclarations
5786 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
5787 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_4data___get__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
5788
5789 /* function exit code */
5790 __Pyx_RefNannyFinishContext();
5791 return __pyx_r;
5792 }
5793
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_4data___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)5794 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_4data___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
5795 PyObject *__pyx_r = NULL;
5796 __Pyx_RefNannyDeclarations
5797 __Pyx_RefNannySetupContext("__get__", 0);
5798 __Pyx_XDECREF(__pyx_r);
5799 __Pyx_INCREF(__pyx_v_self->data);
5800 __pyx_r = __pyx_v_self->data;
5801 goto __pyx_L0;
5802
5803 /* function exit code */
5804 __pyx_L0:;
5805 __Pyx_XGIVEREF(__pyx_r);
5806 __Pyx_RefNannyFinishContext();
5807 return __pyx_r;
5808 }
5809
5810 /* Python wrapper */
5811 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4data_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)5812 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
5813 int __pyx_r;
5814 __Pyx_RefNannyDeclarations
5815 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
5816 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_4data_2__set__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self), ((PyObject *)__pyx_v_value));
5817
5818 /* function exit code */
5819 __Pyx_RefNannyFinishContext();
5820 return __pyx_r;
5821 }
5822
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_4data_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self,PyObject * __pyx_v_value)5823 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_4data_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value) {
5824 int __pyx_r;
5825 __Pyx_RefNannyDeclarations
5826 __Pyx_RefNannySetupContext("__set__", 0);
5827 __Pyx_INCREF(__pyx_v_value);
5828 __Pyx_GIVEREF(__pyx_v_value);
5829 __Pyx_GOTREF(__pyx_v_self->data);
5830 __Pyx_DECREF(__pyx_v_self->data);
5831 __pyx_v_self->data = __pyx_v_value;
5832
5833 /* function exit code */
5834 __pyx_r = 0;
5835 __Pyx_RefNannyFinishContext();
5836 return __pyx_r;
5837 }
5838
5839 /* Python wrapper */
5840 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4data_5__del__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4data_5__del__(PyObject * __pyx_v_self)5841 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4data_5__del__(PyObject *__pyx_v_self) {
5842 int __pyx_r;
5843 __Pyx_RefNannyDeclarations
5844 __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
5845 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_4data_4__del__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
5846
5847 /* function exit code */
5848 __Pyx_RefNannyFinishContext();
5849 return __pyx_r;
5850 }
5851
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_4data_4__del__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)5852 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_4data_4__del__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
5853 int __pyx_r;
5854 __Pyx_RefNannyDeclarations
5855 __Pyx_RefNannySetupContext("__del__", 0);
5856 __Pyx_INCREF(Py_None);
5857 __Pyx_GIVEREF(Py_None);
5858 __Pyx_GOTREF(__pyx_v_self->data);
5859 __Pyx_DECREF(__pyx_v_self->data);
5860 __pyx_v_self->data = Py_None;
5861
5862 /* function exit code */
5863 __pyx_r = 0;
5864 __Pyx_RefNannyFinishContext();
5865 return __pyx_r;
5866 }
5867
5868 /* "src/vbo.pyx":39
5869 * cdef public unsigned int buffer
5870 * cdef public object data
5871 * cdef public int size # <<<<<<<<<<<<<<
5872 * cdef public object target
5873 * cdef public object usage
5874 */
5875
5876 /* Python wrapper */
5877 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4size_1__get__(PyObject * __pyx_v_self)5878 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4size_1__get__(PyObject *__pyx_v_self) {
5879 PyObject *__pyx_r = 0;
5880 __Pyx_RefNannyDeclarations
5881 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
5882 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_4size___get__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
5883
5884 /* function exit code */
5885 __Pyx_RefNannyFinishContext();
5886 return __pyx_r;
5887 }
5888
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_4size___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)5889 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_4size___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
5890 PyObject *__pyx_r = NULL;
5891 __Pyx_RefNannyDeclarations
5892 PyObject *__pyx_t_1 = NULL;
5893 __Pyx_RefNannySetupContext("__get__", 0);
5894 __Pyx_XDECREF(__pyx_r);
5895 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error)
5896 __Pyx_GOTREF(__pyx_t_1);
5897 __pyx_r = __pyx_t_1;
5898 __pyx_t_1 = 0;
5899 goto __pyx_L0;
5900
5901 /* function exit code */
5902 __pyx_L1_error:;
5903 __Pyx_XDECREF(__pyx_t_1);
5904 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5905 __pyx_r = NULL;
5906 __pyx_L0:;
5907 __Pyx_XGIVEREF(__pyx_r);
5908 __Pyx_RefNannyFinishContext();
5909 return __pyx_r;
5910 }
5911
5912 /* Python wrapper */
5913 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4size_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4size_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)5914 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4size_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
5915 int __pyx_r;
5916 __Pyx_RefNannyDeclarations
5917 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
5918 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_4size_2__set__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self), ((PyObject *)__pyx_v_value));
5919
5920 /* function exit code */
5921 __Pyx_RefNannyFinishContext();
5922 return __pyx_r;
5923 }
5924
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_4size_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self,PyObject * __pyx_v_value)5925 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_4size_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value) {
5926 int __pyx_r;
5927 __Pyx_RefNannyDeclarations
5928 int __pyx_t_1;
5929 __Pyx_RefNannySetupContext("__set__", 0);
5930 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 39, __pyx_L1_error)
5931 __pyx_v_self->size = __pyx_t_1;
5932
5933 /* function exit code */
5934 __pyx_r = 0;
5935 goto __pyx_L0;
5936 __pyx_L1_error:;
5937 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.size.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5938 __pyx_r = -1;
5939 __pyx_L0:;
5940 __Pyx_RefNannyFinishContext();
5941 return __pyx_r;
5942 }
5943
5944 /* "src/vbo.pyx":40
5945 * cdef public object data
5946 * cdef public int size
5947 * cdef public object target # <<<<<<<<<<<<<<
5948 * cdef public object usage
5949 * cdef public int resolved
5950 */
5951
5952 /* Python wrapper */
5953 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6target_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6target_1__get__(PyObject * __pyx_v_self)5954 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6target_1__get__(PyObject *__pyx_v_self) {
5955 PyObject *__pyx_r = 0;
5956 __Pyx_RefNannyDeclarations
5957 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
5958 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6target___get__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
5959
5960 /* function exit code */
5961 __Pyx_RefNannyFinishContext();
5962 return __pyx_r;
5963 }
5964
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6target___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)5965 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6target___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
5966 PyObject *__pyx_r = NULL;
5967 __Pyx_RefNannyDeclarations
5968 __Pyx_RefNannySetupContext("__get__", 0);
5969 __Pyx_XDECREF(__pyx_r);
5970 __Pyx_INCREF(__pyx_v_self->target);
5971 __pyx_r = __pyx_v_self->target;
5972 goto __pyx_L0;
5973
5974 /* function exit code */
5975 __pyx_L0:;
5976 __Pyx_XGIVEREF(__pyx_r);
5977 __Pyx_RefNannyFinishContext();
5978 return __pyx_r;
5979 }
5980
5981 /* Python wrapper */
5982 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6target_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6target_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)5983 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6target_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
5984 int __pyx_r;
5985 __Pyx_RefNannyDeclarations
5986 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
5987 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6target_2__set__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self), ((PyObject *)__pyx_v_value));
5988
5989 /* function exit code */
5990 __Pyx_RefNannyFinishContext();
5991 return __pyx_r;
5992 }
5993
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6target_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self,PyObject * __pyx_v_value)5994 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6target_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value) {
5995 int __pyx_r;
5996 __Pyx_RefNannyDeclarations
5997 __Pyx_RefNannySetupContext("__set__", 0);
5998 __Pyx_INCREF(__pyx_v_value);
5999 __Pyx_GIVEREF(__pyx_v_value);
6000 __Pyx_GOTREF(__pyx_v_self->target);
6001 __Pyx_DECREF(__pyx_v_self->target);
6002 __pyx_v_self->target = __pyx_v_value;
6003
6004 /* function exit code */
6005 __pyx_r = 0;
6006 __Pyx_RefNannyFinishContext();
6007 return __pyx_r;
6008 }
6009
6010 /* Python wrapper */
6011 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6target_5__del__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6target_5__del__(PyObject * __pyx_v_self)6012 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6target_5__del__(PyObject *__pyx_v_self) {
6013 int __pyx_r;
6014 __Pyx_RefNannyDeclarations
6015 __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
6016 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6target_4__del__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
6017
6018 /* function exit code */
6019 __Pyx_RefNannyFinishContext();
6020 return __pyx_r;
6021 }
6022
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6target_4__del__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)6023 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_6target_4__del__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
6024 int __pyx_r;
6025 __Pyx_RefNannyDeclarations
6026 __Pyx_RefNannySetupContext("__del__", 0);
6027 __Pyx_INCREF(Py_None);
6028 __Pyx_GIVEREF(Py_None);
6029 __Pyx_GOTREF(__pyx_v_self->target);
6030 __Pyx_DECREF(__pyx_v_self->target);
6031 __pyx_v_self->target = Py_None;
6032
6033 /* function exit code */
6034 __pyx_r = 0;
6035 __Pyx_RefNannyFinishContext();
6036 return __pyx_r;
6037 }
6038
6039 /* "src/vbo.pyx":41
6040 * cdef public int size
6041 * cdef public object target
6042 * cdef public object usage # <<<<<<<<<<<<<<
6043 * cdef public int resolved
6044 * cdef public object target_spec # possible string definition
6045 */
6046
6047 /* Python wrapper */
6048 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_5usage_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_5usage_1__get__(PyObject * __pyx_v_self)6049 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_5usage_1__get__(PyObject *__pyx_v_self) {
6050 PyObject *__pyx_r = 0;
6051 __Pyx_RefNannyDeclarations
6052 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6053 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_5usage___get__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
6054
6055 /* function exit code */
6056 __Pyx_RefNannyFinishContext();
6057 return __pyx_r;
6058 }
6059
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_5usage___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)6060 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_5usage___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
6061 PyObject *__pyx_r = NULL;
6062 __Pyx_RefNannyDeclarations
6063 __Pyx_RefNannySetupContext("__get__", 0);
6064 __Pyx_XDECREF(__pyx_r);
6065 __Pyx_INCREF(__pyx_v_self->usage);
6066 __pyx_r = __pyx_v_self->usage;
6067 goto __pyx_L0;
6068
6069 /* function exit code */
6070 __pyx_L0:;
6071 __Pyx_XGIVEREF(__pyx_r);
6072 __Pyx_RefNannyFinishContext();
6073 return __pyx_r;
6074 }
6075
6076 /* Python wrapper */
6077 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_5usage_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_5usage_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)6078 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_5usage_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6079 int __pyx_r;
6080 __Pyx_RefNannyDeclarations
6081 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6082 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_5usage_2__set__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6083
6084 /* function exit code */
6085 __Pyx_RefNannyFinishContext();
6086 return __pyx_r;
6087 }
6088
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_5usage_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self,PyObject * __pyx_v_value)6089 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_5usage_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value) {
6090 int __pyx_r;
6091 __Pyx_RefNannyDeclarations
6092 __Pyx_RefNannySetupContext("__set__", 0);
6093 __Pyx_INCREF(__pyx_v_value);
6094 __Pyx_GIVEREF(__pyx_v_value);
6095 __Pyx_GOTREF(__pyx_v_self->usage);
6096 __Pyx_DECREF(__pyx_v_self->usage);
6097 __pyx_v_self->usage = __pyx_v_value;
6098
6099 /* function exit code */
6100 __pyx_r = 0;
6101 __Pyx_RefNannyFinishContext();
6102 return __pyx_r;
6103 }
6104
6105 /* Python wrapper */
6106 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_5usage_5__del__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_5usage_5__del__(PyObject * __pyx_v_self)6107 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_5usage_5__del__(PyObject *__pyx_v_self) {
6108 int __pyx_r;
6109 __Pyx_RefNannyDeclarations
6110 __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
6111 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_5usage_4__del__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
6112
6113 /* function exit code */
6114 __Pyx_RefNannyFinishContext();
6115 return __pyx_r;
6116 }
6117
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_5usage_4__del__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)6118 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_5usage_4__del__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
6119 int __pyx_r;
6120 __Pyx_RefNannyDeclarations
6121 __Pyx_RefNannySetupContext("__del__", 0);
6122 __Pyx_INCREF(Py_None);
6123 __Pyx_GIVEREF(Py_None);
6124 __Pyx_GOTREF(__pyx_v_self->usage);
6125 __Pyx_DECREF(__pyx_v_self->usage);
6126 __pyx_v_self->usage = Py_None;
6127
6128 /* function exit code */
6129 __pyx_r = 0;
6130 __Pyx_RefNannyFinishContext();
6131 return __pyx_r;
6132 }
6133
6134 /* "src/vbo.pyx":42
6135 * cdef public object target
6136 * cdef public object usage
6137 * cdef public int resolved # <<<<<<<<<<<<<<
6138 * cdef public object target_spec # possible string definition
6139 * cdef public object usage_spec # possible string definition
6140 */
6141
6142 /* Python wrapper */
6143 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_8resolved_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_8resolved_1__get__(PyObject * __pyx_v_self)6144 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_8resolved_1__get__(PyObject *__pyx_v_self) {
6145 PyObject *__pyx_r = 0;
6146 __Pyx_RefNannyDeclarations
6147 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6148 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_8resolved___get__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
6149
6150 /* function exit code */
6151 __Pyx_RefNannyFinishContext();
6152 return __pyx_r;
6153 }
6154
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_8resolved___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)6155 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_8resolved___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
6156 PyObject *__pyx_r = NULL;
6157 __Pyx_RefNannyDeclarations
6158 PyObject *__pyx_t_1 = NULL;
6159 __Pyx_RefNannySetupContext("__get__", 0);
6160 __Pyx_XDECREF(__pyx_r);
6161 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->resolved); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error)
6162 __Pyx_GOTREF(__pyx_t_1);
6163 __pyx_r = __pyx_t_1;
6164 __pyx_t_1 = 0;
6165 goto __pyx_L0;
6166
6167 /* function exit code */
6168 __pyx_L1_error:;
6169 __Pyx_XDECREF(__pyx_t_1);
6170 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.resolved.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6171 __pyx_r = NULL;
6172 __pyx_L0:;
6173 __Pyx_XGIVEREF(__pyx_r);
6174 __Pyx_RefNannyFinishContext();
6175 return __pyx_r;
6176 }
6177
6178 /* Python wrapper */
6179 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_8resolved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_8resolved_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)6180 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_8resolved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6181 int __pyx_r;
6182 __Pyx_RefNannyDeclarations
6183 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6184 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_8resolved_2__set__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6185
6186 /* function exit code */
6187 __Pyx_RefNannyFinishContext();
6188 return __pyx_r;
6189 }
6190
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_8resolved_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self,PyObject * __pyx_v_value)6191 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_8resolved_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value) {
6192 int __pyx_r;
6193 __Pyx_RefNannyDeclarations
6194 int __pyx_t_1;
6195 __Pyx_RefNannySetupContext("__set__", 0);
6196 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 42, __pyx_L1_error)
6197 __pyx_v_self->resolved = __pyx_t_1;
6198
6199 /* function exit code */
6200 __pyx_r = 0;
6201 goto __pyx_L0;
6202 __pyx_L1_error:;
6203 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.resolved.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6204 __pyx_r = -1;
6205 __pyx_L0:;
6206 __Pyx_RefNannyFinishContext();
6207 return __pyx_r;
6208 }
6209
6210 /* "src/vbo.pyx":43
6211 * cdef public object usage
6212 * cdef public int resolved
6213 * cdef public object target_spec # possible string definition # <<<<<<<<<<<<<<
6214 * cdef public object usage_spec # possible string definition
6215 * cdef public list _copy_segments
6216 */
6217
6218 /* Python wrapper */
6219 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_11target_spec_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_11target_spec_1__get__(PyObject * __pyx_v_self)6220 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_11target_spec_1__get__(PyObject *__pyx_v_self) {
6221 PyObject *__pyx_r = 0;
6222 __Pyx_RefNannyDeclarations
6223 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6224 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_11target_spec___get__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
6225
6226 /* function exit code */
6227 __Pyx_RefNannyFinishContext();
6228 return __pyx_r;
6229 }
6230
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_11target_spec___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)6231 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_11target_spec___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
6232 PyObject *__pyx_r = NULL;
6233 __Pyx_RefNannyDeclarations
6234 __Pyx_RefNannySetupContext("__get__", 0);
6235 __Pyx_XDECREF(__pyx_r);
6236 __Pyx_INCREF(__pyx_v_self->target_spec);
6237 __pyx_r = __pyx_v_self->target_spec;
6238 goto __pyx_L0;
6239
6240 /* function exit code */
6241 __pyx_L0:;
6242 __Pyx_XGIVEREF(__pyx_r);
6243 __Pyx_RefNannyFinishContext();
6244 return __pyx_r;
6245 }
6246
6247 /* Python wrapper */
6248 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_11target_spec_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_11target_spec_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)6249 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_11target_spec_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6250 int __pyx_r;
6251 __Pyx_RefNannyDeclarations
6252 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6253 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_11target_spec_2__set__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6254
6255 /* function exit code */
6256 __Pyx_RefNannyFinishContext();
6257 return __pyx_r;
6258 }
6259
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_11target_spec_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self,PyObject * __pyx_v_value)6260 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_11target_spec_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value) {
6261 int __pyx_r;
6262 __Pyx_RefNannyDeclarations
6263 __Pyx_RefNannySetupContext("__set__", 0);
6264 __Pyx_INCREF(__pyx_v_value);
6265 __Pyx_GIVEREF(__pyx_v_value);
6266 __Pyx_GOTREF(__pyx_v_self->target_spec);
6267 __Pyx_DECREF(__pyx_v_self->target_spec);
6268 __pyx_v_self->target_spec = __pyx_v_value;
6269
6270 /* function exit code */
6271 __pyx_r = 0;
6272 __Pyx_RefNannyFinishContext();
6273 return __pyx_r;
6274 }
6275
6276 /* Python wrapper */
6277 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_11target_spec_5__del__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_11target_spec_5__del__(PyObject * __pyx_v_self)6278 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_11target_spec_5__del__(PyObject *__pyx_v_self) {
6279 int __pyx_r;
6280 __Pyx_RefNannyDeclarations
6281 __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
6282 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_11target_spec_4__del__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
6283
6284 /* function exit code */
6285 __Pyx_RefNannyFinishContext();
6286 return __pyx_r;
6287 }
6288
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_11target_spec_4__del__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)6289 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_11target_spec_4__del__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
6290 int __pyx_r;
6291 __Pyx_RefNannyDeclarations
6292 __Pyx_RefNannySetupContext("__del__", 0);
6293 __Pyx_INCREF(Py_None);
6294 __Pyx_GIVEREF(Py_None);
6295 __Pyx_GOTREF(__pyx_v_self->target_spec);
6296 __Pyx_DECREF(__pyx_v_self->target_spec);
6297 __pyx_v_self->target_spec = Py_None;
6298
6299 /* function exit code */
6300 __pyx_r = 0;
6301 __Pyx_RefNannyFinishContext();
6302 return __pyx_r;
6303 }
6304
6305 /* "src/vbo.pyx":44
6306 * cdef public int resolved
6307 * cdef public object target_spec # possible string definition
6308 * cdef public object usage_spec # possible string definition # <<<<<<<<<<<<<<
6309 * cdef public list _copy_segments
6310 * cdef public object _I_
6311 */
6312
6313 /* Python wrapper */
6314 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_10usage_spec_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_10usage_spec_1__get__(PyObject * __pyx_v_self)6315 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_10usage_spec_1__get__(PyObject *__pyx_v_self) {
6316 PyObject *__pyx_r = 0;
6317 __Pyx_RefNannyDeclarations
6318 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6319 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_10usage_spec___get__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
6320
6321 /* function exit code */
6322 __Pyx_RefNannyFinishContext();
6323 return __pyx_r;
6324 }
6325
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_10usage_spec___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)6326 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_10usage_spec___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
6327 PyObject *__pyx_r = NULL;
6328 __Pyx_RefNannyDeclarations
6329 __Pyx_RefNannySetupContext("__get__", 0);
6330 __Pyx_XDECREF(__pyx_r);
6331 __Pyx_INCREF(__pyx_v_self->usage_spec);
6332 __pyx_r = __pyx_v_self->usage_spec;
6333 goto __pyx_L0;
6334
6335 /* function exit code */
6336 __pyx_L0:;
6337 __Pyx_XGIVEREF(__pyx_r);
6338 __Pyx_RefNannyFinishContext();
6339 return __pyx_r;
6340 }
6341
6342 /* Python wrapper */
6343 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_10usage_spec_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_10usage_spec_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)6344 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_10usage_spec_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6345 int __pyx_r;
6346 __Pyx_RefNannyDeclarations
6347 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6348 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_10usage_spec_2__set__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6349
6350 /* function exit code */
6351 __Pyx_RefNannyFinishContext();
6352 return __pyx_r;
6353 }
6354
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_10usage_spec_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self,PyObject * __pyx_v_value)6355 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_10usage_spec_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value) {
6356 int __pyx_r;
6357 __Pyx_RefNannyDeclarations
6358 __Pyx_RefNannySetupContext("__set__", 0);
6359 __Pyx_INCREF(__pyx_v_value);
6360 __Pyx_GIVEREF(__pyx_v_value);
6361 __Pyx_GOTREF(__pyx_v_self->usage_spec);
6362 __Pyx_DECREF(__pyx_v_self->usage_spec);
6363 __pyx_v_self->usage_spec = __pyx_v_value;
6364
6365 /* function exit code */
6366 __pyx_r = 0;
6367 __Pyx_RefNannyFinishContext();
6368 return __pyx_r;
6369 }
6370
6371 /* Python wrapper */
6372 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_10usage_spec_5__del__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_10usage_spec_5__del__(PyObject * __pyx_v_self)6373 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_10usage_spec_5__del__(PyObject *__pyx_v_self) {
6374 int __pyx_r;
6375 __Pyx_RefNannyDeclarations
6376 __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
6377 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_10usage_spec_4__del__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
6378
6379 /* function exit code */
6380 __Pyx_RefNannyFinishContext();
6381 return __pyx_r;
6382 }
6383
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_10usage_spec_4__del__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)6384 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_10usage_spec_4__del__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
6385 int __pyx_r;
6386 __Pyx_RefNannyDeclarations
6387 __Pyx_RefNannySetupContext("__del__", 0);
6388 __Pyx_INCREF(Py_None);
6389 __Pyx_GIVEREF(Py_None);
6390 __Pyx_GOTREF(__pyx_v_self->usage_spec);
6391 __Pyx_DECREF(__pyx_v_self->usage_spec);
6392 __pyx_v_self->usage_spec = Py_None;
6393
6394 /* function exit code */
6395 __pyx_r = 0;
6396 __Pyx_RefNannyFinishContext();
6397 return __pyx_r;
6398 }
6399
6400 /* "src/vbo.pyx":45
6401 * cdef public object target_spec # possible string definition
6402 * cdef public object usage_spec # possible string definition
6403 * cdef public list _copy_segments # <<<<<<<<<<<<<<
6404 * cdef public object _I_
6405 * cdef public object arrayType
6406 */
6407
6408 /* Python wrapper */
6409 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments_1__get__(PyObject * __pyx_v_self)6410 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments_1__get__(PyObject *__pyx_v_self) {
6411 PyObject *__pyx_r = 0;
6412 __Pyx_RefNannyDeclarations
6413 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6414 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments___get__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
6415
6416 /* function exit code */
6417 __Pyx_RefNannyFinishContext();
6418 return __pyx_r;
6419 }
6420
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)6421 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
6422 PyObject *__pyx_r = NULL;
6423 __Pyx_RefNannyDeclarations
6424 __Pyx_RefNannySetupContext("__get__", 0);
6425 __Pyx_XDECREF(__pyx_r);
6426 __Pyx_INCREF(__pyx_v_self->_copy_segments);
6427 __pyx_r = __pyx_v_self->_copy_segments;
6428 goto __pyx_L0;
6429
6430 /* function exit code */
6431 __pyx_L0:;
6432 __Pyx_XGIVEREF(__pyx_r);
6433 __Pyx_RefNannyFinishContext();
6434 return __pyx_r;
6435 }
6436
6437 /* Python wrapper */
6438 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)6439 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6440 int __pyx_r;
6441 __Pyx_RefNannyDeclarations
6442 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6443 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments_2__set__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6444
6445 /* function exit code */
6446 __Pyx_RefNannyFinishContext();
6447 return __pyx_r;
6448 }
6449
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self,PyObject * __pyx_v_value)6450 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value) {
6451 int __pyx_r;
6452 __Pyx_RefNannyDeclarations
6453 PyObject *__pyx_t_1 = NULL;
6454 __Pyx_RefNannySetupContext("__set__", 0);
6455 if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 45, __pyx_L1_error)
6456 __pyx_t_1 = __pyx_v_value;
6457 __Pyx_INCREF(__pyx_t_1);
6458 __Pyx_GIVEREF(__pyx_t_1);
6459 __Pyx_GOTREF(__pyx_v_self->_copy_segments);
6460 __Pyx_DECREF(__pyx_v_self->_copy_segments);
6461 __pyx_v_self->_copy_segments = ((PyObject*)__pyx_t_1);
6462 __pyx_t_1 = 0;
6463
6464 /* function exit code */
6465 __pyx_r = 0;
6466 goto __pyx_L0;
6467 __pyx_L1_error:;
6468 __Pyx_XDECREF(__pyx_t_1);
6469 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO._copy_segments.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6470 __pyx_r = -1;
6471 __pyx_L0:;
6472 __Pyx_RefNannyFinishContext();
6473 return __pyx_r;
6474 }
6475
6476 /* Python wrapper */
6477 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments_5__del__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments_5__del__(PyObject * __pyx_v_self)6478 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments_5__del__(PyObject *__pyx_v_self) {
6479 int __pyx_r;
6480 __Pyx_RefNannyDeclarations
6481 __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
6482 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments_4__del__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
6483
6484 /* function exit code */
6485 __Pyx_RefNannyFinishContext();
6486 return __pyx_r;
6487 }
6488
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments_4__del__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)6489 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments_4__del__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
6490 int __pyx_r;
6491 __Pyx_RefNannyDeclarations
6492 __Pyx_RefNannySetupContext("__del__", 0);
6493 __Pyx_INCREF(Py_None);
6494 __Pyx_GIVEREF(Py_None);
6495 __Pyx_GOTREF(__pyx_v_self->_copy_segments);
6496 __Pyx_DECREF(__pyx_v_self->_copy_segments);
6497 __pyx_v_self->_copy_segments = ((PyObject*)Py_None);
6498
6499 /* function exit code */
6500 __pyx_r = 0;
6501 __Pyx_RefNannyFinishContext();
6502 return __pyx_r;
6503 }
6504
6505 /* "src/vbo.pyx":46
6506 * cdef public object usage_spec # possible string definition
6507 * cdef public list _copy_segments
6508 * cdef public object _I_ # <<<<<<<<<<<<<<
6509 * cdef public object arrayType
6510 * _no_cache_ = True # do not cache in context data arrays
6511 */
6512
6513 /* Python wrapper */
6514 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_3_I__1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_3_I__1__get__(PyObject * __pyx_v_self)6515 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_3_I__1__get__(PyObject *__pyx_v_self) {
6516 PyObject *__pyx_r = 0;
6517 __Pyx_RefNannyDeclarations
6518 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6519 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_3_I____get__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
6520
6521 /* function exit code */
6522 __Pyx_RefNannyFinishContext();
6523 return __pyx_r;
6524 }
6525
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_3_I____get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)6526 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_3_I____get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
6527 PyObject *__pyx_r = NULL;
6528 __Pyx_RefNannyDeclarations
6529 __Pyx_RefNannySetupContext("__get__", 0);
6530 __Pyx_XDECREF(__pyx_r);
6531 __Pyx_INCREF(__pyx_v_self->_I_);
6532 __pyx_r = __pyx_v_self->_I_;
6533 goto __pyx_L0;
6534
6535 /* function exit code */
6536 __pyx_L0:;
6537 __Pyx_XGIVEREF(__pyx_r);
6538 __Pyx_RefNannyFinishContext();
6539 return __pyx_r;
6540 }
6541
6542 /* Python wrapper */
6543 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_3_I__3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_3_I__3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)6544 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_3_I__3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6545 int __pyx_r;
6546 __Pyx_RefNannyDeclarations
6547 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6548 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_3_I__2__set__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6549
6550 /* function exit code */
6551 __Pyx_RefNannyFinishContext();
6552 return __pyx_r;
6553 }
6554
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_3_I__2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self,PyObject * __pyx_v_value)6555 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_3_I__2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value) {
6556 int __pyx_r;
6557 __Pyx_RefNannyDeclarations
6558 __Pyx_RefNannySetupContext("__set__", 0);
6559 __Pyx_INCREF(__pyx_v_value);
6560 __Pyx_GIVEREF(__pyx_v_value);
6561 __Pyx_GOTREF(__pyx_v_self->_I_);
6562 __Pyx_DECREF(__pyx_v_self->_I_);
6563 __pyx_v_self->_I_ = __pyx_v_value;
6564
6565 /* function exit code */
6566 __pyx_r = 0;
6567 __Pyx_RefNannyFinishContext();
6568 return __pyx_r;
6569 }
6570
6571 /* Python wrapper */
6572 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_3_I__5__del__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_3_I__5__del__(PyObject * __pyx_v_self)6573 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_3_I__5__del__(PyObject *__pyx_v_self) {
6574 int __pyx_r;
6575 __Pyx_RefNannyDeclarations
6576 __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
6577 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_3_I__4__del__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
6578
6579 /* function exit code */
6580 __Pyx_RefNannyFinishContext();
6581 return __pyx_r;
6582 }
6583
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_3_I__4__del__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)6584 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_3_I__4__del__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
6585 int __pyx_r;
6586 __Pyx_RefNannyDeclarations
6587 __Pyx_RefNannySetupContext("__del__", 0);
6588 __Pyx_INCREF(Py_None);
6589 __Pyx_GIVEREF(Py_None);
6590 __Pyx_GOTREF(__pyx_v_self->_I_);
6591 __Pyx_DECREF(__pyx_v_self->_I_);
6592 __pyx_v_self->_I_ = Py_None;
6593
6594 /* function exit code */
6595 __pyx_r = 0;
6596 __Pyx_RefNannyFinishContext();
6597 return __pyx_r;
6598 }
6599
6600 /* "src/vbo.pyx":47
6601 * cdef public list _copy_segments
6602 * cdef public object _I_
6603 * cdef public object arrayType # <<<<<<<<<<<<<<
6604 * _no_cache_ = True # do not cache in context data arrays
6605 * def __init__(
6606 */
6607
6608 /* Python wrapper */
6609 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_9arrayType_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_9arrayType_1__get__(PyObject * __pyx_v_self)6610 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_9arrayType_1__get__(PyObject *__pyx_v_self) {
6611 PyObject *__pyx_r = 0;
6612 __Pyx_RefNannyDeclarations
6613 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6614 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_9arrayType___get__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
6615
6616 /* function exit code */
6617 __Pyx_RefNannyFinishContext();
6618 return __pyx_r;
6619 }
6620
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_9arrayType___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)6621 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_9arrayType___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
6622 PyObject *__pyx_r = NULL;
6623 __Pyx_RefNannyDeclarations
6624 __Pyx_RefNannySetupContext("__get__", 0);
6625 __Pyx_XDECREF(__pyx_r);
6626 __Pyx_INCREF(__pyx_v_self->arrayType);
6627 __pyx_r = __pyx_v_self->arrayType;
6628 goto __pyx_L0;
6629
6630 /* function exit code */
6631 __pyx_L0:;
6632 __Pyx_XGIVEREF(__pyx_r);
6633 __Pyx_RefNannyFinishContext();
6634 return __pyx_r;
6635 }
6636
6637 /* Python wrapper */
6638 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_9arrayType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_9arrayType_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)6639 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_9arrayType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6640 int __pyx_r;
6641 __Pyx_RefNannyDeclarations
6642 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6643 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_9arrayType_2__set__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6644
6645 /* function exit code */
6646 __Pyx_RefNannyFinishContext();
6647 return __pyx_r;
6648 }
6649
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_9arrayType_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self,PyObject * __pyx_v_value)6650 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_9arrayType_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v_value) {
6651 int __pyx_r;
6652 __Pyx_RefNannyDeclarations
6653 __Pyx_RefNannySetupContext("__set__", 0);
6654 __Pyx_INCREF(__pyx_v_value);
6655 __Pyx_GIVEREF(__pyx_v_value);
6656 __Pyx_GOTREF(__pyx_v_self->arrayType);
6657 __Pyx_DECREF(__pyx_v_self->arrayType);
6658 __pyx_v_self->arrayType = __pyx_v_value;
6659
6660 /* function exit code */
6661 __pyx_r = 0;
6662 __Pyx_RefNannyFinishContext();
6663 return __pyx_r;
6664 }
6665
6666 /* Python wrapper */
6667 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_9arrayType_5__del__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_9arrayType_5__del__(PyObject * __pyx_v_self)6668 static int __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_9arrayType_5__del__(PyObject *__pyx_v_self) {
6669 int __pyx_r;
6670 __Pyx_RefNannyDeclarations
6671 __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
6672 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_9arrayType_4__del__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
6673
6674 /* function exit code */
6675 __Pyx_RefNannyFinishContext();
6676 return __pyx_r;
6677 }
6678
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_9arrayType_4__del__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)6679 static int __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_9arrayType_4__del__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
6680 int __pyx_r;
6681 __Pyx_RefNannyDeclarations
6682 __Pyx_RefNannySetupContext("__del__", 0);
6683 __Pyx_INCREF(Py_None);
6684 __Pyx_GIVEREF(Py_None);
6685 __Pyx_GOTREF(__pyx_v_self->arrayType);
6686 __Pyx_DECREF(__pyx_v_self->arrayType);
6687 __pyx_v_self->arrayType = Py_None;
6688
6689 /* function exit code */
6690 __pyx_r = 0;
6691 __Pyx_RefNannyFinishContext();
6692 return __pyx_r;
6693 }
6694
6695 /* "(tree fragment)":1
6696 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
6697 * cdef tuple state
6698 * cdef object _dict
6699 */
6700
6701 /* Python wrapper */
6702 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_29__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_29__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)6703 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_29__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
6704 PyObject *__pyx_r = 0;
6705 __Pyx_RefNannyDeclarations
6706 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
6707 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_28__reduce_cython__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self));
6708
6709 /* function exit code */
6710 __Pyx_RefNannyFinishContext();
6711 return __pyx_r;
6712 }
6713
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_28__reduce_cython__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self)6714 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_28__reduce_cython__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self) {
6715 PyObject *__pyx_v_state = 0;
6716 PyObject *__pyx_v__dict = 0;
6717 int __pyx_v_use_setstate;
6718 PyObject *__pyx_r = NULL;
6719 __Pyx_RefNannyDeclarations
6720 PyObject *__pyx_t_1 = NULL;
6721 PyObject *__pyx_t_2 = NULL;
6722 PyObject *__pyx_t_3 = NULL;
6723 PyObject *__pyx_t_4 = NULL;
6724 PyObject *__pyx_t_5 = NULL;
6725 PyObject *__pyx_t_6 = NULL;
6726 int __pyx_t_7;
6727 int __pyx_t_8;
6728 int __pyx_t_9;
6729 __Pyx_RefNannySetupContext("__reduce_cython__", 0);
6730
6731 /* "(tree fragment)":5
6732 * cdef object _dict
6733 * cdef bint use_setstate
6734 * state = (self._I_, self._copy_segments, self.arrayType, self.buffer, self.copied, self.created, self.data, self.resolved, self.size, self.target, self.target_spec, self.usage, self.usage_spec) # <<<<<<<<<<<<<<
6735 * _dict = getattr(self, '__dict__', None)
6736 * if _dict is not None:
6737 */
6738 __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->buffer); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
6739 __Pyx_GOTREF(__pyx_t_1);
6740 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->copied); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
6741 __Pyx_GOTREF(__pyx_t_2);
6742 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->created); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
6743 __Pyx_GOTREF(__pyx_t_3);
6744 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->resolved); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
6745 __Pyx_GOTREF(__pyx_t_4);
6746 __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->size); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 5, __pyx_L1_error)
6747 __Pyx_GOTREF(__pyx_t_5);
6748 __pyx_t_6 = PyTuple_New(13); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5, __pyx_L1_error)
6749 __Pyx_GOTREF(__pyx_t_6);
6750 __Pyx_INCREF(__pyx_v_self->_I_);
6751 __Pyx_GIVEREF(__pyx_v_self->_I_);
6752 PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_self->_I_);
6753 __Pyx_INCREF(__pyx_v_self->_copy_segments);
6754 __Pyx_GIVEREF(__pyx_v_self->_copy_segments);
6755 PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_self->_copy_segments);
6756 __Pyx_INCREF(__pyx_v_self->arrayType);
6757 __Pyx_GIVEREF(__pyx_v_self->arrayType);
6758 PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_self->arrayType);
6759 __Pyx_GIVEREF(__pyx_t_1);
6760 PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_1);
6761 __Pyx_GIVEREF(__pyx_t_2);
6762 PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_2);
6763 __Pyx_GIVEREF(__pyx_t_3);
6764 PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_t_3);
6765 __Pyx_INCREF(__pyx_v_self->data);
6766 __Pyx_GIVEREF(__pyx_v_self->data);
6767 PyTuple_SET_ITEM(__pyx_t_6, 6, __pyx_v_self->data);
6768 __Pyx_GIVEREF(__pyx_t_4);
6769 PyTuple_SET_ITEM(__pyx_t_6, 7, __pyx_t_4);
6770 __Pyx_GIVEREF(__pyx_t_5);
6771 PyTuple_SET_ITEM(__pyx_t_6, 8, __pyx_t_5);
6772 __Pyx_INCREF(__pyx_v_self->target);
6773 __Pyx_GIVEREF(__pyx_v_self->target);
6774 PyTuple_SET_ITEM(__pyx_t_6, 9, __pyx_v_self->target);
6775 __Pyx_INCREF(__pyx_v_self->target_spec);
6776 __Pyx_GIVEREF(__pyx_v_self->target_spec);
6777 PyTuple_SET_ITEM(__pyx_t_6, 10, __pyx_v_self->target_spec);
6778 __Pyx_INCREF(__pyx_v_self->usage);
6779 __Pyx_GIVEREF(__pyx_v_self->usage);
6780 PyTuple_SET_ITEM(__pyx_t_6, 11, __pyx_v_self->usage);
6781 __Pyx_INCREF(__pyx_v_self->usage_spec);
6782 __Pyx_GIVEREF(__pyx_v_self->usage_spec);
6783 PyTuple_SET_ITEM(__pyx_t_6, 12, __pyx_v_self->usage_spec);
6784 __pyx_t_1 = 0;
6785 __pyx_t_2 = 0;
6786 __pyx_t_3 = 0;
6787 __pyx_t_4 = 0;
6788 __pyx_t_5 = 0;
6789 __pyx_v_state = ((PyObject*)__pyx_t_6);
6790 __pyx_t_6 = 0;
6791
6792 /* "(tree fragment)":6
6793 * cdef bint use_setstate
6794 * state = (self._I_, self._copy_segments, self.arrayType, self.buffer, self.copied, self.created, self.data, self.resolved, self.size, self.target, self.target_spec, self.usage, self.usage_spec)
6795 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
6796 * if _dict is not None:
6797 * state += (_dict,)
6798 */
6799 __pyx_t_6 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 6, __pyx_L1_error)
6800 __Pyx_GOTREF(__pyx_t_6);
6801 __pyx_v__dict = __pyx_t_6;
6802 __pyx_t_6 = 0;
6803
6804 /* "(tree fragment)":7
6805 * state = (self._I_, self._copy_segments, self.arrayType, self.buffer, self.copied, self.created, self.data, self.resolved, self.size, self.target, self.target_spec, self.usage, self.usage_spec)
6806 * _dict = getattr(self, '__dict__', None)
6807 * if _dict is not None: # <<<<<<<<<<<<<<
6808 * state += (_dict,)
6809 * use_setstate = True
6810 */
6811 __pyx_t_7 = (__pyx_v__dict != Py_None);
6812 __pyx_t_8 = (__pyx_t_7 != 0);
6813 if (__pyx_t_8) {
6814
6815 /* "(tree fragment)":8
6816 * _dict = getattr(self, '__dict__', None)
6817 * if _dict is not None:
6818 * state += (_dict,) # <<<<<<<<<<<<<<
6819 * use_setstate = True
6820 * else:
6821 */
6822 __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 8, __pyx_L1_error)
6823 __Pyx_GOTREF(__pyx_t_6);
6824 __Pyx_INCREF(__pyx_v__dict);
6825 __Pyx_GIVEREF(__pyx_v__dict);
6826 PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v__dict);
6827 __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 8, __pyx_L1_error)
6828 __Pyx_GOTREF(__pyx_t_5);
6829 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6830 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_5));
6831 __pyx_t_5 = 0;
6832
6833 /* "(tree fragment)":9
6834 * if _dict is not None:
6835 * state += (_dict,)
6836 * use_setstate = True # <<<<<<<<<<<<<<
6837 * else:
6838 * use_setstate = self._I_ is not None or self._copy_segments is not None or self.arrayType is not None or self.data is not None or self.target is not None or self.target_spec is not None or self.usage is not None or self.usage_spec is not None
6839 */
6840 __pyx_v_use_setstate = 1;
6841
6842 /* "(tree fragment)":7
6843 * state = (self._I_, self._copy_segments, self.arrayType, self.buffer, self.copied, self.created, self.data, self.resolved, self.size, self.target, self.target_spec, self.usage, self.usage_spec)
6844 * _dict = getattr(self, '__dict__', None)
6845 * if _dict is not None: # <<<<<<<<<<<<<<
6846 * state += (_dict,)
6847 * use_setstate = True
6848 */
6849 goto __pyx_L3;
6850 }
6851
6852 /* "(tree fragment)":11
6853 * use_setstate = True
6854 * else:
6855 * use_setstate = self._I_ is not None or self._copy_segments is not None or self.arrayType is not None or self.data is not None or self.target is not None or self.target_spec is not None or self.usage is not None or self.usage_spec is not None # <<<<<<<<<<<<<<
6856 * if use_setstate:
6857 * return __pyx_unpickle_VBO, (type(self), 0x0fed755, None), state
6858 */
6859 /*else*/ {
6860 __pyx_t_7 = (__pyx_v_self->_I_ != Py_None);
6861 __pyx_t_9 = (__pyx_t_7 != 0);
6862 if (!__pyx_t_9) {
6863 } else {
6864 __pyx_t_8 = __pyx_t_9;
6865 goto __pyx_L4_bool_binop_done;
6866 }
6867 __pyx_t_9 = (__pyx_v_self->_copy_segments != ((PyObject*)Py_None));
6868 __pyx_t_7 = (__pyx_t_9 != 0);
6869 if (!__pyx_t_7) {
6870 } else {
6871 __pyx_t_8 = __pyx_t_7;
6872 goto __pyx_L4_bool_binop_done;
6873 }
6874 __pyx_t_7 = (__pyx_v_self->arrayType != Py_None);
6875 __pyx_t_9 = (__pyx_t_7 != 0);
6876 if (!__pyx_t_9) {
6877 } else {
6878 __pyx_t_8 = __pyx_t_9;
6879 goto __pyx_L4_bool_binop_done;
6880 }
6881 __pyx_t_9 = (__pyx_v_self->data != Py_None);
6882 __pyx_t_7 = (__pyx_t_9 != 0);
6883 if (!__pyx_t_7) {
6884 } else {
6885 __pyx_t_8 = __pyx_t_7;
6886 goto __pyx_L4_bool_binop_done;
6887 }
6888 __pyx_t_7 = (__pyx_v_self->target != Py_None);
6889 __pyx_t_9 = (__pyx_t_7 != 0);
6890 if (!__pyx_t_9) {
6891 } else {
6892 __pyx_t_8 = __pyx_t_9;
6893 goto __pyx_L4_bool_binop_done;
6894 }
6895 __pyx_t_9 = (__pyx_v_self->target_spec != Py_None);
6896 __pyx_t_7 = (__pyx_t_9 != 0);
6897 if (!__pyx_t_7) {
6898 } else {
6899 __pyx_t_8 = __pyx_t_7;
6900 goto __pyx_L4_bool_binop_done;
6901 }
6902 __pyx_t_7 = (__pyx_v_self->usage != Py_None);
6903 __pyx_t_9 = (__pyx_t_7 != 0);
6904 if (!__pyx_t_9) {
6905 } else {
6906 __pyx_t_8 = __pyx_t_9;
6907 goto __pyx_L4_bool_binop_done;
6908 }
6909 __pyx_t_9 = (__pyx_v_self->usage_spec != Py_None);
6910 __pyx_t_7 = (__pyx_t_9 != 0);
6911 __pyx_t_8 = __pyx_t_7;
6912 __pyx_L4_bool_binop_done:;
6913 __pyx_v_use_setstate = __pyx_t_8;
6914 }
6915 __pyx_L3:;
6916
6917 /* "(tree fragment)":12
6918 * else:
6919 * use_setstate = self._I_ is not None or self._copy_segments is not None or self.arrayType is not None or self.data is not None or self.target is not None or self.target_spec is not None or self.usage is not None or self.usage_spec is not None
6920 * if use_setstate: # <<<<<<<<<<<<<<
6921 * return __pyx_unpickle_VBO, (type(self), 0x0fed755, None), state
6922 * else:
6923 */
6924 __pyx_t_8 = (__pyx_v_use_setstate != 0);
6925 if (__pyx_t_8) {
6926
6927 /* "(tree fragment)":13
6928 * use_setstate = self._I_ is not None or self._copy_segments is not None or self.arrayType is not None or self.data is not None or self.target is not None or self.target_spec is not None or self.usage is not None or self.usage_spec is not None
6929 * if use_setstate:
6930 * return __pyx_unpickle_VBO, (type(self), 0x0fed755, None), state # <<<<<<<<<<<<<<
6931 * else:
6932 * return __pyx_unpickle_VBO, (type(self), 0x0fed755, state)
6933 */
6934 __Pyx_XDECREF(__pyx_r);
6935 __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_VBO); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
6936 __Pyx_GOTREF(__pyx_t_5);
6937 __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
6938 __Pyx_GOTREF(__pyx_t_6);
6939 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
6940 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
6941 PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
6942 __Pyx_INCREF(__pyx_int_16701269);
6943 __Pyx_GIVEREF(__pyx_int_16701269);
6944 PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_16701269);
6945 __Pyx_INCREF(Py_None);
6946 __Pyx_GIVEREF(Py_None);
6947 PyTuple_SET_ITEM(__pyx_t_6, 2, Py_None);
6948 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
6949 __Pyx_GOTREF(__pyx_t_4);
6950 __Pyx_GIVEREF(__pyx_t_5);
6951 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
6952 __Pyx_GIVEREF(__pyx_t_6);
6953 PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6);
6954 __Pyx_INCREF(__pyx_v_state);
6955 __Pyx_GIVEREF(__pyx_v_state);
6956 PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state);
6957 __pyx_t_5 = 0;
6958 __pyx_t_6 = 0;
6959 __pyx_r = __pyx_t_4;
6960 __pyx_t_4 = 0;
6961 goto __pyx_L0;
6962
6963 /* "(tree fragment)":12
6964 * else:
6965 * use_setstate = self._I_ is not None or self._copy_segments is not None or self.arrayType is not None or self.data is not None or self.target is not None or self.target_spec is not None or self.usage is not None or self.usage_spec is not None
6966 * if use_setstate: # <<<<<<<<<<<<<<
6967 * return __pyx_unpickle_VBO, (type(self), 0x0fed755, None), state
6968 * else:
6969 */
6970 }
6971
6972 /* "(tree fragment)":15
6973 * return __pyx_unpickle_VBO, (type(self), 0x0fed755, None), state
6974 * else:
6975 * return __pyx_unpickle_VBO, (type(self), 0x0fed755, state) # <<<<<<<<<<<<<<
6976 * def __setstate_cython__(self, __pyx_state):
6977 * __pyx_unpickle_VBO__set_state(self, __pyx_state)
6978 */
6979 /*else*/ {
6980 __Pyx_XDECREF(__pyx_r);
6981 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_VBO); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
6982 __Pyx_GOTREF(__pyx_t_4);
6983 __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
6984 __Pyx_GOTREF(__pyx_t_6);
6985 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
6986 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
6987 PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
6988 __Pyx_INCREF(__pyx_int_16701269);
6989 __Pyx_GIVEREF(__pyx_int_16701269);
6990 PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_16701269);
6991 __Pyx_INCREF(__pyx_v_state);
6992 __Pyx_GIVEREF(__pyx_v_state);
6993 PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
6994 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
6995 __Pyx_GOTREF(__pyx_t_5);
6996 __Pyx_GIVEREF(__pyx_t_4);
6997 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
6998 __Pyx_GIVEREF(__pyx_t_6);
6999 PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6);
7000 __pyx_t_4 = 0;
7001 __pyx_t_6 = 0;
7002 __pyx_r = __pyx_t_5;
7003 __pyx_t_5 = 0;
7004 goto __pyx_L0;
7005 }
7006
7007 /* "(tree fragment)":1
7008 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
7009 * cdef tuple state
7010 * cdef object _dict
7011 */
7012
7013 /* function exit code */
7014 __pyx_L1_error:;
7015 __Pyx_XDECREF(__pyx_t_1);
7016 __Pyx_XDECREF(__pyx_t_2);
7017 __Pyx_XDECREF(__pyx_t_3);
7018 __Pyx_XDECREF(__pyx_t_4);
7019 __Pyx_XDECREF(__pyx_t_5);
7020 __Pyx_XDECREF(__pyx_t_6);
7021 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7022 __pyx_r = NULL;
7023 __pyx_L0:;
7024 __Pyx_XDECREF(__pyx_v_state);
7025 __Pyx_XDECREF(__pyx_v__dict);
7026 __Pyx_XGIVEREF(__pyx_r);
7027 __Pyx_RefNannyFinishContext();
7028 return __pyx_r;
7029 }
7030
7031 /* "(tree fragment)":16
7032 * else:
7033 * return __pyx_unpickle_VBO, (type(self), 0x0fed755, state)
7034 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
7035 * __pyx_unpickle_VBO__set_state(self, __pyx_state)
7036 */
7037
7038 /* Python wrapper */
7039 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_31__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_31__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)7040 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_31__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
7041 PyObject *__pyx_r = 0;
7042 __Pyx_RefNannyDeclarations
7043 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
7044 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_3VBO_30__setstate_cython__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
7045
7046 /* function exit code */
7047 __Pyx_RefNannyFinishContext();
7048 return __pyx_r;
7049 }
7050
__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_30__setstate_cython__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_self,PyObject * __pyx_v___pyx_state)7051 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_3VBO_30__setstate_cython__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
7052 PyObject *__pyx_r = NULL;
7053 __Pyx_RefNannyDeclarations
7054 PyObject *__pyx_t_1 = NULL;
7055 __Pyx_RefNannySetupContext("__setstate_cython__", 0);
7056
7057 /* "(tree fragment)":17
7058 * return __pyx_unpickle_VBO, (type(self), 0x0fed755, state)
7059 * def __setstate_cython__(self, __pyx_state):
7060 * __pyx_unpickle_VBO__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
7061 */
7062 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
7063 __pyx_t_1 = __pyx_f_17OpenGL_accelerate_3vbo___pyx_unpickle_VBO__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
7064 __Pyx_GOTREF(__pyx_t_1);
7065 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7066
7067 /* "(tree fragment)":16
7068 * else:
7069 * return __pyx_unpickle_VBO, (type(self), 0x0fed755, state)
7070 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
7071 * __pyx_unpickle_VBO__set_state(self, __pyx_state)
7072 */
7073
7074 /* function exit code */
7075 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7076 goto __pyx_L0;
7077 __pyx_L1_error:;
7078 __Pyx_XDECREF(__pyx_t_1);
7079 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBO.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7080 __pyx_r = NULL;
7081 __pyx_L0:;
7082 __Pyx_XGIVEREF(__pyx_r);
7083 __Pyx_RefNannyFinishContext();
7084 return __pyx_r;
7085 }
7086
7087 /* "src/vbo.pyx":267
7088 * cdef public VBO vbo
7089 * cdef public unsigned int offset
7090 * def __cinit__( self, VBO vbo, unsigned int offset ): # <<<<<<<<<<<<<<
7091 * self.vbo = vbo
7092 * Py_XINCREF( vbo )
7093 */
7094
7095 /* Python wrapper */
7096 static int __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_1__cinit__(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)7097 static int __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7098 struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_vbo = 0;
7099 unsigned int __pyx_v_offset;
7100 int __pyx_r;
7101 __Pyx_RefNannyDeclarations
7102 __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
7103 {
7104 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vbo,&__pyx_n_s_offset,0};
7105 PyObject* values[2] = {0,0};
7106 if (unlikely(__pyx_kwds)) {
7107 Py_ssize_t kw_args;
7108 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7109 switch (pos_args) {
7110 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7111 CYTHON_FALLTHROUGH;
7112 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7113 CYTHON_FALLTHROUGH;
7114 case 0: break;
7115 default: goto __pyx_L5_argtuple_error;
7116 }
7117 kw_args = PyDict_Size(__pyx_kwds);
7118 switch (pos_args) {
7119 case 0:
7120 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vbo)) != 0)) kw_args--;
7121 else goto __pyx_L5_argtuple_error;
7122 CYTHON_FALLTHROUGH;
7123 case 1:
7124 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset)) != 0)) kw_args--;
7125 else {
7126 __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(0, 267, __pyx_L3_error)
7127 }
7128 }
7129 if (unlikely(kw_args > 0)) {
7130 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 267, __pyx_L3_error)
7131 }
7132 } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
7133 goto __pyx_L5_argtuple_error;
7134 } else {
7135 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7136 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7137 }
7138 __pyx_v_vbo = ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)values[0]);
7139 __pyx_v_offset = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_offset == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 267, __pyx_L3_error)
7140 }
7141 goto __pyx_L4_argument_unpacking_done;
7142 __pyx_L5_argtuple_error:;
7143 __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 267, __pyx_L3_error)
7144 __pyx_L3_error:;
7145 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBOOffset.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7146 __Pyx_RefNannyFinishContext();
7147 return -1;
7148 __pyx_L4_argument_unpacking_done:;
7149 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vbo), __pyx_ptype_17OpenGL_accelerate_3vbo_VBO, 1, "vbo", 0))) __PYX_ERR(0, 267, __pyx_L1_error)
7150 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset___cinit__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_self), __pyx_v_vbo, __pyx_v_offset);
7151
7152 /* function exit code */
7153 goto __pyx_L0;
7154 __pyx_L1_error:;
7155 __pyx_r = -1;
7156 __pyx_L0:;
7157 __Pyx_RefNannyFinishContext();
7158 return __pyx_r;
7159 }
7160
__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset___cinit__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset * __pyx_v_self,struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v_vbo,unsigned int __pyx_v_offset)7161 static int __pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset___cinit__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *__pyx_v_self, struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v_vbo, unsigned int __pyx_v_offset) {
7162 int __pyx_r;
7163 __Pyx_RefNannyDeclarations
7164 __Pyx_RefNannySetupContext("__cinit__", 0);
7165
7166 /* "src/vbo.pyx":268
7167 * cdef public unsigned int offset
7168 * def __cinit__( self, VBO vbo, unsigned int offset ):
7169 * self.vbo = vbo # <<<<<<<<<<<<<<
7170 * Py_XINCREF( vbo )
7171 * self.offset = offset
7172 */
7173 __Pyx_INCREF(((PyObject *)__pyx_v_vbo));
7174 __Pyx_GIVEREF(((PyObject *)__pyx_v_vbo));
7175 __Pyx_GOTREF(__pyx_v_self->vbo);
7176 __Pyx_DECREF(((PyObject *)__pyx_v_self->vbo));
7177 __pyx_v_self->vbo = __pyx_v_vbo;
7178
7179 /* "src/vbo.pyx":269
7180 * def __cinit__( self, VBO vbo, unsigned int offset ):
7181 * self.vbo = vbo
7182 * Py_XINCREF( vbo ) # <<<<<<<<<<<<<<
7183 * self.offset = offset
7184 * def __dealloc__( self ):
7185 */
7186 Py_XINCREF(((PyObject *)__pyx_v_vbo));
7187
7188 /* "src/vbo.pyx":270
7189 * self.vbo = vbo
7190 * Py_XINCREF( vbo )
7191 * self.offset = offset # <<<<<<<<<<<<<<
7192 * def __dealloc__( self ):
7193 * if self.vbo is not None:
7194 */
7195 __pyx_v_self->offset = __pyx_v_offset;
7196
7197 /* "src/vbo.pyx":267
7198 * cdef public VBO vbo
7199 * cdef public unsigned int offset
7200 * def __cinit__( self, VBO vbo, unsigned int offset ): # <<<<<<<<<<<<<<
7201 * self.vbo = vbo
7202 * Py_XINCREF( vbo )
7203 */
7204
7205 /* function exit code */
7206 __pyx_r = 0;
7207 __Pyx_RefNannyFinishContext();
7208 return __pyx_r;
7209 }
7210
7211 /* "src/vbo.pyx":271
7212 * Py_XINCREF( vbo )
7213 * self.offset = offset
7214 * def __dealloc__( self ): # <<<<<<<<<<<<<<
7215 * if self.vbo is not None:
7216 * Py_XDECREF( self.vbo )
7217 */
7218
7219 /* Python wrapper */
7220 static void __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_3__dealloc__(PyObject * __pyx_v_self)7221 static void __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_3__dealloc__(PyObject *__pyx_v_self) {
7222 __Pyx_RefNannyDeclarations
7223 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
7224 __pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_2__dealloc__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_self));
7225
7226 /* function exit code */
7227 __Pyx_RefNannyFinishContext();
7228 }
7229
__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_2__dealloc__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset * __pyx_v_self)7230 static void __pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_2__dealloc__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *__pyx_v_self) {
7231 __Pyx_RefNannyDeclarations
7232 int __pyx_t_1;
7233 int __pyx_t_2;
7234 PyObject *__pyx_t_3 = NULL;
7235 __Pyx_RefNannySetupContext("__dealloc__", 0);
7236
7237 /* "src/vbo.pyx":272
7238 * self.offset = offset
7239 * def __dealloc__( self ):
7240 * if self.vbo is not None: # <<<<<<<<<<<<<<
7241 * Py_XDECREF( self.vbo )
7242 * self.vbo = None
7243 */
7244 __pyx_t_1 = (((PyObject *)__pyx_v_self->vbo) != Py_None);
7245 __pyx_t_2 = (__pyx_t_1 != 0);
7246 if (__pyx_t_2) {
7247
7248 /* "src/vbo.pyx":273
7249 * def __dealloc__( self ):
7250 * if self.vbo is not None:
7251 * Py_XDECREF( self.vbo ) # <<<<<<<<<<<<<<
7252 * self.vbo = None
7253 *
7254 */
7255 __pyx_t_3 = ((PyObject *)__pyx_v_self->vbo);
7256 __Pyx_INCREF(__pyx_t_3);
7257 Py_XDECREF(__pyx_t_3);
7258 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7259
7260 /* "src/vbo.pyx":274
7261 * if self.vbo is not None:
7262 * Py_XDECREF( self.vbo )
7263 * self.vbo = None # <<<<<<<<<<<<<<
7264 *
7265 * def __getattr__( self, key ):
7266 */
7267 __Pyx_INCREF(Py_None);
7268 __Pyx_GIVEREF(Py_None);
7269 __Pyx_GOTREF(__pyx_v_self->vbo);
7270 __Pyx_DECREF(((PyObject *)__pyx_v_self->vbo));
7271 __pyx_v_self->vbo = ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)Py_None);
7272
7273 /* "src/vbo.pyx":272
7274 * self.offset = offset
7275 * def __dealloc__( self ):
7276 * if self.vbo is not None: # <<<<<<<<<<<<<<
7277 * Py_XDECREF( self.vbo )
7278 * self.vbo = None
7279 */
7280 }
7281
7282 /* "src/vbo.pyx":271
7283 * Py_XINCREF( vbo )
7284 * self.offset = offset
7285 * def __dealloc__( self ): # <<<<<<<<<<<<<<
7286 * if self.vbo is not None:
7287 * Py_XDECREF( self.vbo )
7288 */
7289
7290 /* function exit code */
7291 __Pyx_RefNannyFinishContext();
7292 }
7293
7294 /* "src/vbo.pyx":276
7295 * self.vbo = None
7296 *
7297 * def __getattr__( self, key ): # <<<<<<<<<<<<<<
7298 * if key != 'vbo':
7299 * return getattr( self.vbo, key )
7300 */
7301
7302 /* Python wrapper */
7303 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_5__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_5__getattr__(PyObject * __pyx_v_self,PyObject * __pyx_v_key)7304 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_5__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
7305 PyObject *__pyx_r = 0;
7306 __Pyx_RefNannyDeclarations
7307 __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
7308 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_4__getattr__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_self), ((PyObject *)__pyx_v_key));
7309
7310 /* function exit code */
7311 __Pyx_RefNannyFinishContext();
7312 return __pyx_r;
7313 }
7314
__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_4__getattr__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset * __pyx_v_self,PyObject * __pyx_v_key)7315 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_4__getattr__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *__pyx_v_self, PyObject *__pyx_v_key) {
7316 PyObject *__pyx_r = NULL;
7317 __Pyx_RefNannyDeclarations
7318 int __pyx_t_1;
7319 PyObject *__pyx_t_2 = NULL;
7320 PyObject *__pyx_t_3 = NULL;
7321 __Pyx_RefNannySetupContext("__getattr__", 0);
7322
7323 /* "src/vbo.pyx":277
7324 *
7325 * def __getattr__( self, key ):
7326 * if key != 'vbo': # <<<<<<<<<<<<<<
7327 * return getattr( self.vbo, key )
7328 * raise AttributeError( 'No %r key in VBOOffset'%(key,))
7329 */
7330 __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_key, __pyx_n_s_vbo, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 277, __pyx_L1_error)
7331 if (__pyx_t_1) {
7332
7333 /* "src/vbo.pyx":278
7334 * def __getattr__( self, key ):
7335 * if key != 'vbo':
7336 * return getattr( self.vbo, key ) # <<<<<<<<<<<<<<
7337 * raise AttributeError( 'No %r key in VBOOffset'%(key,))
7338 * def __add__( self, other ):
7339 */
7340 __Pyx_XDECREF(__pyx_r);
7341 __pyx_t_2 = ((PyObject *)__pyx_v_self->vbo);
7342 __Pyx_INCREF(__pyx_t_2);
7343 __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error)
7344 __Pyx_GOTREF(__pyx_t_3);
7345 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7346 __pyx_r = __pyx_t_3;
7347 __pyx_t_3 = 0;
7348 goto __pyx_L0;
7349
7350 /* "src/vbo.pyx":277
7351 *
7352 * def __getattr__( self, key ):
7353 * if key != 'vbo': # <<<<<<<<<<<<<<
7354 * return getattr( self.vbo, key )
7355 * raise AttributeError( 'No %r key in VBOOffset'%(key,))
7356 */
7357 }
7358
7359 /* "src/vbo.pyx":279
7360 * if key != 'vbo':
7361 * return getattr( self.vbo, key )
7362 * raise AttributeError( 'No %r key in VBOOffset'%(key,)) # <<<<<<<<<<<<<<
7363 * def __add__( self, other ):
7364 * if hasattr( other, 'offset' ):
7365 */
7366 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 279, __pyx_L1_error)
7367 __Pyx_GOTREF(__pyx_t_3);
7368 __Pyx_INCREF(__pyx_v_key);
7369 __Pyx_GIVEREF(__pyx_v_key);
7370 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_key);
7371 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_No_r_key_in_VBOOffset, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error)
7372 __Pyx_GOTREF(__pyx_t_2);
7373 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7374 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_AttributeError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 279, __pyx_L1_error)
7375 __Pyx_GOTREF(__pyx_t_3);
7376 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7377 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
7378 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7379 __PYX_ERR(0, 279, __pyx_L1_error)
7380
7381 /* "src/vbo.pyx":276
7382 * self.vbo = None
7383 *
7384 * def __getattr__( self, key ): # <<<<<<<<<<<<<<
7385 * if key != 'vbo':
7386 * return getattr( self.vbo, key )
7387 */
7388
7389 /* function exit code */
7390 __pyx_L1_error:;
7391 __Pyx_XDECREF(__pyx_t_2);
7392 __Pyx_XDECREF(__pyx_t_3);
7393 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBOOffset.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7394 __pyx_r = NULL;
7395 __pyx_L0:;
7396 __Pyx_XGIVEREF(__pyx_r);
7397 __Pyx_RefNannyFinishContext();
7398 return __pyx_r;
7399 }
7400
7401 /* "src/vbo.pyx":280
7402 * return getattr( self.vbo, key )
7403 * raise AttributeError( 'No %r key in VBOOffset'%(key,))
7404 * def __add__( self, other ): # <<<<<<<<<<<<<<
7405 * if hasattr( other, 'offset' ):
7406 * other = other.offset
7407 */
7408
7409 /* Python wrapper */
7410 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_7__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_7__add__(PyObject * __pyx_v_self,PyObject * __pyx_v_other)7411 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_7__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
7412 PyObject *__pyx_r = 0;
7413 __Pyx_RefNannyDeclarations
7414 __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
7415 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_6__add__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
7416
7417 /* function exit code */
7418 __Pyx_RefNannyFinishContext();
7419 return __pyx_r;
7420 }
7421
__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_6__add__(PyObject * __pyx_v_self,PyObject * __pyx_v_other)7422 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_6__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
7423 PyObject *__pyx_r = NULL;
7424 __Pyx_RefNannyDeclarations
7425 int __pyx_t_1;
7426 int __pyx_t_2;
7427 PyObject *__pyx_t_3 = NULL;
7428 PyObject *__pyx_t_4 = NULL;
7429 PyObject *__pyx_t_5 = NULL;
7430 __Pyx_RefNannySetupContext("__add__", 0);
7431 __Pyx_INCREF(__pyx_v_other);
7432
7433 /* "src/vbo.pyx":281
7434 * raise AttributeError( 'No %r key in VBOOffset'%(key,))
7435 * def __add__( self, other ):
7436 * if hasattr( other, 'offset' ): # <<<<<<<<<<<<<<
7437 * other = other.offset
7438 * return VBOOffset( self.vbo, self.offset + other )
7439 */
7440 __pyx_t_1 = __Pyx_HasAttr(__pyx_v_other, __pyx_n_s_offset); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 281, __pyx_L1_error)
7441 __pyx_t_2 = (__pyx_t_1 != 0);
7442 if (__pyx_t_2) {
7443
7444 /* "src/vbo.pyx":282
7445 * def __add__( self, other ):
7446 * if hasattr( other, 'offset' ):
7447 * other = other.offset # <<<<<<<<<<<<<<
7448 * return VBOOffset( self.vbo, self.offset + other )
7449 * cdef int check_live( self ):
7450 */
7451 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 282, __pyx_L1_error)
7452 __Pyx_GOTREF(__pyx_t_3);
7453 __Pyx_DECREF_SET(__pyx_v_other, __pyx_t_3);
7454 __pyx_t_3 = 0;
7455
7456 /* "src/vbo.pyx":281
7457 * raise AttributeError( 'No %r key in VBOOffset'%(key,))
7458 * def __add__( self, other ):
7459 * if hasattr( other, 'offset' ): # <<<<<<<<<<<<<<
7460 * other = other.offset
7461 * return VBOOffset( self.vbo, self.offset + other )
7462 */
7463 }
7464
7465 /* "src/vbo.pyx":283
7466 * if hasattr( other, 'offset' ):
7467 * other = other.offset
7468 * return VBOOffset( self.vbo, self.offset + other ) # <<<<<<<<<<<<<<
7469 * cdef int check_live( self ):
7470 * if self.vbo is not None:
7471 */
7472 __Pyx_XDECREF(__pyx_r);
7473 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_vbo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L1_error)
7474 __Pyx_GOTREF(__pyx_t_3);
7475 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 283, __pyx_L1_error)
7476 __Pyx_GOTREF(__pyx_t_4);
7477 __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_v_other); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 283, __pyx_L1_error)
7478 __Pyx_GOTREF(__pyx_t_5);
7479 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7480 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 283, __pyx_L1_error)
7481 __Pyx_GOTREF(__pyx_t_4);
7482 __Pyx_GIVEREF(__pyx_t_3);
7483 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
7484 __Pyx_GIVEREF(__pyx_t_5);
7485 PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);
7486 __pyx_t_3 = 0;
7487 __pyx_t_5 = 0;
7488 __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_17OpenGL_accelerate_3vbo_VBOOffset), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 283, __pyx_L1_error)
7489 __Pyx_GOTREF(__pyx_t_5);
7490 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7491 __pyx_r = __pyx_t_5;
7492 __pyx_t_5 = 0;
7493 goto __pyx_L0;
7494
7495 /* "src/vbo.pyx":280
7496 * return getattr( self.vbo, key )
7497 * raise AttributeError( 'No %r key in VBOOffset'%(key,))
7498 * def __add__( self, other ): # <<<<<<<<<<<<<<
7499 * if hasattr( other, 'offset' ):
7500 * other = other.offset
7501 */
7502
7503 /* function exit code */
7504 __pyx_L1_error:;
7505 __Pyx_XDECREF(__pyx_t_3);
7506 __Pyx_XDECREF(__pyx_t_4);
7507 __Pyx_XDECREF(__pyx_t_5);
7508 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBOOffset.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7509 __pyx_r = NULL;
7510 __pyx_L0:;
7511 __Pyx_XDECREF(__pyx_v_other);
7512 __Pyx_XGIVEREF(__pyx_r);
7513 __Pyx_RefNannyFinishContext();
7514 return __pyx_r;
7515 }
7516
7517 /* "src/vbo.pyx":284
7518 * other = other.offset
7519 * return VBOOffset( self.vbo, self.offset + other )
7520 * cdef int check_live( self ): # <<<<<<<<<<<<<<
7521 * if self.vbo is not None:
7522 * return self.vbo.check_live()
7523 */
7524
__pyx_f_17OpenGL_accelerate_3vbo_9VBOOffset_check_live(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset * __pyx_v_self)7525 static int __pyx_f_17OpenGL_accelerate_3vbo_9VBOOffset_check_live(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *__pyx_v_self) {
7526 int __pyx_r;
7527 __Pyx_RefNannyDeclarations
7528 int __pyx_t_1;
7529 int __pyx_t_2;
7530 PyObject *__pyx_t_3 = NULL;
7531 __Pyx_RefNannySetupContext("check_live", 0);
7532
7533 /* "src/vbo.pyx":285
7534 * return VBOOffset( self.vbo, self.offset + other )
7535 * cdef int check_live( self ):
7536 * if self.vbo is not None: # <<<<<<<<<<<<<<
7537 * return self.vbo.check_live()
7538 * else:
7539 */
7540 __pyx_t_1 = (((PyObject *)__pyx_v_self->vbo) != Py_None);
7541 __pyx_t_2 = (__pyx_t_1 != 0);
7542 if (likely(__pyx_t_2)) {
7543
7544 /* "src/vbo.pyx":286
7545 * cdef int check_live( self ):
7546 * if self.vbo is not None:
7547 * return self.vbo.check_live() # <<<<<<<<<<<<<<
7548 * else:
7549 * raise RuntimeError( """Attempting to use offset into deleted VBO""" )
7550 */
7551 __pyx_r = ((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_self->vbo->__pyx_vtab)->check_live(__pyx_v_self->vbo);
7552 goto __pyx_L0;
7553
7554 /* "src/vbo.pyx":285
7555 * return VBOOffset( self.vbo, self.offset + other )
7556 * cdef int check_live( self ):
7557 * if self.vbo is not None: # <<<<<<<<<<<<<<
7558 * return self.vbo.check_live()
7559 * else:
7560 */
7561 }
7562
7563 /* "src/vbo.pyx":288
7564 * return self.vbo.check_live()
7565 * else:
7566 * raise RuntimeError( """Attempting to use offset into deleted VBO""" ) # <<<<<<<<<<<<<<
7567 *
7568 * cdef class VBOHandler(FormatHandler):
7569 */
7570 /*else*/ {
7571 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __pyx_L1_error)
7572 __Pyx_GOTREF(__pyx_t_3);
7573 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
7574 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7575 __PYX_ERR(0, 288, __pyx_L1_error)
7576 }
7577
7578 /* "src/vbo.pyx":284
7579 * other = other.offset
7580 * return VBOOffset( self.vbo, self.offset + other )
7581 * cdef int check_live( self ): # <<<<<<<<<<<<<<
7582 * if self.vbo is not None:
7583 * return self.vbo.check_live()
7584 */
7585
7586 /* function exit code */
7587 __pyx_L1_error:;
7588 __Pyx_XDECREF(__pyx_t_3);
7589 __Pyx_WriteUnraisable("OpenGL_accelerate.vbo.VBOOffset.check_live", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
7590 __pyx_r = 0;
7591 __pyx_L0:;
7592 __Pyx_RefNannyFinishContext();
7593 return __pyx_r;
7594 }
7595
7596 /* "src/vbo.pyx":265
7597 * an integer-array of the offset.
7598 * """
7599 * cdef public VBO vbo # <<<<<<<<<<<<<<
7600 * cdef public unsigned int offset
7601 * def __cinit__( self, VBO vbo, unsigned int offset ):
7602 */
7603
7604 /* Python wrapper */
7605 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo_1__get__(PyObject * __pyx_v_self)7606 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo_1__get__(PyObject *__pyx_v_self) {
7607 PyObject *__pyx_r = 0;
7608 __Pyx_RefNannyDeclarations
7609 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7610 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo___get__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_self));
7611
7612 /* function exit code */
7613 __Pyx_RefNannyFinishContext();
7614 return __pyx_r;
7615 }
7616
__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset * __pyx_v_self)7617 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *__pyx_v_self) {
7618 PyObject *__pyx_r = NULL;
7619 __Pyx_RefNannyDeclarations
7620 __Pyx_RefNannySetupContext("__get__", 0);
7621 __Pyx_XDECREF(__pyx_r);
7622 __Pyx_INCREF(((PyObject *)__pyx_v_self->vbo));
7623 __pyx_r = ((PyObject *)__pyx_v_self->vbo);
7624 goto __pyx_L0;
7625
7626 /* function exit code */
7627 __pyx_L0:;
7628 __Pyx_XGIVEREF(__pyx_r);
7629 __Pyx_RefNannyFinishContext();
7630 return __pyx_r;
7631 }
7632
7633 /* Python wrapper */
7634 static int __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)7635 static int __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7636 int __pyx_r;
7637 __Pyx_RefNannyDeclarations
7638 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7639 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo_2__set__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7640
7641 /* function exit code */
7642 __Pyx_RefNannyFinishContext();
7643 return __pyx_r;
7644 }
7645
__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset * __pyx_v_self,PyObject * __pyx_v_value)7646 static int __pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *__pyx_v_self, PyObject *__pyx_v_value) {
7647 int __pyx_r;
7648 __Pyx_RefNannyDeclarations
7649 PyObject *__pyx_t_1 = NULL;
7650 __Pyx_RefNannySetupContext("__set__", 0);
7651 if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_17OpenGL_accelerate_3vbo_VBO))))) __PYX_ERR(0, 265, __pyx_L1_error)
7652 __pyx_t_1 = __pyx_v_value;
7653 __Pyx_INCREF(__pyx_t_1);
7654 __Pyx_GIVEREF(__pyx_t_1);
7655 __Pyx_GOTREF(__pyx_v_self->vbo);
7656 __Pyx_DECREF(((PyObject *)__pyx_v_self->vbo));
7657 __pyx_v_self->vbo = ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_t_1);
7658 __pyx_t_1 = 0;
7659
7660 /* function exit code */
7661 __pyx_r = 0;
7662 goto __pyx_L0;
7663 __pyx_L1_error:;
7664 __Pyx_XDECREF(__pyx_t_1);
7665 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBOOffset.vbo.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7666 __pyx_r = -1;
7667 __pyx_L0:;
7668 __Pyx_RefNannyFinishContext();
7669 return __pyx_r;
7670 }
7671
7672 /* Python wrapper */
7673 static int __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo_5__del__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo_5__del__(PyObject * __pyx_v_self)7674 static int __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo_5__del__(PyObject *__pyx_v_self) {
7675 int __pyx_r;
7676 __Pyx_RefNannyDeclarations
7677 __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7678 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo_4__del__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_self));
7679
7680 /* function exit code */
7681 __Pyx_RefNannyFinishContext();
7682 return __pyx_r;
7683 }
7684
__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo_4__del__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset * __pyx_v_self)7685 static int __pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo_4__del__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *__pyx_v_self) {
7686 int __pyx_r;
7687 __Pyx_RefNannyDeclarations
7688 __Pyx_RefNannySetupContext("__del__", 0);
7689 __Pyx_INCREF(Py_None);
7690 __Pyx_GIVEREF(Py_None);
7691 __Pyx_GOTREF(__pyx_v_self->vbo);
7692 __Pyx_DECREF(((PyObject *)__pyx_v_self->vbo));
7693 __pyx_v_self->vbo = ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)Py_None);
7694
7695 /* function exit code */
7696 __pyx_r = 0;
7697 __Pyx_RefNannyFinishContext();
7698 return __pyx_r;
7699 }
7700
7701 /* "src/vbo.pyx":266
7702 * """
7703 * cdef public VBO vbo
7704 * cdef public unsigned int offset # <<<<<<<<<<<<<<
7705 * def __cinit__( self, VBO vbo, unsigned int offset ):
7706 * self.vbo = vbo
7707 */
7708
7709 /* Python wrapper */
7710 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_6offset_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_6offset_1__get__(PyObject * __pyx_v_self)7711 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_6offset_1__get__(PyObject *__pyx_v_self) {
7712 PyObject *__pyx_r = 0;
7713 __Pyx_RefNannyDeclarations
7714 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7715 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_6offset___get__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_self));
7716
7717 /* function exit code */
7718 __Pyx_RefNannyFinishContext();
7719 return __pyx_r;
7720 }
7721
__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_6offset___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset * __pyx_v_self)7722 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_6offset___get__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *__pyx_v_self) {
7723 PyObject *__pyx_r = NULL;
7724 __Pyx_RefNannyDeclarations
7725 PyObject *__pyx_t_1 = NULL;
7726 __Pyx_RefNannySetupContext("__get__", 0);
7727 __Pyx_XDECREF(__pyx_r);
7728 __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error)
7729 __Pyx_GOTREF(__pyx_t_1);
7730 __pyx_r = __pyx_t_1;
7731 __pyx_t_1 = 0;
7732 goto __pyx_L0;
7733
7734 /* function exit code */
7735 __pyx_L1_error:;
7736 __Pyx_XDECREF(__pyx_t_1);
7737 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBOOffset.offset.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7738 __pyx_r = NULL;
7739 __pyx_L0:;
7740 __Pyx_XGIVEREF(__pyx_r);
7741 __Pyx_RefNannyFinishContext();
7742 return __pyx_r;
7743 }
7744
7745 /* Python wrapper */
7746 static int __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_6offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_6offset_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)7747 static int __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_6offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7748 int __pyx_r;
7749 __Pyx_RefNannyDeclarations
7750 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7751 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_6offset_2__set__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7752
7753 /* function exit code */
7754 __Pyx_RefNannyFinishContext();
7755 return __pyx_r;
7756 }
7757
__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_6offset_2__set__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset * __pyx_v_self,PyObject * __pyx_v_value)7758 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) {
7759 int __pyx_r;
7760 __Pyx_RefNannyDeclarations
7761 unsigned int __pyx_t_1;
7762 __Pyx_RefNannySetupContext("__set__", 0);
7763 __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 266, __pyx_L1_error)
7764 __pyx_v_self->offset = __pyx_t_1;
7765
7766 /* function exit code */
7767 __pyx_r = 0;
7768 goto __pyx_L0;
7769 __pyx_L1_error:;
7770 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBOOffset.offset.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7771 __pyx_r = -1;
7772 __pyx_L0:;
7773 __Pyx_RefNannyFinishContext();
7774 return __pyx_r;
7775 }
7776
7777 /* "(tree fragment)":1
7778 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
7779 * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
7780 * def __setstate_cython__(self, __pyx_state):
7781 */
7782
7783 /* Python wrapper */
7784 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_9__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)7785 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
7786 PyObject *__pyx_r = 0;
7787 __Pyx_RefNannyDeclarations
7788 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
7789 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_8__reduce_cython__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_self));
7790
7791 /* function exit code */
7792 __Pyx_RefNannyFinishContext();
7793 return __pyx_r;
7794 }
7795
__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset * __pyx_v_self)7796 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *__pyx_v_self) {
7797 PyObject *__pyx_r = NULL;
7798 __Pyx_RefNannyDeclarations
7799 PyObject *__pyx_t_1 = NULL;
7800 __Pyx_RefNannySetupContext("__reduce_cython__", 0);
7801
7802 /* "(tree fragment)":2
7803 * def __reduce_cython__(self):
7804 * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
7805 * def __setstate_cython__(self, __pyx_state):
7806 * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
7807 */
7808 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
7809 __Pyx_GOTREF(__pyx_t_1);
7810 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7811 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7812 __PYX_ERR(1, 2, __pyx_L1_error)
7813
7814 /* "(tree fragment)":1
7815 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
7816 * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
7817 * def __setstate_cython__(self, __pyx_state):
7818 */
7819
7820 /* function exit code */
7821 __pyx_L1_error:;
7822 __Pyx_XDECREF(__pyx_t_1);
7823 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBOOffset.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7824 __pyx_r = NULL;
7825 __Pyx_XGIVEREF(__pyx_r);
7826 __Pyx_RefNannyFinishContext();
7827 return __pyx_r;
7828 }
7829
7830 /* "(tree fragment)":3
7831 * def __reduce_cython__(self):
7832 * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
7833 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
7834 * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
7835 */
7836
7837 /* Python wrapper */
7838 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_11__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)7839 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
7840 PyObject *__pyx_r = 0;
7841 __Pyx_RefNannyDeclarations
7842 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
7843 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_10__setstate_cython__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
7844
7845 /* function exit code */
7846 __Pyx_RefNannyFinishContext();
7847 return __pyx_r;
7848 }
7849
__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)7850 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_9VBOOffset_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
7851 PyObject *__pyx_r = NULL;
7852 __Pyx_RefNannyDeclarations
7853 PyObject *__pyx_t_1 = NULL;
7854 __Pyx_RefNannySetupContext("__setstate_cython__", 0);
7855
7856 /* "(tree fragment)":4
7857 * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
7858 * def __setstate_cython__(self, __pyx_state):
7859 * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
7860 */
7861 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
7862 __Pyx_GOTREF(__pyx_t_1);
7863 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7864 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7865 __PYX_ERR(1, 4, __pyx_L1_error)
7866
7867 /* "(tree fragment)":3
7868 * def __reduce_cython__(self):
7869 * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
7870 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
7871 * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
7872 */
7873
7874 /* function exit code */
7875 __pyx_L1_error:;
7876 __Pyx_XDECREF(__pyx_t_1);
7877 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBOOffset.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7878 __pyx_r = NULL;
7879 __Pyx_XGIVEREF(__pyx_r);
7880 __Pyx_RefNannyFinishContext();
7881 return __pyx_r;
7882 }
7883
7884 /* "src/vbo.pyx":295
7885 * cdef object arrayType # import and use explicit reference...
7886 * isOutput = False
7887 * def __init__( self ): # <<<<<<<<<<<<<<
7888 * self.vp0 = ctypes.c_void_p( 0 )
7889 * from OpenGL.arrays.arraydatatype import ArrayDatatype
7890 */
7891
7892 /* Python wrapper */
7893 static int __pyx_pw_17OpenGL_accelerate_3vbo_10VBOHandler_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_10VBOHandler_1__init__(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)7894 static int __pyx_pw_17OpenGL_accelerate_3vbo_10VBOHandler_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7895 int __pyx_r;
7896 __Pyx_RefNannyDeclarations
7897 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
7898 if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
7899 __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
7900 if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
7901 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_10VBOHandler___init__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *)__pyx_v_self));
7902
7903 /* function exit code */
7904 __Pyx_RefNannyFinishContext();
7905 return __pyx_r;
7906 }
7907
__pyx_pf_17OpenGL_accelerate_3vbo_10VBOHandler___init__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler * __pyx_v_self)7908 static int __pyx_pf_17OpenGL_accelerate_3vbo_10VBOHandler___init__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *__pyx_v_self) {
7909 PyObject *__pyx_v_ArrayDatatype = NULL;
7910 int __pyx_r;
7911 __Pyx_RefNannyDeclarations
7912 PyObject *__pyx_t_1 = NULL;
7913 PyObject *__pyx_t_2 = NULL;
7914 PyObject *__pyx_t_3 = NULL;
7915 __Pyx_RefNannySetupContext("__init__", 0);
7916
7917 /* "src/vbo.pyx":296
7918 * isOutput = False
7919 * def __init__( self ):
7920 * self.vp0 = ctypes.c_void_p( 0 ) # <<<<<<<<<<<<<<
7921 * from OpenGL.arrays.arraydatatype import ArrayDatatype
7922 * self.arrayType = ArrayDatatype
7923 */
7924 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 296, __pyx_L1_error)
7925 __Pyx_GOTREF(__pyx_t_2);
7926 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_c_void_p); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 296, __pyx_L1_error)
7927 __Pyx_GOTREF(__pyx_t_3);
7928 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7929 __pyx_t_2 = NULL;
7930 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
7931 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
7932 if (likely(__pyx_t_2)) {
7933 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
7934 __Pyx_INCREF(__pyx_t_2);
7935 __Pyx_INCREF(function);
7936 __Pyx_DECREF_SET(__pyx_t_3, function);
7937 }
7938 }
7939 __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_0);
7940 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
7941 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error)
7942 __Pyx_GOTREF(__pyx_t_1);
7943 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7944 __Pyx_GIVEREF(__pyx_t_1);
7945 __Pyx_GOTREF(__pyx_v_self->vp0);
7946 __Pyx_DECREF(__pyx_v_self->vp0);
7947 __pyx_v_self->vp0 = __pyx_t_1;
7948 __pyx_t_1 = 0;
7949
7950 /* "src/vbo.pyx":297
7951 * def __init__( self ):
7952 * self.vp0 = ctypes.c_void_p( 0 )
7953 * from OpenGL.arrays.arraydatatype import ArrayDatatype # <<<<<<<<<<<<<<
7954 * self.arrayType = ArrayDatatype
7955 * cdef object c_dataPointer( self, object instance ):
7956 */
7957 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 297, __pyx_L1_error)
7958 __Pyx_GOTREF(__pyx_t_1);
7959 __Pyx_INCREF(__pyx_n_s_ArrayDatatype);
7960 __Pyx_GIVEREF(__pyx_n_s_ArrayDatatype);
7961 PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_ArrayDatatype);
7962 __pyx_t_3 = __Pyx_Import(__pyx_n_s_OpenGL_arrays_arraydatatype, __pyx_t_1, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 297, __pyx_L1_error)
7963 __Pyx_GOTREF(__pyx_t_3);
7964 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7965 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_ArrayDatatype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 297, __pyx_L1_error)
7966 __Pyx_GOTREF(__pyx_t_1);
7967 __Pyx_INCREF(__pyx_t_1);
7968 __pyx_v_ArrayDatatype = __pyx_t_1;
7969 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7970 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7971
7972 /* "src/vbo.pyx":298
7973 * self.vp0 = ctypes.c_void_p( 0 )
7974 * from OpenGL.arrays.arraydatatype import ArrayDatatype
7975 * self.arrayType = ArrayDatatype # <<<<<<<<<<<<<<
7976 * cdef object c_dataPointer( self, object instance ):
7977 * """Retrieve data-pointer directly"""
7978 */
7979 __Pyx_INCREF(__pyx_v_ArrayDatatype);
7980 __Pyx_GIVEREF(__pyx_v_ArrayDatatype);
7981 __Pyx_GOTREF(__pyx_v_self->arrayType);
7982 __Pyx_DECREF(__pyx_v_self->arrayType);
7983 __pyx_v_self->arrayType = __pyx_v_ArrayDatatype;
7984
7985 /* "src/vbo.pyx":295
7986 * cdef object arrayType # import and use explicit reference...
7987 * isOutput = False
7988 * def __init__( self ): # <<<<<<<<<<<<<<
7989 * self.vp0 = ctypes.c_void_p( 0 )
7990 * from OpenGL.arrays.arraydatatype import ArrayDatatype
7991 */
7992
7993 /* function exit code */
7994 __pyx_r = 0;
7995 goto __pyx_L0;
7996 __pyx_L1_error:;
7997 __Pyx_XDECREF(__pyx_t_1);
7998 __Pyx_XDECREF(__pyx_t_2);
7999 __Pyx_XDECREF(__pyx_t_3);
8000 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBOHandler.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8001 __pyx_r = -1;
8002 __pyx_L0:;
8003 __Pyx_XDECREF(__pyx_v_ArrayDatatype);
8004 __Pyx_RefNannyFinishContext();
8005 return __pyx_r;
8006 }
8007
8008 /* "src/vbo.pyx":299
8009 * from OpenGL.arrays.arraydatatype import ArrayDatatype
8010 * self.arrayType = ArrayDatatype
8011 * cdef object c_dataPointer( self, object instance ): # <<<<<<<<<<<<<<
8012 * """Retrieve data-pointer directly"""
8013 * (<VBO>instance).check_live()
8014 */
8015
__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_dataPointer(CYTHON_UNUSED struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler * __pyx_v_self,PyObject * __pyx_v_instance)8016 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_dataPointer(CYTHON_UNUSED struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *__pyx_v_self, PyObject *__pyx_v_instance) {
8017 PyObject *__pyx_r = NULL;
8018 __Pyx_RefNannyDeclarations
8019 __Pyx_RefNannySetupContext("c_dataPointer", 0);
8020
8021 /* "src/vbo.pyx":301
8022 * cdef object c_dataPointer( self, object instance ):
8023 * """Retrieve data-pointer directly"""
8024 * (<VBO>instance).check_live() # <<<<<<<<<<<<<<
8025 * return 0
8026 * cdef c_from_param( self, object instance, object typeCode ):
8027 */
8028 (void)(((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *)((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_instance)->__pyx_vtab)->check_live(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_instance)));
8029
8030 /* "src/vbo.pyx":302
8031 * """Retrieve data-pointer directly"""
8032 * (<VBO>instance).check_live()
8033 * return 0 # <<<<<<<<<<<<<<
8034 * cdef c_from_param( self, object instance, object typeCode ):
8035 * """simple function-based from_param"""
8036 */
8037 __Pyx_XDECREF(__pyx_r);
8038 __Pyx_INCREF(__pyx_int_0);
8039 __pyx_r = __pyx_int_0;
8040 goto __pyx_L0;
8041
8042 /* "src/vbo.pyx":299
8043 * from OpenGL.arrays.arraydatatype import ArrayDatatype
8044 * self.arrayType = ArrayDatatype
8045 * cdef object c_dataPointer( self, object instance ): # <<<<<<<<<<<<<<
8046 * """Retrieve data-pointer directly"""
8047 * (<VBO>instance).check_live()
8048 */
8049
8050 /* function exit code */
8051 __pyx_L0:;
8052 __Pyx_XGIVEREF(__pyx_r);
8053 __Pyx_RefNannyFinishContext();
8054 return __pyx_r;
8055 }
8056
8057 /* "src/vbo.pyx":303
8058 * (<VBO>instance).check_live()
8059 * return 0
8060 * cdef c_from_param( self, object instance, object typeCode ): # <<<<<<<<<<<<<<
8061 * """simple function-based from_param"""
8062 * (<VBO>instance).check_live()
8063 */
8064
__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_from_param(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler * __pyx_v_self,PyObject * __pyx_v_instance,CYTHON_UNUSED PyObject * __pyx_v_typeCode)8065 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_from_param(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *__pyx_v_self, PyObject *__pyx_v_instance, CYTHON_UNUSED PyObject *__pyx_v_typeCode) {
8066 PyObject *__pyx_r = NULL;
8067 __Pyx_RefNannyDeclarations
8068 __Pyx_RefNannySetupContext("c_from_param", 0);
8069
8070 /* "src/vbo.pyx":305
8071 * cdef c_from_param( self, object instance, object typeCode ):
8072 * """simple function-based from_param"""
8073 * (<VBO>instance).check_live() # <<<<<<<<<<<<<<
8074 * return self.vp0
8075 * cdef c_asArray( self, object instance, object typeCode ):
8076 */
8077 (void)(((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *)((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_instance)->__pyx_vtab)->check_live(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_instance)));
8078
8079 /* "src/vbo.pyx":306
8080 * """simple function-based from_param"""
8081 * (<VBO>instance).check_live()
8082 * return self.vp0 # <<<<<<<<<<<<<<
8083 * cdef c_asArray( self, object instance, object typeCode ):
8084 * """Retrieve the given value as a (contiguous) array of type typeCode"""
8085 */
8086 __Pyx_XDECREF(__pyx_r);
8087 __Pyx_INCREF(__pyx_v_self->vp0);
8088 __pyx_r = __pyx_v_self->vp0;
8089 goto __pyx_L0;
8090
8091 /* "src/vbo.pyx":303
8092 * (<VBO>instance).check_live()
8093 * return 0
8094 * cdef c_from_param( self, object instance, object typeCode ): # <<<<<<<<<<<<<<
8095 * """simple function-based from_param"""
8096 * (<VBO>instance).check_live()
8097 */
8098
8099 /* function exit code */
8100 __pyx_L0:;
8101 __Pyx_XGIVEREF(__pyx_r);
8102 __Pyx_RefNannyFinishContext();
8103 return __pyx_r;
8104 }
8105
8106 /* "src/vbo.pyx":307
8107 * (<VBO>instance).check_live()
8108 * return self.vp0
8109 * cdef c_asArray( self, object instance, object typeCode ): # <<<<<<<<<<<<<<
8110 * """Retrieve the given value as a (contiguous) array of type typeCode"""
8111 * (<VBO>instance).check_live()
8112 */
8113
__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_asArray(CYTHON_UNUSED struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler * __pyx_v_self,PyObject * __pyx_v_instance,CYTHON_UNUSED PyObject * __pyx_v_typeCode)8114 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_asArray(CYTHON_UNUSED struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *__pyx_v_self, PyObject *__pyx_v_instance, CYTHON_UNUSED PyObject *__pyx_v_typeCode) {
8115 PyObject *__pyx_r = NULL;
8116 __Pyx_RefNannyDeclarations
8117 __Pyx_RefNannySetupContext("c_asArray", 0);
8118
8119 /* "src/vbo.pyx":309
8120 * cdef c_asArray( self, object instance, object typeCode ):
8121 * """Retrieve the given value as a (contiguous) array of type typeCode"""
8122 * (<VBO>instance).check_live() # <<<<<<<<<<<<<<
8123 * return instance
8124 * cdef c_arrayByteCount( self, object instance ):
8125 */
8126 (void)(((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *)((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_instance)->__pyx_vtab)->check_live(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_instance)));
8127
8128 /* "src/vbo.pyx":310
8129 * """Retrieve the given value as a (contiguous) array of type typeCode"""
8130 * (<VBO>instance).check_live()
8131 * return instance # <<<<<<<<<<<<<<
8132 * cdef c_arrayByteCount( self, object instance ):
8133 * """Given a data-value, calculate number of bytes required to represent"""
8134 */
8135 __Pyx_XDECREF(__pyx_r);
8136 __Pyx_INCREF(__pyx_v_instance);
8137 __pyx_r = __pyx_v_instance;
8138 goto __pyx_L0;
8139
8140 /* "src/vbo.pyx":307
8141 * (<VBO>instance).check_live()
8142 * return self.vp0
8143 * cdef c_asArray( self, object instance, object typeCode ): # <<<<<<<<<<<<<<
8144 * """Retrieve the given value as a (contiguous) array of type typeCode"""
8145 * (<VBO>instance).check_live()
8146 */
8147
8148 /* function exit code */
8149 __pyx_L0:;
8150 __Pyx_XGIVEREF(__pyx_r);
8151 __Pyx_RefNannyFinishContext();
8152 return __pyx_r;
8153 }
8154
8155 /* "src/vbo.pyx":311
8156 * (<VBO>instance).check_live()
8157 * return instance
8158 * cdef c_arrayByteCount( self, object instance ): # <<<<<<<<<<<<<<
8159 * """Given a data-value, calculate number of bytes required to represent"""
8160 * (<VBO>instance).check_live()
8161 */
8162
__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_arrayByteCount(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler * __pyx_v_self,PyObject * __pyx_v_instance)8163 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_arrayByteCount(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *__pyx_v_self, PyObject *__pyx_v_instance) {
8164 PyObject *__pyx_r = NULL;
8165 __Pyx_RefNannyDeclarations
8166 PyObject *__pyx_t_1 = NULL;
8167 PyObject *__pyx_t_2 = NULL;
8168 PyObject *__pyx_t_3 = NULL;
8169 __Pyx_RefNannySetupContext("c_arrayByteCount", 0);
8170
8171 /* "src/vbo.pyx":313
8172 * cdef c_arrayByteCount( self, object instance ):
8173 * """Given a data-value, calculate number of bytes required to represent"""
8174 * (<VBO>instance).check_live() # <<<<<<<<<<<<<<
8175 * return self.arrayType.arrayByteCount( (<VBO>instance).data )
8176 * cdef c_arrayToGLType( self, object instance ):
8177 */
8178 (void)(((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *)((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_instance)->__pyx_vtab)->check_live(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_instance)));
8179
8180 /* "src/vbo.pyx":314
8181 * """Given a data-value, calculate number of bytes required to represent"""
8182 * (<VBO>instance).check_live()
8183 * return self.arrayType.arrayByteCount( (<VBO>instance).data ) # <<<<<<<<<<<<<<
8184 * cdef c_arrayToGLType( self, object instance ):
8185 * """Given a value, guess OpenGL type of the corresponding pointer"""
8186 */
8187 __Pyx_XDECREF(__pyx_r);
8188 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s_arrayByteCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 314, __pyx_L1_error)
8189 __Pyx_GOTREF(__pyx_t_2);
8190 __pyx_t_3 = NULL;
8191 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
8192 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
8193 if (likely(__pyx_t_3)) {
8194 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
8195 __Pyx_INCREF(__pyx_t_3);
8196 __Pyx_INCREF(function);
8197 __Pyx_DECREF_SET(__pyx_t_2, function);
8198 }
8199 }
8200 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_instance)->data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_instance)->data);
8201 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
8202 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error)
8203 __Pyx_GOTREF(__pyx_t_1);
8204 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8205 __pyx_r = __pyx_t_1;
8206 __pyx_t_1 = 0;
8207 goto __pyx_L0;
8208
8209 /* "src/vbo.pyx":311
8210 * (<VBO>instance).check_live()
8211 * return instance
8212 * cdef c_arrayByteCount( self, object instance ): # <<<<<<<<<<<<<<
8213 * """Given a data-value, calculate number of bytes required to represent"""
8214 * (<VBO>instance).check_live()
8215 */
8216
8217 /* function exit code */
8218 __pyx_L1_error:;
8219 __Pyx_XDECREF(__pyx_t_1);
8220 __Pyx_XDECREF(__pyx_t_2);
8221 __Pyx_XDECREF(__pyx_t_3);
8222 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBOHandler.c_arrayByteCount", __pyx_clineno, __pyx_lineno, __pyx_filename);
8223 __pyx_r = 0;
8224 __pyx_L0:;
8225 __Pyx_XGIVEREF(__pyx_r);
8226 __Pyx_RefNannyFinishContext();
8227 return __pyx_r;
8228 }
8229
8230 /* "src/vbo.pyx":315
8231 * (<VBO>instance).check_live()
8232 * return self.arrayType.arrayByteCount( (<VBO>instance).data )
8233 * cdef c_arrayToGLType( self, object instance ): # <<<<<<<<<<<<<<
8234 * """Given a value, guess OpenGL type of the corresponding pointer"""
8235 * (<VBO>instance).check_live()
8236 */
8237
__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_arrayToGLType(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler * __pyx_v_self,PyObject * __pyx_v_instance)8238 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_arrayToGLType(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *__pyx_v_self, PyObject *__pyx_v_instance) {
8239 PyObject *__pyx_r = NULL;
8240 __Pyx_RefNannyDeclarations
8241 PyObject *__pyx_t_1 = NULL;
8242 PyObject *__pyx_t_2 = NULL;
8243 PyObject *__pyx_t_3 = NULL;
8244 __Pyx_RefNannySetupContext("c_arrayToGLType", 0);
8245
8246 /* "src/vbo.pyx":317
8247 * cdef c_arrayToGLType( self, object instance ):
8248 * """Given a value, guess OpenGL type of the corresponding pointer"""
8249 * (<VBO>instance).check_live() # <<<<<<<<<<<<<<
8250 * return self.arrayType.arrayToGLType( (<VBO>instance).data )
8251 * cdef c_arraySize( self, object instance, object typeCode ):
8252 */
8253 (void)(((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *)((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_instance)->__pyx_vtab)->check_live(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_instance)));
8254
8255 /* "src/vbo.pyx":318
8256 * """Given a value, guess OpenGL type of the corresponding pointer"""
8257 * (<VBO>instance).check_live()
8258 * return self.arrayType.arrayToGLType( (<VBO>instance).data ) # <<<<<<<<<<<<<<
8259 * cdef c_arraySize( self, object instance, object typeCode ):
8260 * """Retrieve array size reference"""
8261 */
8262 __Pyx_XDECREF(__pyx_r);
8263 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s_arrayToGLType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L1_error)
8264 __Pyx_GOTREF(__pyx_t_2);
8265 __pyx_t_3 = NULL;
8266 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
8267 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
8268 if (likely(__pyx_t_3)) {
8269 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
8270 __Pyx_INCREF(__pyx_t_3);
8271 __Pyx_INCREF(function);
8272 __Pyx_DECREF_SET(__pyx_t_2, function);
8273 }
8274 }
8275 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_instance)->data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_instance)->data);
8276 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
8277 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 318, __pyx_L1_error)
8278 __Pyx_GOTREF(__pyx_t_1);
8279 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8280 __pyx_r = __pyx_t_1;
8281 __pyx_t_1 = 0;
8282 goto __pyx_L0;
8283
8284 /* "src/vbo.pyx":315
8285 * (<VBO>instance).check_live()
8286 * return self.arrayType.arrayByteCount( (<VBO>instance).data )
8287 * cdef c_arrayToGLType( self, object instance ): # <<<<<<<<<<<<<<
8288 * """Given a value, guess OpenGL type of the corresponding pointer"""
8289 * (<VBO>instance).check_live()
8290 */
8291
8292 /* function exit code */
8293 __pyx_L1_error:;
8294 __Pyx_XDECREF(__pyx_t_1);
8295 __Pyx_XDECREF(__pyx_t_2);
8296 __Pyx_XDECREF(__pyx_t_3);
8297 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBOHandler.c_arrayToGLType", __pyx_clineno, __pyx_lineno, __pyx_filename);
8298 __pyx_r = 0;
8299 __pyx_L0:;
8300 __Pyx_XGIVEREF(__pyx_r);
8301 __Pyx_RefNannyFinishContext();
8302 return __pyx_r;
8303 }
8304
8305 /* "src/vbo.pyx":319
8306 * (<VBO>instance).check_live()
8307 * return self.arrayType.arrayToGLType( (<VBO>instance).data )
8308 * cdef c_arraySize( self, object instance, object typeCode ): # <<<<<<<<<<<<<<
8309 * """Retrieve array size reference"""
8310 * (<VBO>instance).check_live()
8311 */
8312
__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_arraySize(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler * __pyx_v_self,PyObject * __pyx_v_instance,CYTHON_UNUSED PyObject * __pyx_v_typeCode)8313 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_arraySize(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *__pyx_v_self, PyObject *__pyx_v_instance, CYTHON_UNUSED PyObject *__pyx_v_typeCode) {
8314 PyObject *__pyx_r = NULL;
8315 __Pyx_RefNannyDeclarations
8316 PyObject *__pyx_t_1 = NULL;
8317 PyObject *__pyx_t_2 = NULL;
8318 PyObject *__pyx_t_3 = NULL;
8319 __Pyx_RefNannySetupContext("c_arraySize", 0);
8320
8321 /* "src/vbo.pyx":321
8322 * cdef c_arraySize( self, object instance, object typeCode ):
8323 * """Retrieve array size reference"""
8324 * (<VBO>instance).check_live() # <<<<<<<<<<<<<<
8325 * return self.arrayType.arraySize( (<VBO>instance).data )
8326 * cdef c_unitSize( self, object instance, typeCode ):
8327 */
8328 (void)(((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *)((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_instance)->__pyx_vtab)->check_live(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_instance)));
8329
8330 /* "src/vbo.pyx":322
8331 * """Retrieve array size reference"""
8332 * (<VBO>instance).check_live()
8333 * return self.arrayType.arraySize( (<VBO>instance).data ) # <<<<<<<<<<<<<<
8334 * cdef c_unitSize( self, object instance, typeCode ):
8335 * """Retrieve last dimension of the array"""
8336 */
8337 __Pyx_XDECREF(__pyx_r);
8338 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s_arraySize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error)
8339 __Pyx_GOTREF(__pyx_t_2);
8340 __pyx_t_3 = NULL;
8341 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
8342 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
8343 if (likely(__pyx_t_3)) {
8344 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
8345 __Pyx_INCREF(__pyx_t_3);
8346 __Pyx_INCREF(function);
8347 __Pyx_DECREF_SET(__pyx_t_2, function);
8348 }
8349 }
8350 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_instance)->data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_instance)->data);
8351 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
8352 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error)
8353 __Pyx_GOTREF(__pyx_t_1);
8354 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8355 __pyx_r = __pyx_t_1;
8356 __pyx_t_1 = 0;
8357 goto __pyx_L0;
8358
8359 /* "src/vbo.pyx":319
8360 * (<VBO>instance).check_live()
8361 * return self.arrayType.arrayToGLType( (<VBO>instance).data )
8362 * cdef c_arraySize( self, object instance, object typeCode ): # <<<<<<<<<<<<<<
8363 * """Retrieve array size reference"""
8364 * (<VBO>instance).check_live()
8365 */
8366
8367 /* function exit code */
8368 __pyx_L1_error:;
8369 __Pyx_XDECREF(__pyx_t_1);
8370 __Pyx_XDECREF(__pyx_t_2);
8371 __Pyx_XDECREF(__pyx_t_3);
8372 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBOHandler.c_arraySize", __pyx_clineno, __pyx_lineno, __pyx_filename);
8373 __pyx_r = 0;
8374 __pyx_L0:;
8375 __Pyx_XGIVEREF(__pyx_r);
8376 __Pyx_RefNannyFinishContext();
8377 return __pyx_r;
8378 }
8379
8380 /* "src/vbo.pyx":323
8381 * (<VBO>instance).check_live()
8382 * return self.arrayType.arraySize( (<VBO>instance).data )
8383 * cdef c_unitSize( self, object instance, typeCode ): # <<<<<<<<<<<<<<
8384 * """Retrieve last dimension of the array"""
8385 * (<VBO>instance).check_live()
8386 */
8387
__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_unitSize(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler * __pyx_v_self,PyObject * __pyx_v_instance,CYTHON_UNUSED PyObject * __pyx_v_typeCode)8388 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_unitSize(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *__pyx_v_self, PyObject *__pyx_v_instance, CYTHON_UNUSED PyObject *__pyx_v_typeCode) {
8389 PyObject *__pyx_r = NULL;
8390 __Pyx_RefNannyDeclarations
8391 PyObject *__pyx_t_1 = NULL;
8392 PyObject *__pyx_t_2 = NULL;
8393 PyObject *__pyx_t_3 = NULL;
8394 __Pyx_RefNannySetupContext("c_unitSize", 0);
8395
8396 /* "src/vbo.pyx":325
8397 * cdef c_unitSize( self, object instance, typeCode ):
8398 * """Retrieve last dimension of the array"""
8399 * (<VBO>instance).check_live() # <<<<<<<<<<<<<<
8400 * return self.arrayType.unitSize( (<VBO>instance).data )
8401 * cdef c_dimensions( self, object instance ):
8402 */
8403 (void)(((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *)((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_instance)->__pyx_vtab)->check_live(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_instance)));
8404
8405 /* "src/vbo.pyx":326
8406 * """Retrieve last dimension of the array"""
8407 * (<VBO>instance).check_live()
8408 * return self.arrayType.unitSize( (<VBO>instance).data ) # <<<<<<<<<<<<<<
8409 * cdef c_dimensions( self, object instance ):
8410 * """Retrieve full set of dimensions for the array as tuple"""
8411 */
8412 __Pyx_XDECREF(__pyx_r);
8413 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s_unitSize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 326, __pyx_L1_error)
8414 __Pyx_GOTREF(__pyx_t_2);
8415 __pyx_t_3 = NULL;
8416 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
8417 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
8418 if (likely(__pyx_t_3)) {
8419 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
8420 __Pyx_INCREF(__pyx_t_3);
8421 __Pyx_INCREF(function);
8422 __Pyx_DECREF_SET(__pyx_t_2, function);
8423 }
8424 }
8425 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_instance)->data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_instance)->data);
8426 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
8427 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error)
8428 __Pyx_GOTREF(__pyx_t_1);
8429 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8430 __pyx_r = __pyx_t_1;
8431 __pyx_t_1 = 0;
8432 goto __pyx_L0;
8433
8434 /* "src/vbo.pyx":323
8435 * (<VBO>instance).check_live()
8436 * return self.arrayType.arraySize( (<VBO>instance).data )
8437 * cdef c_unitSize( self, object instance, typeCode ): # <<<<<<<<<<<<<<
8438 * """Retrieve last dimension of the array"""
8439 * (<VBO>instance).check_live()
8440 */
8441
8442 /* function exit code */
8443 __pyx_L1_error:;
8444 __Pyx_XDECREF(__pyx_t_1);
8445 __Pyx_XDECREF(__pyx_t_2);
8446 __Pyx_XDECREF(__pyx_t_3);
8447 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBOHandler.c_unitSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
8448 __pyx_r = 0;
8449 __pyx_L0:;
8450 __Pyx_XGIVEREF(__pyx_r);
8451 __Pyx_RefNannyFinishContext();
8452 return __pyx_r;
8453 }
8454
8455 /* "src/vbo.pyx":327
8456 * (<VBO>instance).check_live()
8457 * return self.arrayType.unitSize( (<VBO>instance).data )
8458 * cdef c_dimensions( self, object instance ): # <<<<<<<<<<<<<<
8459 * """Retrieve full set of dimensions for the array as tuple"""
8460 * (<VBO>instance).check_live()
8461 */
8462
__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_dimensions(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler * __pyx_v_self,PyObject * __pyx_v_instance)8463 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_dimensions(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *__pyx_v_self, PyObject *__pyx_v_instance) {
8464 PyObject *__pyx_r = NULL;
8465 __Pyx_RefNannyDeclarations
8466 PyObject *__pyx_t_1 = NULL;
8467 PyObject *__pyx_t_2 = NULL;
8468 PyObject *__pyx_t_3 = NULL;
8469 __Pyx_RefNannySetupContext("c_dimensions", 0);
8470
8471 /* "src/vbo.pyx":329
8472 * cdef c_dimensions( self, object instance ):
8473 * """Retrieve full set of dimensions for the array as tuple"""
8474 * (<VBO>instance).check_live() # <<<<<<<<<<<<<<
8475 * return self.arrayType.dimensions( (<VBO>instance).data )
8476 *
8477 */
8478 (void)(((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO *)((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_instance)->__pyx_vtab)->check_live(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_instance)));
8479
8480 /* "src/vbo.pyx":330
8481 * """Retrieve full set of dimensions for the array as tuple"""
8482 * (<VBO>instance).check_live()
8483 * return self.arrayType.dimensions( (<VBO>instance).data ) # <<<<<<<<<<<<<<
8484 *
8485 * cdef class VBOOffsetHandler(FormatHandler):
8486 */
8487 __Pyx_XDECREF(__pyx_r);
8488 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 330, __pyx_L1_error)
8489 __Pyx_GOTREF(__pyx_t_2);
8490 __pyx_t_3 = NULL;
8491 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
8492 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
8493 if (likely(__pyx_t_3)) {
8494 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
8495 __Pyx_INCREF(__pyx_t_3);
8496 __Pyx_INCREF(function);
8497 __Pyx_DECREF_SET(__pyx_t_2, function);
8498 }
8499 }
8500 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_instance)->data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v_instance)->data);
8501 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
8502 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __pyx_L1_error)
8503 __Pyx_GOTREF(__pyx_t_1);
8504 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8505 __pyx_r = __pyx_t_1;
8506 __pyx_t_1 = 0;
8507 goto __pyx_L0;
8508
8509 /* "src/vbo.pyx":327
8510 * (<VBO>instance).check_live()
8511 * return self.arrayType.unitSize( (<VBO>instance).data )
8512 * cdef c_dimensions( self, object instance ): # <<<<<<<<<<<<<<
8513 * """Retrieve full set of dimensions for the array as tuple"""
8514 * (<VBO>instance).check_live()
8515 */
8516
8517 /* function exit code */
8518 __pyx_L1_error:;
8519 __Pyx_XDECREF(__pyx_t_1);
8520 __Pyx_XDECREF(__pyx_t_2);
8521 __Pyx_XDECREF(__pyx_t_3);
8522 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBOHandler.c_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
8523 __pyx_r = 0;
8524 __pyx_L0:;
8525 __Pyx_XGIVEREF(__pyx_r);
8526 __Pyx_RefNannyFinishContext();
8527 return __pyx_r;
8528 }
8529
8530 /* "(tree fragment)":1
8531 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
8532 * cdef tuple state
8533 * cdef object _dict
8534 */
8535
8536 /* Python wrapper */
8537 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_10VBOHandler_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_10VBOHandler_3__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)8538 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_10VBOHandler_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8539 PyObject *__pyx_r = 0;
8540 __Pyx_RefNannyDeclarations
8541 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
8542 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_10VBOHandler_2__reduce_cython__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *)__pyx_v_self));
8543
8544 /* function exit code */
8545 __Pyx_RefNannyFinishContext();
8546 return __pyx_r;
8547 }
8548
__pyx_pf_17OpenGL_accelerate_3vbo_10VBOHandler_2__reduce_cython__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler * __pyx_v_self)8549 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_10VBOHandler_2__reduce_cython__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *__pyx_v_self) {
8550 PyObject *__pyx_v_state = 0;
8551 PyObject *__pyx_v__dict = 0;
8552 int __pyx_v_use_setstate;
8553 PyObject *__pyx_r = NULL;
8554 __Pyx_RefNannyDeclarations
8555 PyObject *__pyx_t_1 = NULL;
8556 PyObject *__pyx_t_2 = NULL;
8557 int __pyx_t_3;
8558 int __pyx_t_4;
8559 int __pyx_t_5;
8560 PyObject *__pyx_t_6 = NULL;
8561 __Pyx_RefNannySetupContext("__reduce_cython__", 0);
8562
8563 /* "(tree fragment)":5
8564 * cdef object _dict
8565 * cdef bint use_setstate
8566 * state = (self.ERROR_ON_COPY, self.arrayType, self.vp0) # <<<<<<<<<<<<<<
8567 * _dict = getattr(self, '__dict__', None)
8568 * if _dict is not None:
8569 */
8570 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.ERROR_ON_COPY); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
8571 __Pyx_GOTREF(__pyx_t_1);
8572 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
8573 __Pyx_GOTREF(__pyx_t_2);
8574 __Pyx_GIVEREF(__pyx_t_1);
8575 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
8576 __Pyx_INCREF(__pyx_v_self->arrayType);
8577 __Pyx_GIVEREF(__pyx_v_self->arrayType);
8578 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->arrayType);
8579 __Pyx_INCREF(__pyx_v_self->vp0);
8580 __Pyx_GIVEREF(__pyx_v_self->vp0);
8581 PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->vp0);
8582 __pyx_t_1 = 0;
8583 __pyx_v_state = ((PyObject*)__pyx_t_2);
8584 __pyx_t_2 = 0;
8585
8586 /* "(tree fragment)":6
8587 * cdef bint use_setstate
8588 * state = (self.ERROR_ON_COPY, self.arrayType, self.vp0)
8589 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
8590 * if _dict is not None:
8591 * state += (_dict,)
8592 */
8593 __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
8594 __Pyx_GOTREF(__pyx_t_2);
8595 __pyx_v__dict = __pyx_t_2;
8596 __pyx_t_2 = 0;
8597
8598 /* "(tree fragment)":7
8599 * state = (self.ERROR_ON_COPY, self.arrayType, self.vp0)
8600 * _dict = getattr(self, '__dict__', None)
8601 * if _dict is not None: # <<<<<<<<<<<<<<
8602 * state += (_dict,)
8603 * use_setstate = True
8604 */
8605 __pyx_t_3 = (__pyx_v__dict != Py_None);
8606 __pyx_t_4 = (__pyx_t_3 != 0);
8607 if (__pyx_t_4) {
8608
8609 /* "(tree fragment)":8
8610 * _dict = getattr(self, '__dict__', None)
8611 * if _dict is not None:
8612 * state += (_dict,) # <<<<<<<<<<<<<<
8613 * use_setstate = True
8614 * else:
8615 */
8616 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error)
8617 __Pyx_GOTREF(__pyx_t_2);
8618 __Pyx_INCREF(__pyx_v__dict);
8619 __Pyx_GIVEREF(__pyx_v__dict);
8620 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
8621 __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
8622 __Pyx_GOTREF(__pyx_t_1);
8623 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8624 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
8625 __pyx_t_1 = 0;
8626
8627 /* "(tree fragment)":9
8628 * if _dict is not None:
8629 * state += (_dict,)
8630 * use_setstate = True # <<<<<<<<<<<<<<
8631 * else:
8632 * use_setstate = self.arrayType is not None or self.vp0 is not None
8633 */
8634 __pyx_v_use_setstate = 1;
8635
8636 /* "(tree fragment)":7
8637 * state = (self.ERROR_ON_COPY, self.arrayType, self.vp0)
8638 * _dict = getattr(self, '__dict__', None)
8639 * if _dict is not None: # <<<<<<<<<<<<<<
8640 * state += (_dict,)
8641 * use_setstate = True
8642 */
8643 goto __pyx_L3;
8644 }
8645
8646 /* "(tree fragment)":11
8647 * use_setstate = True
8648 * else:
8649 * use_setstate = self.arrayType is not None or self.vp0 is not None # <<<<<<<<<<<<<<
8650 * if use_setstate:
8651 * return __pyx_unpickle_VBOHandler, (type(self), 0xaddf131, None), state
8652 */
8653 /*else*/ {
8654 __pyx_t_3 = (__pyx_v_self->arrayType != Py_None);
8655 __pyx_t_5 = (__pyx_t_3 != 0);
8656 if (!__pyx_t_5) {
8657 } else {
8658 __pyx_t_4 = __pyx_t_5;
8659 goto __pyx_L4_bool_binop_done;
8660 }
8661 __pyx_t_5 = (__pyx_v_self->vp0 != Py_None);
8662 __pyx_t_3 = (__pyx_t_5 != 0);
8663 __pyx_t_4 = __pyx_t_3;
8664 __pyx_L4_bool_binop_done:;
8665 __pyx_v_use_setstate = __pyx_t_4;
8666 }
8667 __pyx_L3:;
8668
8669 /* "(tree fragment)":12
8670 * else:
8671 * use_setstate = self.arrayType is not None or self.vp0 is not None
8672 * if use_setstate: # <<<<<<<<<<<<<<
8673 * return __pyx_unpickle_VBOHandler, (type(self), 0xaddf131, None), state
8674 * else:
8675 */
8676 __pyx_t_4 = (__pyx_v_use_setstate != 0);
8677 if (__pyx_t_4) {
8678
8679 /* "(tree fragment)":13
8680 * use_setstate = self.arrayType is not None or self.vp0 is not None
8681 * if use_setstate:
8682 * return __pyx_unpickle_VBOHandler, (type(self), 0xaddf131, None), state # <<<<<<<<<<<<<<
8683 * else:
8684 * return __pyx_unpickle_VBOHandler, (type(self), 0xaddf131, state)
8685 */
8686 __Pyx_XDECREF(__pyx_r);
8687 __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_VBOHandler); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
8688 __Pyx_GOTREF(__pyx_t_1);
8689 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
8690 __Pyx_GOTREF(__pyx_t_2);
8691 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
8692 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
8693 PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
8694 __Pyx_INCREF(__pyx_int_182317361);
8695 __Pyx_GIVEREF(__pyx_int_182317361);
8696 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_182317361);
8697 __Pyx_INCREF(Py_None);
8698 __Pyx_GIVEREF(Py_None);
8699 PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
8700 __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
8701 __Pyx_GOTREF(__pyx_t_6);
8702 __Pyx_GIVEREF(__pyx_t_1);
8703 PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
8704 __Pyx_GIVEREF(__pyx_t_2);
8705 PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
8706 __Pyx_INCREF(__pyx_v_state);
8707 __Pyx_GIVEREF(__pyx_v_state);
8708 PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
8709 __pyx_t_1 = 0;
8710 __pyx_t_2 = 0;
8711 __pyx_r = __pyx_t_6;
8712 __pyx_t_6 = 0;
8713 goto __pyx_L0;
8714
8715 /* "(tree fragment)":12
8716 * else:
8717 * use_setstate = self.arrayType is not None or self.vp0 is not None
8718 * if use_setstate: # <<<<<<<<<<<<<<
8719 * return __pyx_unpickle_VBOHandler, (type(self), 0xaddf131, None), state
8720 * else:
8721 */
8722 }
8723
8724 /* "(tree fragment)":15
8725 * return __pyx_unpickle_VBOHandler, (type(self), 0xaddf131, None), state
8726 * else:
8727 * return __pyx_unpickle_VBOHandler, (type(self), 0xaddf131, state) # <<<<<<<<<<<<<<
8728 * def __setstate_cython__(self, __pyx_state):
8729 * __pyx_unpickle_VBOHandler__set_state(self, __pyx_state)
8730 */
8731 /*else*/ {
8732 __Pyx_XDECREF(__pyx_r);
8733 __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_VBOHandler); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
8734 __Pyx_GOTREF(__pyx_t_6);
8735 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
8736 __Pyx_GOTREF(__pyx_t_2);
8737 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
8738 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
8739 PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
8740 __Pyx_INCREF(__pyx_int_182317361);
8741 __Pyx_GIVEREF(__pyx_int_182317361);
8742 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_182317361);
8743 __Pyx_INCREF(__pyx_v_state);
8744 __Pyx_GIVEREF(__pyx_v_state);
8745 PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
8746 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
8747 __Pyx_GOTREF(__pyx_t_1);
8748 __Pyx_GIVEREF(__pyx_t_6);
8749 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
8750 __Pyx_GIVEREF(__pyx_t_2);
8751 PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
8752 __pyx_t_6 = 0;
8753 __pyx_t_2 = 0;
8754 __pyx_r = __pyx_t_1;
8755 __pyx_t_1 = 0;
8756 goto __pyx_L0;
8757 }
8758
8759 /* "(tree fragment)":1
8760 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
8761 * cdef tuple state
8762 * cdef object _dict
8763 */
8764
8765 /* function exit code */
8766 __pyx_L1_error:;
8767 __Pyx_XDECREF(__pyx_t_1);
8768 __Pyx_XDECREF(__pyx_t_2);
8769 __Pyx_XDECREF(__pyx_t_6);
8770 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBOHandler.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8771 __pyx_r = NULL;
8772 __pyx_L0:;
8773 __Pyx_XDECREF(__pyx_v_state);
8774 __Pyx_XDECREF(__pyx_v__dict);
8775 __Pyx_XGIVEREF(__pyx_r);
8776 __Pyx_RefNannyFinishContext();
8777 return __pyx_r;
8778 }
8779
8780 /* "(tree fragment)":16
8781 * else:
8782 * return __pyx_unpickle_VBOHandler, (type(self), 0xaddf131, state)
8783 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
8784 * __pyx_unpickle_VBOHandler__set_state(self, __pyx_state)
8785 */
8786
8787 /* Python wrapper */
8788 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_10VBOHandler_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_10VBOHandler_5__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)8789 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_10VBOHandler_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
8790 PyObject *__pyx_r = 0;
8791 __Pyx_RefNannyDeclarations
8792 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
8793 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_10VBOHandler_4__setstate_cython__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
8794
8795 /* function exit code */
8796 __Pyx_RefNannyFinishContext();
8797 return __pyx_r;
8798 }
8799
__pyx_pf_17OpenGL_accelerate_3vbo_10VBOHandler_4__setstate_cython__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler * __pyx_v_self,PyObject * __pyx_v___pyx_state)8800 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_10VBOHandler_4__setstate_cython__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
8801 PyObject *__pyx_r = NULL;
8802 __Pyx_RefNannyDeclarations
8803 PyObject *__pyx_t_1 = NULL;
8804 __Pyx_RefNannySetupContext("__setstate_cython__", 0);
8805
8806 /* "(tree fragment)":17
8807 * return __pyx_unpickle_VBOHandler, (type(self), 0xaddf131, state)
8808 * def __setstate_cython__(self, __pyx_state):
8809 * __pyx_unpickle_VBOHandler__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
8810 */
8811 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
8812 __pyx_t_1 = __pyx_f_17OpenGL_accelerate_3vbo___pyx_unpickle_VBOHandler__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
8813 __Pyx_GOTREF(__pyx_t_1);
8814 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8815
8816 /* "(tree fragment)":16
8817 * else:
8818 * return __pyx_unpickle_VBOHandler, (type(self), 0xaddf131, state)
8819 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
8820 * __pyx_unpickle_VBOHandler__set_state(self, __pyx_state)
8821 */
8822
8823 /* function exit code */
8824 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8825 goto __pyx_L0;
8826 __pyx_L1_error:;
8827 __Pyx_XDECREF(__pyx_t_1);
8828 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBOHandler.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8829 __pyx_r = NULL;
8830 __pyx_L0:;
8831 __Pyx_XGIVEREF(__pyx_r);
8832 __Pyx_RefNannyFinishContext();
8833 return __pyx_r;
8834 }
8835
8836 /* "src/vbo.pyx":335
8837 * cdef object arrayType # import and use explicit reference...
8838 * isOutput = False
8839 * def __init__( self ): # <<<<<<<<<<<<<<
8840 * from OpenGL.arrays.arraydatatype import ArrayDatatype
8841 * self.arrayType = ArrayDatatype
8842 */
8843
8844 /* Python wrapper */
8845 static int __pyx_pw_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_1__init__(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)8846 static int __pyx_pw_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8847 int __pyx_r;
8848 __Pyx_RefNannyDeclarations
8849 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
8850 if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
8851 __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
8852 if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
8853 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_16VBOOffsetHandler___init__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *)__pyx_v_self));
8854
8855 /* function exit code */
8856 __Pyx_RefNannyFinishContext();
8857 return __pyx_r;
8858 }
8859
__pyx_pf_17OpenGL_accelerate_3vbo_16VBOOffsetHandler___init__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler * __pyx_v_self)8860 static int __pyx_pf_17OpenGL_accelerate_3vbo_16VBOOffsetHandler___init__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *__pyx_v_self) {
8861 PyObject *__pyx_v_ArrayDatatype = NULL;
8862 int __pyx_r;
8863 __Pyx_RefNannyDeclarations
8864 PyObject *__pyx_t_1 = NULL;
8865 PyObject *__pyx_t_2 = NULL;
8866 __Pyx_RefNannySetupContext("__init__", 0);
8867
8868 /* "src/vbo.pyx":336
8869 * isOutput = False
8870 * def __init__( self ):
8871 * from OpenGL.arrays.arraydatatype import ArrayDatatype # <<<<<<<<<<<<<<
8872 * self.arrayType = ArrayDatatype
8873 *
8874 */
8875 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 336, __pyx_L1_error)
8876 __Pyx_GOTREF(__pyx_t_1);
8877 __Pyx_INCREF(__pyx_n_s_ArrayDatatype);
8878 __Pyx_GIVEREF(__pyx_n_s_ArrayDatatype);
8879 PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_ArrayDatatype);
8880 __pyx_t_2 = __Pyx_Import(__pyx_n_s_OpenGL_arrays_arraydatatype, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 336, __pyx_L1_error)
8881 __Pyx_GOTREF(__pyx_t_2);
8882 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8883 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_ArrayDatatype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 336, __pyx_L1_error)
8884 __Pyx_GOTREF(__pyx_t_1);
8885 __Pyx_INCREF(__pyx_t_1);
8886 __pyx_v_ArrayDatatype = __pyx_t_1;
8887 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8888 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8889
8890 /* "src/vbo.pyx":337
8891 * def __init__( self ):
8892 * from OpenGL.arrays.arraydatatype import ArrayDatatype
8893 * self.arrayType = ArrayDatatype # <<<<<<<<<<<<<<
8894 *
8895 * cdef object c_dataPointer( self, object instance ):
8896 */
8897 __Pyx_INCREF(__pyx_v_ArrayDatatype);
8898 __Pyx_GIVEREF(__pyx_v_ArrayDatatype);
8899 __Pyx_GOTREF(__pyx_v_self->arrayType);
8900 __Pyx_DECREF(__pyx_v_self->arrayType);
8901 __pyx_v_self->arrayType = __pyx_v_ArrayDatatype;
8902
8903 /* "src/vbo.pyx":335
8904 * cdef object arrayType # import and use explicit reference...
8905 * isOutput = False
8906 * def __init__( self ): # <<<<<<<<<<<<<<
8907 * from OpenGL.arrays.arraydatatype import ArrayDatatype
8908 * self.arrayType = ArrayDatatype
8909 */
8910
8911 /* function exit code */
8912 __pyx_r = 0;
8913 goto __pyx_L0;
8914 __pyx_L1_error:;
8915 __Pyx_XDECREF(__pyx_t_1);
8916 __Pyx_XDECREF(__pyx_t_2);
8917 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBOOffsetHandler.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8918 __pyx_r = -1;
8919 __pyx_L0:;
8920 __Pyx_XDECREF(__pyx_v_ArrayDatatype);
8921 __Pyx_RefNannyFinishContext();
8922 return __pyx_r;
8923 }
8924
8925 /* "src/vbo.pyx":339
8926 * self.arrayType = ArrayDatatype
8927 *
8928 * cdef object c_dataPointer( self, object instance ): # <<<<<<<<<<<<<<
8929 * """Retrieve data-pointer directly"""
8930 * (<VBOOffset>instance).check_live()
8931 */
8932
__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_dataPointer(CYTHON_UNUSED struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler * __pyx_v_self,PyObject * __pyx_v_instance)8933 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_dataPointer(CYTHON_UNUSED struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *__pyx_v_self, PyObject *__pyx_v_instance) {
8934 PyObject *__pyx_r = NULL;
8935 __Pyx_RefNannyDeclarations
8936 PyObject *__pyx_t_1 = NULL;
8937 __Pyx_RefNannySetupContext("c_dataPointer", 0);
8938
8939 /* "src/vbo.pyx":341
8940 * cdef object c_dataPointer( self, object instance ):
8941 * """Retrieve data-pointer directly"""
8942 * (<VBOOffset>instance).check_live() # <<<<<<<<<<<<<<
8943 * return (<VBOOffset>instance).offset
8944 * cdef c_from_param( self, object instance, object typeCode ):
8945 */
8946 (void)(((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBOOffset *)((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)->__pyx_vtab)->check_live(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)));
8947
8948 /* "src/vbo.pyx":342
8949 * """Retrieve data-pointer directly"""
8950 * (<VBOOffset>instance).check_live()
8951 * return (<VBOOffset>instance).offset # <<<<<<<<<<<<<<
8952 * cdef c_from_param( self, object instance, object typeCode ):
8953 * """simple function-based from_param"""
8954 */
8955 __Pyx_XDECREF(__pyx_r);
8956 __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)->offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error)
8957 __Pyx_GOTREF(__pyx_t_1);
8958 __pyx_r = __pyx_t_1;
8959 __pyx_t_1 = 0;
8960 goto __pyx_L0;
8961
8962 /* "src/vbo.pyx":339
8963 * self.arrayType = ArrayDatatype
8964 *
8965 * cdef object c_dataPointer( self, object instance ): # <<<<<<<<<<<<<<
8966 * """Retrieve data-pointer directly"""
8967 * (<VBOOffset>instance).check_live()
8968 */
8969
8970 /* function exit code */
8971 __pyx_L1_error:;
8972 __Pyx_XDECREF(__pyx_t_1);
8973 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBOOffsetHandler.c_dataPointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
8974 __pyx_r = 0;
8975 __pyx_L0:;
8976 __Pyx_XGIVEREF(__pyx_r);
8977 __Pyx_RefNannyFinishContext();
8978 return __pyx_r;
8979 }
8980
8981 /* "src/vbo.pyx":343
8982 * (<VBOOffset>instance).check_live()
8983 * return (<VBOOffset>instance).offset
8984 * cdef c_from_param( self, object instance, object typeCode ): # <<<<<<<<<<<<<<
8985 * """simple function-based from_param"""
8986 * (<VBOOffset>instance).check_live()
8987 */
8988
__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_from_param(CYTHON_UNUSED struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler * __pyx_v_self,PyObject * __pyx_v_instance,CYTHON_UNUSED PyObject * __pyx_v_typeCode)8989 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_from_param(CYTHON_UNUSED struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *__pyx_v_self, PyObject *__pyx_v_instance, CYTHON_UNUSED PyObject *__pyx_v_typeCode) {
8990 PyObject *__pyx_r = NULL;
8991 __Pyx_RefNannyDeclarations
8992 PyObject *__pyx_t_1 = NULL;
8993 PyObject *__pyx_t_2 = NULL;
8994 PyObject *__pyx_t_3 = NULL;
8995 PyObject *__pyx_t_4 = NULL;
8996 __Pyx_RefNannySetupContext("c_from_param", 0);
8997
8998 /* "src/vbo.pyx":345
8999 * cdef c_from_param( self, object instance, object typeCode ):
9000 * """simple function-based from_param"""
9001 * (<VBOOffset>instance).check_live() # <<<<<<<<<<<<<<
9002 * return ctypes.c_void_p( (<VBOOffset>instance).offset )
9003 * cdef c_asArray( self, object instance, object typeCode ):
9004 */
9005 (void)(((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBOOffset *)((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)->__pyx_vtab)->check_live(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)));
9006
9007 /* "src/vbo.pyx":346
9008 * """simple function-based from_param"""
9009 * (<VBOOffset>instance).check_live()
9010 * return ctypes.c_void_p( (<VBOOffset>instance).offset ) # <<<<<<<<<<<<<<
9011 * cdef c_asArray( self, object instance, object typeCode ):
9012 * """Retrieve the given value as a (contiguous) array of type typeCode"""
9013 */
9014 __Pyx_XDECREF(__pyx_r);
9015 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 346, __pyx_L1_error)
9016 __Pyx_GOTREF(__pyx_t_2);
9017 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_c_void_p); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 346, __pyx_L1_error)
9018 __Pyx_GOTREF(__pyx_t_3);
9019 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9020 __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)->offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 346, __pyx_L1_error)
9021 __Pyx_GOTREF(__pyx_t_2);
9022 __pyx_t_4 = NULL;
9023 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
9024 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
9025 if (likely(__pyx_t_4)) {
9026 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
9027 __Pyx_INCREF(__pyx_t_4);
9028 __Pyx_INCREF(function);
9029 __Pyx_DECREF_SET(__pyx_t_3, function);
9030 }
9031 }
9032 __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
9033 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
9034 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9035 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
9036 __Pyx_GOTREF(__pyx_t_1);
9037 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9038 __pyx_r = __pyx_t_1;
9039 __pyx_t_1 = 0;
9040 goto __pyx_L0;
9041
9042 /* "src/vbo.pyx":343
9043 * (<VBOOffset>instance).check_live()
9044 * return (<VBOOffset>instance).offset
9045 * cdef c_from_param( self, object instance, object typeCode ): # <<<<<<<<<<<<<<
9046 * """simple function-based from_param"""
9047 * (<VBOOffset>instance).check_live()
9048 */
9049
9050 /* function exit code */
9051 __pyx_L1_error:;
9052 __Pyx_XDECREF(__pyx_t_1);
9053 __Pyx_XDECREF(__pyx_t_2);
9054 __Pyx_XDECREF(__pyx_t_3);
9055 __Pyx_XDECREF(__pyx_t_4);
9056 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBOOffsetHandler.c_from_param", __pyx_clineno, __pyx_lineno, __pyx_filename);
9057 __pyx_r = 0;
9058 __pyx_L0:;
9059 __Pyx_XGIVEREF(__pyx_r);
9060 __Pyx_RefNannyFinishContext();
9061 return __pyx_r;
9062 }
9063
9064 /* "src/vbo.pyx":347
9065 * (<VBOOffset>instance).check_live()
9066 * return ctypes.c_void_p( (<VBOOffset>instance).offset )
9067 * cdef c_asArray( self, object instance, object typeCode ): # <<<<<<<<<<<<<<
9068 * """Retrieve the given value as a (contiguous) array of type typeCode"""
9069 * (<VBOOffset>instance).check_live()
9070 */
9071
__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_asArray(CYTHON_UNUSED struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler * __pyx_v_self,PyObject * __pyx_v_instance,CYTHON_UNUSED PyObject * __pyx_v_typeCode)9072 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_asArray(CYTHON_UNUSED struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *__pyx_v_self, PyObject *__pyx_v_instance, CYTHON_UNUSED PyObject *__pyx_v_typeCode) {
9073 PyObject *__pyx_r = NULL;
9074 __Pyx_RefNannyDeclarations
9075 __Pyx_RefNannySetupContext("c_asArray", 0);
9076
9077 /* "src/vbo.pyx":349
9078 * cdef c_asArray( self, object instance, object typeCode ):
9079 * """Retrieve the given value as a (contiguous) array of type typeCode"""
9080 * (<VBOOffset>instance).check_live() # <<<<<<<<<<<<<<
9081 * return instance
9082 *
9083 */
9084 (void)(((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBOOffset *)((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)->__pyx_vtab)->check_live(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)));
9085
9086 /* "src/vbo.pyx":350
9087 * """Retrieve the given value as a (contiguous) array of type typeCode"""
9088 * (<VBOOffset>instance).check_live()
9089 * return instance # <<<<<<<<<<<<<<
9090 *
9091 * cdef c_arrayByteCount( self, object instance ):
9092 */
9093 __Pyx_XDECREF(__pyx_r);
9094 __Pyx_INCREF(__pyx_v_instance);
9095 __pyx_r = __pyx_v_instance;
9096 goto __pyx_L0;
9097
9098 /* "src/vbo.pyx":347
9099 * (<VBOOffset>instance).check_live()
9100 * return ctypes.c_void_p( (<VBOOffset>instance).offset )
9101 * cdef c_asArray( self, object instance, object typeCode ): # <<<<<<<<<<<<<<
9102 * """Retrieve the given value as a (contiguous) array of type typeCode"""
9103 * (<VBOOffset>instance).check_live()
9104 */
9105
9106 /* function exit code */
9107 __pyx_L0:;
9108 __Pyx_XGIVEREF(__pyx_r);
9109 __Pyx_RefNannyFinishContext();
9110 return __pyx_r;
9111 }
9112
9113 /* "src/vbo.pyx":352
9114 * return instance
9115 *
9116 * cdef c_arrayByteCount( self, object instance ): # <<<<<<<<<<<<<<
9117 * """Given a data-value, calculate number of bytes required to represent"""
9118 * (<VBOOffset>instance).check_live()
9119 */
9120
__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_arrayByteCount(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler * __pyx_v_self,PyObject * __pyx_v_instance)9121 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_arrayByteCount(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *__pyx_v_self, PyObject *__pyx_v_instance) {
9122 PyObject *__pyx_r = NULL;
9123 __Pyx_RefNannyDeclarations
9124 PyObject *__pyx_t_1 = NULL;
9125 PyObject *__pyx_t_2 = NULL;
9126 PyObject *__pyx_t_3 = NULL;
9127 __Pyx_RefNannySetupContext("c_arrayByteCount", 0);
9128
9129 /* "src/vbo.pyx":354
9130 * cdef c_arrayByteCount( self, object instance ):
9131 * """Given a data-value, calculate number of bytes required to represent"""
9132 * (<VBOOffset>instance).check_live() # <<<<<<<<<<<<<<
9133 * return self.arrayType.arrayByteCount( (<VBOOffset>instance).vbo.data )
9134 * cdef c_arrayToGLType( self, object instance ):
9135 */
9136 (void)(((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBOOffset *)((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)->__pyx_vtab)->check_live(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)));
9137
9138 /* "src/vbo.pyx":355
9139 * """Given a data-value, calculate number of bytes required to represent"""
9140 * (<VBOOffset>instance).check_live()
9141 * return self.arrayType.arrayByteCount( (<VBOOffset>instance).vbo.data ) # <<<<<<<<<<<<<<
9142 * cdef c_arrayToGLType( self, object instance ):
9143 * """Given a value, guess OpenGL type of the corresponding pointer"""
9144 */
9145 __Pyx_XDECREF(__pyx_r);
9146 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s_arrayByteCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 355, __pyx_L1_error)
9147 __Pyx_GOTREF(__pyx_t_2);
9148 __pyx_t_3 = NULL;
9149 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
9150 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
9151 if (likely(__pyx_t_3)) {
9152 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
9153 __Pyx_INCREF(__pyx_t_3);
9154 __Pyx_INCREF(function);
9155 __Pyx_DECREF_SET(__pyx_t_2, function);
9156 }
9157 }
9158 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)->vbo->data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)->vbo->data);
9159 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
9160 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error)
9161 __Pyx_GOTREF(__pyx_t_1);
9162 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9163 __pyx_r = __pyx_t_1;
9164 __pyx_t_1 = 0;
9165 goto __pyx_L0;
9166
9167 /* "src/vbo.pyx":352
9168 * return instance
9169 *
9170 * cdef c_arrayByteCount( self, object instance ): # <<<<<<<<<<<<<<
9171 * """Given a data-value, calculate number of bytes required to represent"""
9172 * (<VBOOffset>instance).check_live()
9173 */
9174
9175 /* function exit code */
9176 __pyx_L1_error:;
9177 __Pyx_XDECREF(__pyx_t_1);
9178 __Pyx_XDECREF(__pyx_t_2);
9179 __Pyx_XDECREF(__pyx_t_3);
9180 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBOOffsetHandler.c_arrayByteCount", __pyx_clineno, __pyx_lineno, __pyx_filename);
9181 __pyx_r = 0;
9182 __pyx_L0:;
9183 __Pyx_XGIVEREF(__pyx_r);
9184 __Pyx_RefNannyFinishContext();
9185 return __pyx_r;
9186 }
9187
9188 /* "src/vbo.pyx":356
9189 * (<VBOOffset>instance).check_live()
9190 * return self.arrayType.arrayByteCount( (<VBOOffset>instance).vbo.data )
9191 * cdef c_arrayToGLType( self, object instance ): # <<<<<<<<<<<<<<
9192 * """Given a value, guess OpenGL type of the corresponding pointer"""
9193 * (<VBOOffset>instance).check_live()
9194 */
9195
__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_arrayToGLType(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler * __pyx_v_self,PyObject * __pyx_v_instance)9196 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_arrayToGLType(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *__pyx_v_self, PyObject *__pyx_v_instance) {
9197 PyObject *__pyx_r = NULL;
9198 __Pyx_RefNannyDeclarations
9199 PyObject *__pyx_t_1 = NULL;
9200 PyObject *__pyx_t_2 = NULL;
9201 PyObject *__pyx_t_3 = NULL;
9202 __Pyx_RefNannySetupContext("c_arrayToGLType", 0);
9203
9204 /* "src/vbo.pyx":358
9205 * cdef c_arrayToGLType( self, object instance ):
9206 * """Given a value, guess OpenGL type of the corresponding pointer"""
9207 * (<VBOOffset>instance).check_live() # <<<<<<<<<<<<<<
9208 * return self.arrayType.arrayToGLType( (<VBOOffset>instance).vbo.data )
9209 * cdef c_arraySize( self, object instance, object typeCode ):
9210 */
9211 (void)(((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBOOffset *)((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)->__pyx_vtab)->check_live(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)));
9212
9213 /* "src/vbo.pyx":359
9214 * """Given a value, guess OpenGL type of the corresponding pointer"""
9215 * (<VBOOffset>instance).check_live()
9216 * return self.arrayType.arrayToGLType( (<VBOOffset>instance).vbo.data ) # <<<<<<<<<<<<<<
9217 * cdef c_arraySize( self, object instance, object typeCode ):
9218 * """Retrieve array size reference"""
9219 */
9220 __Pyx_XDECREF(__pyx_r);
9221 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s_arrayToGLType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error)
9222 __Pyx_GOTREF(__pyx_t_2);
9223 __pyx_t_3 = NULL;
9224 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
9225 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
9226 if (likely(__pyx_t_3)) {
9227 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
9228 __Pyx_INCREF(__pyx_t_3);
9229 __Pyx_INCREF(function);
9230 __Pyx_DECREF_SET(__pyx_t_2, function);
9231 }
9232 }
9233 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)->vbo->data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)->vbo->data);
9234 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
9235 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error)
9236 __Pyx_GOTREF(__pyx_t_1);
9237 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9238 __pyx_r = __pyx_t_1;
9239 __pyx_t_1 = 0;
9240 goto __pyx_L0;
9241
9242 /* "src/vbo.pyx":356
9243 * (<VBOOffset>instance).check_live()
9244 * return self.arrayType.arrayByteCount( (<VBOOffset>instance).vbo.data )
9245 * cdef c_arrayToGLType( self, object instance ): # <<<<<<<<<<<<<<
9246 * """Given a value, guess OpenGL type of the corresponding pointer"""
9247 * (<VBOOffset>instance).check_live()
9248 */
9249
9250 /* function exit code */
9251 __pyx_L1_error:;
9252 __Pyx_XDECREF(__pyx_t_1);
9253 __Pyx_XDECREF(__pyx_t_2);
9254 __Pyx_XDECREF(__pyx_t_3);
9255 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBOOffsetHandler.c_arrayToGLType", __pyx_clineno, __pyx_lineno, __pyx_filename);
9256 __pyx_r = 0;
9257 __pyx_L0:;
9258 __Pyx_XGIVEREF(__pyx_r);
9259 __Pyx_RefNannyFinishContext();
9260 return __pyx_r;
9261 }
9262
9263 /* "src/vbo.pyx":360
9264 * (<VBOOffset>instance).check_live()
9265 * return self.arrayType.arrayToGLType( (<VBOOffset>instance).vbo.data )
9266 * cdef c_arraySize( self, object instance, object typeCode ): # <<<<<<<<<<<<<<
9267 * """Retrieve array size reference"""
9268 * (<VBOOffset>instance).check_live()
9269 */
9270
__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_arraySize(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler * __pyx_v_self,PyObject * __pyx_v_instance,CYTHON_UNUSED PyObject * __pyx_v_typeCode)9271 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_arraySize(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *__pyx_v_self, PyObject *__pyx_v_instance, CYTHON_UNUSED PyObject *__pyx_v_typeCode) {
9272 PyObject *__pyx_r = NULL;
9273 __Pyx_RefNannyDeclarations
9274 PyObject *__pyx_t_1 = NULL;
9275 PyObject *__pyx_t_2 = NULL;
9276 PyObject *__pyx_t_3 = NULL;
9277 __Pyx_RefNannySetupContext("c_arraySize", 0);
9278
9279 /* "src/vbo.pyx":362
9280 * cdef c_arraySize( self, object instance, object typeCode ):
9281 * """Retrieve array size reference"""
9282 * (<VBOOffset>instance).check_live() # <<<<<<<<<<<<<<
9283 * return self.arrayType.arraySize( (<VBOOffset>instance).vbo.data )
9284 * cdef c_unitSize( self, object instance, typeCode ):
9285 */
9286 (void)(((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBOOffset *)((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)->__pyx_vtab)->check_live(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)));
9287
9288 /* "src/vbo.pyx":363
9289 * """Retrieve array size reference"""
9290 * (<VBOOffset>instance).check_live()
9291 * return self.arrayType.arraySize( (<VBOOffset>instance).vbo.data ) # <<<<<<<<<<<<<<
9292 * cdef c_unitSize( self, object instance, typeCode ):
9293 * """Retrieve last dimension of the array"""
9294 */
9295 __Pyx_XDECREF(__pyx_r);
9296 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s_arraySize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 363, __pyx_L1_error)
9297 __Pyx_GOTREF(__pyx_t_2);
9298 __pyx_t_3 = NULL;
9299 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
9300 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
9301 if (likely(__pyx_t_3)) {
9302 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
9303 __Pyx_INCREF(__pyx_t_3);
9304 __Pyx_INCREF(function);
9305 __Pyx_DECREF_SET(__pyx_t_2, function);
9306 }
9307 }
9308 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)->vbo->data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)->vbo->data);
9309 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
9310 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error)
9311 __Pyx_GOTREF(__pyx_t_1);
9312 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9313 __pyx_r = __pyx_t_1;
9314 __pyx_t_1 = 0;
9315 goto __pyx_L0;
9316
9317 /* "src/vbo.pyx":360
9318 * (<VBOOffset>instance).check_live()
9319 * return self.arrayType.arrayToGLType( (<VBOOffset>instance).vbo.data )
9320 * cdef c_arraySize( self, object instance, object typeCode ): # <<<<<<<<<<<<<<
9321 * """Retrieve array size reference"""
9322 * (<VBOOffset>instance).check_live()
9323 */
9324
9325 /* function exit code */
9326 __pyx_L1_error:;
9327 __Pyx_XDECREF(__pyx_t_1);
9328 __Pyx_XDECREF(__pyx_t_2);
9329 __Pyx_XDECREF(__pyx_t_3);
9330 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBOOffsetHandler.c_arraySize", __pyx_clineno, __pyx_lineno, __pyx_filename);
9331 __pyx_r = 0;
9332 __pyx_L0:;
9333 __Pyx_XGIVEREF(__pyx_r);
9334 __Pyx_RefNannyFinishContext();
9335 return __pyx_r;
9336 }
9337
9338 /* "src/vbo.pyx":364
9339 * (<VBOOffset>instance).check_live()
9340 * return self.arrayType.arraySize( (<VBOOffset>instance).vbo.data )
9341 * cdef c_unitSize( self, object instance, typeCode ): # <<<<<<<<<<<<<<
9342 * """Retrieve last dimension of the array"""
9343 * (<VBOOffset>instance).check_live()
9344 */
9345
__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_unitSize(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler * __pyx_v_self,PyObject * __pyx_v_instance,CYTHON_UNUSED PyObject * __pyx_v_typeCode)9346 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_unitSize(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *__pyx_v_self, PyObject *__pyx_v_instance, CYTHON_UNUSED PyObject *__pyx_v_typeCode) {
9347 PyObject *__pyx_r = NULL;
9348 __Pyx_RefNannyDeclarations
9349 PyObject *__pyx_t_1 = NULL;
9350 PyObject *__pyx_t_2 = NULL;
9351 PyObject *__pyx_t_3 = NULL;
9352 __Pyx_RefNannySetupContext("c_unitSize", 0);
9353
9354 /* "src/vbo.pyx":366
9355 * cdef c_unitSize( self, object instance, typeCode ):
9356 * """Retrieve last dimension of the array"""
9357 * (<VBOOffset>instance).check_live() # <<<<<<<<<<<<<<
9358 * return self.arrayType.unitSize( (<VBOOffset>instance).vbo.data )
9359 * cdef c_dimensions( self, object instance ):
9360 */
9361 (void)(((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBOOffset *)((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)->__pyx_vtab)->check_live(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)));
9362
9363 /* "src/vbo.pyx":367
9364 * """Retrieve last dimension of the array"""
9365 * (<VBOOffset>instance).check_live()
9366 * return self.arrayType.unitSize( (<VBOOffset>instance).vbo.data ) # <<<<<<<<<<<<<<
9367 * cdef c_dimensions( self, object instance ):
9368 * """Retrieve full set of dimensions for the array as tuple"""
9369 */
9370 __Pyx_XDECREF(__pyx_r);
9371 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s_unitSize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 367, __pyx_L1_error)
9372 __Pyx_GOTREF(__pyx_t_2);
9373 __pyx_t_3 = NULL;
9374 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
9375 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
9376 if (likely(__pyx_t_3)) {
9377 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
9378 __Pyx_INCREF(__pyx_t_3);
9379 __Pyx_INCREF(function);
9380 __Pyx_DECREF_SET(__pyx_t_2, function);
9381 }
9382 }
9383 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)->vbo->data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)->vbo->data);
9384 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
9385 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 367, __pyx_L1_error)
9386 __Pyx_GOTREF(__pyx_t_1);
9387 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9388 __pyx_r = __pyx_t_1;
9389 __pyx_t_1 = 0;
9390 goto __pyx_L0;
9391
9392 /* "src/vbo.pyx":364
9393 * (<VBOOffset>instance).check_live()
9394 * return self.arrayType.arraySize( (<VBOOffset>instance).vbo.data )
9395 * cdef c_unitSize( self, object instance, typeCode ): # <<<<<<<<<<<<<<
9396 * """Retrieve last dimension of the array"""
9397 * (<VBOOffset>instance).check_live()
9398 */
9399
9400 /* function exit code */
9401 __pyx_L1_error:;
9402 __Pyx_XDECREF(__pyx_t_1);
9403 __Pyx_XDECREF(__pyx_t_2);
9404 __Pyx_XDECREF(__pyx_t_3);
9405 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBOOffsetHandler.c_unitSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
9406 __pyx_r = 0;
9407 __pyx_L0:;
9408 __Pyx_XGIVEREF(__pyx_r);
9409 __Pyx_RefNannyFinishContext();
9410 return __pyx_r;
9411 }
9412
9413 /* "src/vbo.pyx":368
9414 * (<VBOOffset>instance).check_live()
9415 * return self.arrayType.unitSize( (<VBOOffset>instance).vbo.data )
9416 * cdef c_dimensions( self, object instance ): # <<<<<<<<<<<<<<
9417 * """Retrieve full set of dimensions for the array as tuple"""
9418 * (<VBOOffset>instance).check_live()
9419 */
9420
__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_dimensions(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler * __pyx_v_self,PyObject * __pyx_v_instance)9421 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_c_dimensions(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *__pyx_v_self, PyObject *__pyx_v_instance) {
9422 PyObject *__pyx_r = NULL;
9423 __Pyx_RefNannyDeclarations
9424 PyObject *__pyx_t_1 = NULL;
9425 PyObject *__pyx_t_2 = NULL;
9426 PyObject *__pyx_t_3 = NULL;
9427 __Pyx_RefNannySetupContext("c_dimensions", 0);
9428
9429 /* "src/vbo.pyx":370
9430 * cdef c_dimensions( self, object instance ):
9431 * """Retrieve full set of dimensions for the array as tuple"""
9432 * (<VBOOffset>instance).check_live() # <<<<<<<<<<<<<<
9433 * return self.arrayType.dimensions( (<VBOOffset>instance).vbo.data )
9434 */
9435 (void)(((struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBOOffset *)((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)->__pyx_vtab)->check_live(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)));
9436
9437 /* "src/vbo.pyx":371
9438 * """Retrieve full set of dimensions for the array as tuple"""
9439 * (<VBOOffset>instance).check_live()
9440 * return self.arrayType.dimensions( (<VBOOffset>instance).vbo.data ) # <<<<<<<<<<<<<<
9441 */
9442 __Pyx_XDECREF(__pyx_r);
9443 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arrayType, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error)
9444 __Pyx_GOTREF(__pyx_t_2);
9445 __pyx_t_3 = NULL;
9446 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
9447 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
9448 if (likely(__pyx_t_3)) {
9449 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
9450 __Pyx_INCREF(__pyx_t_3);
9451 __Pyx_INCREF(function);
9452 __Pyx_DECREF_SET(__pyx_t_2, function);
9453 }
9454 }
9455 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)->vbo->data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)__pyx_v_instance)->vbo->data);
9456 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
9457 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error)
9458 __Pyx_GOTREF(__pyx_t_1);
9459 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9460 __pyx_r = __pyx_t_1;
9461 __pyx_t_1 = 0;
9462 goto __pyx_L0;
9463
9464 /* "src/vbo.pyx":368
9465 * (<VBOOffset>instance).check_live()
9466 * return self.arrayType.unitSize( (<VBOOffset>instance).vbo.data )
9467 * cdef c_dimensions( self, object instance ): # <<<<<<<<<<<<<<
9468 * """Retrieve full set of dimensions for the array as tuple"""
9469 * (<VBOOffset>instance).check_live()
9470 */
9471
9472 /* function exit code */
9473 __pyx_L1_error:;
9474 __Pyx_XDECREF(__pyx_t_1);
9475 __Pyx_XDECREF(__pyx_t_2);
9476 __Pyx_XDECREF(__pyx_t_3);
9477 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBOOffsetHandler.c_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
9478 __pyx_r = 0;
9479 __pyx_L0:;
9480 __Pyx_XGIVEREF(__pyx_r);
9481 __Pyx_RefNannyFinishContext();
9482 return __pyx_r;
9483 }
9484
9485 /* "(tree fragment)":1
9486 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
9487 * cdef tuple state
9488 * cdef object _dict
9489 */
9490
9491 /* Python wrapper */
9492 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_3__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)9493 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9494 PyObject *__pyx_r = 0;
9495 __Pyx_RefNannyDeclarations
9496 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
9497 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_2__reduce_cython__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *)__pyx_v_self));
9498
9499 /* function exit code */
9500 __Pyx_RefNannyFinishContext();
9501 return __pyx_r;
9502 }
9503
__pyx_pf_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_2__reduce_cython__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler * __pyx_v_self)9504 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_2__reduce_cython__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *__pyx_v_self) {
9505 PyObject *__pyx_v_state = 0;
9506 PyObject *__pyx_v__dict = 0;
9507 int __pyx_v_use_setstate;
9508 PyObject *__pyx_r = NULL;
9509 __Pyx_RefNannyDeclarations
9510 PyObject *__pyx_t_1 = NULL;
9511 PyObject *__pyx_t_2 = NULL;
9512 int __pyx_t_3;
9513 int __pyx_t_4;
9514 PyObject *__pyx_t_5 = NULL;
9515 __Pyx_RefNannySetupContext("__reduce_cython__", 0);
9516
9517 /* "(tree fragment)":5
9518 * cdef object _dict
9519 * cdef bint use_setstate
9520 * state = (self.ERROR_ON_COPY, self.arrayType) # <<<<<<<<<<<<<<
9521 * _dict = getattr(self, '__dict__', None)
9522 * if _dict is not None:
9523 */
9524 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.ERROR_ON_COPY); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
9525 __Pyx_GOTREF(__pyx_t_1);
9526 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
9527 __Pyx_GOTREF(__pyx_t_2);
9528 __Pyx_GIVEREF(__pyx_t_1);
9529 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
9530 __Pyx_INCREF(__pyx_v_self->arrayType);
9531 __Pyx_GIVEREF(__pyx_v_self->arrayType);
9532 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->arrayType);
9533 __pyx_t_1 = 0;
9534 __pyx_v_state = ((PyObject*)__pyx_t_2);
9535 __pyx_t_2 = 0;
9536
9537 /* "(tree fragment)":6
9538 * cdef bint use_setstate
9539 * state = (self.ERROR_ON_COPY, self.arrayType)
9540 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
9541 * if _dict is not None:
9542 * state += (_dict,)
9543 */
9544 __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
9545 __Pyx_GOTREF(__pyx_t_2);
9546 __pyx_v__dict = __pyx_t_2;
9547 __pyx_t_2 = 0;
9548
9549 /* "(tree fragment)":7
9550 * state = (self.ERROR_ON_COPY, self.arrayType)
9551 * _dict = getattr(self, '__dict__', None)
9552 * if _dict is not None: # <<<<<<<<<<<<<<
9553 * state += (_dict,)
9554 * use_setstate = True
9555 */
9556 __pyx_t_3 = (__pyx_v__dict != Py_None);
9557 __pyx_t_4 = (__pyx_t_3 != 0);
9558 if (__pyx_t_4) {
9559
9560 /* "(tree fragment)":8
9561 * _dict = getattr(self, '__dict__', None)
9562 * if _dict is not None:
9563 * state += (_dict,) # <<<<<<<<<<<<<<
9564 * use_setstate = True
9565 * else:
9566 */
9567 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error)
9568 __Pyx_GOTREF(__pyx_t_2);
9569 __Pyx_INCREF(__pyx_v__dict);
9570 __Pyx_GIVEREF(__pyx_v__dict);
9571 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
9572 __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
9573 __Pyx_GOTREF(__pyx_t_1);
9574 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9575 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
9576 __pyx_t_1 = 0;
9577
9578 /* "(tree fragment)":9
9579 * if _dict is not None:
9580 * state += (_dict,)
9581 * use_setstate = True # <<<<<<<<<<<<<<
9582 * else:
9583 * use_setstate = self.arrayType is not None
9584 */
9585 __pyx_v_use_setstate = 1;
9586
9587 /* "(tree fragment)":7
9588 * state = (self.ERROR_ON_COPY, self.arrayType)
9589 * _dict = getattr(self, '__dict__', None)
9590 * if _dict is not None: # <<<<<<<<<<<<<<
9591 * state += (_dict,)
9592 * use_setstate = True
9593 */
9594 goto __pyx_L3;
9595 }
9596
9597 /* "(tree fragment)":11
9598 * use_setstate = True
9599 * else:
9600 * use_setstate = self.arrayType is not None # <<<<<<<<<<<<<<
9601 * if use_setstate:
9602 * return __pyx_unpickle_VBOOffsetHandler, (type(self), 0xe0a0c83, None), state
9603 */
9604 /*else*/ {
9605 __pyx_t_4 = (__pyx_v_self->arrayType != Py_None);
9606 __pyx_v_use_setstate = __pyx_t_4;
9607 }
9608 __pyx_L3:;
9609
9610 /* "(tree fragment)":12
9611 * else:
9612 * use_setstate = self.arrayType is not None
9613 * if use_setstate: # <<<<<<<<<<<<<<
9614 * return __pyx_unpickle_VBOOffsetHandler, (type(self), 0xe0a0c83, None), state
9615 * else:
9616 */
9617 __pyx_t_4 = (__pyx_v_use_setstate != 0);
9618 if (__pyx_t_4) {
9619
9620 /* "(tree fragment)":13
9621 * use_setstate = self.arrayType is not None
9622 * if use_setstate:
9623 * return __pyx_unpickle_VBOOffsetHandler, (type(self), 0xe0a0c83, None), state # <<<<<<<<<<<<<<
9624 * else:
9625 * return __pyx_unpickle_VBOOffsetHandler, (type(self), 0xe0a0c83, state)
9626 */
9627 __Pyx_XDECREF(__pyx_r);
9628 __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_VBOOffsetHandler); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
9629 __Pyx_GOTREF(__pyx_t_1);
9630 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
9631 __Pyx_GOTREF(__pyx_t_2);
9632 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
9633 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
9634 PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
9635 __Pyx_INCREF(__pyx_int_235539587);
9636 __Pyx_GIVEREF(__pyx_int_235539587);
9637 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235539587);
9638 __Pyx_INCREF(Py_None);
9639 __Pyx_GIVEREF(Py_None);
9640 PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
9641 __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
9642 __Pyx_GOTREF(__pyx_t_5);
9643 __Pyx_GIVEREF(__pyx_t_1);
9644 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
9645 __Pyx_GIVEREF(__pyx_t_2);
9646 PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
9647 __Pyx_INCREF(__pyx_v_state);
9648 __Pyx_GIVEREF(__pyx_v_state);
9649 PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
9650 __pyx_t_1 = 0;
9651 __pyx_t_2 = 0;
9652 __pyx_r = __pyx_t_5;
9653 __pyx_t_5 = 0;
9654 goto __pyx_L0;
9655
9656 /* "(tree fragment)":12
9657 * else:
9658 * use_setstate = self.arrayType is not None
9659 * if use_setstate: # <<<<<<<<<<<<<<
9660 * return __pyx_unpickle_VBOOffsetHandler, (type(self), 0xe0a0c83, None), state
9661 * else:
9662 */
9663 }
9664
9665 /* "(tree fragment)":15
9666 * return __pyx_unpickle_VBOOffsetHandler, (type(self), 0xe0a0c83, None), state
9667 * else:
9668 * return __pyx_unpickle_VBOOffsetHandler, (type(self), 0xe0a0c83, state) # <<<<<<<<<<<<<<
9669 * def __setstate_cython__(self, __pyx_state):
9670 * __pyx_unpickle_VBOOffsetHandler__set_state(self, __pyx_state)
9671 */
9672 /*else*/ {
9673 __Pyx_XDECREF(__pyx_r);
9674 __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_VBOOffsetHandler); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
9675 __Pyx_GOTREF(__pyx_t_5);
9676 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
9677 __Pyx_GOTREF(__pyx_t_2);
9678 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
9679 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
9680 PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
9681 __Pyx_INCREF(__pyx_int_235539587);
9682 __Pyx_GIVEREF(__pyx_int_235539587);
9683 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_235539587);
9684 __Pyx_INCREF(__pyx_v_state);
9685 __Pyx_GIVEREF(__pyx_v_state);
9686 PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
9687 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
9688 __Pyx_GOTREF(__pyx_t_1);
9689 __Pyx_GIVEREF(__pyx_t_5);
9690 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
9691 __Pyx_GIVEREF(__pyx_t_2);
9692 PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
9693 __pyx_t_5 = 0;
9694 __pyx_t_2 = 0;
9695 __pyx_r = __pyx_t_1;
9696 __pyx_t_1 = 0;
9697 goto __pyx_L0;
9698 }
9699
9700 /* "(tree fragment)":1
9701 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
9702 * cdef tuple state
9703 * cdef object _dict
9704 */
9705
9706 /* function exit code */
9707 __pyx_L1_error:;
9708 __Pyx_XDECREF(__pyx_t_1);
9709 __Pyx_XDECREF(__pyx_t_2);
9710 __Pyx_XDECREF(__pyx_t_5);
9711 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBOOffsetHandler.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9712 __pyx_r = NULL;
9713 __pyx_L0:;
9714 __Pyx_XDECREF(__pyx_v_state);
9715 __Pyx_XDECREF(__pyx_v__dict);
9716 __Pyx_XGIVEREF(__pyx_r);
9717 __Pyx_RefNannyFinishContext();
9718 return __pyx_r;
9719 }
9720
9721 /* "(tree fragment)":16
9722 * else:
9723 * return __pyx_unpickle_VBOOffsetHandler, (type(self), 0xe0a0c83, state)
9724 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
9725 * __pyx_unpickle_VBOOffsetHandler__set_state(self, __pyx_state)
9726 */
9727
9728 /* Python wrapper */
9729 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_5__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)9730 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
9731 PyObject *__pyx_r = 0;
9732 __Pyx_RefNannyDeclarations
9733 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
9734 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_4__setstate_cython__(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
9735
9736 /* function exit code */
9737 __Pyx_RefNannyFinishContext();
9738 return __pyx_r;
9739 }
9740
__pyx_pf_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_4__setstate_cython__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler * __pyx_v_self,PyObject * __pyx_v___pyx_state)9741 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_4__setstate_cython__(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
9742 PyObject *__pyx_r = NULL;
9743 __Pyx_RefNannyDeclarations
9744 PyObject *__pyx_t_1 = NULL;
9745 __Pyx_RefNannySetupContext("__setstate_cython__", 0);
9746
9747 /* "(tree fragment)":17
9748 * return __pyx_unpickle_VBOOffsetHandler, (type(self), 0xe0a0c83, state)
9749 * def __setstate_cython__(self, __pyx_state):
9750 * __pyx_unpickle_VBOOffsetHandler__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
9751 */
9752 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
9753 __pyx_t_1 = __pyx_f_17OpenGL_accelerate_3vbo___pyx_unpickle_VBOOffsetHandler__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
9754 __Pyx_GOTREF(__pyx_t_1);
9755 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9756
9757 /* "(tree fragment)":16
9758 * else:
9759 * return __pyx_unpickle_VBOOffsetHandler, (type(self), 0xe0a0c83, state)
9760 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
9761 * __pyx_unpickle_VBOOffsetHandler__set_state(self, __pyx_state)
9762 */
9763
9764 /* function exit code */
9765 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9766 goto __pyx_L0;
9767 __pyx_L1_error:;
9768 __Pyx_XDECREF(__pyx_t_1);
9769 __Pyx_AddTraceback("OpenGL_accelerate.vbo.VBOOffsetHandler.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9770 __pyx_r = NULL;
9771 __pyx_L0:;
9772 __Pyx_XGIVEREF(__pyx_r);
9773 __Pyx_RefNannyFinishContext();
9774 return __pyx_r;
9775 }
9776
9777 /* "(tree fragment)":1
9778 * def __pyx_unpickle_VBO(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
9779 * cdef object __pyx_PickleError
9780 * cdef object __pyx_result
9781 */
9782
9783 /* Python wrapper */
9784 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_1__pyx_unpickle_VBO(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9785 static PyMethodDef __pyx_mdef_17OpenGL_accelerate_3vbo_1__pyx_unpickle_VBO = {"__pyx_unpickle_VBO", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_17OpenGL_accelerate_3vbo_1__pyx_unpickle_VBO, METH_VARARGS|METH_KEYWORDS, 0};
__pyx_pw_17OpenGL_accelerate_3vbo_1__pyx_unpickle_VBO(PyObject * __pyx_self,PyObject * __pyx_args,PyObject * __pyx_kwds)9786 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_1__pyx_unpickle_VBO(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9787 PyObject *__pyx_v___pyx_type = 0;
9788 long __pyx_v___pyx_checksum;
9789 PyObject *__pyx_v___pyx_state = 0;
9790 PyObject *__pyx_r = 0;
9791 __Pyx_RefNannyDeclarations
9792 __Pyx_RefNannySetupContext("__pyx_unpickle_VBO (wrapper)", 0);
9793 {
9794 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
9795 PyObject* values[3] = {0,0,0};
9796 if (unlikely(__pyx_kwds)) {
9797 Py_ssize_t kw_args;
9798 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9799 switch (pos_args) {
9800 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9801 CYTHON_FALLTHROUGH;
9802 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9803 CYTHON_FALLTHROUGH;
9804 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9805 CYTHON_FALLTHROUGH;
9806 case 0: break;
9807 default: goto __pyx_L5_argtuple_error;
9808 }
9809 kw_args = PyDict_Size(__pyx_kwds);
9810 switch (pos_args) {
9811 case 0:
9812 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
9813 else goto __pyx_L5_argtuple_error;
9814 CYTHON_FALLTHROUGH;
9815 case 1:
9816 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
9817 else {
9818 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VBO", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
9819 }
9820 CYTHON_FALLTHROUGH;
9821 case 2:
9822 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
9823 else {
9824 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VBO", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
9825 }
9826 }
9827 if (unlikely(kw_args > 0)) {
9828 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_VBO") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
9829 }
9830 } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
9831 goto __pyx_L5_argtuple_error;
9832 } else {
9833 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9834 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9835 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9836 }
9837 __pyx_v___pyx_type = values[0];
9838 __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
9839 __pyx_v___pyx_state = values[2];
9840 }
9841 goto __pyx_L4_argument_unpacking_done;
9842 __pyx_L5_argtuple_error:;
9843 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VBO", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
9844 __pyx_L3_error:;
9845 __Pyx_AddTraceback("OpenGL_accelerate.vbo.__pyx_unpickle_VBO", __pyx_clineno, __pyx_lineno, __pyx_filename);
9846 __Pyx_RefNannyFinishContext();
9847 return NULL;
9848 __pyx_L4_argument_unpacking_done:;
9849 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo___pyx_unpickle_VBO(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
9850
9851 /* function exit code */
9852 __Pyx_RefNannyFinishContext();
9853 return __pyx_r;
9854 }
9855
__pyx_pf_17OpenGL_accelerate_3vbo___pyx_unpickle_VBO(CYTHON_UNUSED PyObject * __pyx_self,PyObject * __pyx_v___pyx_type,long __pyx_v___pyx_checksum,PyObject * __pyx_v___pyx_state)9856 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo___pyx_unpickle_VBO(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
9857 PyObject *__pyx_v___pyx_PickleError = 0;
9858 PyObject *__pyx_v___pyx_result = 0;
9859 PyObject *__pyx_r = NULL;
9860 __Pyx_RefNannyDeclarations
9861 int __pyx_t_1;
9862 PyObject *__pyx_t_2 = NULL;
9863 PyObject *__pyx_t_3 = NULL;
9864 PyObject *__pyx_t_4 = NULL;
9865 PyObject *__pyx_t_5 = NULL;
9866 int __pyx_t_6;
9867 __Pyx_RefNannySetupContext("__pyx_unpickle_VBO", 0);
9868
9869 /* "(tree fragment)":4
9870 * cdef object __pyx_PickleError
9871 * cdef object __pyx_result
9872 * if __pyx_checksum != 0x0fed755: # <<<<<<<<<<<<<<
9873 * from pickle import PickleError as __pyx_PickleError
9874 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0fed755 = (_I_, _copy_segments, arrayType, buffer, copied, created, data, resolved, size, target, target_spec, usage, usage_spec))" % __pyx_checksum)
9875 */
9876 __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x0fed755) != 0);
9877 if (__pyx_t_1) {
9878
9879 /* "(tree fragment)":5
9880 * cdef object __pyx_result
9881 * if __pyx_checksum != 0x0fed755:
9882 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
9883 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0fed755 = (_I_, _copy_segments, arrayType, buffer, copied, created, data, resolved, size, target, target_spec, usage, usage_spec))" % __pyx_checksum)
9884 * __pyx_result = VBO.__new__(__pyx_type)
9885 */
9886 __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
9887 __Pyx_GOTREF(__pyx_t_2);
9888 __Pyx_INCREF(__pyx_n_s_PickleError);
9889 __Pyx_GIVEREF(__pyx_n_s_PickleError);
9890 PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
9891 __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
9892 __Pyx_GOTREF(__pyx_t_3);
9893 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9894 __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
9895 __Pyx_GOTREF(__pyx_t_2);
9896 __Pyx_INCREF(__pyx_t_2);
9897 __pyx_v___pyx_PickleError = __pyx_t_2;
9898 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9899 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9900
9901 /* "(tree fragment)":6
9902 * if __pyx_checksum != 0x0fed755:
9903 * from pickle import PickleError as __pyx_PickleError
9904 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0fed755 = (_I_, _copy_segments, arrayType, buffer, copied, created, data, resolved, size, target, target_spec, usage, usage_spec))" % __pyx_checksum) # <<<<<<<<<<<<<<
9905 * __pyx_result = VBO.__new__(__pyx_type)
9906 * if __pyx_state is not None:
9907 */
9908 __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
9909 __Pyx_GOTREF(__pyx_t_2);
9910 __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x0f, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
9911 __Pyx_GOTREF(__pyx_t_4);
9912 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9913 __Pyx_INCREF(__pyx_v___pyx_PickleError);
9914 __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
9915 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
9916 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
9917 if (likely(__pyx_t_5)) {
9918 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
9919 __Pyx_INCREF(__pyx_t_5);
9920 __Pyx_INCREF(function);
9921 __Pyx_DECREF_SET(__pyx_t_2, function);
9922 }
9923 }
9924 __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
9925 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
9926 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9927 if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
9928 __Pyx_GOTREF(__pyx_t_3);
9929 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9930 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
9931 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9932 __PYX_ERR(1, 6, __pyx_L1_error)
9933
9934 /* "(tree fragment)":4
9935 * cdef object __pyx_PickleError
9936 * cdef object __pyx_result
9937 * if __pyx_checksum != 0x0fed755: # <<<<<<<<<<<<<<
9938 * from pickle import PickleError as __pyx_PickleError
9939 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0fed755 = (_I_, _copy_segments, arrayType, buffer, copied, created, data, resolved, size, target, target_spec, usage, usage_spec))" % __pyx_checksum)
9940 */
9941 }
9942
9943 /* "(tree fragment)":7
9944 * from pickle import PickleError as __pyx_PickleError
9945 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0fed755 = (_I_, _copy_segments, arrayType, buffer, copied, created, data, resolved, size, target, target_spec, usage, usage_spec))" % __pyx_checksum)
9946 * __pyx_result = VBO.__new__(__pyx_type) # <<<<<<<<<<<<<<
9947 * if __pyx_state is not None:
9948 * __pyx_unpickle_VBO__set_state(<VBO> __pyx_result, __pyx_state)
9949 */
9950 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_17OpenGL_accelerate_3vbo_VBO), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
9951 __Pyx_GOTREF(__pyx_t_2);
9952 __pyx_t_4 = NULL;
9953 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
9954 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
9955 if (likely(__pyx_t_4)) {
9956 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
9957 __Pyx_INCREF(__pyx_t_4);
9958 __Pyx_INCREF(function);
9959 __Pyx_DECREF_SET(__pyx_t_2, function);
9960 }
9961 }
9962 __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
9963 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
9964 if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
9965 __Pyx_GOTREF(__pyx_t_3);
9966 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9967 __pyx_v___pyx_result = __pyx_t_3;
9968 __pyx_t_3 = 0;
9969
9970 /* "(tree fragment)":8
9971 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0fed755 = (_I_, _copy_segments, arrayType, buffer, copied, created, data, resolved, size, target, target_spec, usage, usage_spec))" % __pyx_checksum)
9972 * __pyx_result = VBO.__new__(__pyx_type)
9973 * if __pyx_state is not None: # <<<<<<<<<<<<<<
9974 * __pyx_unpickle_VBO__set_state(<VBO> __pyx_result, __pyx_state)
9975 * return __pyx_result
9976 */
9977 __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
9978 __pyx_t_6 = (__pyx_t_1 != 0);
9979 if (__pyx_t_6) {
9980
9981 /* "(tree fragment)":9
9982 * __pyx_result = VBO.__new__(__pyx_type)
9983 * if __pyx_state is not None:
9984 * __pyx_unpickle_VBO__set_state(<VBO> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
9985 * return __pyx_result
9986 * cdef __pyx_unpickle_VBO__set_state(VBO __pyx_result, tuple __pyx_state):
9987 */
9988 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
9989 __pyx_t_3 = __pyx_f_17OpenGL_accelerate_3vbo___pyx_unpickle_VBO__set_state(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
9990 __Pyx_GOTREF(__pyx_t_3);
9991 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9992
9993 /* "(tree fragment)":8
9994 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0fed755 = (_I_, _copy_segments, arrayType, buffer, copied, created, data, resolved, size, target, target_spec, usage, usage_spec))" % __pyx_checksum)
9995 * __pyx_result = VBO.__new__(__pyx_type)
9996 * if __pyx_state is not None: # <<<<<<<<<<<<<<
9997 * __pyx_unpickle_VBO__set_state(<VBO> __pyx_result, __pyx_state)
9998 * return __pyx_result
9999 */
10000 }
10001
10002 /* "(tree fragment)":10
10003 * if __pyx_state is not None:
10004 * __pyx_unpickle_VBO__set_state(<VBO> __pyx_result, __pyx_state)
10005 * return __pyx_result # <<<<<<<<<<<<<<
10006 * cdef __pyx_unpickle_VBO__set_state(VBO __pyx_result, tuple __pyx_state):
10007 * __pyx_result._I_ = __pyx_state[0]; __pyx_result._copy_segments = __pyx_state[1]; __pyx_result.arrayType = __pyx_state[2]; __pyx_result.buffer = __pyx_state[3]; __pyx_result.copied = __pyx_state[4]; __pyx_result.created = __pyx_state[5]; __pyx_result.data = __pyx_state[6]; __pyx_result.resolved = __pyx_state[7]; __pyx_result.size = __pyx_state[8]; __pyx_result.target = __pyx_state[9]; __pyx_result.target_spec = __pyx_state[10]; __pyx_result.usage = __pyx_state[11]; __pyx_result.usage_spec = __pyx_state[12]
10008 */
10009 __Pyx_XDECREF(__pyx_r);
10010 __Pyx_INCREF(__pyx_v___pyx_result);
10011 __pyx_r = __pyx_v___pyx_result;
10012 goto __pyx_L0;
10013
10014 /* "(tree fragment)":1
10015 * def __pyx_unpickle_VBO(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
10016 * cdef object __pyx_PickleError
10017 * cdef object __pyx_result
10018 */
10019
10020 /* function exit code */
10021 __pyx_L1_error:;
10022 __Pyx_XDECREF(__pyx_t_2);
10023 __Pyx_XDECREF(__pyx_t_3);
10024 __Pyx_XDECREF(__pyx_t_4);
10025 __Pyx_XDECREF(__pyx_t_5);
10026 __Pyx_AddTraceback("OpenGL_accelerate.vbo.__pyx_unpickle_VBO", __pyx_clineno, __pyx_lineno, __pyx_filename);
10027 __pyx_r = NULL;
10028 __pyx_L0:;
10029 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
10030 __Pyx_XDECREF(__pyx_v___pyx_result);
10031 __Pyx_XGIVEREF(__pyx_r);
10032 __Pyx_RefNannyFinishContext();
10033 return __pyx_r;
10034 }
10035
10036 /* "(tree fragment)":11
10037 * __pyx_unpickle_VBO__set_state(<VBO> __pyx_result, __pyx_state)
10038 * return __pyx_result
10039 * cdef __pyx_unpickle_VBO__set_state(VBO __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
10040 * __pyx_result._I_ = __pyx_state[0]; __pyx_result._copy_segments = __pyx_state[1]; __pyx_result.arrayType = __pyx_state[2]; __pyx_result.buffer = __pyx_state[3]; __pyx_result.copied = __pyx_state[4]; __pyx_result.created = __pyx_state[5]; __pyx_result.data = __pyx_state[6]; __pyx_result.resolved = __pyx_state[7]; __pyx_result.size = __pyx_state[8]; __pyx_result.target = __pyx_state[9]; __pyx_result.target_spec = __pyx_state[10]; __pyx_result.usage = __pyx_state[11]; __pyx_result.usage_spec = __pyx_state[12]
10041 * if len(__pyx_state) > 13 and hasattr(__pyx_result, '__dict__'):
10042 */
10043
__pyx_f_17OpenGL_accelerate_3vbo___pyx_unpickle_VBO__set_state(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO * __pyx_v___pyx_result,PyObject * __pyx_v___pyx_state)10044 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo___pyx_unpickle_VBO__set_state(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
10045 PyObject *__pyx_r = NULL;
10046 __Pyx_RefNannyDeclarations
10047 PyObject *__pyx_t_1 = NULL;
10048 unsigned int __pyx_t_2;
10049 int __pyx_t_3;
10050 int __pyx_t_4;
10051 Py_ssize_t __pyx_t_5;
10052 int __pyx_t_6;
10053 int __pyx_t_7;
10054 PyObject *__pyx_t_8 = NULL;
10055 PyObject *__pyx_t_9 = NULL;
10056 PyObject *__pyx_t_10 = NULL;
10057 __Pyx_RefNannySetupContext("__pyx_unpickle_VBO__set_state", 0);
10058
10059 /* "(tree fragment)":12
10060 * return __pyx_result
10061 * cdef __pyx_unpickle_VBO__set_state(VBO __pyx_result, tuple __pyx_state):
10062 * __pyx_result._I_ = __pyx_state[0]; __pyx_result._copy_segments = __pyx_state[1]; __pyx_result.arrayType = __pyx_state[2]; __pyx_result.buffer = __pyx_state[3]; __pyx_result.copied = __pyx_state[4]; __pyx_result.created = __pyx_state[5]; __pyx_result.data = __pyx_state[6]; __pyx_result.resolved = __pyx_state[7]; __pyx_result.size = __pyx_state[8]; __pyx_result.target = __pyx_state[9]; __pyx_result.target_spec = __pyx_state[10]; __pyx_result.usage = __pyx_state[11]; __pyx_result.usage_spec = __pyx_state[12] # <<<<<<<<<<<<<<
10063 * if len(__pyx_state) > 13 and hasattr(__pyx_result, '__dict__'):
10064 * __pyx_result.__dict__.update(__pyx_state[13])
10065 */
10066 if (unlikely(__pyx_v___pyx_state == Py_None)) {
10067 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
10068 __PYX_ERR(1, 12, __pyx_L1_error)
10069 }
10070 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
10071 __Pyx_GOTREF(__pyx_t_1);
10072 __Pyx_GIVEREF(__pyx_t_1);
10073 __Pyx_GOTREF(__pyx_v___pyx_result->_I_);
10074 __Pyx_DECREF(__pyx_v___pyx_result->_I_);
10075 __pyx_v___pyx_result->_I_ = __pyx_t_1;
10076 __pyx_t_1 = 0;
10077 if (unlikely(__pyx_v___pyx_state == Py_None)) {
10078 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
10079 __PYX_ERR(1, 12, __pyx_L1_error)
10080 }
10081 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
10082 __Pyx_GOTREF(__pyx_t_1);
10083 if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
10084 __Pyx_GIVEREF(__pyx_t_1);
10085 __Pyx_GOTREF(__pyx_v___pyx_result->_copy_segments);
10086 __Pyx_DECREF(__pyx_v___pyx_result->_copy_segments);
10087 __pyx_v___pyx_result->_copy_segments = ((PyObject*)__pyx_t_1);
10088 __pyx_t_1 = 0;
10089 if (unlikely(__pyx_v___pyx_state == Py_None)) {
10090 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
10091 __PYX_ERR(1, 12, __pyx_L1_error)
10092 }
10093 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
10094 __Pyx_GOTREF(__pyx_t_1);
10095 __Pyx_GIVEREF(__pyx_t_1);
10096 __Pyx_GOTREF(__pyx_v___pyx_result->arrayType);
10097 __Pyx_DECREF(__pyx_v___pyx_result->arrayType);
10098 __pyx_v___pyx_result->arrayType = __pyx_t_1;
10099 __pyx_t_1 = 0;
10100 if (unlikely(__pyx_v___pyx_state == Py_None)) {
10101 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
10102 __PYX_ERR(1, 12, __pyx_L1_error)
10103 }
10104 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
10105 __Pyx_GOTREF(__pyx_t_1);
10106 __pyx_t_2 = __Pyx_PyInt_As_unsigned_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
10107 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10108 __pyx_v___pyx_result->buffer = __pyx_t_2;
10109 if (unlikely(__pyx_v___pyx_state == Py_None)) {
10110 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
10111 __PYX_ERR(1, 12, __pyx_L1_error)
10112 }
10113 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
10114 __Pyx_GOTREF(__pyx_t_1);
10115 __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
10116 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10117 __pyx_v___pyx_result->copied = __pyx_t_3;
10118 if (unlikely(__pyx_v___pyx_state == Py_None)) {
10119 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
10120 __PYX_ERR(1, 12, __pyx_L1_error)
10121 }
10122 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
10123 __Pyx_GOTREF(__pyx_t_1);
10124 __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
10125 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10126 __pyx_v___pyx_result->created = __pyx_t_3;
10127 if (unlikely(__pyx_v___pyx_state == Py_None)) {
10128 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
10129 __PYX_ERR(1, 12, __pyx_L1_error)
10130 }
10131 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
10132 __Pyx_GOTREF(__pyx_t_1);
10133 __Pyx_GIVEREF(__pyx_t_1);
10134 __Pyx_GOTREF(__pyx_v___pyx_result->data);
10135 __Pyx_DECREF(__pyx_v___pyx_result->data);
10136 __pyx_v___pyx_result->data = __pyx_t_1;
10137 __pyx_t_1 = 0;
10138 if (unlikely(__pyx_v___pyx_state == Py_None)) {
10139 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
10140 __PYX_ERR(1, 12, __pyx_L1_error)
10141 }
10142 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
10143 __Pyx_GOTREF(__pyx_t_1);
10144 __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
10145 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10146 __pyx_v___pyx_result->resolved = __pyx_t_3;
10147 if (unlikely(__pyx_v___pyx_state == Py_None)) {
10148 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
10149 __PYX_ERR(1, 12, __pyx_L1_error)
10150 }
10151 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
10152 __Pyx_GOTREF(__pyx_t_1);
10153 __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
10154 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10155 __pyx_v___pyx_result->size = __pyx_t_3;
10156 if (unlikely(__pyx_v___pyx_state == Py_None)) {
10157 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
10158 __PYX_ERR(1, 12, __pyx_L1_error)
10159 }
10160 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
10161 __Pyx_GOTREF(__pyx_t_1);
10162 __Pyx_GIVEREF(__pyx_t_1);
10163 __Pyx_GOTREF(__pyx_v___pyx_result->target);
10164 __Pyx_DECREF(__pyx_v___pyx_result->target);
10165 __pyx_v___pyx_result->target = __pyx_t_1;
10166 __pyx_t_1 = 0;
10167 if (unlikely(__pyx_v___pyx_state == Py_None)) {
10168 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
10169 __PYX_ERR(1, 12, __pyx_L1_error)
10170 }
10171 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
10172 __Pyx_GOTREF(__pyx_t_1);
10173 __Pyx_GIVEREF(__pyx_t_1);
10174 __Pyx_GOTREF(__pyx_v___pyx_result->target_spec);
10175 __Pyx_DECREF(__pyx_v___pyx_result->target_spec);
10176 __pyx_v___pyx_result->target_spec = __pyx_t_1;
10177 __pyx_t_1 = 0;
10178 if (unlikely(__pyx_v___pyx_state == Py_None)) {
10179 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
10180 __PYX_ERR(1, 12, __pyx_L1_error)
10181 }
10182 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
10183 __Pyx_GOTREF(__pyx_t_1);
10184 __Pyx_GIVEREF(__pyx_t_1);
10185 __Pyx_GOTREF(__pyx_v___pyx_result->usage);
10186 __Pyx_DECREF(__pyx_v___pyx_result->usage);
10187 __pyx_v___pyx_result->usage = __pyx_t_1;
10188 __pyx_t_1 = 0;
10189 if (unlikely(__pyx_v___pyx_state == Py_None)) {
10190 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
10191 __PYX_ERR(1, 12, __pyx_L1_error)
10192 }
10193 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 12, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
10194 __Pyx_GOTREF(__pyx_t_1);
10195 __Pyx_GIVEREF(__pyx_t_1);
10196 __Pyx_GOTREF(__pyx_v___pyx_result->usage_spec);
10197 __Pyx_DECREF(__pyx_v___pyx_result->usage_spec);
10198 __pyx_v___pyx_result->usage_spec = __pyx_t_1;
10199 __pyx_t_1 = 0;
10200
10201 /* "(tree fragment)":13
10202 * cdef __pyx_unpickle_VBO__set_state(VBO __pyx_result, tuple __pyx_state):
10203 * __pyx_result._I_ = __pyx_state[0]; __pyx_result._copy_segments = __pyx_state[1]; __pyx_result.arrayType = __pyx_state[2]; __pyx_result.buffer = __pyx_state[3]; __pyx_result.copied = __pyx_state[4]; __pyx_result.created = __pyx_state[5]; __pyx_result.data = __pyx_state[6]; __pyx_result.resolved = __pyx_state[7]; __pyx_result.size = __pyx_state[8]; __pyx_result.target = __pyx_state[9]; __pyx_result.target_spec = __pyx_state[10]; __pyx_result.usage = __pyx_state[11]; __pyx_result.usage_spec = __pyx_state[12]
10204 * if len(__pyx_state) > 13 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
10205 * __pyx_result.__dict__.update(__pyx_state[13])
10206 */
10207 if (unlikely(__pyx_v___pyx_state == Py_None)) {
10208 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
10209 __PYX_ERR(1, 13, __pyx_L1_error)
10210 }
10211 __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
10212 __pyx_t_6 = ((__pyx_t_5 > 13) != 0);
10213 if (__pyx_t_6) {
10214 } else {
10215 __pyx_t_4 = __pyx_t_6;
10216 goto __pyx_L4_bool_binop_done;
10217 }
10218 __pyx_t_6 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
10219 __pyx_t_7 = (__pyx_t_6 != 0);
10220 __pyx_t_4 = __pyx_t_7;
10221 __pyx_L4_bool_binop_done:;
10222 if (__pyx_t_4) {
10223
10224 /* "(tree fragment)":14
10225 * __pyx_result._I_ = __pyx_state[0]; __pyx_result._copy_segments = __pyx_state[1]; __pyx_result.arrayType = __pyx_state[2]; __pyx_result.buffer = __pyx_state[3]; __pyx_result.copied = __pyx_state[4]; __pyx_result.created = __pyx_state[5]; __pyx_result.data = __pyx_state[6]; __pyx_result.resolved = __pyx_state[7]; __pyx_result.size = __pyx_state[8]; __pyx_result.target = __pyx_state[9]; __pyx_result.target_spec = __pyx_state[10]; __pyx_result.usage = __pyx_state[11]; __pyx_result.usage_spec = __pyx_state[12]
10226 * if len(__pyx_state) > 13 and hasattr(__pyx_result, '__dict__'):
10227 * __pyx_result.__dict__.update(__pyx_state[13]) # <<<<<<<<<<<<<<
10228 */
10229 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
10230 __Pyx_GOTREF(__pyx_t_8);
10231 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_update); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 14, __pyx_L1_error)
10232 __Pyx_GOTREF(__pyx_t_9);
10233 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10234 if (unlikely(__pyx_v___pyx_state == Py_None)) {
10235 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
10236 __PYX_ERR(1, 14, __pyx_L1_error)
10237 }
10238 __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 13, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
10239 __Pyx_GOTREF(__pyx_t_8);
10240 __pyx_t_10 = NULL;
10241 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
10242 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
10243 if (likely(__pyx_t_10)) {
10244 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
10245 __Pyx_INCREF(__pyx_t_10);
10246 __Pyx_INCREF(function);
10247 __Pyx_DECREF_SET(__pyx_t_9, function);
10248 }
10249 }
10250 __pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8);
10251 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
10252 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10253 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
10254 __Pyx_GOTREF(__pyx_t_1);
10255 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
10256 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10257
10258 /* "(tree fragment)":13
10259 * cdef __pyx_unpickle_VBO__set_state(VBO __pyx_result, tuple __pyx_state):
10260 * __pyx_result._I_ = __pyx_state[0]; __pyx_result._copy_segments = __pyx_state[1]; __pyx_result.arrayType = __pyx_state[2]; __pyx_result.buffer = __pyx_state[3]; __pyx_result.copied = __pyx_state[4]; __pyx_result.created = __pyx_state[5]; __pyx_result.data = __pyx_state[6]; __pyx_result.resolved = __pyx_state[7]; __pyx_result.size = __pyx_state[8]; __pyx_result.target = __pyx_state[9]; __pyx_result.target_spec = __pyx_state[10]; __pyx_result.usage = __pyx_state[11]; __pyx_result.usage_spec = __pyx_state[12]
10261 * if len(__pyx_state) > 13 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
10262 * __pyx_result.__dict__.update(__pyx_state[13])
10263 */
10264 }
10265
10266 /* "(tree fragment)":11
10267 * __pyx_unpickle_VBO__set_state(<VBO> __pyx_result, __pyx_state)
10268 * return __pyx_result
10269 * cdef __pyx_unpickle_VBO__set_state(VBO __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
10270 * __pyx_result._I_ = __pyx_state[0]; __pyx_result._copy_segments = __pyx_state[1]; __pyx_result.arrayType = __pyx_state[2]; __pyx_result.buffer = __pyx_state[3]; __pyx_result.copied = __pyx_state[4]; __pyx_result.created = __pyx_state[5]; __pyx_result.data = __pyx_state[6]; __pyx_result.resolved = __pyx_state[7]; __pyx_result.size = __pyx_state[8]; __pyx_result.target = __pyx_state[9]; __pyx_result.target_spec = __pyx_state[10]; __pyx_result.usage = __pyx_state[11]; __pyx_result.usage_spec = __pyx_state[12]
10271 * if len(__pyx_state) > 13 and hasattr(__pyx_result, '__dict__'):
10272 */
10273
10274 /* function exit code */
10275 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10276 goto __pyx_L0;
10277 __pyx_L1_error:;
10278 __Pyx_XDECREF(__pyx_t_1);
10279 __Pyx_XDECREF(__pyx_t_8);
10280 __Pyx_XDECREF(__pyx_t_9);
10281 __Pyx_XDECREF(__pyx_t_10);
10282 __Pyx_AddTraceback("OpenGL_accelerate.vbo.__pyx_unpickle_VBO__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
10283 __pyx_r = 0;
10284 __pyx_L0:;
10285 __Pyx_XGIVEREF(__pyx_r);
10286 __Pyx_RefNannyFinishContext();
10287 return __pyx_r;
10288 }
10289
10290 /* "(tree fragment)":1
10291 * def __pyx_unpickle_VBOHandler(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
10292 * cdef object __pyx_PickleError
10293 * cdef object __pyx_result
10294 */
10295
10296 /* Python wrapper */
10297 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3__pyx_unpickle_VBOHandler(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
10298 static PyMethodDef __pyx_mdef_17OpenGL_accelerate_3vbo_3__pyx_unpickle_VBOHandler = {"__pyx_unpickle_VBOHandler", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_17OpenGL_accelerate_3vbo_3__pyx_unpickle_VBOHandler, METH_VARARGS|METH_KEYWORDS, 0};
__pyx_pw_17OpenGL_accelerate_3vbo_3__pyx_unpickle_VBOHandler(PyObject * __pyx_self,PyObject * __pyx_args,PyObject * __pyx_kwds)10299 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_3__pyx_unpickle_VBOHandler(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10300 PyObject *__pyx_v___pyx_type = 0;
10301 long __pyx_v___pyx_checksum;
10302 PyObject *__pyx_v___pyx_state = 0;
10303 PyObject *__pyx_r = 0;
10304 __Pyx_RefNannyDeclarations
10305 __Pyx_RefNannySetupContext("__pyx_unpickle_VBOHandler (wrapper)", 0);
10306 {
10307 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
10308 PyObject* values[3] = {0,0,0};
10309 if (unlikely(__pyx_kwds)) {
10310 Py_ssize_t kw_args;
10311 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
10312 switch (pos_args) {
10313 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10314 CYTHON_FALLTHROUGH;
10315 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10316 CYTHON_FALLTHROUGH;
10317 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10318 CYTHON_FALLTHROUGH;
10319 case 0: break;
10320 default: goto __pyx_L5_argtuple_error;
10321 }
10322 kw_args = PyDict_Size(__pyx_kwds);
10323 switch (pos_args) {
10324 case 0:
10325 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
10326 else goto __pyx_L5_argtuple_error;
10327 CYTHON_FALLTHROUGH;
10328 case 1:
10329 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
10330 else {
10331 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VBOHandler", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
10332 }
10333 CYTHON_FALLTHROUGH;
10334 case 2:
10335 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
10336 else {
10337 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VBOHandler", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
10338 }
10339 }
10340 if (unlikely(kw_args > 0)) {
10341 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_VBOHandler") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
10342 }
10343 } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
10344 goto __pyx_L5_argtuple_error;
10345 } else {
10346 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10347 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10348 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10349 }
10350 __pyx_v___pyx_type = values[0];
10351 __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
10352 __pyx_v___pyx_state = values[2];
10353 }
10354 goto __pyx_L4_argument_unpacking_done;
10355 __pyx_L5_argtuple_error:;
10356 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VBOHandler", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
10357 __pyx_L3_error:;
10358 __Pyx_AddTraceback("OpenGL_accelerate.vbo.__pyx_unpickle_VBOHandler", __pyx_clineno, __pyx_lineno, __pyx_filename);
10359 __Pyx_RefNannyFinishContext();
10360 return NULL;
10361 __pyx_L4_argument_unpacking_done:;
10362 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_2__pyx_unpickle_VBOHandler(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
10363
10364 /* function exit code */
10365 __Pyx_RefNannyFinishContext();
10366 return __pyx_r;
10367 }
10368
__pyx_pf_17OpenGL_accelerate_3vbo_2__pyx_unpickle_VBOHandler(CYTHON_UNUSED PyObject * __pyx_self,PyObject * __pyx_v___pyx_type,long __pyx_v___pyx_checksum,PyObject * __pyx_v___pyx_state)10369 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_2__pyx_unpickle_VBOHandler(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
10370 PyObject *__pyx_v___pyx_PickleError = 0;
10371 PyObject *__pyx_v___pyx_result = 0;
10372 PyObject *__pyx_r = NULL;
10373 __Pyx_RefNannyDeclarations
10374 int __pyx_t_1;
10375 PyObject *__pyx_t_2 = NULL;
10376 PyObject *__pyx_t_3 = NULL;
10377 PyObject *__pyx_t_4 = NULL;
10378 PyObject *__pyx_t_5 = NULL;
10379 int __pyx_t_6;
10380 __Pyx_RefNannySetupContext("__pyx_unpickle_VBOHandler", 0);
10381
10382 /* "(tree fragment)":4
10383 * cdef object __pyx_PickleError
10384 * cdef object __pyx_result
10385 * if __pyx_checksum != 0xaddf131: # <<<<<<<<<<<<<<
10386 * from pickle import PickleError as __pyx_PickleError
10387 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xaddf131 = (ERROR_ON_COPY, arrayType, vp0))" % __pyx_checksum)
10388 */
10389 __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xaddf131) != 0);
10390 if (__pyx_t_1) {
10391
10392 /* "(tree fragment)":5
10393 * cdef object __pyx_result
10394 * if __pyx_checksum != 0xaddf131:
10395 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
10396 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xaddf131 = (ERROR_ON_COPY, arrayType, vp0))" % __pyx_checksum)
10397 * __pyx_result = VBOHandler.__new__(__pyx_type)
10398 */
10399 __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
10400 __Pyx_GOTREF(__pyx_t_2);
10401 __Pyx_INCREF(__pyx_n_s_PickleError);
10402 __Pyx_GIVEREF(__pyx_n_s_PickleError);
10403 PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
10404 __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
10405 __Pyx_GOTREF(__pyx_t_3);
10406 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10407 __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
10408 __Pyx_GOTREF(__pyx_t_2);
10409 __Pyx_INCREF(__pyx_t_2);
10410 __pyx_v___pyx_PickleError = __pyx_t_2;
10411 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10412 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10413
10414 /* "(tree fragment)":6
10415 * if __pyx_checksum != 0xaddf131:
10416 * from pickle import PickleError as __pyx_PickleError
10417 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xaddf131 = (ERROR_ON_COPY, arrayType, vp0))" % __pyx_checksum) # <<<<<<<<<<<<<<
10418 * __pyx_result = VBOHandler.__new__(__pyx_type)
10419 * if __pyx_state is not None:
10420 */
10421 __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
10422 __Pyx_GOTREF(__pyx_t_2);
10423 __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xad, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
10424 __Pyx_GOTREF(__pyx_t_4);
10425 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10426 __Pyx_INCREF(__pyx_v___pyx_PickleError);
10427 __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
10428 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
10429 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
10430 if (likely(__pyx_t_5)) {
10431 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
10432 __Pyx_INCREF(__pyx_t_5);
10433 __Pyx_INCREF(function);
10434 __Pyx_DECREF_SET(__pyx_t_2, function);
10435 }
10436 }
10437 __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
10438 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
10439 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10440 if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
10441 __Pyx_GOTREF(__pyx_t_3);
10442 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10443 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
10444 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10445 __PYX_ERR(1, 6, __pyx_L1_error)
10446
10447 /* "(tree fragment)":4
10448 * cdef object __pyx_PickleError
10449 * cdef object __pyx_result
10450 * if __pyx_checksum != 0xaddf131: # <<<<<<<<<<<<<<
10451 * from pickle import PickleError as __pyx_PickleError
10452 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xaddf131 = (ERROR_ON_COPY, arrayType, vp0))" % __pyx_checksum)
10453 */
10454 }
10455
10456 /* "(tree fragment)":7
10457 * from pickle import PickleError as __pyx_PickleError
10458 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xaddf131 = (ERROR_ON_COPY, arrayType, vp0))" % __pyx_checksum)
10459 * __pyx_result = VBOHandler.__new__(__pyx_type) # <<<<<<<<<<<<<<
10460 * if __pyx_state is not None:
10461 * __pyx_unpickle_VBOHandler__set_state(<VBOHandler> __pyx_result, __pyx_state)
10462 */
10463 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_17OpenGL_accelerate_3vbo_VBOHandler), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
10464 __Pyx_GOTREF(__pyx_t_2);
10465 __pyx_t_4 = NULL;
10466 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
10467 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
10468 if (likely(__pyx_t_4)) {
10469 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
10470 __Pyx_INCREF(__pyx_t_4);
10471 __Pyx_INCREF(function);
10472 __Pyx_DECREF_SET(__pyx_t_2, function);
10473 }
10474 }
10475 __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
10476 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
10477 if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
10478 __Pyx_GOTREF(__pyx_t_3);
10479 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10480 __pyx_v___pyx_result = __pyx_t_3;
10481 __pyx_t_3 = 0;
10482
10483 /* "(tree fragment)":8
10484 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xaddf131 = (ERROR_ON_COPY, arrayType, vp0))" % __pyx_checksum)
10485 * __pyx_result = VBOHandler.__new__(__pyx_type)
10486 * if __pyx_state is not None: # <<<<<<<<<<<<<<
10487 * __pyx_unpickle_VBOHandler__set_state(<VBOHandler> __pyx_result, __pyx_state)
10488 * return __pyx_result
10489 */
10490 __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
10491 __pyx_t_6 = (__pyx_t_1 != 0);
10492 if (__pyx_t_6) {
10493
10494 /* "(tree fragment)":9
10495 * __pyx_result = VBOHandler.__new__(__pyx_type)
10496 * if __pyx_state is not None:
10497 * __pyx_unpickle_VBOHandler__set_state(<VBOHandler> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
10498 * return __pyx_result
10499 * cdef __pyx_unpickle_VBOHandler__set_state(VBOHandler __pyx_result, tuple __pyx_state):
10500 */
10501 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
10502 __pyx_t_3 = __pyx_f_17OpenGL_accelerate_3vbo___pyx_unpickle_VBOHandler__set_state(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
10503 __Pyx_GOTREF(__pyx_t_3);
10504 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10505
10506 /* "(tree fragment)":8
10507 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xaddf131 = (ERROR_ON_COPY, arrayType, vp0))" % __pyx_checksum)
10508 * __pyx_result = VBOHandler.__new__(__pyx_type)
10509 * if __pyx_state is not None: # <<<<<<<<<<<<<<
10510 * __pyx_unpickle_VBOHandler__set_state(<VBOHandler> __pyx_result, __pyx_state)
10511 * return __pyx_result
10512 */
10513 }
10514
10515 /* "(tree fragment)":10
10516 * if __pyx_state is not None:
10517 * __pyx_unpickle_VBOHandler__set_state(<VBOHandler> __pyx_result, __pyx_state)
10518 * return __pyx_result # <<<<<<<<<<<<<<
10519 * cdef __pyx_unpickle_VBOHandler__set_state(VBOHandler __pyx_result, tuple __pyx_state):
10520 * __pyx_result.ERROR_ON_COPY = __pyx_state[0]; __pyx_result.arrayType = __pyx_state[1]; __pyx_result.vp0 = __pyx_state[2]
10521 */
10522 __Pyx_XDECREF(__pyx_r);
10523 __Pyx_INCREF(__pyx_v___pyx_result);
10524 __pyx_r = __pyx_v___pyx_result;
10525 goto __pyx_L0;
10526
10527 /* "(tree fragment)":1
10528 * def __pyx_unpickle_VBOHandler(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
10529 * cdef object __pyx_PickleError
10530 * cdef object __pyx_result
10531 */
10532
10533 /* function exit code */
10534 __pyx_L1_error:;
10535 __Pyx_XDECREF(__pyx_t_2);
10536 __Pyx_XDECREF(__pyx_t_3);
10537 __Pyx_XDECREF(__pyx_t_4);
10538 __Pyx_XDECREF(__pyx_t_5);
10539 __Pyx_AddTraceback("OpenGL_accelerate.vbo.__pyx_unpickle_VBOHandler", __pyx_clineno, __pyx_lineno, __pyx_filename);
10540 __pyx_r = NULL;
10541 __pyx_L0:;
10542 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
10543 __Pyx_XDECREF(__pyx_v___pyx_result);
10544 __Pyx_XGIVEREF(__pyx_r);
10545 __Pyx_RefNannyFinishContext();
10546 return __pyx_r;
10547 }
10548
10549 /* "(tree fragment)":11
10550 * __pyx_unpickle_VBOHandler__set_state(<VBOHandler> __pyx_result, __pyx_state)
10551 * return __pyx_result
10552 * cdef __pyx_unpickle_VBOHandler__set_state(VBOHandler __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
10553 * __pyx_result.ERROR_ON_COPY = __pyx_state[0]; __pyx_result.arrayType = __pyx_state[1]; __pyx_result.vp0 = __pyx_state[2]
10554 * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
10555 */
10556
__pyx_f_17OpenGL_accelerate_3vbo___pyx_unpickle_VBOHandler__set_state(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler * __pyx_v___pyx_result,PyObject * __pyx_v___pyx_state)10557 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo___pyx_unpickle_VBOHandler__set_state(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
10558 PyObject *__pyx_r = NULL;
10559 __Pyx_RefNannyDeclarations
10560 PyObject *__pyx_t_1 = NULL;
10561 int __pyx_t_2;
10562 int __pyx_t_3;
10563 Py_ssize_t __pyx_t_4;
10564 int __pyx_t_5;
10565 int __pyx_t_6;
10566 PyObject *__pyx_t_7 = NULL;
10567 PyObject *__pyx_t_8 = NULL;
10568 PyObject *__pyx_t_9 = NULL;
10569 __Pyx_RefNannySetupContext("__pyx_unpickle_VBOHandler__set_state", 0);
10570
10571 /* "(tree fragment)":12
10572 * return __pyx_result
10573 * cdef __pyx_unpickle_VBOHandler__set_state(VBOHandler __pyx_result, tuple __pyx_state):
10574 * __pyx_result.ERROR_ON_COPY = __pyx_state[0]; __pyx_result.arrayType = __pyx_state[1]; __pyx_result.vp0 = __pyx_state[2] # <<<<<<<<<<<<<<
10575 * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
10576 * __pyx_result.__dict__.update(__pyx_state[3])
10577 */
10578 if (unlikely(__pyx_v___pyx_state == Py_None)) {
10579 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
10580 __PYX_ERR(1, 12, __pyx_L1_error)
10581 }
10582 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
10583 __Pyx_GOTREF(__pyx_t_1);
10584 __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
10585 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10586 __pyx_v___pyx_result->__pyx_base.ERROR_ON_COPY = __pyx_t_2;
10587 if (unlikely(__pyx_v___pyx_state == Py_None)) {
10588 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
10589 __PYX_ERR(1, 12, __pyx_L1_error)
10590 }
10591 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
10592 __Pyx_GOTREF(__pyx_t_1);
10593 __Pyx_GIVEREF(__pyx_t_1);
10594 __Pyx_GOTREF(__pyx_v___pyx_result->arrayType);
10595 __Pyx_DECREF(__pyx_v___pyx_result->arrayType);
10596 __pyx_v___pyx_result->arrayType = __pyx_t_1;
10597 __pyx_t_1 = 0;
10598 if (unlikely(__pyx_v___pyx_state == Py_None)) {
10599 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
10600 __PYX_ERR(1, 12, __pyx_L1_error)
10601 }
10602 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
10603 __Pyx_GOTREF(__pyx_t_1);
10604 __Pyx_GIVEREF(__pyx_t_1);
10605 __Pyx_GOTREF(__pyx_v___pyx_result->vp0);
10606 __Pyx_DECREF(__pyx_v___pyx_result->vp0);
10607 __pyx_v___pyx_result->vp0 = __pyx_t_1;
10608 __pyx_t_1 = 0;
10609
10610 /* "(tree fragment)":13
10611 * cdef __pyx_unpickle_VBOHandler__set_state(VBOHandler __pyx_result, tuple __pyx_state):
10612 * __pyx_result.ERROR_ON_COPY = __pyx_state[0]; __pyx_result.arrayType = __pyx_state[1]; __pyx_result.vp0 = __pyx_state[2]
10613 * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
10614 * __pyx_result.__dict__.update(__pyx_state[3])
10615 */
10616 if (unlikely(__pyx_v___pyx_state == Py_None)) {
10617 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
10618 __PYX_ERR(1, 13, __pyx_L1_error)
10619 }
10620 __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
10621 __pyx_t_5 = ((__pyx_t_4 > 3) != 0);
10622 if (__pyx_t_5) {
10623 } else {
10624 __pyx_t_3 = __pyx_t_5;
10625 goto __pyx_L4_bool_binop_done;
10626 }
10627 __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
10628 __pyx_t_6 = (__pyx_t_5 != 0);
10629 __pyx_t_3 = __pyx_t_6;
10630 __pyx_L4_bool_binop_done:;
10631 if (__pyx_t_3) {
10632
10633 /* "(tree fragment)":14
10634 * __pyx_result.ERROR_ON_COPY = __pyx_state[0]; __pyx_result.arrayType = __pyx_state[1]; __pyx_result.vp0 = __pyx_state[2]
10635 * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
10636 * __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<<
10637 */
10638 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
10639 __Pyx_GOTREF(__pyx_t_7);
10640 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
10641 __Pyx_GOTREF(__pyx_t_8);
10642 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10643 if (unlikely(__pyx_v___pyx_state == Py_None)) {
10644 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
10645 __PYX_ERR(1, 14, __pyx_L1_error)
10646 }
10647 __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
10648 __Pyx_GOTREF(__pyx_t_7);
10649 __pyx_t_9 = NULL;
10650 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
10651 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
10652 if (likely(__pyx_t_9)) {
10653 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
10654 __Pyx_INCREF(__pyx_t_9);
10655 __Pyx_INCREF(function);
10656 __Pyx_DECREF_SET(__pyx_t_8, function);
10657 }
10658 }
10659 __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
10660 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
10661 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10662 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
10663 __Pyx_GOTREF(__pyx_t_1);
10664 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10665 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10666
10667 /* "(tree fragment)":13
10668 * cdef __pyx_unpickle_VBOHandler__set_state(VBOHandler __pyx_result, tuple __pyx_state):
10669 * __pyx_result.ERROR_ON_COPY = __pyx_state[0]; __pyx_result.arrayType = __pyx_state[1]; __pyx_result.vp0 = __pyx_state[2]
10670 * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
10671 * __pyx_result.__dict__.update(__pyx_state[3])
10672 */
10673 }
10674
10675 /* "(tree fragment)":11
10676 * __pyx_unpickle_VBOHandler__set_state(<VBOHandler> __pyx_result, __pyx_state)
10677 * return __pyx_result
10678 * cdef __pyx_unpickle_VBOHandler__set_state(VBOHandler __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
10679 * __pyx_result.ERROR_ON_COPY = __pyx_state[0]; __pyx_result.arrayType = __pyx_state[1]; __pyx_result.vp0 = __pyx_state[2]
10680 * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
10681 */
10682
10683 /* function exit code */
10684 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10685 goto __pyx_L0;
10686 __pyx_L1_error:;
10687 __Pyx_XDECREF(__pyx_t_1);
10688 __Pyx_XDECREF(__pyx_t_7);
10689 __Pyx_XDECREF(__pyx_t_8);
10690 __Pyx_XDECREF(__pyx_t_9);
10691 __Pyx_AddTraceback("OpenGL_accelerate.vbo.__pyx_unpickle_VBOHandler__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
10692 __pyx_r = 0;
10693 __pyx_L0:;
10694 __Pyx_XGIVEREF(__pyx_r);
10695 __Pyx_RefNannyFinishContext();
10696 return __pyx_r;
10697 }
10698
10699 /* "(tree fragment)":1
10700 * def __pyx_unpickle_VBOOffsetHandler(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
10701 * cdef object __pyx_PickleError
10702 * cdef object __pyx_result
10703 */
10704
10705 /* Python wrapper */
10706 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_5__pyx_unpickle_VBOOffsetHandler(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
10707 static PyMethodDef __pyx_mdef_17OpenGL_accelerate_3vbo_5__pyx_unpickle_VBOOffsetHandler = {"__pyx_unpickle_VBOOffsetHandler", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_17OpenGL_accelerate_3vbo_5__pyx_unpickle_VBOOffsetHandler, METH_VARARGS|METH_KEYWORDS, 0};
__pyx_pw_17OpenGL_accelerate_3vbo_5__pyx_unpickle_VBOOffsetHandler(PyObject * __pyx_self,PyObject * __pyx_args,PyObject * __pyx_kwds)10708 static PyObject *__pyx_pw_17OpenGL_accelerate_3vbo_5__pyx_unpickle_VBOOffsetHandler(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10709 PyObject *__pyx_v___pyx_type = 0;
10710 long __pyx_v___pyx_checksum;
10711 PyObject *__pyx_v___pyx_state = 0;
10712 PyObject *__pyx_r = 0;
10713 __Pyx_RefNannyDeclarations
10714 __Pyx_RefNannySetupContext("__pyx_unpickle_VBOOffsetHandler (wrapper)", 0);
10715 {
10716 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
10717 PyObject* values[3] = {0,0,0};
10718 if (unlikely(__pyx_kwds)) {
10719 Py_ssize_t kw_args;
10720 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
10721 switch (pos_args) {
10722 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10723 CYTHON_FALLTHROUGH;
10724 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10725 CYTHON_FALLTHROUGH;
10726 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10727 CYTHON_FALLTHROUGH;
10728 case 0: break;
10729 default: goto __pyx_L5_argtuple_error;
10730 }
10731 kw_args = PyDict_Size(__pyx_kwds);
10732 switch (pos_args) {
10733 case 0:
10734 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
10735 else goto __pyx_L5_argtuple_error;
10736 CYTHON_FALLTHROUGH;
10737 case 1:
10738 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
10739 else {
10740 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VBOOffsetHandler", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
10741 }
10742 CYTHON_FALLTHROUGH;
10743 case 2:
10744 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
10745 else {
10746 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VBOOffsetHandler", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
10747 }
10748 }
10749 if (unlikely(kw_args > 0)) {
10750 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_VBOOffsetHandler") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
10751 }
10752 } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
10753 goto __pyx_L5_argtuple_error;
10754 } else {
10755 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10756 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10757 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10758 }
10759 __pyx_v___pyx_type = values[0];
10760 __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
10761 __pyx_v___pyx_state = values[2];
10762 }
10763 goto __pyx_L4_argument_unpacking_done;
10764 __pyx_L5_argtuple_error:;
10765 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VBOOffsetHandler", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
10766 __pyx_L3_error:;
10767 __Pyx_AddTraceback("OpenGL_accelerate.vbo.__pyx_unpickle_VBOOffsetHandler", __pyx_clineno, __pyx_lineno, __pyx_filename);
10768 __Pyx_RefNannyFinishContext();
10769 return NULL;
10770 __pyx_L4_argument_unpacking_done:;
10771 __pyx_r = __pyx_pf_17OpenGL_accelerate_3vbo_4__pyx_unpickle_VBOOffsetHandler(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
10772
10773 /* function exit code */
10774 __Pyx_RefNannyFinishContext();
10775 return __pyx_r;
10776 }
10777
__pyx_pf_17OpenGL_accelerate_3vbo_4__pyx_unpickle_VBOOffsetHandler(CYTHON_UNUSED PyObject * __pyx_self,PyObject * __pyx_v___pyx_type,long __pyx_v___pyx_checksum,PyObject * __pyx_v___pyx_state)10778 static PyObject *__pyx_pf_17OpenGL_accelerate_3vbo_4__pyx_unpickle_VBOOffsetHandler(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
10779 PyObject *__pyx_v___pyx_PickleError = 0;
10780 PyObject *__pyx_v___pyx_result = 0;
10781 PyObject *__pyx_r = NULL;
10782 __Pyx_RefNannyDeclarations
10783 int __pyx_t_1;
10784 PyObject *__pyx_t_2 = NULL;
10785 PyObject *__pyx_t_3 = NULL;
10786 PyObject *__pyx_t_4 = NULL;
10787 PyObject *__pyx_t_5 = NULL;
10788 int __pyx_t_6;
10789 __Pyx_RefNannySetupContext("__pyx_unpickle_VBOOffsetHandler", 0);
10790
10791 /* "(tree fragment)":4
10792 * cdef object __pyx_PickleError
10793 * cdef object __pyx_result
10794 * if __pyx_checksum != 0xe0a0c83: # <<<<<<<<<<<<<<
10795 * from pickle import PickleError as __pyx_PickleError
10796 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xe0a0c83 = (ERROR_ON_COPY, arrayType))" % __pyx_checksum)
10797 */
10798 __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xe0a0c83) != 0);
10799 if (__pyx_t_1) {
10800
10801 /* "(tree fragment)":5
10802 * cdef object __pyx_result
10803 * if __pyx_checksum != 0xe0a0c83:
10804 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
10805 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xe0a0c83 = (ERROR_ON_COPY, arrayType))" % __pyx_checksum)
10806 * __pyx_result = VBOOffsetHandler.__new__(__pyx_type)
10807 */
10808 __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
10809 __Pyx_GOTREF(__pyx_t_2);
10810 __Pyx_INCREF(__pyx_n_s_PickleError);
10811 __Pyx_GIVEREF(__pyx_n_s_PickleError);
10812 PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
10813 __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
10814 __Pyx_GOTREF(__pyx_t_3);
10815 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10816 __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
10817 __Pyx_GOTREF(__pyx_t_2);
10818 __Pyx_INCREF(__pyx_t_2);
10819 __pyx_v___pyx_PickleError = __pyx_t_2;
10820 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10821 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10822
10823 /* "(tree fragment)":6
10824 * if __pyx_checksum != 0xe0a0c83:
10825 * from pickle import PickleError as __pyx_PickleError
10826 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xe0a0c83 = (ERROR_ON_COPY, arrayType))" % __pyx_checksum) # <<<<<<<<<<<<<<
10827 * __pyx_result = VBOOffsetHandler.__new__(__pyx_type)
10828 * if __pyx_state is not None:
10829 */
10830 __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
10831 __Pyx_GOTREF(__pyx_t_2);
10832 __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xe0, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
10833 __Pyx_GOTREF(__pyx_t_4);
10834 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10835 __Pyx_INCREF(__pyx_v___pyx_PickleError);
10836 __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
10837 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
10838 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
10839 if (likely(__pyx_t_5)) {
10840 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
10841 __Pyx_INCREF(__pyx_t_5);
10842 __Pyx_INCREF(function);
10843 __Pyx_DECREF_SET(__pyx_t_2, function);
10844 }
10845 }
10846 __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
10847 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
10848 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10849 if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
10850 __Pyx_GOTREF(__pyx_t_3);
10851 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10852 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
10853 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10854 __PYX_ERR(1, 6, __pyx_L1_error)
10855
10856 /* "(tree fragment)":4
10857 * cdef object __pyx_PickleError
10858 * cdef object __pyx_result
10859 * if __pyx_checksum != 0xe0a0c83: # <<<<<<<<<<<<<<
10860 * from pickle import PickleError as __pyx_PickleError
10861 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xe0a0c83 = (ERROR_ON_COPY, arrayType))" % __pyx_checksum)
10862 */
10863 }
10864
10865 /* "(tree fragment)":7
10866 * from pickle import PickleError as __pyx_PickleError
10867 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xe0a0c83 = (ERROR_ON_COPY, arrayType))" % __pyx_checksum)
10868 * __pyx_result = VBOOffsetHandler.__new__(__pyx_type) # <<<<<<<<<<<<<<
10869 * if __pyx_state is not None:
10870 * __pyx_unpickle_VBOOffsetHandler__set_state(<VBOOffsetHandler> __pyx_result, __pyx_state)
10871 */
10872 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_17OpenGL_accelerate_3vbo_VBOOffsetHandler), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
10873 __Pyx_GOTREF(__pyx_t_2);
10874 __pyx_t_4 = NULL;
10875 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
10876 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
10877 if (likely(__pyx_t_4)) {
10878 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
10879 __Pyx_INCREF(__pyx_t_4);
10880 __Pyx_INCREF(function);
10881 __Pyx_DECREF_SET(__pyx_t_2, function);
10882 }
10883 }
10884 __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
10885 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
10886 if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
10887 __Pyx_GOTREF(__pyx_t_3);
10888 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10889 __pyx_v___pyx_result = __pyx_t_3;
10890 __pyx_t_3 = 0;
10891
10892 /* "(tree fragment)":8
10893 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xe0a0c83 = (ERROR_ON_COPY, arrayType))" % __pyx_checksum)
10894 * __pyx_result = VBOOffsetHandler.__new__(__pyx_type)
10895 * if __pyx_state is not None: # <<<<<<<<<<<<<<
10896 * __pyx_unpickle_VBOOffsetHandler__set_state(<VBOOffsetHandler> __pyx_result, __pyx_state)
10897 * return __pyx_result
10898 */
10899 __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
10900 __pyx_t_6 = (__pyx_t_1 != 0);
10901 if (__pyx_t_6) {
10902
10903 /* "(tree fragment)":9
10904 * __pyx_result = VBOOffsetHandler.__new__(__pyx_type)
10905 * if __pyx_state is not None:
10906 * __pyx_unpickle_VBOOffsetHandler__set_state(<VBOOffsetHandler> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
10907 * return __pyx_result
10908 * cdef __pyx_unpickle_VBOOffsetHandler__set_state(VBOOffsetHandler __pyx_result, tuple __pyx_state):
10909 */
10910 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
10911 __pyx_t_3 = __pyx_f_17OpenGL_accelerate_3vbo___pyx_unpickle_VBOOffsetHandler__set_state(((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
10912 __Pyx_GOTREF(__pyx_t_3);
10913 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10914
10915 /* "(tree fragment)":8
10916 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xe0a0c83 = (ERROR_ON_COPY, arrayType))" % __pyx_checksum)
10917 * __pyx_result = VBOOffsetHandler.__new__(__pyx_type)
10918 * if __pyx_state is not None: # <<<<<<<<<<<<<<
10919 * __pyx_unpickle_VBOOffsetHandler__set_state(<VBOOffsetHandler> __pyx_result, __pyx_state)
10920 * return __pyx_result
10921 */
10922 }
10923
10924 /* "(tree fragment)":10
10925 * if __pyx_state is not None:
10926 * __pyx_unpickle_VBOOffsetHandler__set_state(<VBOOffsetHandler> __pyx_result, __pyx_state)
10927 * return __pyx_result # <<<<<<<<<<<<<<
10928 * cdef __pyx_unpickle_VBOOffsetHandler__set_state(VBOOffsetHandler __pyx_result, tuple __pyx_state):
10929 * __pyx_result.ERROR_ON_COPY = __pyx_state[0]; __pyx_result.arrayType = __pyx_state[1]
10930 */
10931 __Pyx_XDECREF(__pyx_r);
10932 __Pyx_INCREF(__pyx_v___pyx_result);
10933 __pyx_r = __pyx_v___pyx_result;
10934 goto __pyx_L0;
10935
10936 /* "(tree fragment)":1
10937 * def __pyx_unpickle_VBOOffsetHandler(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
10938 * cdef object __pyx_PickleError
10939 * cdef object __pyx_result
10940 */
10941
10942 /* function exit code */
10943 __pyx_L1_error:;
10944 __Pyx_XDECREF(__pyx_t_2);
10945 __Pyx_XDECREF(__pyx_t_3);
10946 __Pyx_XDECREF(__pyx_t_4);
10947 __Pyx_XDECREF(__pyx_t_5);
10948 __Pyx_AddTraceback("OpenGL_accelerate.vbo.__pyx_unpickle_VBOOffsetHandler", __pyx_clineno, __pyx_lineno, __pyx_filename);
10949 __pyx_r = NULL;
10950 __pyx_L0:;
10951 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
10952 __Pyx_XDECREF(__pyx_v___pyx_result);
10953 __Pyx_XGIVEREF(__pyx_r);
10954 __Pyx_RefNannyFinishContext();
10955 return __pyx_r;
10956 }
10957
10958 /* "(tree fragment)":11
10959 * __pyx_unpickle_VBOOffsetHandler__set_state(<VBOOffsetHandler> __pyx_result, __pyx_state)
10960 * return __pyx_result
10961 * cdef __pyx_unpickle_VBOOffsetHandler__set_state(VBOOffsetHandler __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
10962 * __pyx_result.ERROR_ON_COPY = __pyx_state[0]; __pyx_result.arrayType = __pyx_state[1]
10963 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
10964 */
10965
__pyx_f_17OpenGL_accelerate_3vbo___pyx_unpickle_VBOOffsetHandler__set_state(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler * __pyx_v___pyx_result,PyObject * __pyx_v___pyx_state)10966 static PyObject *__pyx_f_17OpenGL_accelerate_3vbo___pyx_unpickle_VBOOffsetHandler__set_state(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
10967 PyObject *__pyx_r = NULL;
10968 __Pyx_RefNannyDeclarations
10969 PyObject *__pyx_t_1 = NULL;
10970 int __pyx_t_2;
10971 int __pyx_t_3;
10972 Py_ssize_t __pyx_t_4;
10973 int __pyx_t_5;
10974 int __pyx_t_6;
10975 PyObject *__pyx_t_7 = NULL;
10976 PyObject *__pyx_t_8 = NULL;
10977 PyObject *__pyx_t_9 = NULL;
10978 __Pyx_RefNannySetupContext("__pyx_unpickle_VBOOffsetHandler__set_state", 0);
10979
10980 /* "(tree fragment)":12
10981 * return __pyx_result
10982 * cdef __pyx_unpickle_VBOOffsetHandler__set_state(VBOOffsetHandler __pyx_result, tuple __pyx_state):
10983 * __pyx_result.ERROR_ON_COPY = __pyx_state[0]; __pyx_result.arrayType = __pyx_state[1] # <<<<<<<<<<<<<<
10984 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
10985 * __pyx_result.__dict__.update(__pyx_state[2])
10986 */
10987 if (unlikely(__pyx_v___pyx_state == Py_None)) {
10988 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
10989 __PYX_ERR(1, 12, __pyx_L1_error)
10990 }
10991 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
10992 __Pyx_GOTREF(__pyx_t_1);
10993 __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
10994 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10995 __pyx_v___pyx_result->__pyx_base.ERROR_ON_COPY = __pyx_t_2;
10996 if (unlikely(__pyx_v___pyx_state == Py_None)) {
10997 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
10998 __PYX_ERR(1, 12, __pyx_L1_error)
10999 }
11000 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
11001 __Pyx_GOTREF(__pyx_t_1);
11002 __Pyx_GIVEREF(__pyx_t_1);
11003 __Pyx_GOTREF(__pyx_v___pyx_result->arrayType);
11004 __Pyx_DECREF(__pyx_v___pyx_result->arrayType);
11005 __pyx_v___pyx_result->arrayType = __pyx_t_1;
11006 __pyx_t_1 = 0;
11007
11008 /* "(tree fragment)":13
11009 * cdef __pyx_unpickle_VBOOffsetHandler__set_state(VBOOffsetHandler __pyx_result, tuple __pyx_state):
11010 * __pyx_result.ERROR_ON_COPY = __pyx_state[0]; __pyx_result.arrayType = __pyx_state[1]
11011 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
11012 * __pyx_result.__dict__.update(__pyx_state[2])
11013 */
11014 if (unlikely(__pyx_v___pyx_state == Py_None)) {
11015 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
11016 __PYX_ERR(1, 13, __pyx_L1_error)
11017 }
11018 __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
11019 __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
11020 if (__pyx_t_5) {
11021 } else {
11022 __pyx_t_3 = __pyx_t_5;
11023 goto __pyx_L4_bool_binop_done;
11024 }
11025 __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
11026 __pyx_t_6 = (__pyx_t_5 != 0);
11027 __pyx_t_3 = __pyx_t_6;
11028 __pyx_L4_bool_binop_done:;
11029 if (__pyx_t_3) {
11030
11031 /* "(tree fragment)":14
11032 * __pyx_result.ERROR_ON_COPY = __pyx_state[0]; __pyx_result.arrayType = __pyx_state[1]
11033 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
11034 * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<<
11035 */
11036 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
11037 __Pyx_GOTREF(__pyx_t_7);
11038 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
11039 __Pyx_GOTREF(__pyx_t_8);
11040 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11041 if (unlikely(__pyx_v___pyx_state == Py_None)) {
11042 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
11043 __PYX_ERR(1, 14, __pyx_L1_error)
11044 }
11045 __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
11046 __Pyx_GOTREF(__pyx_t_7);
11047 __pyx_t_9 = NULL;
11048 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
11049 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
11050 if (likely(__pyx_t_9)) {
11051 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
11052 __Pyx_INCREF(__pyx_t_9);
11053 __Pyx_INCREF(function);
11054 __Pyx_DECREF_SET(__pyx_t_8, function);
11055 }
11056 }
11057 __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
11058 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
11059 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11060 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
11061 __Pyx_GOTREF(__pyx_t_1);
11062 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11063 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11064
11065 /* "(tree fragment)":13
11066 * cdef __pyx_unpickle_VBOOffsetHandler__set_state(VBOOffsetHandler __pyx_result, tuple __pyx_state):
11067 * __pyx_result.ERROR_ON_COPY = __pyx_state[0]; __pyx_result.arrayType = __pyx_state[1]
11068 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
11069 * __pyx_result.__dict__.update(__pyx_state[2])
11070 */
11071 }
11072
11073 /* "(tree fragment)":11
11074 * __pyx_unpickle_VBOOffsetHandler__set_state(<VBOOffsetHandler> __pyx_result, __pyx_state)
11075 * return __pyx_result
11076 * cdef __pyx_unpickle_VBOOffsetHandler__set_state(VBOOffsetHandler __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
11077 * __pyx_result.ERROR_ON_COPY = __pyx_state[0]; __pyx_result.arrayType = __pyx_state[1]
11078 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
11079 */
11080
11081 /* function exit code */
11082 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11083 goto __pyx_L0;
11084 __pyx_L1_error:;
11085 __Pyx_XDECREF(__pyx_t_1);
11086 __Pyx_XDECREF(__pyx_t_7);
11087 __Pyx_XDECREF(__pyx_t_8);
11088 __Pyx_XDECREF(__pyx_t_9);
11089 __Pyx_AddTraceback("OpenGL_accelerate.vbo.__pyx_unpickle_VBOOffsetHandler__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
11090 __pyx_r = 0;
11091 __pyx_L0:;
11092 __Pyx_XGIVEREF(__pyx_r);
11093 __Pyx_RefNannyFinishContext();
11094 return __pyx_r;
11095 }
11096 static struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBO __pyx_vtable_17OpenGL_accelerate_3vbo_VBO;
11097
__pyx_tp_new_17OpenGL_accelerate_3vbo_VBO(PyTypeObject * t,CYTHON_UNUSED PyObject * a,CYTHON_UNUSED PyObject * k)11098 static PyObject *__pyx_tp_new_17OpenGL_accelerate_3vbo_VBO(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
11099 struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *p;
11100 PyObject *o;
11101 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
11102 o = (*t->tp_alloc)(t, 0);
11103 } else {
11104 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
11105 }
11106 if (unlikely(!o)) return 0;
11107 p = ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)o);
11108 p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_3vbo_VBO;
11109 p->data = Py_None; Py_INCREF(Py_None);
11110 p->target = Py_None; Py_INCREF(Py_None);
11111 p->usage = Py_None; Py_INCREF(Py_None);
11112 p->target_spec = Py_None; Py_INCREF(Py_None);
11113 p->usage_spec = Py_None; Py_INCREF(Py_None);
11114 p->_copy_segments = ((PyObject*)Py_None); Py_INCREF(Py_None);
11115 p->_I_ = Py_None; Py_INCREF(Py_None);
11116 p->arrayType = Py_None; Py_INCREF(Py_None);
11117 return o;
11118 }
11119
__pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBO(PyObject * o)11120 static void __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBO(PyObject *o) {
11121 struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)o;
11122 #if CYTHON_USE_TP_FINALIZE
11123 if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
11124 if (PyObject_CallFinalizerFromDealloc(o)) return;
11125 }
11126 #endif
11127 PyObject_GC_UnTrack(o);
11128 {
11129 PyObject *etype, *eval, *etb;
11130 PyErr_Fetch(&etype, &eval, &etb);
11131 ++Py_REFCNT(o);
11132 __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_3__dealloc__(o);
11133 --Py_REFCNT(o);
11134 PyErr_Restore(etype, eval, etb);
11135 }
11136 if (p->__weakref__) PyObject_ClearWeakRefs(o);
11137 Py_CLEAR(p->data);
11138 Py_CLEAR(p->target);
11139 Py_CLEAR(p->usage);
11140 Py_CLEAR(p->target_spec);
11141 Py_CLEAR(p->usage_spec);
11142 Py_CLEAR(p->_copy_segments);
11143 Py_CLEAR(p->_I_);
11144 Py_CLEAR(p->arrayType);
11145 (*Py_TYPE(o)->tp_free)(o);
11146 }
11147
__pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBO(PyObject * o,visitproc v,void * a)11148 static int __pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBO(PyObject *o, visitproc v, void *a) {
11149 int e;
11150 struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)o;
11151 if (p->data) {
11152 e = (*v)(p->data, a); if (e) return e;
11153 }
11154 if (p->target) {
11155 e = (*v)(p->target, a); if (e) return e;
11156 }
11157 if (p->usage) {
11158 e = (*v)(p->usage, a); if (e) return e;
11159 }
11160 if (p->target_spec) {
11161 e = (*v)(p->target_spec, a); if (e) return e;
11162 }
11163 if (p->usage_spec) {
11164 e = (*v)(p->usage_spec, a); if (e) return e;
11165 }
11166 if (p->_copy_segments) {
11167 e = (*v)(p->_copy_segments, a); if (e) return e;
11168 }
11169 if (p->_I_) {
11170 e = (*v)(p->_I_, a); if (e) return e;
11171 }
11172 if (p->arrayType) {
11173 e = (*v)(p->arrayType, a); if (e) return e;
11174 }
11175 return 0;
11176 }
11177
__pyx_tp_clear_17OpenGL_accelerate_3vbo_VBO(PyObject * o)11178 static int __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBO(PyObject *o) {
11179 PyObject* tmp;
11180 struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)o;
11181 tmp = ((PyObject*)p->data);
11182 p->data = Py_None; Py_INCREF(Py_None);
11183 Py_XDECREF(tmp);
11184 tmp = ((PyObject*)p->target);
11185 p->target = Py_None; Py_INCREF(Py_None);
11186 Py_XDECREF(tmp);
11187 tmp = ((PyObject*)p->usage);
11188 p->usage = Py_None; Py_INCREF(Py_None);
11189 Py_XDECREF(tmp);
11190 tmp = ((PyObject*)p->target_spec);
11191 p->target_spec = Py_None; Py_INCREF(Py_None);
11192 Py_XDECREF(tmp);
11193 tmp = ((PyObject*)p->usage_spec);
11194 p->usage_spec = Py_None; Py_INCREF(Py_None);
11195 Py_XDECREF(tmp);
11196 tmp = ((PyObject*)p->_copy_segments);
11197 p->_copy_segments = ((PyObject*)Py_None); Py_INCREF(Py_None);
11198 Py_XDECREF(tmp);
11199 tmp = ((PyObject*)p->_I_);
11200 p->_I_ = Py_None; Py_INCREF(Py_None);
11201 Py_XDECREF(tmp);
11202 tmp = ((PyObject*)p->arrayType);
11203 p->arrayType = Py_None; Py_INCREF(Py_None);
11204 Py_XDECREF(tmp);
11205 return 0;
11206 }
11207
__pyx_mp_ass_subscript_17OpenGL_accelerate_3vbo_VBO(PyObject * o,PyObject * i,PyObject * v)11208 static int __pyx_mp_ass_subscript_17OpenGL_accelerate_3vbo_VBO(PyObject *o, PyObject *i, PyObject *v) {
11209 if (v) {
11210 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_7__setitem__(o, i, v);
11211 }
11212 else {
11213 PyErr_Format(PyExc_NotImplementedError,
11214 "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
11215 return -1;
11216 }
11217 }
11218
__pyx_tp_getattro_17OpenGL_accelerate_3vbo_VBO(PyObject * o,PyObject * n)11219 static PyObject *__pyx_tp_getattro_17OpenGL_accelerate_3vbo_VBO(PyObject *o, PyObject *n) {
11220 PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
11221 if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
11222 PyErr_Clear();
11223 v = __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_11__getattr__(o, n);
11224 }
11225 return v;
11226 }
11227
__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_implementation(PyObject * o,CYTHON_UNUSED void * x)11228 static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_implementation(PyObject *o, CYTHON_UNUSED void *x) {
11229 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_14implementation_1__get__(o);
11230 }
11231
__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_copied(PyObject * o,CYTHON_UNUSED void * x)11232 static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_copied(PyObject *o, CYTHON_UNUSED void *x) {
11233 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6copied_1__get__(o);
11234 }
11235
__pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_copied(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)11236 static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_copied(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
11237 if (v) {
11238 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6copied_3__set__(o, v);
11239 }
11240 else {
11241 PyErr_SetString(PyExc_NotImplementedError, "__del__");
11242 return -1;
11243 }
11244 }
11245
__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_created(PyObject * o,CYTHON_UNUSED void * x)11246 static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_created(PyObject *o, CYTHON_UNUSED void *x) {
11247 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_7created_1__get__(o);
11248 }
11249
__pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_created(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)11250 static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_created(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
11251 if (v) {
11252 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_7created_3__set__(o, v);
11253 }
11254 else {
11255 PyErr_SetString(PyExc_NotImplementedError, "__del__");
11256 return -1;
11257 }
11258 }
11259
__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_buffer(PyObject * o,CYTHON_UNUSED void * x)11260 static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_buffer(PyObject *o, CYTHON_UNUSED void *x) {
11261 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6buffer_1__get__(o);
11262 }
11263
__pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_buffer(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)11264 static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_buffer(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
11265 if (v) {
11266 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6buffer_3__set__(o, v);
11267 }
11268 else {
11269 PyErr_SetString(PyExc_NotImplementedError, "__del__");
11270 return -1;
11271 }
11272 }
11273
__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_data(PyObject * o,CYTHON_UNUSED void * x)11274 static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_data(PyObject *o, CYTHON_UNUSED void *x) {
11275 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4data_1__get__(o);
11276 }
11277
__pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_data(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)11278 static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
11279 if (v) {
11280 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4data_3__set__(o, v);
11281 }
11282 else {
11283 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4data_5__del__(o);
11284 }
11285 }
11286
__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_size(PyObject * o,CYTHON_UNUSED void * x)11287 static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_size(PyObject *o, CYTHON_UNUSED void *x) {
11288 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4size_1__get__(o);
11289 }
11290
__pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_size(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)11291 static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_size(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
11292 if (v) {
11293 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_4size_3__set__(o, v);
11294 }
11295 else {
11296 PyErr_SetString(PyExc_NotImplementedError, "__del__");
11297 return -1;
11298 }
11299 }
11300
__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_target(PyObject * o,CYTHON_UNUSED void * x)11301 static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_target(PyObject *o, CYTHON_UNUSED void *x) {
11302 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6target_1__get__(o);
11303 }
11304
__pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_target(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)11305 static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_target(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
11306 if (v) {
11307 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6target_3__set__(o, v);
11308 }
11309 else {
11310 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_6target_5__del__(o);
11311 }
11312 }
11313
__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_usage(PyObject * o,CYTHON_UNUSED void * x)11314 static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_usage(PyObject *o, CYTHON_UNUSED void *x) {
11315 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_5usage_1__get__(o);
11316 }
11317
__pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_usage(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)11318 static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_usage(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
11319 if (v) {
11320 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_5usage_3__set__(o, v);
11321 }
11322 else {
11323 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_5usage_5__del__(o);
11324 }
11325 }
11326
__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_resolved(PyObject * o,CYTHON_UNUSED void * x)11327 static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_resolved(PyObject *o, CYTHON_UNUSED void *x) {
11328 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_8resolved_1__get__(o);
11329 }
11330
__pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_resolved(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)11331 static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_resolved(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
11332 if (v) {
11333 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_8resolved_3__set__(o, v);
11334 }
11335 else {
11336 PyErr_SetString(PyExc_NotImplementedError, "__del__");
11337 return -1;
11338 }
11339 }
11340
__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_target_spec(PyObject * o,CYTHON_UNUSED void * x)11341 static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_target_spec(PyObject *o, CYTHON_UNUSED void *x) {
11342 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_11target_spec_1__get__(o);
11343 }
11344
__pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_target_spec(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)11345 static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_target_spec(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
11346 if (v) {
11347 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_11target_spec_3__set__(o, v);
11348 }
11349 else {
11350 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_11target_spec_5__del__(o);
11351 }
11352 }
11353
__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_usage_spec(PyObject * o,CYTHON_UNUSED void * x)11354 static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_usage_spec(PyObject *o, CYTHON_UNUSED void *x) {
11355 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_10usage_spec_1__get__(o);
11356 }
11357
__pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_usage_spec(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)11358 static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_usage_spec(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
11359 if (v) {
11360 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_10usage_spec_3__set__(o, v);
11361 }
11362 else {
11363 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_10usage_spec_5__del__(o);
11364 }
11365 }
11366
__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO__copy_segments(PyObject * o,CYTHON_UNUSED void * x)11367 static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO__copy_segments(PyObject *o, CYTHON_UNUSED void *x) {
11368 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments_1__get__(o);
11369 }
11370
__pyx_setprop_17OpenGL_accelerate_3vbo_3VBO__copy_segments(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)11371 static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO__copy_segments(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
11372 if (v) {
11373 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments_3__set__(o, v);
11374 }
11375 else {
11376 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_14_copy_segments_5__del__(o);
11377 }
11378 }
11379
__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO__I_(PyObject * o,CYTHON_UNUSED void * x)11380 static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO__I_(PyObject *o, CYTHON_UNUSED void *x) {
11381 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_3_I__1__get__(o);
11382 }
11383
__pyx_setprop_17OpenGL_accelerate_3vbo_3VBO__I_(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)11384 static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO__I_(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
11385 if (v) {
11386 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_3_I__3__set__(o, v);
11387 }
11388 else {
11389 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_3_I__5__del__(o);
11390 }
11391 }
11392
__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_arrayType(PyObject * o,CYTHON_UNUSED void * x)11393 static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_arrayType(PyObject *o, CYTHON_UNUSED void *x) {
11394 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_9arrayType_1__get__(o);
11395 }
11396
__pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_arrayType(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)11397 static int __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_arrayType(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
11398 if (v) {
11399 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_9arrayType_3__set__(o, v);
11400 }
11401 else {
11402 return __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_9arrayType_5__del__(o);
11403 }
11404 }
11405
11406 static PyMethodDef __pyx_methods_17OpenGL_accelerate_3vbo_VBO[] = {
11407 {"set_array", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_5set_array, METH_VARARGS|METH_KEYWORDS, __pyx_doc_17OpenGL_accelerate_3vbo_3VBO_4set_array},
11408 {"__getattr__", (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_11__getattr__, METH_O|METH_COEXIST, 0},
11409 {"create_buffers", (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_15create_buffers, METH_NOARGS, __pyx_doc_17OpenGL_accelerate_3vbo_3VBO_14create_buffers},
11410 {"copy_data", (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_17copy_data, METH_NOARGS, __pyx_doc_17OpenGL_accelerate_3vbo_3VBO_16copy_data},
11411 {"delete", (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_19delete, METH_NOARGS, __pyx_doc_17OpenGL_accelerate_3vbo_3VBO_18delete},
11412 {"bind", (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_21bind, METH_NOARGS, __pyx_doc_17OpenGL_accelerate_3vbo_3VBO_20bind},
11413 {"unbind", (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_23unbind, METH_NOARGS, __pyx_doc_17OpenGL_accelerate_3vbo_3VBO_22unbind},
11414 {"__exit__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_27__exit__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_17OpenGL_accelerate_3vbo_3VBO_26__exit__},
11415 {"__reduce_cython__", (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_29__reduce_cython__, METH_NOARGS, 0},
11416 {"__setstate_cython__", (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_3VBO_31__setstate_cython__, METH_O, 0},
11417 {0, 0, 0, 0}
11418 };
11419
11420 static struct PyGetSetDef __pyx_getsets_17OpenGL_accelerate_3vbo_VBO[] = {
11421 {(char *)"implementation", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_implementation, 0, (char *)"Retrieve our implementation reference", 0},
11422 {(char *)"copied", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_copied, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_copied, (char *)0, 0},
11423 {(char *)"created", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_created, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_created, (char *)0, 0},
11424 {(char *)"buffer", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_buffer, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_buffer, (char *)0, 0},
11425 {(char *)"data", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_data, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_data, (char *)0, 0},
11426 {(char *)"size", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_size, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_size, (char *)0, 0},
11427 {(char *)"target", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_target, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_target, (char *)0, 0},
11428 {(char *)"usage", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_usage, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_usage, (char *)0, 0},
11429 {(char *)"resolved", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_resolved, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_resolved, (char *)0, 0},
11430 {(char *)"target_spec", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_target_spec, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_target_spec, (char *)0, 0},
11431 {(char *)"usage_spec", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_usage_spec, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_usage_spec, (char *)0, 0},
11432 {(char *)"_copy_segments", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO__copy_segments, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO__copy_segments, (char *)0, 0},
11433 {(char *)"_I_", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO__I_, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO__I_, (char *)0, 0},
11434 {(char *)"arrayType", __pyx_getprop_17OpenGL_accelerate_3vbo_3VBO_arrayType, __pyx_setprop_17OpenGL_accelerate_3vbo_3VBO_arrayType, (char *)0, 0},
11435 {0, 0, 0, 0, 0}
11436 };
11437
11438 static PyNumberMethods __pyx_tp_as_number_VBO = {
11439 __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_25__add__, /*nb_add*/
11440 0, /*nb_subtract*/
11441 0, /*nb_multiply*/
11442 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
11443 0, /*nb_divide*/
11444 #endif
11445 0, /*nb_remainder*/
11446 0, /*nb_divmod*/
11447 0, /*nb_power*/
11448 0, /*nb_negative*/
11449 0, /*nb_positive*/
11450 0, /*nb_absolute*/
11451 0, /*nb_nonzero*/
11452 0, /*nb_invert*/
11453 0, /*nb_lshift*/
11454 0, /*nb_rshift*/
11455 0, /*nb_and*/
11456 0, /*nb_xor*/
11457 0, /*nb_or*/
11458 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
11459 0, /*nb_coerce*/
11460 #endif
11461 __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_13__int__, /*nb_int*/
11462 #if PY_MAJOR_VERSION < 3
11463 __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_13__int__, /*nb_long*/
11464 #else
11465 0, /*reserved*/
11466 #endif
11467 0, /*nb_float*/
11468 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
11469 0, /*nb_oct*/
11470 #endif
11471 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
11472 0, /*nb_hex*/
11473 #endif
11474 0, /*nb_inplace_add*/
11475 0, /*nb_inplace_subtract*/
11476 0, /*nb_inplace_multiply*/
11477 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
11478 0, /*nb_inplace_divide*/
11479 #endif
11480 0, /*nb_inplace_remainder*/
11481 0, /*nb_inplace_power*/
11482 0, /*nb_inplace_lshift*/
11483 0, /*nb_inplace_rshift*/
11484 0, /*nb_inplace_and*/
11485 0, /*nb_inplace_xor*/
11486 0, /*nb_inplace_or*/
11487 0, /*nb_floor_divide*/
11488 0, /*nb_true_divide*/
11489 0, /*nb_inplace_floor_divide*/
11490 0, /*nb_inplace_true_divide*/
11491 0, /*nb_index*/
11492 #if PY_VERSION_HEX >= 0x03050000
11493 0, /*nb_matrix_multiply*/
11494 #endif
11495 #if PY_VERSION_HEX >= 0x03050000
11496 0, /*nb_inplace_matrix_multiply*/
11497 #endif
11498 };
11499
11500 static PySequenceMethods __pyx_tp_as_sequence_VBO = {
11501 __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_9__len__, /*sq_length*/
11502 0, /*sq_concat*/
11503 0, /*sq_repeat*/
11504 0, /*sq_item*/
11505 0, /*sq_slice*/
11506 0, /*sq_ass_item*/
11507 0, /*sq_ass_slice*/
11508 0, /*sq_contains*/
11509 0, /*sq_inplace_concat*/
11510 0, /*sq_inplace_repeat*/
11511 };
11512
11513 static PyMappingMethods __pyx_tp_as_mapping_VBO = {
11514 __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_9__len__, /*mp_length*/
11515 0, /*mp_subscript*/
11516 __pyx_mp_ass_subscript_17OpenGL_accelerate_3vbo_VBO, /*mp_ass_subscript*/
11517 };
11518
11519 static PyTypeObject __pyx_type_17OpenGL_accelerate_3vbo_VBO = {
11520 PyVarObject_HEAD_INIT(0, 0)
11521 "OpenGL_accelerate.vbo.VBO", /*tp_name*/
11522 sizeof(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO), /*tp_basicsize*/
11523 0, /*tp_itemsize*/
11524 __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBO, /*tp_dealloc*/
11525 #if PY_VERSION_HEX < 0x030800b4
11526 0, /*tp_print*/
11527 #endif
11528 #if PY_VERSION_HEX >= 0x030800b4
11529 0, /*tp_vectorcall_offset*/
11530 #endif
11531 0, /*tp_getattr*/
11532 0, /*tp_setattr*/
11533 #if PY_MAJOR_VERSION < 3
11534 0, /*tp_compare*/
11535 #endif
11536 #if PY_MAJOR_VERSION >= 3
11537 0, /*tp_as_async*/
11538 #endif
11539 0, /*tp_repr*/
11540 &__pyx_tp_as_number_VBO, /*tp_as_number*/
11541 &__pyx_tp_as_sequence_VBO, /*tp_as_sequence*/
11542 &__pyx_tp_as_mapping_VBO, /*tp_as_mapping*/
11543 0, /*tp_hash*/
11544 0, /*tp_call*/
11545 0, /*tp_str*/
11546 __pyx_tp_getattro_17OpenGL_accelerate_3vbo_VBO, /*tp_getattro*/
11547 0, /*tp_setattro*/
11548 0, /*tp_as_buffer*/
11549 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
11550 "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*/
11551 __pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBO, /*tp_traverse*/
11552 __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBO, /*tp_clear*/
11553 0, /*tp_richcompare*/
11554 0, /*tp_weaklistoffset*/
11555 0, /*tp_iter*/
11556 0, /*tp_iternext*/
11557 __pyx_methods_17OpenGL_accelerate_3vbo_VBO, /*tp_methods*/
11558 0, /*tp_members*/
11559 __pyx_getsets_17OpenGL_accelerate_3vbo_VBO, /*tp_getset*/
11560 0, /*tp_base*/
11561 0, /*tp_dict*/
11562 0, /*tp_descr_get*/
11563 0, /*tp_descr_set*/
11564 0, /*tp_dictoffset*/
11565 __pyx_pw_17OpenGL_accelerate_3vbo_3VBO_1__init__, /*tp_init*/
11566 0, /*tp_alloc*/
11567 __pyx_tp_new_17OpenGL_accelerate_3vbo_VBO, /*tp_new*/
11568 0, /*tp_free*/
11569 0, /*tp_is_gc*/
11570 0, /*tp_bases*/
11571 0, /*tp_mro*/
11572 0, /*tp_cache*/
11573 0, /*tp_subclasses*/
11574 0, /*tp_weaklist*/
11575 0, /*tp_del*/
11576 0, /*tp_version_tag*/
11577 #if PY_VERSION_HEX >= 0x030400a1
11578 0, /*tp_finalize*/
11579 #endif
11580 #if PY_VERSION_HEX >= 0x030800b1
11581 0, /*tp_vectorcall*/
11582 #endif
11583 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
11584 0, /*tp_print*/
11585 #endif
11586 };
11587 static struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBOOffset __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffset;
11588
__pyx_tp_new_17OpenGL_accelerate_3vbo_VBOOffset(PyTypeObject * t,PyObject * a,PyObject * k)11589 static PyObject *__pyx_tp_new_17OpenGL_accelerate_3vbo_VBOOffset(PyTypeObject *t, PyObject *a, PyObject *k) {
11590 struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *p;
11591 PyObject *o;
11592 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
11593 o = (*t->tp_alloc)(t, 0);
11594 } else {
11595 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
11596 }
11597 if (unlikely(!o)) return 0;
11598 p = ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)o);
11599 p->__pyx_vtab = __pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOOffset;
11600 p->vbo = ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)Py_None); Py_INCREF(Py_None);
11601 if (unlikely(__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_1__cinit__(o, a, k) < 0)) goto bad;
11602 return o;
11603 bad:
11604 Py_DECREF(o); o = 0;
11605 return NULL;
11606 }
11607
__pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBOOffset(PyObject * o)11608 static void __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBOOffset(PyObject *o) {
11609 struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)o;
11610 #if CYTHON_USE_TP_FINALIZE
11611 if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
11612 if (PyObject_CallFinalizerFromDealloc(o)) return;
11613 }
11614 #endif
11615 PyObject_GC_UnTrack(o);
11616 {
11617 PyObject *etype, *eval, *etb;
11618 PyErr_Fetch(&etype, &eval, &etb);
11619 ++Py_REFCNT(o);
11620 __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_3__dealloc__(o);
11621 --Py_REFCNT(o);
11622 PyErr_Restore(etype, eval, etb);
11623 }
11624 Py_CLEAR(p->vbo);
11625 (*Py_TYPE(o)->tp_free)(o);
11626 }
11627
__pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBOOffset(PyObject * o,visitproc v,void * a)11628 static int __pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBOOffset(PyObject *o, visitproc v, void *a) {
11629 int e;
11630 struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)o;
11631 if (p->vbo) {
11632 e = (*v)(((PyObject *)p->vbo), a); if (e) return e;
11633 }
11634 return 0;
11635 }
11636
__pyx_tp_clear_17OpenGL_accelerate_3vbo_VBOOffset(PyObject * o)11637 static int __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBOOffset(PyObject *o) {
11638 PyObject* tmp;
11639 struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *)o;
11640 tmp = ((PyObject*)p->vbo);
11641 p->vbo = ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *)Py_None); Py_INCREF(Py_None);
11642 Py_XDECREF(tmp);
11643 return 0;
11644 }
11645
__pyx_tp_getattro_17OpenGL_accelerate_3vbo_VBOOffset(PyObject * o,PyObject * n)11646 static PyObject *__pyx_tp_getattro_17OpenGL_accelerate_3vbo_VBOOffset(PyObject *o, PyObject *n) {
11647 PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
11648 if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
11649 PyErr_Clear();
11650 v = __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_5__getattr__(o, n);
11651 }
11652 return v;
11653 }
11654
__pyx_getprop_17OpenGL_accelerate_3vbo_9VBOOffset_vbo(PyObject * o,CYTHON_UNUSED void * x)11655 static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_9VBOOffset_vbo(PyObject *o, CYTHON_UNUSED void *x) {
11656 return __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo_1__get__(o);
11657 }
11658
__pyx_setprop_17OpenGL_accelerate_3vbo_9VBOOffset_vbo(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)11659 static int __pyx_setprop_17OpenGL_accelerate_3vbo_9VBOOffset_vbo(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
11660 if (v) {
11661 return __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo_3__set__(o, v);
11662 }
11663 else {
11664 return __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_3vbo_5__del__(o);
11665 }
11666 }
11667
__pyx_getprop_17OpenGL_accelerate_3vbo_9VBOOffset_offset(PyObject * o,CYTHON_UNUSED void * x)11668 static PyObject *__pyx_getprop_17OpenGL_accelerate_3vbo_9VBOOffset_offset(PyObject *o, CYTHON_UNUSED void *x) {
11669 return __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_6offset_1__get__(o);
11670 }
11671
__pyx_setprop_17OpenGL_accelerate_3vbo_9VBOOffset_offset(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)11672 static int __pyx_setprop_17OpenGL_accelerate_3vbo_9VBOOffset_offset(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
11673 if (v) {
11674 return __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_6offset_3__set__(o, v);
11675 }
11676 else {
11677 PyErr_SetString(PyExc_NotImplementedError, "__del__");
11678 return -1;
11679 }
11680 }
11681
11682 static PyMethodDef __pyx_methods_17OpenGL_accelerate_3vbo_VBOOffset[] = {
11683 {"__getattr__", (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_5__getattr__, METH_O|METH_COEXIST, 0},
11684 {"__reduce_cython__", (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_9__reduce_cython__, METH_NOARGS, 0},
11685 {"__setstate_cython__", (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_11__setstate_cython__, METH_O, 0},
11686 {0, 0, 0, 0}
11687 };
11688
11689 static struct PyGetSetDef __pyx_getsets_17OpenGL_accelerate_3vbo_VBOOffset[] = {
11690 {(char *)"vbo", __pyx_getprop_17OpenGL_accelerate_3vbo_9VBOOffset_vbo, __pyx_setprop_17OpenGL_accelerate_3vbo_9VBOOffset_vbo, (char *)0, 0},
11691 {(char *)"offset", __pyx_getprop_17OpenGL_accelerate_3vbo_9VBOOffset_offset, __pyx_setprop_17OpenGL_accelerate_3vbo_9VBOOffset_offset, (char *)0, 0},
11692 {0, 0, 0, 0, 0}
11693 };
11694
11695 static PyNumberMethods __pyx_tp_as_number_VBOOffset = {
11696 __pyx_pw_17OpenGL_accelerate_3vbo_9VBOOffset_7__add__, /*nb_add*/
11697 0, /*nb_subtract*/
11698 0, /*nb_multiply*/
11699 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
11700 0, /*nb_divide*/
11701 #endif
11702 0, /*nb_remainder*/
11703 0, /*nb_divmod*/
11704 0, /*nb_power*/
11705 0, /*nb_negative*/
11706 0, /*nb_positive*/
11707 0, /*nb_absolute*/
11708 0, /*nb_nonzero*/
11709 0, /*nb_invert*/
11710 0, /*nb_lshift*/
11711 0, /*nb_rshift*/
11712 0, /*nb_and*/
11713 0, /*nb_xor*/
11714 0, /*nb_or*/
11715 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
11716 0, /*nb_coerce*/
11717 #endif
11718 0, /*nb_int*/
11719 #if PY_MAJOR_VERSION < 3
11720 0, /*nb_long*/
11721 #else
11722 0, /*reserved*/
11723 #endif
11724 0, /*nb_float*/
11725 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
11726 0, /*nb_oct*/
11727 #endif
11728 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
11729 0, /*nb_hex*/
11730 #endif
11731 0, /*nb_inplace_add*/
11732 0, /*nb_inplace_subtract*/
11733 0, /*nb_inplace_multiply*/
11734 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
11735 0, /*nb_inplace_divide*/
11736 #endif
11737 0, /*nb_inplace_remainder*/
11738 0, /*nb_inplace_power*/
11739 0, /*nb_inplace_lshift*/
11740 0, /*nb_inplace_rshift*/
11741 0, /*nb_inplace_and*/
11742 0, /*nb_inplace_xor*/
11743 0, /*nb_inplace_or*/
11744 0, /*nb_floor_divide*/
11745 0, /*nb_true_divide*/
11746 0, /*nb_inplace_floor_divide*/
11747 0, /*nb_inplace_true_divide*/
11748 0, /*nb_index*/
11749 #if PY_VERSION_HEX >= 0x03050000
11750 0, /*nb_matrix_multiply*/
11751 #endif
11752 #if PY_VERSION_HEX >= 0x03050000
11753 0, /*nb_inplace_matrix_multiply*/
11754 #endif
11755 };
11756
11757 static PyTypeObject __pyx_type_17OpenGL_accelerate_3vbo_VBOOffset = {
11758 PyVarObject_HEAD_INIT(0, 0)
11759 "OpenGL_accelerate.vbo.VBOOffset", /*tp_name*/
11760 sizeof(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset), /*tp_basicsize*/
11761 0, /*tp_itemsize*/
11762 __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBOOffset, /*tp_dealloc*/
11763 #if PY_VERSION_HEX < 0x030800b4
11764 0, /*tp_print*/
11765 #endif
11766 #if PY_VERSION_HEX >= 0x030800b4
11767 0, /*tp_vectorcall_offset*/
11768 #endif
11769 0, /*tp_getattr*/
11770 0, /*tp_setattr*/
11771 #if PY_MAJOR_VERSION < 3
11772 0, /*tp_compare*/
11773 #endif
11774 #if PY_MAJOR_VERSION >= 3
11775 0, /*tp_as_async*/
11776 #endif
11777 0, /*tp_repr*/
11778 &__pyx_tp_as_number_VBOOffset, /*tp_as_number*/
11779 0, /*tp_as_sequence*/
11780 0, /*tp_as_mapping*/
11781 0, /*tp_hash*/
11782 0, /*tp_call*/
11783 0, /*tp_str*/
11784 __pyx_tp_getattro_17OpenGL_accelerate_3vbo_VBOOffset, /*tp_getattro*/
11785 0, /*tp_setattro*/
11786 0, /*tp_as_buffer*/
11787 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
11788 "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*/
11789 __pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBOOffset, /*tp_traverse*/
11790 __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBOOffset, /*tp_clear*/
11791 0, /*tp_richcompare*/
11792 0, /*tp_weaklistoffset*/
11793 0, /*tp_iter*/
11794 0, /*tp_iternext*/
11795 __pyx_methods_17OpenGL_accelerate_3vbo_VBOOffset, /*tp_methods*/
11796 0, /*tp_members*/
11797 __pyx_getsets_17OpenGL_accelerate_3vbo_VBOOffset, /*tp_getset*/
11798 0, /*tp_base*/
11799 0, /*tp_dict*/
11800 0, /*tp_descr_get*/
11801 0, /*tp_descr_set*/
11802 0, /*tp_dictoffset*/
11803 0, /*tp_init*/
11804 0, /*tp_alloc*/
11805 __pyx_tp_new_17OpenGL_accelerate_3vbo_VBOOffset, /*tp_new*/
11806 0, /*tp_free*/
11807 0, /*tp_is_gc*/
11808 0, /*tp_bases*/
11809 0, /*tp_mro*/
11810 0, /*tp_cache*/
11811 0, /*tp_subclasses*/
11812 0, /*tp_weaklist*/
11813 0, /*tp_del*/
11814 0, /*tp_version_tag*/
11815 #if PY_VERSION_HEX >= 0x030400a1
11816 0, /*tp_finalize*/
11817 #endif
11818 #if PY_VERSION_HEX >= 0x030800b1
11819 0, /*tp_vectorcall*/
11820 #endif
11821 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
11822 0, /*tp_print*/
11823 #endif
11824 };
11825 static struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBOHandler __pyx_vtable_17OpenGL_accelerate_3vbo_VBOHandler;
11826
__pyx_tp_new_17OpenGL_accelerate_3vbo_VBOHandler(PyTypeObject * t,PyObject * a,PyObject * k)11827 static PyObject *__pyx_tp_new_17OpenGL_accelerate_3vbo_VBOHandler(PyTypeObject *t, PyObject *a, PyObject *k) {
11828 struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *p;
11829 PyObject *o = __pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_new(t, a, k);
11830 if (unlikely(!o)) return 0;
11831 p = ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *)o);
11832 p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler*)__pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOHandler;
11833 p->vp0 = Py_None; Py_INCREF(Py_None);
11834 p->arrayType = Py_None; Py_INCREF(Py_None);
11835 return o;
11836 }
11837
__pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBOHandler(PyObject * o)11838 static void __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBOHandler(PyObject *o) {
11839 struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *)o;
11840 #if CYTHON_USE_TP_FINALIZE
11841 if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
11842 if (PyObject_CallFinalizerFromDealloc(o)) return;
11843 }
11844 #endif
11845 PyObject_GC_UnTrack(o);
11846 Py_CLEAR(p->vp0);
11847 Py_CLEAR(p->arrayType);
11848 #if CYTHON_USE_TYPE_SLOTS
11849 if (PyType_IS_GC(Py_TYPE(o)->tp_base))
11850 #endif
11851 PyObject_GC_Track(o);
11852 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);
11853 }
11854
__pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBOHandler(PyObject * o,visitproc v,void * a)11855 static int __pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBOHandler(PyObject *o, visitproc v, void *a) {
11856 int e;
11857 struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *)o;
11858 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;
11859 if (p->vp0) {
11860 e = (*v)(p->vp0, a); if (e) return e;
11861 }
11862 if (p->arrayType) {
11863 e = (*v)(p->arrayType, a); if (e) return e;
11864 }
11865 return 0;
11866 }
11867
__pyx_tp_clear_17OpenGL_accelerate_3vbo_VBOHandler(PyObject * o)11868 static int __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBOHandler(PyObject *o) {
11869 PyObject* tmp;
11870 struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler *)o;
11871 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);
11872 tmp = ((PyObject*)p->vp0);
11873 p->vp0 = Py_None; Py_INCREF(Py_None);
11874 Py_XDECREF(tmp);
11875 tmp = ((PyObject*)p->arrayType);
11876 p->arrayType = Py_None; Py_INCREF(Py_None);
11877 Py_XDECREF(tmp);
11878 return 0;
11879 }
11880
11881 static PyMethodDef __pyx_methods_17OpenGL_accelerate_3vbo_VBOHandler[] = {
11882 {"__reduce_cython__", (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_10VBOHandler_3__reduce_cython__, METH_NOARGS, 0},
11883 {"__setstate_cython__", (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_10VBOHandler_5__setstate_cython__, METH_O, 0},
11884 {0, 0, 0, 0}
11885 };
11886
11887 static PyTypeObject __pyx_type_17OpenGL_accelerate_3vbo_VBOHandler = {
11888 PyVarObject_HEAD_INIT(0, 0)
11889 "OpenGL_accelerate.vbo.VBOHandler", /*tp_name*/
11890 sizeof(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOHandler), /*tp_basicsize*/
11891 0, /*tp_itemsize*/
11892 __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBOHandler, /*tp_dealloc*/
11893 #if PY_VERSION_HEX < 0x030800b4
11894 0, /*tp_print*/
11895 #endif
11896 #if PY_VERSION_HEX >= 0x030800b4
11897 0, /*tp_vectorcall_offset*/
11898 #endif
11899 0, /*tp_getattr*/
11900 0, /*tp_setattr*/
11901 #if PY_MAJOR_VERSION < 3
11902 0, /*tp_compare*/
11903 #endif
11904 #if PY_MAJOR_VERSION >= 3
11905 0, /*tp_as_async*/
11906 #endif
11907 0, /*tp_repr*/
11908 0, /*tp_as_number*/
11909 0, /*tp_as_sequence*/
11910 0, /*tp_as_mapping*/
11911 0, /*tp_hash*/
11912 0, /*tp_call*/
11913 0, /*tp_str*/
11914 0, /*tp_getattro*/
11915 0, /*tp_setattro*/
11916 0, /*tp_as_buffer*/
11917 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
11918 "Handles VBO instances passed in as array data", /*tp_doc*/
11919 __pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBOHandler, /*tp_traverse*/
11920 __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBOHandler, /*tp_clear*/
11921 0, /*tp_richcompare*/
11922 0, /*tp_weaklistoffset*/
11923 0, /*tp_iter*/
11924 0, /*tp_iternext*/
11925 __pyx_methods_17OpenGL_accelerate_3vbo_VBOHandler, /*tp_methods*/
11926 0, /*tp_members*/
11927 0, /*tp_getset*/
11928 0, /*tp_base*/
11929 0, /*tp_dict*/
11930 0, /*tp_descr_get*/
11931 0, /*tp_descr_set*/
11932 0, /*tp_dictoffset*/
11933 __pyx_pw_17OpenGL_accelerate_3vbo_10VBOHandler_1__init__, /*tp_init*/
11934 0, /*tp_alloc*/
11935 __pyx_tp_new_17OpenGL_accelerate_3vbo_VBOHandler, /*tp_new*/
11936 0, /*tp_free*/
11937 0, /*tp_is_gc*/
11938 0, /*tp_bases*/
11939 0, /*tp_mro*/
11940 0, /*tp_cache*/
11941 0, /*tp_subclasses*/
11942 0, /*tp_weaklist*/
11943 0, /*tp_del*/
11944 0, /*tp_version_tag*/
11945 #if PY_VERSION_HEX >= 0x030400a1
11946 0, /*tp_finalize*/
11947 #endif
11948 #if PY_VERSION_HEX >= 0x030800b1
11949 0, /*tp_vectorcall*/
11950 #endif
11951 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
11952 0, /*tp_print*/
11953 #endif
11954 };
11955 static struct __pyx_vtabstruct_17OpenGL_accelerate_3vbo_VBOOffsetHandler __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffsetHandler;
11956
__pyx_tp_new_17OpenGL_accelerate_3vbo_VBOOffsetHandler(PyTypeObject * t,PyObject * a,PyObject * k)11957 static PyObject *__pyx_tp_new_17OpenGL_accelerate_3vbo_VBOOffsetHandler(PyTypeObject *t, PyObject *a, PyObject *k) {
11958 struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *p;
11959 PyObject *o = __pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler->tp_new(t, a, k);
11960 if (unlikely(!o)) return 0;
11961 p = ((struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *)o);
11962 p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_17OpenGL_accelerate_13formathandler_FormatHandler*)__pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOOffsetHandler;
11963 p->arrayType = Py_None; Py_INCREF(Py_None);
11964 return o;
11965 }
11966
__pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBOOffsetHandler(PyObject * o)11967 static void __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBOOffsetHandler(PyObject *o) {
11968 struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *)o;
11969 #if CYTHON_USE_TP_FINALIZE
11970 if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
11971 if (PyObject_CallFinalizerFromDealloc(o)) return;
11972 }
11973 #endif
11974 PyObject_GC_UnTrack(o);
11975 Py_CLEAR(p->arrayType);
11976 #if CYTHON_USE_TYPE_SLOTS
11977 if (PyType_IS_GC(Py_TYPE(o)->tp_base))
11978 #endif
11979 PyObject_GC_Track(o);
11980 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);
11981 }
11982
__pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBOOffsetHandler(PyObject * o,visitproc v,void * a)11983 static int __pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBOOffsetHandler(PyObject *o, visitproc v, void *a) {
11984 int e;
11985 struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *)o;
11986 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;
11987 if (p->arrayType) {
11988 e = (*v)(p->arrayType, a); if (e) return e;
11989 }
11990 return 0;
11991 }
11992
__pyx_tp_clear_17OpenGL_accelerate_3vbo_VBOOffsetHandler(PyObject * o)11993 static int __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBOOffsetHandler(PyObject *o) {
11994 PyObject* tmp;
11995 struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *p = (struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler *)o;
11996 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);
11997 tmp = ((PyObject*)p->arrayType);
11998 p->arrayType = Py_None; Py_INCREF(Py_None);
11999 Py_XDECREF(tmp);
12000 return 0;
12001 }
12002
12003 static PyMethodDef __pyx_methods_17OpenGL_accelerate_3vbo_VBOOffsetHandler[] = {
12004 {"__reduce_cython__", (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_3__reduce_cython__, METH_NOARGS, 0},
12005 {"__setstate_cython__", (PyCFunction)__pyx_pw_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_5__setstate_cython__, METH_O, 0},
12006 {0, 0, 0, 0}
12007 };
12008
12009 static PyTypeObject __pyx_type_17OpenGL_accelerate_3vbo_VBOOffsetHandler = {
12010 PyVarObject_HEAD_INIT(0, 0)
12011 "OpenGL_accelerate.vbo.VBOOffsetHandler", /*tp_name*/
12012 sizeof(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffsetHandler), /*tp_basicsize*/
12013 0, /*tp_itemsize*/
12014 __pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBOOffsetHandler, /*tp_dealloc*/
12015 #if PY_VERSION_HEX < 0x030800b4
12016 0, /*tp_print*/
12017 #endif
12018 #if PY_VERSION_HEX >= 0x030800b4
12019 0, /*tp_vectorcall_offset*/
12020 #endif
12021 0, /*tp_getattr*/
12022 0, /*tp_setattr*/
12023 #if PY_MAJOR_VERSION < 3
12024 0, /*tp_compare*/
12025 #endif
12026 #if PY_MAJOR_VERSION >= 3
12027 0, /*tp_as_async*/
12028 #endif
12029 0, /*tp_repr*/
12030 0, /*tp_as_number*/
12031 0, /*tp_as_sequence*/
12032 0, /*tp_as_mapping*/
12033 0, /*tp_hash*/
12034 0, /*tp_call*/
12035 0, /*tp_str*/
12036 0, /*tp_getattro*/
12037 0, /*tp_setattro*/
12038 0, /*tp_as_buffer*/
12039 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
12040 0, /*tp_doc*/
12041 __pyx_tp_traverse_17OpenGL_accelerate_3vbo_VBOOffsetHandler, /*tp_traverse*/
12042 __pyx_tp_clear_17OpenGL_accelerate_3vbo_VBOOffsetHandler, /*tp_clear*/
12043 0, /*tp_richcompare*/
12044 0, /*tp_weaklistoffset*/
12045 0, /*tp_iter*/
12046 0, /*tp_iternext*/
12047 __pyx_methods_17OpenGL_accelerate_3vbo_VBOOffsetHandler, /*tp_methods*/
12048 0, /*tp_members*/
12049 0, /*tp_getset*/
12050 0, /*tp_base*/
12051 0, /*tp_dict*/
12052 0, /*tp_descr_get*/
12053 0, /*tp_descr_set*/
12054 0, /*tp_dictoffset*/
12055 __pyx_pw_17OpenGL_accelerate_3vbo_16VBOOffsetHandler_1__init__, /*tp_init*/
12056 0, /*tp_alloc*/
12057 __pyx_tp_new_17OpenGL_accelerate_3vbo_VBOOffsetHandler, /*tp_new*/
12058 0, /*tp_free*/
12059 0, /*tp_is_gc*/
12060 0, /*tp_bases*/
12061 0, /*tp_mro*/
12062 0, /*tp_cache*/
12063 0, /*tp_subclasses*/
12064 0, /*tp_weaklist*/
12065 0, /*tp_del*/
12066 0, /*tp_version_tag*/
12067 #if PY_VERSION_HEX >= 0x030400a1
12068 0, /*tp_finalize*/
12069 #endif
12070 #if PY_VERSION_HEX >= 0x030800b1
12071 0, /*tp_vectorcall*/
12072 #endif
12073 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
12074 0, /*tp_print*/
12075 #endif
12076 };
12077
12078 static PyMethodDef __pyx_methods[] = {
12079 {0, 0, 0, 0}
12080 };
12081
12082 #if PY_MAJOR_VERSION >= 3
12083 #if CYTHON_PEP489_MULTI_PHASE_INIT
12084 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
12085 static int __pyx_pymod_exec_vbo(PyObject* module); /*proto*/
12086 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
12087 {Py_mod_create, (void*)__pyx_pymod_create},
12088 {Py_mod_exec, (void*)__pyx_pymod_exec_vbo},
12089 {0, NULL}
12090 };
12091 #endif
12092
12093 static struct PyModuleDef __pyx_moduledef = {
12094 PyModuleDef_HEAD_INIT,
12095 "vbo",
12096 __pyx_k_Cython_coded_VBO_implementation, /* m_doc */
12097 #if CYTHON_PEP489_MULTI_PHASE_INIT
12098 0, /* m_size */
12099 #else
12100 -1, /* m_size */
12101 #endif
12102 __pyx_methods /* m_methods */,
12103 #if CYTHON_PEP489_MULTI_PHASE_INIT
12104 __pyx_moduledef_slots, /* m_slots */
12105 #else
12106 NULL, /* m_reload */
12107 #endif
12108 NULL, /* m_traverse */
12109 NULL, /* m_clear */
12110 NULL /* m_free */
12111 };
12112 #endif
12113 #ifndef CYTHON_SMALL_CODE
12114 #if defined(__clang__)
12115 #define CYTHON_SMALL_CODE
12116 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
12117 #define CYTHON_SMALL_CODE __attribute__((cold))
12118 #else
12119 #define CYTHON_SMALL_CODE
12120 #endif
12121 #endif
12122
12123 static __Pyx_StringTabEntry __pyx_string_tab[] = {
12124 {&__pyx_kp_s_Already_created_the_buffer, __pyx_k_Already_created_the_buffer, sizeof(__pyx_k_Already_created_the_buffer), 0, 0, 1, 0},
12125 {&__pyx_n_s_ArrayDatatype, __pyx_k_ArrayDatatype, sizeof(__pyx_k_ArrayDatatype), 0, 0, 1, 1},
12126 {&__pyx_kp_s_Attempting_to_use_a_deleted_VBO, __pyx_k_Attempting_to_use_a_deleted_VBO, sizeof(__pyx_k_Attempting_to_use_a_deleted_VBO), 0, 0, 1, 0},
12127 {&__pyx_kp_s_Attempting_to_use_offset_into_de, __pyx_k_Attempting_to_use_offset_into_de, sizeof(__pyx_k_Attempting_to_use_offset_into_de), 0, 0, 1, 0},
12128 {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
12129 {&__pyx_n_s_DELETERS, __pyx_k_DELETERS, sizeof(__pyx_k_DELETERS), 0, 0, 1, 1},
12130 {&__pyx_kp_s_Don_t_know_how_to_map_stepped_ar, __pyx_k_Don_t_know_how_to_map_stepped_ar, sizeof(__pyx_k_Don_t_know_how_to_map_stepped_ar), 0, 0, 1, 0},
12131 {&__pyx_n_s_GL_ARRAY_BUFFER, __pyx_k_GL_ARRAY_BUFFER, sizeof(__pyx_k_GL_ARRAY_BUFFER), 0, 0, 1, 1},
12132 {&__pyx_n_s_GL_DYNAMIC_DRAW, __pyx_k_GL_DYNAMIC_DRAW, sizeof(__pyx_k_GL_DYNAMIC_DRAW), 0, 0, 1, 1},
12133 {&__pyx_n_s_I, __pyx_k_I, sizeof(__pyx_k_I), 0, 0, 1, 1},
12134 {&__pyx_kp_s_Incompatible_checksums_s_vs_0x0f, __pyx_k_Incompatible_checksums_s_vs_0x0f, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x0f), 0, 0, 1, 0},
12135 {&__pyx_kp_s_Incompatible_checksums_s_vs_0xad, __pyx_k_Incompatible_checksums_s_vs_0xad, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xad), 0, 0, 1, 0},
12136 {&__pyx_kp_s_Incompatible_checksums_s_vs_0xe0, __pyx_k_Incompatible_checksums_s_vs_0xe0, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xe0), 0, 0, 1, 0},
12137 {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
12138 {&__pyx_n_s_NULL, __pyx_k_NULL, sizeof(__pyx_k_NULL), 0, 0, 1, 1},
12139 {&__pyx_kp_s_No_r_key_in_VBOOffset, __pyx_k_No_r_key_in_VBOOffset, sizeof(__pyx_k_No_r_key_in_VBOOffset), 0, 0, 1, 0},
12140 {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
12141 {&__pyx_n_s_NullFunctionError, __pyx_k_NullFunctionError, sizeof(__pyx_k_NullFunctionError), 0, 0, 1, 1},
12142 {&__pyx_kp_s_Only_know_how_to_add_integer_lon, __pyx_k_Only_know_how_to_add_integer_lon, sizeof(__pyx_k_Only_know_how_to_add_integer_lon), 0, 0, 1, 0},
12143 {&__pyx_n_s_OpenGL, __pyx_k_OpenGL, sizeof(__pyx_k_OpenGL), 0, 0, 1, 1},
12144 {&__pyx_n_s_OpenGL__bytes, __pyx_k_OpenGL__bytes, sizeof(__pyx_k_OpenGL__bytes), 0, 0, 1, 1},
12145 {&__pyx_n_s_OpenGL_accelerate_vbo, __pyx_k_OpenGL_accelerate_vbo, sizeof(__pyx_k_OpenGL_accelerate_vbo), 0, 0, 1, 1},
12146 {&__pyx_n_s_OpenGL_arrays_arraydatatype, __pyx_k_OpenGL_arrays_arraydatatype, sizeof(__pyx_k_OpenGL_arrays_arraydatatype), 0, 0, 1, 1},
12147 {&__pyx_n_s_OpenGL_arrays_vbo, __pyx_k_OpenGL_arrays_vbo, sizeof(__pyx_k_OpenGL_arrays_vbo), 0, 0, 1, 1},
12148 {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
12149 {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
12150 {&__pyx_kp_s_Should_do_create_buffers_before, __pyx_k_Should_do_create_buffers_before, sizeof(__pyx_k_Should_do_create_buffers_before), 0, 0, 1, 0},
12151 {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
12152 {&__pyx_n_s_VBO, __pyx_k_VBO, sizeof(__pyx_k_VBO), 0, 0, 1, 1},
12153 {&__pyx_n_s_VBOHandler, __pyx_k_VBOHandler, sizeof(__pyx_k_VBOHandler), 0, 0, 1, 1},
12154 {&__pyx_n_s_VBOOffset, __pyx_k_VBOOffset, sizeof(__pyx_k_VBOOffset), 0, 0, 1, 1},
12155 {&__pyx_n_s_VBOOffsetHandler, __pyx_k_VBOOffsetHandler, sizeof(__pyx_k_VBOOffsetHandler), 0, 0, 1, 1},
12156 {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
12157 {&__pyx_n_s_arrayByteCount, __pyx_k_arrayByteCount, sizeof(__pyx_k_arrayByteCount), 0, 0, 1, 1},
12158 {&__pyx_n_s_arraySize, __pyx_k_arraySize, sizeof(__pyx_k_arraySize), 0, 0, 1, 1},
12159 {&__pyx_n_s_arrayToGLType, __pyx_k_arrayToGLType, sizeof(__pyx_k_arrayToGLType), 0, 0, 1, 1},
12160 {&__pyx_n_s_asArray, __pyx_k_asArray, sizeof(__pyx_k_asArray), 0, 0, 1, 1},
12161 {&__pyx_n_s_basename, __pyx_k_basename, sizeof(__pyx_k_basename), 0, 0, 1, 1},
12162 {&__pyx_n_s_bind, __pyx_k_bind, sizeof(__pyx_k_bind), 0, 0, 1, 1},
12163 {&__pyx_n_s_buffer, __pyx_k_buffer, sizeof(__pyx_k_buffer), 0, 0, 1, 1},
12164 {&__pyx_n_s_bytes, __pyx_k_bytes, sizeof(__pyx_k_bytes), 0, 0, 1, 1},
12165 {&__pyx_n_s_c_uint32, __pyx_k_c_uint32, sizeof(__pyx_k_c_uint32), 0, 0, 1, 1},
12166 {&__pyx_n_s_c_void_p, __pyx_k_c_void_p, sizeof(__pyx_k_c_void_p), 0, 0, 1, 1},
12167 {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
12168 {&__pyx_n_s_copied, __pyx_k_copied, sizeof(__pyx_k_copied), 0, 0, 1, 1},
12169 {&__pyx_n_s_copy_data, __pyx_k_copy_data, sizeof(__pyx_k_copy_data), 0, 0, 1, 1},
12170 {&__pyx_n_s_copy_segments, __pyx_k_copy_segments, sizeof(__pyx_k_copy_segments), 0, 0, 1, 1},
12171 {&__pyx_n_s_create_buffers, __pyx_k_create_buffers, sizeof(__pyx_k_create_buffers), 0, 0, 1, 1},
12172 {&__pyx_n_s_ctypes, __pyx_k_ctypes, sizeof(__pyx_k_ctypes), 0, 0, 1, 1},
12173 {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
12174 {&__pyx_n_s_deleter, __pyx_k_deleter, sizeof(__pyx_k_deleter), 0, 0, 1, 1},
12175 {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
12176 {&__pyx_n_s_dimensions, __pyx_k_dimensions, sizeof(__pyx_k_dimensions), 0, 0, 1, 1},
12177 {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
12178 {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
12179 {&__pyx_n_s_exc_tb, __pyx_k_exc_tb, sizeof(__pyx_k_exc_tb), 0, 0, 1, 1},
12180 {&__pyx_n_s_exc_type, __pyx_k_exc_type, sizeof(__pyx_k_exc_type), 0, 0, 1, 1},
12181 {&__pyx_n_s_exc_val, __pyx_k_exc_val, sizeof(__pyx_k_exc_val), 0, 0, 1, 1},
12182 {&__pyx_n_s_get_implementation, __pyx_k_get_implementation, sizeof(__pyx_k_get_implementation), 0, 0, 1, 1},
12183 {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
12184 {&__pyx_n_s_glBindBuffer, __pyx_k_glBindBuffer, sizeof(__pyx_k_glBindBuffer), 0, 0, 1, 1},
12185 {&__pyx_n_s_glBufferData, __pyx_k_glBufferData, sizeof(__pyx_k_glBufferData), 0, 0, 1, 1},
12186 {&__pyx_n_s_glBufferSubData, __pyx_k_glBufferSubData, sizeof(__pyx_k_glBufferSubData), 0, 0, 1, 1},
12187 {&__pyx_n_s_glDeleteBuffers, __pyx_k_glDeleteBuffers, sizeof(__pyx_k_glDeleteBuffers), 0, 0, 1, 1},
12188 {&__pyx_n_s_glGenBuffers, __pyx_k_glGenBuffers, sizeof(__pyx_k_glGenBuffers), 0, 0, 1, 1},
12189 {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
12190 {&__pyx_n_s_implementation, __pyx_k_implementation, sizeof(__pyx_k_implementation), 0, 0, 1, 1},
12191 {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
12192 {&__pyx_n_s_isOutput, __pyx_k_isOutput, sizeof(__pyx_k_isOutput), 0, 0, 1, 1},
12193 {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
12194 {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
12195 {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
12196 {&__pyx_n_s_no_cache, __pyx_k_no_cache, sizeof(__pyx_k_no_cache), 0, 0, 1, 1},
12197 {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
12198 {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
12199 {&__pyx_n_s_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1},
12200 {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
12201 {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
12202 {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
12203 {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
12204 {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
12205 {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
12206 {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
12207 {&__pyx_n_s_pyx_unpickle_VBO, __pyx_k_pyx_unpickle_VBO, sizeof(__pyx_k_pyx_unpickle_VBO), 0, 0, 1, 1},
12208 {&__pyx_n_s_pyx_unpickle_VBOHandler, __pyx_k_pyx_unpickle_VBOHandler, sizeof(__pyx_k_pyx_unpickle_VBOHandler), 0, 0, 1, 1},
12209 {&__pyx_n_s_pyx_unpickle_VBOOffsetHandler, __pyx_k_pyx_unpickle_VBOOffsetHandler, sizeof(__pyx_k_pyx_unpickle_VBOOffsetHandler), 0, 0, 1, 1},
12210 {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
12211 {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
12212 {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
12213 {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
12214 {&__pyx_n_s_ref, __pyx_k_ref, sizeof(__pyx_k_ref), 0, 0, 1, 1},
12215 {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
12216 {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
12217 {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
12218 {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
12219 {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
12220 {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
12221 {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
12222 {&__pyx_n_s_target, __pyx_k_target, sizeof(__pyx_k_target), 0, 0, 1, 1},
12223 {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
12224 {&__pyx_n_s_unbind, __pyx_k_unbind, sizeof(__pyx_k_unbind), 0, 0, 1, 1},
12225 {&__pyx_n_s_unicode, __pyx_k_unicode, sizeof(__pyx_k_unicode), 0, 0, 1, 1},
12226 {&__pyx_n_s_unitSize, __pyx_k_unitSize, sizeof(__pyx_k_unitSize), 0, 0, 1, 1},
12227 {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
12228 {&__pyx_n_s_usage, __pyx_k_usage, sizeof(__pyx_k_usage), 0, 0, 1, 1},
12229 {&__pyx_n_s_vbo, __pyx_k_vbo, sizeof(__pyx_k_vbo), 0, 0, 1, 1},
12230 {&__pyx_n_s_voidDataPointer, __pyx_k_voidDataPointer, sizeof(__pyx_k_voidDataPointer), 0, 0, 1, 1},
12231 {&__pyx_n_s_weakref, __pyx_k_weakref, sizeof(__pyx_k_weakref), 0, 0, 1, 1},
12232 {0, 0, 0, 0, 0, 0, 0}
12233 };
__Pyx_InitCachedBuiltins(void)12234 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
12235 __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 11, __pyx_L1_error)
12236 __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 140, __pyx_L1_error)
12237 __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 179, __pyx_L1_error)
12238 __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 191, __pyx_L1_error)
12239 __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 191, __pyx_L1_error)
12240 __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 199, __pyx_L1_error)
12241 __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 229, __pyx_L1_error)
12242 __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 248, __pyx_L1_error)
12243 return 0;
12244 __pyx_L1_error:;
12245 return -1;
12246 }
12247
__Pyx_InitCachedConstants(void)12248 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
12249 __Pyx_RefNannyDeclarations
12250 __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
12251
12252 /* "src/vbo.pyx":140
12253 * """
12254 * if slice.step and not slice.step == 1:
12255 * raise NotImplemented( """Don't know how to map stepped arrays yet""" ) # <<<<<<<<<<<<<<
12256 * # TODO: handle e.g. mapping character data into an integer data-set
12257 * data = self.arrayType.asArray( array )
12258 */
12259 __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_Don_t_know_how_to_map_stepped_ar); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 140, __pyx_L1_error)
12260 __Pyx_GOTREF(__pyx_tuple_);
12261 __Pyx_GIVEREF(__pyx_tuple_);
12262
12263 /* "src/vbo.pyx":248
12264 * cdef int check_live( self ):
12265 * if self.data is _NULL:
12266 * raise RuntimeError( """Attempting to use a deleted VBO""" ) # <<<<<<<<<<<<<<
12267 *
12268 * __enter__ = bind
12269 */
12270 __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_Attempting_to_use_a_deleted_VBO); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 248, __pyx_L1_error)
12271 __Pyx_GOTREF(__pyx_tuple__2);
12272 __Pyx_GIVEREF(__pyx_tuple__2);
12273
12274 /* "src/vbo.pyx":288
12275 * return self.vbo.check_live()
12276 * else:
12277 * raise RuntimeError( """Attempting to use offset into deleted VBO""" ) # <<<<<<<<<<<<<<
12278 *
12279 * cdef class VBOHandler(FormatHandler):
12280 */
12281 __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_Attempting_to_use_offset_into_de); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 288, __pyx_L1_error)
12282 __Pyx_GOTREF(__pyx_tuple__3);
12283 __Pyx_GIVEREF(__pyx_tuple__3);
12284
12285 /* "(tree fragment)":2
12286 * def __reduce_cython__(self):
12287 * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
12288 * def __setstate_cython__(self, __pyx_state):
12289 * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
12290 */
12291 __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 2, __pyx_L1_error)
12292 __Pyx_GOTREF(__pyx_tuple__4);
12293 __Pyx_GIVEREF(__pyx_tuple__4);
12294
12295 /* "(tree fragment)":4
12296 * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
12297 * def __setstate_cython__(self, __pyx_state):
12298 * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
12299 */
12300 __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(1, 4, __pyx_L1_error)
12301 __Pyx_GOTREF(__pyx_tuple__5);
12302 __Pyx_GIVEREF(__pyx_tuple__5);
12303
12304 /* "(tree fragment)":1
12305 * def __pyx_unpickle_VBO(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
12306 * cdef object __pyx_PickleError
12307 * cdef object __pyx_result
12308 */
12309 __pyx_tuple__6 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(1, 1, __pyx_L1_error)
12310 __Pyx_GOTREF(__pyx_tuple__6);
12311 __Pyx_GIVEREF(__pyx_tuple__6);
12312 __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__6, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_VBO, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(1, 1, __pyx_L1_error)
12313 __pyx_tuple__8 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(1, 1, __pyx_L1_error)
12314 __Pyx_GOTREF(__pyx_tuple__8);
12315 __Pyx_GIVEREF(__pyx_tuple__8);
12316 __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__8, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_VBOHandler, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(1, 1, __pyx_L1_error)
12317 __pyx_tuple__10 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(1, 1, __pyx_L1_error)
12318 __Pyx_GOTREF(__pyx_tuple__10);
12319 __Pyx_GIVEREF(__pyx_tuple__10);
12320 __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_VBOOffsetHandler, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(1, 1, __pyx_L1_error)
12321 __Pyx_RefNannyFinishContext();
12322 return 0;
12323 __pyx_L1_error:;
12324 __Pyx_RefNannyFinishContext();
12325 return -1;
12326 }
12327
__Pyx_InitGlobals(void)12328 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
12329 if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
12330 __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
12331 __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
12332 __pyx_int_16701269 = PyInt_FromLong(16701269L); if (unlikely(!__pyx_int_16701269)) __PYX_ERR(0, 1, __pyx_L1_error)
12333 __pyx_int_182317361 = PyInt_FromLong(182317361L); if (unlikely(!__pyx_int_182317361)) __PYX_ERR(0, 1, __pyx_L1_error)
12334 __pyx_int_235539587 = PyInt_FromLong(235539587L); if (unlikely(!__pyx_int_235539587)) __PYX_ERR(0, 1, __pyx_L1_error)
12335 return 0;
12336 __pyx_L1_error:;
12337 return -1;
12338 }
12339
12340 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
12341 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
12342 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
12343 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
12344 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
12345 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
12346 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
12347
__Pyx_modinit_global_init_code(void)12348 static int __Pyx_modinit_global_init_code(void) {
12349 __Pyx_RefNannyDeclarations
12350 __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
12351 /*--- Global init code ---*/
12352 __Pyx_RefNannyFinishContext();
12353 return 0;
12354 }
12355
__Pyx_modinit_variable_export_code(void)12356 static int __Pyx_modinit_variable_export_code(void) {
12357 __Pyx_RefNannyDeclarations
12358 __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
12359 /*--- Variable export code ---*/
12360 __Pyx_RefNannyFinishContext();
12361 return 0;
12362 }
12363
__Pyx_modinit_function_export_code(void)12364 static int __Pyx_modinit_function_export_code(void) {
12365 __Pyx_RefNannyDeclarations
12366 __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
12367 /*--- Function export code ---*/
12368 __Pyx_RefNannyFinishContext();
12369 return 0;
12370 }
12371
__Pyx_modinit_type_init_code(void)12372 static int __Pyx_modinit_type_init_code(void) {
12373 __Pyx_RefNannyDeclarations
12374 PyObject *__pyx_t_1 = NULL;
12375 __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
12376 /*--- Type init code ---*/
12377 __pyx_vtabptr_17OpenGL_accelerate_3vbo_VBO = &__pyx_vtable_17OpenGL_accelerate_3vbo_VBO;
12378 __pyx_vtable_17OpenGL_accelerate_3vbo_VBO.get_implementation = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *))__pyx_f_17OpenGL_accelerate_3vbo_3VBO_get_implementation;
12379 __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;
12380 __pyx_vtable_17OpenGL_accelerate_3vbo_VBO.c_set_array = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_3vbo_3VBO_c_set_array;
12381 __pyx_vtable_17OpenGL_accelerate_3vbo_VBO.check_live = (int (*)(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBO *))__pyx_f_17OpenGL_accelerate_3vbo_3VBO_check_live;
12382 if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_3vbo_VBO) < 0) __PYX_ERR(0, 13, __pyx_L1_error)
12383 #if PY_VERSION_HEX < 0x030800B1
12384 __pyx_type_17OpenGL_accelerate_3vbo_VBO.tp_print = 0;
12385 #endif
12386 #if CYTHON_COMPILING_IN_CPYTHON
12387 {
12388 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_17OpenGL_accelerate_3vbo_VBO, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 13, __pyx_L1_error)
12389 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
12390 __pyx_wrapperbase_17OpenGL_accelerate_3vbo_3VBO___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
12391 __pyx_wrapperbase_17OpenGL_accelerate_3vbo_3VBO___init__.doc = __pyx_doc_17OpenGL_accelerate_3vbo_3VBO___init__;
12392 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_17OpenGL_accelerate_3vbo_3VBO___init__;
12393 }
12394 }
12395 #endif
12396 #if CYTHON_COMPILING_IN_CPYTHON
12397 {
12398 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_17OpenGL_accelerate_3vbo_VBO, "__setitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 13, __pyx_L1_error)
12399 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
12400 __pyx_wrapperbase_17OpenGL_accelerate_3vbo_3VBO_6__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
12401 __pyx_wrapperbase_17OpenGL_accelerate_3vbo_3VBO_6__setitem__.doc = __pyx_doc_17OpenGL_accelerate_3vbo_3VBO_6__setitem__;
12402 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_17OpenGL_accelerate_3vbo_3VBO_6__setitem__;
12403 }
12404 }
12405 #endif
12406 #if CYTHON_COMPILING_IN_CPYTHON
12407 {
12408 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_17OpenGL_accelerate_3vbo_VBO, "__int__"); if (unlikely(!wrapper)) __PYX_ERR(0, 13, __pyx_L1_error)
12409 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
12410 __pyx_wrapperbase_17OpenGL_accelerate_3vbo_3VBO_12__int__ = *((PyWrapperDescrObject *)wrapper)->d_base;
12411 __pyx_wrapperbase_17OpenGL_accelerate_3vbo_3VBO_12__int__.doc = __pyx_doc_17OpenGL_accelerate_3vbo_3VBO_12__int__;
12412 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_17OpenGL_accelerate_3vbo_3VBO_12__int__;
12413 }
12414 }
12415 #endif
12416 #if CYTHON_COMPILING_IN_CPYTHON
12417 {
12418 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_17OpenGL_accelerate_3vbo_VBO, "__add__"); if (unlikely(!wrapper)) __PYX_ERR(0, 13, __pyx_L1_error)
12419 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
12420 __pyx_wrapperbase_17OpenGL_accelerate_3vbo_3VBO_24__add__ = *((PyWrapperDescrObject *)wrapper)->d_base;
12421 __pyx_wrapperbase_17OpenGL_accelerate_3vbo_3VBO_24__add__.doc = __pyx_doc_17OpenGL_accelerate_3vbo_3VBO_24__add__;
12422 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_17OpenGL_accelerate_3vbo_3VBO_24__add__;
12423 }
12424 }
12425 #endif
12426 if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_3vbo_VBO.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_3vbo_VBO) < 0) __PYX_ERR(0, 13, __pyx_L1_error)
12427 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VBO, (PyObject *)&__pyx_type_17OpenGL_accelerate_3vbo_VBO) < 0) __PYX_ERR(0, 13, __pyx_L1_error)
12428 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__);
12429 if (__Pyx_setup_reduce((PyObject*)&__pyx_type_17OpenGL_accelerate_3vbo_VBO) < 0) __PYX_ERR(0, 13, __pyx_L1_error)
12430 __pyx_ptype_17OpenGL_accelerate_3vbo_VBO = &__pyx_type_17OpenGL_accelerate_3vbo_VBO;
12431 __pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOOffset = &__pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffset;
12432 __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffset.check_live = (int (*)(struct __pyx_obj_17OpenGL_accelerate_3vbo_VBOOffset *))__pyx_f_17OpenGL_accelerate_3vbo_9VBOOffset_check_live;
12433 if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_3vbo_VBOOffset) < 0) __PYX_ERR(0, 257, __pyx_L1_error)
12434 #if PY_VERSION_HEX < 0x030800B1
12435 __pyx_type_17OpenGL_accelerate_3vbo_VBOOffset.tp_print = 0;
12436 #endif
12437 if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_3vbo_VBOOffset.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOOffset) < 0) __PYX_ERR(0, 257, __pyx_L1_error)
12438 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VBOOffset, (PyObject *)&__pyx_type_17OpenGL_accelerate_3vbo_VBOOffset) < 0) __PYX_ERR(0, 257, __pyx_L1_error)
12439 if (__Pyx_setup_reduce((PyObject*)&__pyx_type_17OpenGL_accelerate_3vbo_VBOOffset) < 0) __PYX_ERR(0, 257, __pyx_L1_error)
12440 __pyx_ptype_17OpenGL_accelerate_3vbo_VBOOffset = &__pyx_type_17OpenGL_accelerate_3vbo_VBOOffset;
12441 __pyx_t_1 = PyImport_ImportModule("OpenGL_accelerate.formathandler"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
12442 __Pyx_GOTREF(__pyx_t_1);
12443 __pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler = __Pyx_ImportType(__pyx_t_1, "OpenGL_accelerate.formathandler", "FormatHandler", sizeof(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler), __Pyx_ImportType_CheckSize_Warn);
12444 if (!__pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler) __PYX_ERR(0, 1, __pyx_L1_error)
12445 __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_ERR(0, 1, __pyx_L1_error)
12446 __pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOHandler = &__pyx_vtable_17OpenGL_accelerate_3vbo_VBOHandler;
12447 __pyx_vtable_17OpenGL_accelerate_3vbo_VBOHandler.__pyx_base = *__pyx_vtabptr_17OpenGL_accelerate_13formathandler_FormatHandler;
12448 __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;
12449 __pyx_vtable_17OpenGL_accelerate_3vbo_VBOHandler.__pyx_base.c_dataPointer = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *))__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_dataPointer;
12450 __pyx_vtable_17OpenGL_accelerate_3vbo_VBOHandler.__pyx_base.c_arraySize = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_arraySize;
12451 __pyx_vtable_17OpenGL_accelerate_3vbo_VBOHandler.__pyx_base.c_arrayByteCount = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *))__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_arrayByteCount;
12452 __pyx_vtable_17OpenGL_accelerate_3vbo_VBOHandler.__pyx_base.c_arrayToGLType = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *))__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_arrayToGLType;
12453 __pyx_vtable_17OpenGL_accelerate_3vbo_VBOHandler.__pyx_base.c_asArray = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_asArray;
12454 __pyx_vtable_17OpenGL_accelerate_3vbo_VBOHandler.__pyx_base.c_unitSize = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *, PyObject *))__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_unitSize;
12455 __pyx_vtable_17OpenGL_accelerate_3vbo_VBOHandler.__pyx_base.c_dimensions = (PyObject *(*)(struct __pyx_obj_17OpenGL_accelerate_13formathandler_FormatHandler *, PyObject *))__pyx_f_17OpenGL_accelerate_3vbo_10VBOHandler_c_dimensions;
12456 __pyx_type_17OpenGL_accelerate_3vbo_VBOHandler.tp_base = __pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler;
12457 if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_3vbo_VBOHandler) < 0) __PYX_ERR(0, 290, __pyx_L1_error)
12458 #if PY_VERSION_HEX < 0x030800B1
12459 __pyx_type_17OpenGL_accelerate_3vbo_VBOHandler.tp_print = 0;
12460 #endif
12461 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_17OpenGL_accelerate_3vbo_VBOHandler.tp_dictoffset && __pyx_type_17OpenGL_accelerate_3vbo_VBOHandler.tp_getattro == PyObject_GenericGetAttr)) {
12462 __pyx_type_17OpenGL_accelerate_3vbo_VBOHandler.tp_getattro = __Pyx_PyObject_GenericGetAttr;
12463 }
12464 if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_3vbo_VBOHandler.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOHandler) < 0) __PYX_ERR(0, 290, __pyx_L1_error)
12465 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VBOHandler, (PyObject *)&__pyx_type_17OpenGL_accelerate_3vbo_VBOHandler) < 0) __PYX_ERR(0, 290, __pyx_L1_error)
12466 if (__Pyx_setup_reduce((PyObject*)&__pyx_type_17OpenGL_accelerate_3vbo_VBOHandler) < 0) __PYX_ERR(0, 290, __pyx_L1_error)
12467 __pyx_ptype_17OpenGL_accelerate_3vbo_VBOHandler = &__pyx_type_17OpenGL_accelerate_3vbo_VBOHandler;
12468 __pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOOffsetHandler = &__pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffsetHandler;
12469 __pyx_vtable_17OpenGL_accelerate_3vbo_VBOOffsetHandler.__pyx_base = *__pyx_vtabptr_17OpenGL_accelerate_13formathandler_FormatHandler;
12470 __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;
12471 __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;
12472 __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;
12473 __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;
12474 __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;
12475 __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;
12476 __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;
12477 __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;
12478 __pyx_type_17OpenGL_accelerate_3vbo_VBOOffsetHandler.tp_base = __pyx_ptype_17OpenGL_accelerate_13formathandler_FormatHandler;
12479 if (PyType_Ready(&__pyx_type_17OpenGL_accelerate_3vbo_VBOOffsetHandler) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
12480 #if PY_VERSION_HEX < 0x030800B1
12481 __pyx_type_17OpenGL_accelerate_3vbo_VBOOffsetHandler.tp_print = 0;
12482 #endif
12483 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_17OpenGL_accelerate_3vbo_VBOOffsetHandler.tp_dictoffset && __pyx_type_17OpenGL_accelerate_3vbo_VBOOffsetHandler.tp_getattro == PyObject_GenericGetAttr)) {
12484 __pyx_type_17OpenGL_accelerate_3vbo_VBOOffsetHandler.tp_getattro = __Pyx_PyObject_GenericGetAttr;
12485 }
12486 if (__Pyx_SetVtable(__pyx_type_17OpenGL_accelerate_3vbo_VBOOffsetHandler.tp_dict, __pyx_vtabptr_17OpenGL_accelerate_3vbo_VBOOffsetHandler) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
12487 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VBOOffsetHandler, (PyObject *)&__pyx_type_17OpenGL_accelerate_3vbo_VBOOffsetHandler) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
12488 if (__Pyx_setup_reduce((PyObject*)&__pyx_type_17OpenGL_accelerate_3vbo_VBOOffsetHandler) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
12489 __pyx_ptype_17OpenGL_accelerate_3vbo_VBOOffsetHandler = &__pyx_type_17OpenGL_accelerate_3vbo_VBOOffsetHandler;
12490 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12491 __Pyx_RefNannyFinishContext();
12492 return 0;
12493 __pyx_L1_error:;
12494 __Pyx_XDECREF(__pyx_t_1);
12495 __Pyx_RefNannyFinishContext();
12496 return -1;
12497 }
12498
__Pyx_modinit_type_import_code(void)12499 static int __Pyx_modinit_type_import_code(void) {
12500 __Pyx_RefNannyDeclarations
12501 __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
12502 /*--- Type import code ---*/
12503 __Pyx_RefNannyFinishContext();
12504 return 0;
12505 }
12506
__Pyx_modinit_variable_import_code(void)12507 static int __Pyx_modinit_variable_import_code(void) {
12508 __Pyx_RefNannyDeclarations
12509 __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
12510 /*--- Variable import code ---*/
12511 __Pyx_RefNannyFinishContext();
12512 return 0;
12513 }
12514
__Pyx_modinit_function_import_code(void)12515 static int __Pyx_modinit_function_import_code(void) {
12516 __Pyx_RefNannyDeclarations
12517 __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
12518 /*--- Function import code ---*/
12519 __Pyx_RefNannyFinishContext();
12520 return 0;
12521 }
12522
12523
12524 #if PY_MAJOR_VERSION < 3
12525 #ifdef CYTHON_NO_PYINIT_EXPORT
12526 #define __Pyx_PyMODINIT_FUNC void
12527 #else
12528 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
12529 #endif
12530 #else
12531 #ifdef CYTHON_NO_PYINIT_EXPORT
12532 #define __Pyx_PyMODINIT_FUNC PyObject *
12533 #else
12534 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
12535 #endif
12536 #endif
12537
12538
12539 #if PY_MAJOR_VERSION < 3
12540 __Pyx_PyMODINIT_FUNC initvbo(void) CYTHON_SMALL_CODE; /*proto*/
initvbo(void)12541 __Pyx_PyMODINIT_FUNC initvbo(void)
12542 #else
12543 __Pyx_PyMODINIT_FUNC PyInit_vbo(void) CYTHON_SMALL_CODE; /*proto*/
12544 __Pyx_PyMODINIT_FUNC PyInit_vbo(void)
12545 #if CYTHON_PEP489_MULTI_PHASE_INIT
12546 {
12547 return PyModuleDef_Init(&__pyx_moduledef);
12548 }
12549 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
12550 #if PY_VERSION_HEX >= 0x030700A1
12551 static PY_INT64_T main_interpreter_id = -1;
12552 PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
12553 if (main_interpreter_id == -1) {
12554 main_interpreter_id = current_id;
12555 return (unlikely(current_id == -1)) ? -1 : 0;
12556 } else if (unlikely(main_interpreter_id != current_id))
12557 #else
12558 static PyInterpreterState *main_interpreter = NULL;
12559 PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
12560 if (!main_interpreter) {
12561 main_interpreter = current_interpreter;
12562 } else if (unlikely(main_interpreter != current_interpreter))
12563 #endif
12564 {
12565 PyErr_SetString(
12566 PyExc_ImportError,
12567 "Interpreter change detected - this module can only be loaded into one interpreter per process.");
12568 return -1;
12569 }
12570 return 0;
12571 }
12572 static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
12573 PyObject *value = PyObject_GetAttrString(spec, from_name);
12574 int result = 0;
12575 if (likely(value)) {
12576 if (allow_none || value != Py_None) {
12577 result = PyDict_SetItemString(moddict, to_name, value);
12578 }
12579 Py_DECREF(value);
12580 } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
12581 PyErr_Clear();
12582 } else {
12583 result = -1;
12584 }
12585 return result;
12586 }
12587 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
12588 PyObject *module = NULL, *moddict, *modname;
12589 if (__Pyx_check_single_interpreter())
12590 return NULL;
12591 if (__pyx_m)
12592 return __Pyx_NewRef(__pyx_m);
12593 modname = PyObject_GetAttrString(spec, "name");
12594 if (unlikely(!modname)) goto bad;
12595 module = PyModule_NewObject(modname);
12596 Py_DECREF(modname);
12597 if (unlikely(!module)) goto bad;
12598 moddict = PyModule_GetDict(module);
12599 if (unlikely(!moddict)) goto bad;
12600 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
12601 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
12602 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
12603 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
12604 return module;
12605 bad:
12606 Py_XDECREF(module);
12607 return NULL;
12608 }
12609
12610
12611 static CYTHON_SMALL_CODE int __pyx_pymod_exec_vbo(PyObject *__pyx_pyinit_module)
12612 #endif
12613 #endif
12614 {
12615 PyObject *__pyx_t_1 = NULL;
12616 PyObject *__pyx_t_2 = NULL;
12617 __Pyx_RefNannyDeclarations
12618 #if CYTHON_PEP489_MULTI_PHASE_INIT
12619 if (__pyx_m) {
12620 if (__pyx_m == __pyx_pyinit_module) return 0;
12621 PyErr_SetString(PyExc_RuntimeError, "Module 'vbo' has already been imported. Re-initialisation is not supported.");
12622 return -1;
12623 }
12624 #elif PY_MAJOR_VERSION >= 3
12625 if (__pyx_m) return __Pyx_NewRef(__pyx_m);
12626 #endif
12627 #if CYTHON_REFNANNY
12628 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
12629 if (!__Pyx_RefNanny) {
12630 PyErr_Clear();
12631 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
12632 if (!__Pyx_RefNanny)
12633 Py_FatalError("failed to import 'refnanny' module");
12634 }
12635 #endif
12636 __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_vbo(void)", 0);
12637 if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12638 #ifdef __Pxy_PyFrame_Initialize_Offsets
12639 __Pxy_PyFrame_Initialize_Offsets();
12640 #endif
12641 __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
12642 __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
12643 __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
12644 #ifdef __Pyx_CyFunction_USED
12645 if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12646 #endif
12647 #ifdef __Pyx_FusedFunction_USED
12648 if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12649 #endif
12650 #ifdef __Pyx_Coroutine_USED
12651 if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12652 #endif
12653 #ifdef __Pyx_Generator_USED
12654 if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12655 #endif
12656 #ifdef __Pyx_AsyncGen_USED
12657 if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12658 #endif
12659 #ifdef __Pyx_StopAsyncIteration_USED
12660 if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12661 #endif
12662 /*--- Library function declarations ---*/
12663 /*--- Threads initialization code ---*/
12664 #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
12665 #ifdef WITH_THREAD /* Python build with threading support? */
12666 PyEval_InitThreads();
12667 #endif
12668 #endif
12669 /*--- Module creation code ---*/
12670 #if CYTHON_PEP489_MULTI_PHASE_INIT
12671 __pyx_m = __pyx_pyinit_module;
12672 Py_INCREF(__pyx_m);
12673 #else
12674 #if PY_MAJOR_VERSION < 3
12675 __pyx_m = Py_InitModule4("vbo", __pyx_methods, __pyx_k_Cython_coded_VBO_implementation, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
12676 #else
12677 __pyx_m = PyModule_Create(&__pyx_moduledef);
12678 #endif
12679 if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
12680 #endif
12681 __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
12682 Py_INCREF(__pyx_d);
12683 __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
12684 Py_INCREF(__pyx_b);
12685 __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
12686 Py_INCREF(__pyx_cython_runtime);
12687 if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
12688 /*--- Initialize various global constants etc. ---*/
12689 if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12690 #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
12691 if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12692 #endif
12693 if (__pyx_module_is_main_OpenGL_accelerate__vbo) {
12694 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12695 }
12696 #if PY_MAJOR_VERSION >= 3
12697 {
12698 PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
12699 if (!PyDict_GetItemString(modules, "OpenGL_accelerate.vbo")) {
12700 if (unlikely(PyDict_SetItemString(modules, "OpenGL_accelerate.vbo", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
12701 }
12702 }
12703 #endif
12704 /*--- Builtin init code ---*/
12705 if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error;
12706 /*--- Constants init code ---*/
12707 if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error;
12708 /*--- Global type/function init code ---*/
12709 (void)__Pyx_modinit_global_init_code();
12710 (void)__Pyx_modinit_variable_export_code();
12711 (void)__Pyx_modinit_function_export_code();
12712 if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
12713 (void)__Pyx_modinit_type_import_code();
12714 (void)__Pyx_modinit_variable_import_code();
12715 (void)__Pyx_modinit_function_import_code();
12716 /*--- Execution code ---*/
12717 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
12718 if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12719 #endif
12720
12721 /* "src/vbo.pyx":2
12722 * """Cython-coded VBO implementation"""
12723 * import ctypes, weakref # <<<<<<<<<<<<<<
12724 * from OpenGL_accelerate.formathandler cimport FormatHandler
12725 * from OpenGL import error
12726 */
12727 __pyx_t_1 = __Pyx_Import(__pyx_n_s_ctypes, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
12728 __Pyx_GOTREF(__pyx_t_1);
12729 if (PyDict_SetItem(__pyx_d, __pyx_n_s_ctypes, __pyx_t_1) < 0) __PYX_ERR(0, 2, __pyx_L1_error)
12730 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12731 __pyx_t_1 = __Pyx_Import(__pyx_n_s_weakref, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
12732 __Pyx_GOTREF(__pyx_t_1);
12733 if (PyDict_SetItem(__pyx_d, __pyx_n_s_weakref, __pyx_t_1) < 0) __PYX_ERR(0, 2, __pyx_L1_error)
12734 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12735
12736 /* "src/vbo.pyx":4
12737 * import ctypes, weakref
12738 * from OpenGL_accelerate.formathandler cimport FormatHandler
12739 * from OpenGL import error # <<<<<<<<<<<<<<
12740 * from OpenGL._bytes import bytes,unicode
12741 *
12742 */
12743 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
12744 __Pyx_GOTREF(__pyx_t_1);
12745 __Pyx_INCREF(__pyx_n_s_error);
12746 __Pyx_GIVEREF(__pyx_n_s_error);
12747 PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_error);
12748 __pyx_t_2 = __Pyx_Import(__pyx_n_s_OpenGL, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4, __pyx_L1_error)
12749 __Pyx_GOTREF(__pyx_t_2);
12750 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12751 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
12752 __Pyx_GOTREF(__pyx_t_1);
12753 if (PyDict_SetItem(__pyx_d, __pyx_n_s_error, __pyx_t_1) < 0) __PYX_ERR(0, 4, __pyx_L1_error)
12754 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12755 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12756
12757 /* "src/vbo.pyx":5
12758 * from OpenGL_accelerate.formathandler cimport FormatHandler
12759 * from OpenGL import error
12760 * from OpenGL._bytes import bytes,unicode # <<<<<<<<<<<<<<
12761 *
12762 * cdef extern from "Python.h":
12763 */
12764 __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error)
12765 __Pyx_GOTREF(__pyx_t_2);
12766 __Pyx_INCREF(__pyx_n_s_bytes);
12767 __Pyx_GIVEREF(__pyx_n_s_bytes);
12768 PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_bytes);
12769 __Pyx_INCREF(__pyx_n_s_unicode);
12770 __Pyx_GIVEREF(__pyx_n_s_unicode);
12771 PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_unicode);
12772 __pyx_t_1 = __Pyx_Import(__pyx_n_s_OpenGL__bytes, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error)
12773 __Pyx_GOTREF(__pyx_t_1);
12774 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12775 __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_bytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error)
12776 __Pyx_GOTREF(__pyx_t_2);
12777 if (PyDict_SetItem(__pyx_d, __pyx_n_s_bytes, __pyx_t_2) < 0) __PYX_ERR(0, 5, __pyx_L1_error)
12778 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12779 __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error)
12780 __Pyx_GOTREF(__pyx_t_2);
12781 if (PyDict_SetItem(__pyx_d, __pyx_n_s_unicode, __pyx_t_2) < 0) __PYX_ERR(0, 5, __pyx_L1_error)
12782 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12783 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12784
12785 /* "src/vbo.pyx":11
12786 * cdef void Py_XDECREF( object )
12787 *
12788 * _NULL = object() # <<<<<<<<<<<<<<
12789 *
12790 * cdef class VBO:
12791 */
12792 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_object); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error)
12793 __Pyx_GOTREF(__pyx_t_1);
12794 if (PyDict_SetItem(__pyx_d, __pyx_n_s_NULL, __pyx_t_1) < 0) __PYX_ERR(0, 11, __pyx_L1_error)
12795 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12796
12797 /* "src/vbo.pyx":48
12798 * cdef public object _I_
12799 * cdef public object arrayType
12800 * _no_cache_ = True # do not cache in context data arrays # <<<<<<<<<<<<<<
12801 * def __init__(
12802 * self, data, usage='GL_DYNAMIC_DRAW',
12803 */
12804 if (PyDict_SetItem((PyObject *)__pyx_ptype_17OpenGL_accelerate_3vbo_VBO->tp_dict, __pyx_n_s_no_cache, Py_True) < 0) __PYX_ERR(0, 48, __pyx_L1_error)
12805 PyType_Modified(__pyx_ptype_17OpenGL_accelerate_3vbo_VBO);
12806
12807 /* "src/vbo.pyx":250
12808 * raise RuntimeError( """Attempting to use a deleted VBO""" )
12809 *
12810 * __enter__ = bind # <<<<<<<<<<<<<<
12811 * def __exit__( self, exc_type=None, exc_val=None, exc_tb=None ):
12812 * """Context manager exit"""
12813 */
12814 __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_17OpenGL_accelerate_3vbo_VBO, __pyx_n_s_bind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error)
12815 __Pyx_GOTREF(__pyx_t_1);
12816 if (PyDict_SetItem((PyObject *)__pyx_ptype_17OpenGL_accelerate_3vbo_VBO->tp_dict, __pyx_n_s_enter, __pyx_t_1) < 0) __PYX_ERR(0, 250, __pyx_L1_error)
12817 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12818 PyType_Modified(__pyx_ptype_17OpenGL_accelerate_3vbo_VBO);
12819
12820 /* "src/vbo.pyx":294
12821 * cdef object vp0
12822 * cdef object arrayType # import and use explicit reference...
12823 * isOutput = False # <<<<<<<<<<<<<<
12824 * def __init__( self ):
12825 * self.vp0 = ctypes.c_void_p( 0 )
12826 */
12827 if (PyDict_SetItem((PyObject *)__pyx_ptype_17OpenGL_accelerate_3vbo_VBOHandler->tp_dict, __pyx_n_s_isOutput, Py_False) < 0) __PYX_ERR(0, 294, __pyx_L1_error)
12828 PyType_Modified(__pyx_ptype_17OpenGL_accelerate_3vbo_VBOHandler);
12829
12830 /* "src/vbo.pyx":334
12831 * cdef class VBOOffsetHandler(FormatHandler):
12832 * cdef object arrayType # import and use explicit reference...
12833 * isOutput = False # <<<<<<<<<<<<<<
12834 * def __init__( self ):
12835 * from OpenGL.arrays.arraydatatype import ArrayDatatype
12836 */
12837 if (PyDict_SetItem((PyObject *)__pyx_ptype_17OpenGL_accelerate_3vbo_VBOOffsetHandler->tp_dict, __pyx_n_s_isOutput, Py_False) < 0) __PYX_ERR(0, 334, __pyx_L1_error)
12838 PyType_Modified(__pyx_ptype_17OpenGL_accelerate_3vbo_VBOOffsetHandler);
12839
12840 /* "(tree fragment)":1
12841 * def __pyx_unpickle_VBO(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
12842 * cdef object __pyx_PickleError
12843 * cdef object __pyx_result
12844 */
12845 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_17OpenGL_accelerate_3vbo_1__pyx_unpickle_VBO, NULL, __pyx_n_s_OpenGL_accelerate_vbo); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
12846 __Pyx_GOTREF(__pyx_t_1);
12847 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_VBO, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
12848 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12849
12850 /* "(tree fragment)":11
12851 * __pyx_unpickle_VBO__set_state(<VBO> __pyx_result, __pyx_state)
12852 * return __pyx_result
12853 * cdef __pyx_unpickle_VBO__set_state(VBO __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
12854 * __pyx_result._I_ = __pyx_state[0]; __pyx_result._copy_segments = __pyx_state[1]; __pyx_result.arrayType = __pyx_state[2]; __pyx_result.buffer = __pyx_state[3]; __pyx_result.copied = __pyx_state[4]; __pyx_result.created = __pyx_state[5]; __pyx_result.data = __pyx_state[6]; __pyx_result.resolved = __pyx_state[7]; __pyx_result.size = __pyx_state[8]; __pyx_result.target = __pyx_state[9]; __pyx_result.target_spec = __pyx_state[10]; __pyx_result.usage = __pyx_state[11]; __pyx_result.usage_spec = __pyx_state[12]
12855 * if len(__pyx_state) > 13 and hasattr(__pyx_result, '__dict__'):
12856 */
12857 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_17OpenGL_accelerate_3vbo_3__pyx_unpickle_VBOHandler, NULL, __pyx_n_s_OpenGL_accelerate_vbo); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
12858 __Pyx_GOTREF(__pyx_t_1);
12859 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_VBOHandler, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
12860 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12861
12862 /* "(tree fragment)":1
12863 * def __pyx_unpickle_VBOOffsetHandler(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
12864 * cdef object __pyx_PickleError
12865 * cdef object __pyx_result
12866 */
12867 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_17OpenGL_accelerate_3vbo_5__pyx_unpickle_VBOOffsetHandler, NULL, __pyx_n_s_OpenGL_accelerate_vbo); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
12868 __Pyx_GOTREF(__pyx_t_1);
12869 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_VBOOffsetHandler, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
12870 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12871
12872 /* "src/vbo.pyx":1
12873 * """Cython-coded VBO implementation""" # <<<<<<<<<<<<<<
12874 * import ctypes, weakref
12875 * from OpenGL_accelerate.formathandler cimport FormatHandler
12876 */
12877 __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
12878 __Pyx_GOTREF(__pyx_t_1);
12879 if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12880 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12881
12882 /*--- Wrapped vars code ---*/
12883
12884 goto __pyx_L0;
12885 __pyx_L1_error:;
12886 __Pyx_XDECREF(__pyx_t_1);
12887 __Pyx_XDECREF(__pyx_t_2);
12888 if (__pyx_m) {
12889 if (__pyx_d) {
12890 __Pyx_AddTraceback("init OpenGL_accelerate.vbo", __pyx_clineno, __pyx_lineno, __pyx_filename);
12891 }
12892 Py_CLEAR(__pyx_m);
12893 } else if (!PyErr_Occurred()) {
12894 PyErr_SetString(PyExc_ImportError, "init OpenGL_accelerate.vbo");
12895 }
12896 __pyx_L0:;
12897 __Pyx_RefNannyFinishContext();
12898 #if CYTHON_PEP489_MULTI_PHASE_INIT
12899 return (__pyx_m != NULL) ? 0 : -1;
12900 #elif PY_MAJOR_VERSION >= 3
12901 return __pyx_m;
12902 #else
12903 return;
12904 #endif
12905 }
12906
12907 /* --- Runtime support code --- */
12908 /* Refnanny */
12909 #if CYTHON_REFNANNY
__Pyx_RefNannyImportAPI(const char * modname)12910 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
12911 PyObject *m = NULL, *p = NULL;
12912 void *r = NULL;
12913 m = PyImport_ImportModule(modname);
12914 if (!m) goto end;
12915 p = PyObject_GetAttrString(m, "RefNannyAPI");
12916 if (!p) goto end;
12917 r = PyLong_AsVoidPtr(p);
12918 end:
12919 Py_XDECREF(p);
12920 Py_XDECREF(m);
12921 return (__Pyx_RefNannyAPIStruct *)r;
12922 }
12923 #endif
12924
12925 /* PyObjectGetAttrStr */
12926 #if CYTHON_USE_TYPE_SLOTS
__Pyx_PyObject_GetAttrStr(PyObject * obj,PyObject * attr_name)12927 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
12928 PyTypeObject* tp = Py_TYPE(obj);
12929 if (likely(tp->tp_getattro))
12930 return tp->tp_getattro(obj, attr_name);
12931 #if PY_MAJOR_VERSION < 3
12932 if (likely(tp->tp_getattr))
12933 return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
12934 #endif
12935 return PyObject_GetAttr(obj, attr_name);
12936 }
12937 #endif
12938
12939 /* GetBuiltinName */
__Pyx_GetBuiltinName(PyObject * name)12940 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
12941 PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
12942 if (unlikely(!result)) {
12943 PyErr_Format(PyExc_NameError,
12944 #if PY_MAJOR_VERSION >= 3
12945 "name '%U' is not defined", name);
12946 #else
12947 "name '%.200s' is not defined", PyString_AS_STRING(name));
12948 #endif
12949 }
12950 return result;
12951 }
12952
12953 /* RaiseDoubleKeywords */
__Pyx_RaiseDoubleKeywordsError(const char * func_name,PyObject * kw_name)12954 static void __Pyx_RaiseDoubleKeywordsError(
12955 const char* func_name,
12956 PyObject* kw_name)
12957 {
12958 PyErr_Format(PyExc_TypeError,
12959 #if PY_MAJOR_VERSION >= 3
12960 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
12961 #else
12962 "%s() got multiple values for keyword argument '%s'", func_name,
12963 PyString_AsString(kw_name));
12964 #endif
12965 }
12966
12967 /* ParseKeywords */
__Pyx_ParseOptionalKeywords(PyObject * kwds,PyObject ** argnames[],PyObject * kwds2,PyObject * values[],Py_ssize_t num_pos_args,const char * function_name)12968 static int __Pyx_ParseOptionalKeywords(
12969 PyObject *kwds,
12970 PyObject **argnames[],
12971 PyObject *kwds2,
12972 PyObject *values[],
12973 Py_ssize_t num_pos_args,
12974 const char* function_name)
12975 {
12976 PyObject *key = 0, *value = 0;
12977 Py_ssize_t pos = 0;
12978 PyObject*** name;
12979 PyObject*** first_kw_arg = argnames + num_pos_args;
12980 while (PyDict_Next(kwds, &pos, &key, &value)) {
12981 name = first_kw_arg;
12982 while (*name && (**name != key)) name++;
12983 if (*name) {
12984 values[name-argnames] = value;
12985 continue;
12986 }
12987 name = first_kw_arg;
12988 #if PY_MAJOR_VERSION < 3
12989 if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
12990 while (*name) {
12991 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
12992 && _PyString_Eq(**name, key)) {
12993 values[name-argnames] = value;
12994 break;
12995 }
12996 name++;
12997 }
12998 if (*name) continue;
12999 else {
13000 PyObject*** argname = argnames;
13001 while (argname != first_kw_arg) {
13002 if ((**argname == key) || (
13003 (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
13004 && _PyString_Eq(**argname, key))) {
13005 goto arg_passed_twice;
13006 }
13007 argname++;
13008 }
13009 }
13010 } else
13011 #endif
13012 if (likely(PyUnicode_Check(key))) {
13013 while (*name) {
13014 int cmp = (**name == key) ? 0 :
13015 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
13016 (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
13017 #endif
13018 PyUnicode_Compare(**name, key);
13019 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
13020 if (cmp == 0) {
13021 values[name-argnames] = value;
13022 break;
13023 }
13024 name++;
13025 }
13026 if (*name) continue;
13027 else {
13028 PyObject*** argname = argnames;
13029 while (argname != first_kw_arg) {
13030 int cmp = (**argname == key) ? 0 :
13031 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
13032 (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
13033 #endif
13034 PyUnicode_Compare(**argname, key);
13035 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
13036 if (cmp == 0) goto arg_passed_twice;
13037 argname++;
13038 }
13039 }
13040 } else
13041 goto invalid_keyword_type;
13042 if (kwds2) {
13043 if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
13044 } else {
13045 goto invalid_keyword;
13046 }
13047 }
13048 return 0;
13049 arg_passed_twice:
13050 __Pyx_RaiseDoubleKeywordsError(function_name, key);
13051 goto bad;
13052 invalid_keyword_type:
13053 PyErr_Format(PyExc_TypeError,
13054 "%.200s() keywords must be strings", function_name);
13055 goto bad;
13056 invalid_keyword:
13057 PyErr_Format(PyExc_TypeError,
13058 #if PY_MAJOR_VERSION < 3
13059 "%.200s() got an unexpected keyword argument '%.200s'",
13060 function_name, PyString_AsString(key));
13061 #else
13062 "%s() got an unexpected keyword argument '%U'",
13063 function_name, key);
13064 #endif
13065 bad:
13066 return -1;
13067 }
13068
13069 /* RaiseArgTupleInvalid */
__Pyx_RaiseArgtupleInvalid(const char * func_name,int exact,Py_ssize_t num_min,Py_ssize_t num_max,Py_ssize_t num_found)13070 static void __Pyx_RaiseArgtupleInvalid(
13071 const char* func_name,
13072 int exact,
13073 Py_ssize_t num_min,
13074 Py_ssize_t num_max,
13075 Py_ssize_t num_found)
13076 {
13077 Py_ssize_t num_expected;
13078 const char *more_or_less;
13079 if (num_found < num_min) {
13080 num_expected = num_min;
13081 more_or_less = "at least";
13082 } else {
13083 num_expected = num_max;
13084 more_or_less = "at most";
13085 }
13086 if (exact) {
13087 more_or_less = "exactly";
13088 }
13089 PyErr_Format(PyExc_TypeError,
13090 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
13091 func_name, more_or_less, num_expected,
13092 (num_expected == 1) ? "" : "s", num_found);
13093 }
13094
13095 /* Import */
__Pyx_Import(PyObject * name,PyObject * from_list,int level)13096 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
13097 PyObject *empty_list = 0;
13098 PyObject *module = 0;
13099 PyObject *global_dict = 0;
13100 PyObject *empty_dict = 0;
13101 PyObject *list;
13102 #if PY_MAJOR_VERSION < 3
13103 PyObject *py_import;
13104 py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
13105 if (!py_import)
13106 goto bad;
13107 #endif
13108 if (from_list)
13109 list = from_list;
13110 else {
13111 empty_list = PyList_New(0);
13112 if (!empty_list)
13113 goto bad;
13114 list = empty_list;
13115 }
13116 global_dict = PyModule_GetDict(__pyx_m);
13117 if (!global_dict)
13118 goto bad;
13119 empty_dict = PyDict_New();
13120 if (!empty_dict)
13121 goto bad;
13122 {
13123 #if PY_MAJOR_VERSION >= 3
13124 if (level == -1) {
13125 if (strchr(__Pyx_MODULE_NAME, '.')) {
13126 module = PyImport_ImportModuleLevelObject(
13127 name, global_dict, empty_dict, list, 1);
13128 if (!module) {
13129 if (!PyErr_ExceptionMatches(PyExc_ImportError))
13130 goto bad;
13131 PyErr_Clear();
13132 }
13133 }
13134 level = 0;
13135 }
13136 #endif
13137 if (!module) {
13138 #if PY_MAJOR_VERSION < 3
13139 PyObject *py_level = PyInt_FromLong(level);
13140 if (!py_level)
13141 goto bad;
13142 module = PyObject_CallFunctionObjArgs(py_import,
13143 name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
13144 Py_DECREF(py_level);
13145 #else
13146 module = PyImport_ImportModuleLevelObject(
13147 name, global_dict, empty_dict, list, level);
13148 #endif
13149 }
13150 }
13151 bad:
13152 #if PY_MAJOR_VERSION < 3
13153 Py_XDECREF(py_import);
13154 #endif
13155 Py_XDECREF(empty_list);
13156 Py_XDECREF(empty_dict);
13157 return module;
13158 }
13159
13160 /* ImportFrom */
__Pyx_ImportFrom(PyObject * module,PyObject * name)13161 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
13162 PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
13163 if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
13164 PyErr_Format(PyExc_ImportError,
13165 #if PY_MAJOR_VERSION < 3
13166 "cannot import name %.230s", PyString_AS_STRING(name));
13167 #else
13168 "cannot import name %S", name);
13169 #endif
13170 }
13171 return value;
13172 }
13173
13174 /* PyFunctionFastCall */
13175 #if CYTHON_FAST_PYCALL
__Pyx_PyFunction_FastCallNoKw(PyCodeObject * co,PyObject ** args,Py_ssize_t na,PyObject * globals)13176 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
13177 PyObject *globals) {
13178 PyFrameObject *f;
13179 PyThreadState *tstate = __Pyx_PyThreadState_Current;
13180 PyObject **fastlocals;
13181 Py_ssize_t i;
13182 PyObject *result;
13183 assert(globals != NULL);
13184 /* XXX Perhaps we should create a specialized
13185 PyFrame_New() that doesn't take locals, but does
13186 take builtins without sanity checking them.
13187 */
13188 assert(tstate != NULL);
13189 f = PyFrame_New(tstate, co, globals, NULL);
13190 if (f == NULL) {
13191 return NULL;
13192 }
13193 fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
13194 for (i = 0; i < na; i++) {
13195 Py_INCREF(*args);
13196 fastlocals[i] = *args++;
13197 }
13198 result = PyEval_EvalFrameEx(f,0);
13199 ++tstate->recursion_depth;
13200 Py_DECREF(f);
13201 --tstate->recursion_depth;
13202 return result;
13203 }
13204 #if 1 || PY_VERSION_HEX < 0x030600B1
__Pyx_PyFunction_FastCallDict(PyObject * func,PyObject ** args,Py_ssize_t nargs,PyObject * kwargs)13205 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
13206 PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
13207 PyObject *globals = PyFunction_GET_GLOBALS(func);
13208 PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
13209 PyObject *closure;
13210 #if PY_MAJOR_VERSION >= 3
13211 PyObject *kwdefs;
13212 #endif
13213 PyObject *kwtuple, **k;
13214 PyObject **d;
13215 Py_ssize_t nd;
13216 Py_ssize_t nk;
13217 PyObject *result;
13218 assert(kwargs == NULL || PyDict_Check(kwargs));
13219 nk = kwargs ? PyDict_Size(kwargs) : 0;
13220 if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
13221 return NULL;
13222 }
13223 if (
13224 #if PY_MAJOR_VERSION >= 3
13225 co->co_kwonlyargcount == 0 &&
13226 #endif
13227 likely(kwargs == NULL || nk == 0) &&
13228 co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
13229 if (argdefs == NULL && co->co_argcount == nargs) {
13230 result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
13231 goto done;
13232 }
13233 else if (nargs == 0 && argdefs != NULL
13234 && co->co_argcount == Py_SIZE(argdefs)) {
13235 /* function called with no arguments, but all parameters have
13236 a default value: use default values as arguments .*/
13237 args = &PyTuple_GET_ITEM(argdefs, 0);
13238 result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
13239 goto done;
13240 }
13241 }
13242 if (kwargs != NULL) {
13243 Py_ssize_t pos, i;
13244 kwtuple = PyTuple_New(2 * nk);
13245 if (kwtuple == NULL) {
13246 result = NULL;
13247 goto done;
13248 }
13249 k = &PyTuple_GET_ITEM(kwtuple, 0);
13250 pos = i = 0;
13251 while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
13252 Py_INCREF(k[i]);
13253 Py_INCREF(k[i+1]);
13254 i += 2;
13255 }
13256 nk = i / 2;
13257 }
13258 else {
13259 kwtuple = NULL;
13260 k = NULL;
13261 }
13262 closure = PyFunction_GET_CLOSURE(func);
13263 #if PY_MAJOR_VERSION >= 3
13264 kwdefs = PyFunction_GET_KW_DEFAULTS(func);
13265 #endif
13266 if (argdefs != NULL) {
13267 d = &PyTuple_GET_ITEM(argdefs, 0);
13268 nd = Py_SIZE(argdefs);
13269 }
13270 else {
13271 d = NULL;
13272 nd = 0;
13273 }
13274 #if PY_MAJOR_VERSION >= 3
13275 result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
13276 args, (int)nargs,
13277 k, (int)nk,
13278 d, (int)nd, kwdefs, closure);
13279 #else
13280 result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
13281 args, (int)nargs,
13282 k, (int)nk,
13283 d, (int)nd, closure);
13284 #endif
13285 Py_XDECREF(kwtuple);
13286 done:
13287 Py_LeaveRecursiveCall();
13288 return result;
13289 }
13290 #endif
13291 #endif
13292
13293 /* PyObjectCall */
13294 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_PyObject_Call(PyObject * func,PyObject * arg,PyObject * kw)13295 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
13296 PyObject *result;
13297 ternaryfunc call = func->ob_type->tp_call;
13298 if (unlikely(!call))
13299 return PyObject_Call(func, arg, kw);
13300 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
13301 return NULL;
13302 result = (*call)(func, arg, kw);
13303 Py_LeaveRecursiveCall();
13304 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
13305 PyErr_SetString(
13306 PyExc_SystemError,
13307 "NULL result without error in PyObject_Call");
13308 }
13309 return result;
13310 }
13311 #endif
13312
13313 /* PyObjectCallMethO */
13314 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_PyObject_CallMethO(PyObject * func,PyObject * arg)13315 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
13316 PyObject *self, *result;
13317 PyCFunction cfunc;
13318 cfunc = PyCFunction_GET_FUNCTION(func);
13319 self = PyCFunction_GET_SELF(func);
13320 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
13321 return NULL;
13322 result = cfunc(self, arg);
13323 Py_LeaveRecursiveCall();
13324 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
13325 PyErr_SetString(
13326 PyExc_SystemError,
13327 "NULL result without error in PyObject_Call");
13328 }
13329 return result;
13330 }
13331 #endif
13332
13333 /* PyObjectCallNoArg */
13334 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_PyObject_CallNoArg(PyObject * func)13335 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
13336 #if CYTHON_FAST_PYCALL
13337 if (PyFunction_Check(func)) {
13338 return __Pyx_PyFunction_FastCall(func, NULL, 0);
13339 }
13340 #endif
13341 #ifdef __Pyx_CyFunction_USED
13342 if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
13343 #else
13344 if (likely(PyCFunction_Check(func)))
13345 #endif
13346 {
13347 if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
13348 return __Pyx_PyObject_CallMethO(func, NULL);
13349 }
13350 }
13351 return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
13352 }
13353 #endif
13354
13355 /* PyCFunctionFastCall */
13356 #if CYTHON_FAST_PYCCALL
__Pyx_PyCFunction_FastCall(PyObject * func_obj,PyObject ** args,Py_ssize_t nargs)13357 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
13358 PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
13359 PyCFunction meth = PyCFunction_GET_FUNCTION(func);
13360 PyObject *self = PyCFunction_GET_SELF(func);
13361 int flags = PyCFunction_GET_FLAGS(func);
13362 assert(PyCFunction_Check(func));
13363 assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
13364 assert(nargs >= 0);
13365 assert(nargs == 0 || args != NULL);
13366 /* _PyCFunction_FastCallDict() must not be called with an exception set,
13367 because it may clear it (directly or indirectly) and so the
13368 caller loses its exception */
13369 assert(!PyErr_Occurred());
13370 if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
13371 return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
13372 } else {
13373 return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
13374 }
13375 }
13376 #endif
13377
13378 /* PyObjectCallOneArg */
13379 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx__PyObject_CallOneArg(PyObject * func,PyObject * arg)13380 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
13381 PyObject *result;
13382 PyObject *args = PyTuple_New(1);
13383 if (unlikely(!args)) return NULL;
13384 Py_INCREF(arg);
13385 PyTuple_SET_ITEM(args, 0, arg);
13386 result = __Pyx_PyObject_Call(func, args, NULL);
13387 Py_DECREF(args);
13388 return result;
13389 }
__Pyx_PyObject_CallOneArg(PyObject * func,PyObject * arg)13390 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
13391 #if CYTHON_FAST_PYCALL
13392 if (PyFunction_Check(func)) {
13393 return __Pyx_PyFunction_FastCall(func, &arg, 1);
13394 }
13395 #endif
13396 if (likely(PyCFunction_Check(func))) {
13397 if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
13398 return __Pyx_PyObject_CallMethO(func, arg);
13399 #if CYTHON_FAST_PYCCALL
13400 } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
13401 return __Pyx_PyCFunction_FastCall(func, &arg, 1);
13402 #endif
13403 }
13404 }
13405 return __Pyx__PyObject_CallOneArg(func, arg);
13406 }
13407 #else
__Pyx_PyObject_CallOneArg(PyObject * func,PyObject * arg)13408 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
13409 PyObject *result;
13410 PyObject *args = PyTuple_Pack(1, arg);
13411 if (unlikely(!args)) return NULL;
13412 result = __Pyx_PyObject_Call(func, args, NULL);
13413 Py_DECREF(args);
13414 return result;
13415 }
13416 #endif
13417
13418 /* PyDictVersioning */
13419 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
__Pyx_get_tp_dict_version(PyObject * obj)13420 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
13421 PyObject *dict = Py_TYPE(obj)->tp_dict;
13422 return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
13423 }
__Pyx_get_object_dict_version(PyObject * obj)13424 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
13425 PyObject **dictptr = NULL;
13426 Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
13427 if (offset) {
13428 #if CYTHON_COMPILING_IN_CPYTHON
13429 dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
13430 #else
13431 dictptr = _PyObject_GetDictPtr(obj);
13432 #endif
13433 }
13434 return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
13435 }
__Pyx_object_dict_version_matches(PyObject * obj,PY_UINT64_T tp_dict_version,PY_UINT64_T obj_dict_version)13436 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
13437 PyObject *dict = Py_TYPE(obj)->tp_dict;
13438 if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
13439 return 0;
13440 return obj_dict_version == __Pyx_get_object_dict_version(obj);
13441 }
13442 #endif
13443
13444 /* GetModuleGlobalName */
13445 #if CYTHON_USE_DICT_VERSIONS
__Pyx__GetModuleGlobalName(PyObject * name,PY_UINT64_T * dict_version,PyObject ** dict_cached_value)13446 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
13447 #else
13448 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
13449 #endif
13450 {
13451 PyObject *result;
13452 #if !CYTHON_AVOID_BORROWED_REFS
13453 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
13454 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
13455 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
13456 if (likely(result)) {
13457 return __Pyx_NewRef(result);
13458 } else if (unlikely(PyErr_Occurred())) {
13459 return NULL;
13460 }
13461 #else
13462 result = PyDict_GetItem(__pyx_d, name);
13463 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
13464 if (likely(result)) {
13465 return __Pyx_NewRef(result);
13466 }
13467 #endif
13468 #else
13469 result = PyObject_GetItem(__pyx_d, name);
13470 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
13471 if (likely(result)) {
13472 return __Pyx_NewRef(result);
13473 }
13474 PyErr_Clear();
13475 #endif
13476 return __Pyx_GetBuiltinName(name);
13477 }
13478
13479 /* GetAttr */
__Pyx_GetAttr(PyObject * o,PyObject * n)13480 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
13481 #if CYTHON_USE_TYPE_SLOTS
13482 #if PY_MAJOR_VERSION >= 3
13483 if (likely(PyUnicode_Check(n)))
13484 #else
13485 if (likely(PyString_Check(n)))
13486 #endif
13487 return __Pyx_PyObject_GetAttrStr(o, n);
13488 #endif
13489 return PyObject_GetAttr(o, n);
13490 }
13491
13492 /* PyObjectCall2Args */
__Pyx_PyObject_Call2Args(PyObject * function,PyObject * arg1,PyObject * arg2)13493 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
13494 PyObject *args, *result = NULL;
13495 #if CYTHON_FAST_PYCALL
13496 if (PyFunction_Check(function)) {
13497 PyObject *args[2] = {arg1, arg2};
13498 return __Pyx_PyFunction_FastCall(function, args, 2);
13499 }
13500 #endif
13501 #if CYTHON_FAST_PYCCALL
13502 if (__Pyx_PyFastCFunction_Check(function)) {
13503 PyObject *args[2] = {arg1, arg2};
13504 return __Pyx_PyCFunction_FastCall(function, args, 2);
13505 }
13506 #endif
13507 args = PyTuple_New(2);
13508 if (unlikely(!args)) goto done;
13509 Py_INCREF(arg1);
13510 PyTuple_SET_ITEM(args, 0, arg1);
13511 Py_INCREF(arg2);
13512 PyTuple_SET_ITEM(args, 1, arg2);
13513 Py_INCREF(function);
13514 result = __Pyx_PyObject_Call(function, args, NULL);
13515 Py_DECREF(args);
13516 Py_DECREF(function);
13517 done:
13518 return result;
13519 }
13520
13521 /* PyErrFetchRestore */
13522 #if CYTHON_FAST_THREAD_STATE
__Pyx_ErrRestoreInState(PyThreadState * tstate,PyObject * type,PyObject * value,PyObject * tb)13523 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
13524 PyObject *tmp_type, *tmp_value, *tmp_tb;
13525 tmp_type = tstate->curexc_type;
13526 tmp_value = tstate->curexc_value;
13527 tmp_tb = tstate->curexc_traceback;
13528 tstate->curexc_type = type;
13529 tstate->curexc_value = value;
13530 tstate->curexc_traceback = tb;
13531 Py_XDECREF(tmp_type);
13532 Py_XDECREF(tmp_value);
13533 Py_XDECREF(tmp_tb);
13534 }
__Pyx_ErrFetchInState(PyThreadState * tstate,PyObject ** type,PyObject ** value,PyObject ** tb)13535 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
13536 *type = tstate->curexc_type;
13537 *value = tstate->curexc_value;
13538 *tb = tstate->curexc_traceback;
13539 tstate->curexc_type = 0;
13540 tstate->curexc_value = 0;
13541 tstate->curexc_traceback = 0;
13542 }
13543 #endif
13544
13545 /* WriteUnraisableException */
__Pyx_WriteUnraisable(const char * name,CYTHON_UNUSED int clineno,CYTHON_UNUSED int lineno,CYTHON_UNUSED const char * filename,int full_traceback,CYTHON_UNUSED int nogil)13546 static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
13547 CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
13548 int full_traceback, CYTHON_UNUSED int nogil) {
13549 PyObject *old_exc, *old_val, *old_tb;
13550 PyObject *ctx;
13551 __Pyx_PyThreadState_declare
13552 #ifdef WITH_THREAD
13553 PyGILState_STATE state;
13554 if (nogil)
13555 state = PyGILState_Ensure();
13556 #ifdef _MSC_VER
13557 else state = (PyGILState_STATE)-1;
13558 #endif
13559 #endif
13560 __Pyx_PyThreadState_assign
13561 __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
13562 if (full_traceback) {
13563 Py_XINCREF(old_exc);
13564 Py_XINCREF(old_val);
13565 Py_XINCREF(old_tb);
13566 __Pyx_ErrRestore(old_exc, old_val, old_tb);
13567 PyErr_PrintEx(1);
13568 }
13569 #if PY_MAJOR_VERSION < 3
13570 ctx = PyString_FromString(name);
13571 #else
13572 ctx = PyUnicode_FromString(name);
13573 #endif
13574 __Pyx_ErrRestore(old_exc, old_val, old_tb);
13575 if (!ctx) {
13576 PyErr_WriteUnraisable(Py_None);
13577 } else {
13578 PyErr_WriteUnraisable(ctx);
13579 Py_DECREF(ctx);
13580 }
13581 #ifdef WITH_THREAD
13582 if (nogil)
13583 PyGILState_Release(state);
13584 #endif
13585 }
13586
13587 /* PyIntCompare */
__Pyx_PyInt_EqObjC(PyObject * op1,PyObject * op2,CYTHON_UNUSED long intval,CYTHON_UNUSED long inplace)13588 static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
13589 if (op1 == op2) {
13590 Py_RETURN_TRUE;
13591 }
13592 #if PY_MAJOR_VERSION < 3
13593 if (likely(PyInt_CheckExact(op1))) {
13594 const long b = intval;
13595 long a = PyInt_AS_LONG(op1);
13596 if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
13597 }
13598 #endif
13599 #if CYTHON_USE_PYLONG_INTERNALS
13600 if (likely(PyLong_CheckExact(op1))) {
13601 int unequal;
13602 unsigned long uintval;
13603 Py_ssize_t size = Py_SIZE(op1);
13604 const digit* digits = ((PyLongObject*)op1)->ob_digit;
13605 if (intval == 0) {
13606 if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
13607 } else if (intval < 0) {
13608 if (size >= 0)
13609 Py_RETURN_FALSE;
13610 intval = -intval;
13611 size = -size;
13612 } else {
13613 if (size <= 0)
13614 Py_RETURN_FALSE;
13615 }
13616 uintval = (unsigned long) intval;
13617 #if PyLong_SHIFT * 4 < SIZEOF_LONG*8
13618 if (uintval >> (PyLong_SHIFT * 4)) {
13619 unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
13620 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
13621 } else
13622 #endif
13623 #if PyLong_SHIFT * 3 < SIZEOF_LONG*8
13624 if (uintval >> (PyLong_SHIFT * 3)) {
13625 unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
13626 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
13627 } else
13628 #endif
13629 #if PyLong_SHIFT * 2 < SIZEOF_LONG*8
13630 if (uintval >> (PyLong_SHIFT * 2)) {
13631 unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
13632 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
13633 } else
13634 #endif
13635 #if PyLong_SHIFT * 1 < SIZEOF_LONG*8
13636 if (uintval >> (PyLong_SHIFT * 1)) {
13637 unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
13638 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
13639 } else
13640 #endif
13641 unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
13642 if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
13643 }
13644 #endif
13645 if (PyFloat_CheckExact(op1)) {
13646 const long b = intval;
13647 double a = PyFloat_AS_DOUBLE(op1);
13648 if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
13649 }
13650 return (
13651 PyObject_RichCompare(op1, op2, Py_EQ));
13652 }
13653
13654 /* RaiseException */
13655 #if PY_MAJOR_VERSION < 3
__Pyx_Raise(PyObject * type,PyObject * value,PyObject * tb,CYTHON_UNUSED PyObject * cause)13656 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
13657 CYTHON_UNUSED PyObject *cause) {
13658 __Pyx_PyThreadState_declare
13659 Py_XINCREF(type);
13660 if (!value || value == Py_None)
13661 value = NULL;
13662 else
13663 Py_INCREF(value);
13664 if (!tb || tb == Py_None)
13665 tb = NULL;
13666 else {
13667 Py_INCREF(tb);
13668 if (!PyTraceBack_Check(tb)) {
13669 PyErr_SetString(PyExc_TypeError,
13670 "raise: arg 3 must be a traceback or None");
13671 goto raise_error;
13672 }
13673 }
13674 if (PyType_Check(type)) {
13675 #if CYTHON_COMPILING_IN_PYPY
13676 if (!value) {
13677 Py_INCREF(Py_None);
13678 value = Py_None;
13679 }
13680 #endif
13681 PyErr_NormalizeException(&type, &value, &tb);
13682 } else {
13683 if (value) {
13684 PyErr_SetString(PyExc_TypeError,
13685 "instance exception may not have a separate value");
13686 goto raise_error;
13687 }
13688 value = type;
13689 type = (PyObject*) Py_TYPE(type);
13690 Py_INCREF(type);
13691 if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
13692 PyErr_SetString(PyExc_TypeError,
13693 "raise: exception class must be a subclass of BaseException");
13694 goto raise_error;
13695 }
13696 }
13697 __Pyx_PyThreadState_assign
13698 __Pyx_ErrRestore(type, value, tb);
13699 return;
13700 raise_error:
13701 Py_XDECREF(value);
13702 Py_XDECREF(type);
13703 Py_XDECREF(tb);
13704 return;
13705 }
13706 #else
__Pyx_Raise(PyObject * type,PyObject * value,PyObject * tb,PyObject * cause)13707 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
13708 PyObject* owned_instance = NULL;
13709 if (tb == Py_None) {
13710 tb = 0;
13711 } else if (tb && !PyTraceBack_Check(tb)) {
13712 PyErr_SetString(PyExc_TypeError,
13713 "raise: arg 3 must be a traceback or None");
13714 goto bad;
13715 }
13716 if (value == Py_None)
13717 value = 0;
13718 if (PyExceptionInstance_Check(type)) {
13719 if (value) {
13720 PyErr_SetString(PyExc_TypeError,
13721 "instance exception may not have a separate value");
13722 goto bad;
13723 }
13724 value = type;
13725 type = (PyObject*) Py_TYPE(value);
13726 } else if (PyExceptionClass_Check(type)) {
13727 PyObject *instance_class = NULL;
13728 if (value && PyExceptionInstance_Check(value)) {
13729 instance_class = (PyObject*) Py_TYPE(value);
13730 if (instance_class != type) {
13731 int is_subclass = PyObject_IsSubclass(instance_class, type);
13732 if (!is_subclass) {
13733 instance_class = NULL;
13734 } else if (unlikely(is_subclass == -1)) {
13735 goto bad;
13736 } else {
13737 type = instance_class;
13738 }
13739 }
13740 }
13741 if (!instance_class) {
13742 PyObject *args;
13743 if (!value)
13744 args = PyTuple_New(0);
13745 else if (PyTuple_Check(value)) {
13746 Py_INCREF(value);
13747 args = value;
13748 } else
13749 args = PyTuple_Pack(1, value);
13750 if (!args)
13751 goto bad;
13752 owned_instance = PyObject_Call(type, args, NULL);
13753 Py_DECREF(args);
13754 if (!owned_instance)
13755 goto bad;
13756 value = owned_instance;
13757 if (!PyExceptionInstance_Check(value)) {
13758 PyErr_Format(PyExc_TypeError,
13759 "calling %R should have returned an instance of "
13760 "BaseException, not %R",
13761 type, Py_TYPE(value));
13762 goto bad;
13763 }
13764 }
13765 } else {
13766 PyErr_SetString(PyExc_TypeError,
13767 "raise: exception class must be a subclass of BaseException");
13768 goto bad;
13769 }
13770 if (cause) {
13771 PyObject *fixed_cause;
13772 if (cause == Py_None) {
13773 fixed_cause = NULL;
13774 } else if (PyExceptionClass_Check(cause)) {
13775 fixed_cause = PyObject_CallObject(cause, NULL);
13776 if (fixed_cause == NULL)
13777 goto bad;
13778 } else if (PyExceptionInstance_Check(cause)) {
13779 fixed_cause = cause;
13780 Py_INCREF(fixed_cause);
13781 } else {
13782 PyErr_SetString(PyExc_TypeError,
13783 "exception causes must derive from "
13784 "BaseException");
13785 goto bad;
13786 }
13787 PyException_SetCause(value, fixed_cause);
13788 }
13789 PyErr_SetObject(type, value);
13790 if (tb) {
13791 #if CYTHON_COMPILING_IN_PYPY
13792 PyObject *tmp_type, *tmp_value, *tmp_tb;
13793 PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
13794 Py_INCREF(tb);
13795 PyErr_Restore(tmp_type, tmp_value, tb);
13796 Py_XDECREF(tmp_tb);
13797 #else
13798 PyThreadState *tstate = __Pyx_PyThreadState_Current;
13799 PyObject* tmp_tb = tstate->curexc_traceback;
13800 if (tb != tmp_tb) {
13801 Py_INCREF(tb);
13802 tstate->curexc_traceback = tb;
13803 Py_XDECREF(tmp_tb);
13804 }
13805 #endif
13806 }
13807 bad:
13808 Py_XDECREF(owned_instance);
13809 return;
13810 }
13811 #endif
13812
13813 /* GetItemInt */
__Pyx_GetItemInt_Generic(PyObject * o,PyObject * j)13814 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
13815 PyObject *r;
13816 if (!j) return NULL;
13817 r = PyObject_GetItem(o, j);
13818 Py_DECREF(j);
13819 return r;
13820 }
__Pyx_GetItemInt_List_Fast(PyObject * o,Py_ssize_t i,CYTHON_NCP_UNUSED int wraparound,CYTHON_NCP_UNUSED int boundscheck)13821 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
13822 CYTHON_NCP_UNUSED int wraparound,
13823 CYTHON_NCP_UNUSED int boundscheck) {
13824 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13825 Py_ssize_t wrapped_i = i;
13826 if (wraparound & unlikely(i < 0)) {
13827 wrapped_i += PyList_GET_SIZE(o);
13828 }
13829 if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
13830 PyObject *r = PyList_GET_ITEM(o, wrapped_i);
13831 Py_INCREF(r);
13832 return r;
13833 }
13834 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
13835 #else
13836 return PySequence_GetItem(o, i);
13837 #endif
13838 }
__Pyx_GetItemInt_Tuple_Fast(PyObject * o,Py_ssize_t i,CYTHON_NCP_UNUSED int wraparound,CYTHON_NCP_UNUSED int boundscheck)13839 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
13840 CYTHON_NCP_UNUSED int wraparound,
13841 CYTHON_NCP_UNUSED int boundscheck) {
13842 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13843 Py_ssize_t wrapped_i = i;
13844 if (wraparound & unlikely(i < 0)) {
13845 wrapped_i += PyTuple_GET_SIZE(o);
13846 }
13847 if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
13848 PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
13849 Py_INCREF(r);
13850 return r;
13851 }
13852 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
13853 #else
13854 return PySequence_GetItem(o, i);
13855 #endif
13856 }
__Pyx_GetItemInt_Fast(PyObject * o,Py_ssize_t i,int is_list,CYTHON_NCP_UNUSED int wraparound,CYTHON_NCP_UNUSED int boundscheck)13857 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
13858 CYTHON_NCP_UNUSED int wraparound,
13859 CYTHON_NCP_UNUSED int boundscheck) {
13860 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
13861 if (is_list || PyList_CheckExact(o)) {
13862 Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
13863 if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
13864 PyObject *r = PyList_GET_ITEM(o, n);
13865 Py_INCREF(r);
13866 return r;
13867 }
13868 }
13869 else if (PyTuple_CheckExact(o)) {
13870 Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
13871 if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
13872 PyObject *r = PyTuple_GET_ITEM(o, n);
13873 Py_INCREF(r);
13874 return r;
13875 }
13876 } else {
13877 PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
13878 if (likely(m && m->sq_item)) {
13879 if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
13880 Py_ssize_t l = m->sq_length(o);
13881 if (likely(l >= 0)) {
13882 i += l;
13883 } else {
13884 if (!PyErr_ExceptionMatches(PyExc_OverflowError))
13885 return NULL;
13886 PyErr_Clear();
13887 }
13888 }
13889 return m->sq_item(o, i);
13890 }
13891 }
13892 #else
13893 if (is_list || PySequence_Check(o)) {
13894 return PySequence_GetItem(o, i);
13895 }
13896 #endif
13897 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
13898 }
13899
13900 /* BytesEquals */
__Pyx_PyBytes_Equals(PyObject * s1,PyObject * s2,int equals)13901 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
13902 #if CYTHON_COMPILING_IN_PYPY
13903 return PyObject_RichCompareBool(s1, s2, equals);
13904 #else
13905 if (s1 == s2) {
13906 return (equals == Py_EQ);
13907 } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
13908 const char *ps1, *ps2;
13909 Py_ssize_t length = PyBytes_GET_SIZE(s1);
13910 if (length != PyBytes_GET_SIZE(s2))
13911 return (equals == Py_NE);
13912 ps1 = PyBytes_AS_STRING(s1);
13913 ps2 = PyBytes_AS_STRING(s2);
13914 if (ps1[0] != ps2[0]) {
13915 return (equals == Py_NE);
13916 } else if (length == 1) {
13917 return (equals == Py_EQ);
13918 } else {
13919 int result;
13920 #if CYTHON_USE_UNICODE_INTERNALS
13921 Py_hash_t hash1, hash2;
13922 hash1 = ((PyBytesObject*)s1)->ob_shash;
13923 hash2 = ((PyBytesObject*)s2)->ob_shash;
13924 if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
13925 return (equals == Py_NE);
13926 }
13927 #endif
13928 result = memcmp(ps1, ps2, (size_t)length);
13929 return (equals == Py_EQ) ? (result == 0) : (result != 0);
13930 }
13931 } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
13932 return (equals == Py_NE);
13933 } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
13934 return (equals == Py_NE);
13935 } else {
13936 int result;
13937 PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
13938 if (!py_result)
13939 return -1;
13940 result = __Pyx_PyObject_IsTrue(py_result);
13941 Py_DECREF(py_result);
13942 return result;
13943 }
13944 #endif
13945 }
13946
13947 /* UnicodeEquals */
__Pyx_PyUnicode_Equals(PyObject * s1,PyObject * s2,int equals)13948 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
13949 #if CYTHON_COMPILING_IN_PYPY
13950 return PyObject_RichCompareBool(s1, s2, equals);
13951 #else
13952 #if PY_MAJOR_VERSION < 3
13953 PyObject* owned_ref = NULL;
13954 #endif
13955 int s1_is_unicode, s2_is_unicode;
13956 if (s1 == s2) {
13957 goto return_eq;
13958 }
13959 s1_is_unicode = PyUnicode_CheckExact(s1);
13960 s2_is_unicode = PyUnicode_CheckExact(s2);
13961 #if PY_MAJOR_VERSION < 3
13962 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
13963 owned_ref = PyUnicode_FromObject(s2);
13964 if (unlikely(!owned_ref))
13965 return -1;
13966 s2 = owned_ref;
13967 s2_is_unicode = 1;
13968 } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
13969 owned_ref = PyUnicode_FromObject(s1);
13970 if (unlikely(!owned_ref))
13971 return -1;
13972 s1 = owned_ref;
13973 s1_is_unicode = 1;
13974 } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
13975 return __Pyx_PyBytes_Equals(s1, s2, equals);
13976 }
13977 #endif
13978 if (s1_is_unicode & s2_is_unicode) {
13979 Py_ssize_t length;
13980 int kind;
13981 void *data1, *data2;
13982 if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
13983 return -1;
13984 length = __Pyx_PyUnicode_GET_LENGTH(s1);
13985 if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
13986 goto return_ne;
13987 }
13988 #if CYTHON_USE_UNICODE_INTERNALS
13989 {
13990 Py_hash_t hash1, hash2;
13991 #if CYTHON_PEP393_ENABLED
13992 hash1 = ((PyASCIIObject*)s1)->hash;
13993 hash2 = ((PyASCIIObject*)s2)->hash;
13994 #else
13995 hash1 = ((PyUnicodeObject*)s1)->hash;
13996 hash2 = ((PyUnicodeObject*)s2)->hash;
13997 #endif
13998 if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
13999 goto return_ne;
14000 }
14001 }
14002 #endif
14003 kind = __Pyx_PyUnicode_KIND(s1);
14004 if (kind != __Pyx_PyUnicode_KIND(s2)) {
14005 goto return_ne;
14006 }
14007 data1 = __Pyx_PyUnicode_DATA(s1);
14008 data2 = __Pyx_PyUnicode_DATA(s2);
14009 if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
14010 goto return_ne;
14011 } else if (length == 1) {
14012 goto return_eq;
14013 } else {
14014 int result = memcmp(data1, data2, (size_t)(length * kind));
14015 #if PY_MAJOR_VERSION < 3
14016 Py_XDECREF(owned_ref);
14017 #endif
14018 return (equals == Py_EQ) ? (result == 0) : (result != 0);
14019 }
14020 } else if ((s1 == Py_None) & s2_is_unicode) {
14021 goto return_ne;
14022 } else if ((s2 == Py_None) & s1_is_unicode) {
14023 goto return_ne;
14024 } else {
14025 int result;
14026 PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
14027 #if PY_MAJOR_VERSION < 3
14028 Py_XDECREF(owned_ref);
14029 #endif
14030 if (!py_result)
14031 return -1;
14032 result = __Pyx_PyObject_IsTrue(py_result);
14033 Py_DECREF(py_result);
14034 return result;
14035 }
14036 return_eq:
14037 #if PY_MAJOR_VERSION < 3
14038 Py_XDECREF(owned_ref);
14039 #endif
14040 return (equals == Py_EQ);
14041 return_ne:
14042 #if PY_MAJOR_VERSION < 3
14043 Py_XDECREF(owned_ref);
14044 #endif
14045 return (equals == Py_NE);
14046 #endif
14047 }
14048
14049 /* GetTopmostException */
14050 #if CYTHON_USE_EXC_INFO_STACK
14051 static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState * tstate)14052 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
14053 {
14054 _PyErr_StackItem *exc_info = tstate->exc_info;
14055 while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
14056 exc_info->previous_item != NULL)
14057 {
14058 exc_info = exc_info->previous_item;
14059 }
14060 return exc_info;
14061 }
14062 #endif
14063
14064 /* SaveResetException */
14065 #if CYTHON_FAST_THREAD_STATE
__Pyx__ExceptionSave(PyThreadState * tstate,PyObject ** type,PyObject ** value,PyObject ** tb)14066 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
14067 #if CYTHON_USE_EXC_INFO_STACK
14068 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
14069 *type = exc_info->exc_type;
14070 *value = exc_info->exc_value;
14071 *tb = exc_info->exc_traceback;
14072 #else
14073 *type = tstate->exc_type;
14074 *value = tstate->exc_value;
14075 *tb = tstate->exc_traceback;
14076 #endif
14077 Py_XINCREF(*type);
14078 Py_XINCREF(*value);
14079 Py_XINCREF(*tb);
14080 }
__Pyx__ExceptionReset(PyThreadState * tstate,PyObject * type,PyObject * value,PyObject * tb)14081 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
14082 PyObject *tmp_type, *tmp_value, *tmp_tb;
14083 #if CYTHON_USE_EXC_INFO_STACK
14084 _PyErr_StackItem *exc_info = tstate->exc_info;
14085 tmp_type = exc_info->exc_type;
14086 tmp_value = exc_info->exc_value;
14087 tmp_tb = exc_info->exc_traceback;
14088 exc_info->exc_type = type;
14089 exc_info->exc_value = value;
14090 exc_info->exc_traceback = tb;
14091 #else
14092 tmp_type = tstate->exc_type;
14093 tmp_value = tstate->exc_value;
14094 tmp_tb = tstate->exc_traceback;
14095 tstate->exc_type = type;
14096 tstate->exc_value = value;
14097 tstate->exc_traceback = tb;
14098 #endif
14099 Py_XDECREF(tmp_type);
14100 Py_XDECREF(tmp_value);
14101 Py_XDECREF(tmp_tb);
14102 }
14103 #endif
14104
14105 /* PyErrExceptionMatches */
14106 #if CYTHON_FAST_THREAD_STATE
__Pyx_PyErr_ExceptionMatchesTuple(PyObject * exc_type,PyObject * tuple)14107 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
14108 Py_ssize_t i, n;
14109 n = PyTuple_GET_SIZE(tuple);
14110 #if PY_MAJOR_VERSION >= 3
14111 for (i=0; i<n; i++) {
14112 if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
14113 }
14114 #endif
14115 for (i=0; i<n; i++) {
14116 if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
14117 }
14118 return 0;
14119 }
__Pyx_PyErr_ExceptionMatchesInState(PyThreadState * tstate,PyObject * err)14120 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
14121 PyObject *exc_type = tstate->curexc_type;
14122 if (exc_type == err) return 1;
14123 if (unlikely(!exc_type)) return 0;
14124 if (unlikely(PyTuple_Check(err)))
14125 return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
14126 return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
14127 }
14128 #endif
14129
14130 /* GetException */
14131 #if CYTHON_FAST_THREAD_STATE
__Pyx__GetException(PyThreadState * tstate,PyObject ** type,PyObject ** value,PyObject ** tb)14132 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
14133 #else
14134 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
14135 #endif
14136 {
14137 PyObject *local_type, *local_value, *local_tb;
14138 #if CYTHON_FAST_THREAD_STATE
14139 PyObject *tmp_type, *tmp_value, *tmp_tb;
14140 local_type = tstate->curexc_type;
14141 local_value = tstate->curexc_value;
14142 local_tb = tstate->curexc_traceback;
14143 tstate->curexc_type = 0;
14144 tstate->curexc_value = 0;
14145 tstate->curexc_traceback = 0;
14146 #else
14147 PyErr_Fetch(&local_type, &local_value, &local_tb);
14148 #endif
14149 PyErr_NormalizeException(&local_type, &local_value, &local_tb);
14150 #if CYTHON_FAST_THREAD_STATE
14151 if (unlikely(tstate->curexc_type))
14152 #else
14153 if (unlikely(PyErr_Occurred()))
14154 #endif
14155 goto bad;
14156 #if PY_MAJOR_VERSION >= 3
14157 if (local_tb) {
14158 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
14159 goto bad;
14160 }
14161 #endif
14162 Py_XINCREF(local_tb);
14163 Py_XINCREF(local_type);
14164 Py_XINCREF(local_value);
14165 *type = local_type;
14166 *value = local_value;
14167 *tb = local_tb;
14168 #if CYTHON_FAST_THREAD_STATE
14169 #if CYTHON_USE_EXC_INFO_STACK
14170 {
14171 _PyErr_StackItem *exc_info = tstate->exc_info;
14172 tmp_type = exc_info->exc_type;
14173 tmp_value = exc_info->exc_value;
14174 tmp_tb = exc_info->exc_traceback;
14175 exc_info->exc_type = local_type;
14176 exc_info->exc_value = local_value;
14177 exc_info->exc_traceback = local_tb;
14178 }
14179 #else
14180 tmp_type = tstate->exc_type;
14181 tmp_value = tstate->exc_value;
14182 tmp_tb = tstate->exc_traceback;
14183 tstate->exc_type = local_type;
14184 tstate->exc_value = local_value;
14185 tstate->exc_traceback = local_tb;
14186 #endif
14187 Py_XDECREF(tmp_type);
14188 Py_XDECREF(tmp_value);
14189 Py_XDECREF(tmp_tb);
14190 #else
14191 PyErr_SetExcInfo(local_type, local_value, local_tb);
14192 #endif
14193 return 0;
14194 bad:
14195 *type = 0;
14196 *value = 0;
14197 *tb = 0;
14198 Py_XDECREF(local_type);
14199 Py_XDECREF(local_value);
14200 Py_XDECREF(local_tb);
14201 return -1;
14202 }
14203
14204 /* PyObjectGetMethod */
__Pyx_PyObject_GetMethod(PyObject * obj,PyObject * name,PyObject ** method)14205 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
14206 PyObject *attr;
14207 #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
14208 PyTypeObject *tp = Py_TYPE(obj);
14209 PyObject *descr;
14210 descrgetfunc f = NULL;
14211 PyObject **dictptr, *dict;
14212 int meth_found = 0;
14213 assert (*method == NULL);
14214 if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
14215 attr = __Pyx_PyObject_GetAttrStr(obj, name);
14216 goto try_unpack;
14217 }
14218 if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
14219 return 0;
14220 }
14221 descr = _PyType_Lookup(tp, name);
14222 if (likely(descr != NULL)) {
14223 Py_INCREF(descr);
14224 #if PY_MAJOR_VERSION >= 3
14225 #ifdef __Pyx_CyFunction_USED
14226 if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
14227 #else
14228 if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
14229 #endif
14230 #else
14231 #ifdef __Pyx_CyFunction_USED
14232 if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
14233 #else
14234 if (likely(PyFunction_Check(descr)))
14235 #endif
14236 #endif
14237 {
14238 meth_found = 1;
14239 } else {
14240 f = Py_TYPE(descr)->tp_descr_get;
14241 if (f != NULL && PyDescr_IsData(descr)) {
14242 attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
14243 Py_DECREF(descr);
14244 goto try_unpack;
14245 }
14246 }
14247 }
14248 dictptr = _PyObject_GetDictPtr(obj);
14249 if (dictptr != NULL && (dict = *dictptr) != NULL) {
14250 Py_INCREF(dict);
14251 attr = __Pyx_PyDict_GetItemStr(dict, name);
14252 if (attr != NULL) {
14253 Py_INCREF(attr);
14254 Py_DECREF(dict);
14255 Py_XDECREF(descr);
14256 goto try_unpack;
14257 }
14258 Py_DECREF(dict);
14259 }
14260 if (meth_found) {
14261 *method = descr;
14262 return 1;
14263 }
14264 if (f != NULL) {
14265 attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
14266 Py_DECREF(descr);
14267 goto try_unpack;
14268 }
14269 if (descr != NULL) {
14270 *method = descr;
14271 return 0;
14272 }
14273 PyErr_Format(PyExc_AttributeError,
14274 #if PY_MAJOR_VERSION >= 3
14275 "'%.50s' object has no attribute '%U'",
14276 tp->tp_name, name);
14277 #else
14278 "'%.50s' object has no attribute '%.400s'",
14279 tp->tp_name, PyString_AS_STRING(name));
14280 #endif
14281 return 0;
14282 #else
14283 attr = __Pyx_PyObject_GetAttrStr(obj, name);
14284 goto try_unpack;
14285 #endif
14286 try_unpack:
14287 #if CYTHON_UNPACK_METHODS
14288 if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
14289 PyObject *function = PyMethod_GET_FUNCTION(attr);
14290 Py_INCREF(function);
14291 Py_DECREF(attr);
14292 *method = function;
14293 return 1;
14294 }
14295 #endif
14296 *method = attr;
14297 return 0;
14298 }
14299
14300 /* PyObjectCallMethod1 */
__Pyx__PyObject_CallMethod1(PyObject * method,PyObject * arg)14301 static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
14302 PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
14303 Py_DECREF(method);
14304 return result;
14305 }
__Pyx_PyObject_CallMethod1(PyObject * obj,PyObject * method_name,PyObject * arg)14306 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
14307 PyObject *method = NULL, *result;
14308 int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
14309 if (likely(is_method)) {
14310 result = __Pyx_PyObject_Call2Args(method, obj, arg);
14311 Py_DECREF(method);
14312 return result;
14313 }
14314 if (unlikely(!method)) return NULL;
14315 return __Pyx__PyObject_CallMethod1(method, arg);
14316 }
14317
14318 /* pop_index */
__Pyx__PyObject_PopNewIndex(PyObject * L,PyObject * py_ix)14319 static PyObject* __Pyx__PyObject_PopNewIndex(PyObject* L, PyObject* py_ix) {
14320 PyObject *r;
14321 if (unlikely(!py_ix)) return NULL;
14322 r = __Pyx__PyObject_PopIndex(L, py_ix);
14323 Py_DECREF(py_ix);
14324 return r;
14325 }
__Pyx__PyObject_PopIndex(PyObject * L,PyObject * py_ix)14326 static PyObject* __Pyx__PyObject_PopIndex(PyObject* L, PyObject* py_ix) {
14327 return __Pyx_PyObject_CallMethod1(L, __pyx_n_s_pop, py_ix);
14328 }
14329 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
__Pyx__PyList_PopIndex(PyObject * L,PyObject * py_ix,Py_ssize_t ix)14330 static PyObject* __Pyx__PyList_PopIndex(PyObject* L, PyObject* py_ix, Py_ssize_t ix) {
14331 Py_ssize_t size = PyList_GET_SIZE(L);
14332 if (likely(size > (((PyListObject*)L)->allocated >> 1))) {
14333 Py_ssize_t cix = ix;
14334 if (cix < 0) {
14335 cix += size;
14336 }
14337 if (likely(__Pyx_is_valid_index(cix, size))) {
14338 PyObject* v = PyList_GET_ITEM(L, cix);
14339 Py_SIZE(L) -= 1;
14340 size -= 1;
14341 memmove(&PyList_GET_ITEM(L, cix), &PyList_GET_ITEM(L, cix+1), (size_t)(size-cix)*sizeof(PyObject*));
14342 return v;
14343 }
14344 }
14345 if (py_ix == Py_None) {
14346 return __Pyx__PyObject_PopNewIndex(L, PyInt_FromSsize_t(ix));
14347 } else {
14348 return __Pyx__PyObject_PopIndex(L, py_ix);
14349 }
14350 }
14351 #endif
14352
14353 /* RaiseTooManyValuesToUnpack */
__Pyx_RaiseTooManyValuesError(Py_ssize_t expected)14354 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
14355 PyErr_Format(PyExc_ValueError,
14356 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
14357 }
14358
14359 /* RaiseNeedMoreValuesToUnpack */
__Pyx_RaiseNeedMoreValuesError(Py_ssize_t index)14360 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
14361 PyErr_Format(PyExc_ValueError,
14362 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
14363 index, (index == 1) ? "" : "s");
14364 }
14365
14366 /* IterFinish */
__Pyx_IterFinish(void)14367 static CYTHON_INLINE int __Pyx_IterFinish(void) {
14368 #if CYTHON_FAST_THREAD_STATE
14369 PyThreadState *tstate = __Pyx_PyThreadState_Current;
14370 PyObject* exc_type = tstate->curexc_type;
14371 if (unlikely(exc_type)) {
14372 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
14373 PyObject *exc_value, *exc_tb;
14374 exc_value = tstate->curexc_value;
14375 exc_tb = tstate->curexc_traceback;
14376 tstate->curexc_type = 0;
14377 tstate->curexc_value = 0;
14378 tstate->curexc_traceback = 0;
14379 Py_DECREF(exc_type);
14380 Py_XDECREF(exc_value);
14381 Py_XDECREF(exc_tb);
14382 return 0;
14383 } else {
14384 return -1;
14385 }
14386 }
14387 return 0;
14388 #else
14389 if (unlikely(PyErr_Occurred())) {
14390 if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
14391 PyErr_Clear();
14392 return 0;
14393 } else {
14394 return -1;
14395 }
14396 }
14397 return 0;
14398 #endif
14399 }
14400
14401 /* UnpackItemEndCheck */
__Pyx_IternextUnpackEndCheck(PyObject * retval,Py_ssize_t expected)14402 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
14403 if (unlikely(retval)) {
14404 Py_DECREF(retval);
14405 __Pyx_RaiseTooManyValuesError(expected);
14406 return -1;
14407 } else {
14408 return __Pyx_IterFinish();
14409 }
14410 return 0;
14411 }
14412
14413 /* FastTypeChecks */
14414 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_InBases(PyTypeObject * a,PyTypeObject * b)14415 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
14416 while (a) {
14417 a = a->tp_base;
14418 if (a == b)
14419 return 1;
14420 }
14421 return b == &PyBaseObject_Type;
14422 }
__Pyx_IsSubtype(PyTypeObject * a,PyTypeObject * b)14423 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
14424 PyObject *mro;
14425 if (a == b) return 1;
14426 mro = a->tp_mro;
14427 if (likely(mro)) {
14428 Py_ssize_t i, n;
14429 n = PyTuple_GET_SIZE(mro);
14430 for (i = 0; i < n; i++) {
14431 if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
14432 return 1;
14433 }
14434 return 0;
14435 }
14436 return __Pyx_InBases(a, b);
14437 }
14438 #if PY_MAJOR_VERSION == 2
__Pyx_inner_PyErr_GivenExceptionMatches2(PyObject * err,PyObject * exc_type1,PyObject * exc_type2)14439 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
14440 PyObject *exception, *value, *tb;
14441 int res;
14442 __Pyx_PyThreadState_declare
14443 __Pyx_PyThreadState_assign
14444 __Pyx_ErrFetch(&exception, &value, &tb);
14445 res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
14446 if (unlikely(res == -1)) {
14447 PyErr_WriteUnraisable(err);
14448 res = 0;
14449 }
14450 if (!res) {
14451 res = PyObject_IsSubclass(err, exc_type2);
14452 if (unlikely(res == -1)) {
14453 PyErr_WriteUnraisable(err);
14454 res = 0;
14455 }
14456 }
14457 __Pyx_ErrRestore(exception, value, tb);
14458 return res;
14459 }
14460 #else
__Pyx_inner_PyErr_GivenExceptionMatches2(PyObject * err,PyObject * exc_type1,PyObject * exc_type2)14461 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
14462 int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
14463 if (!res) {
14464 res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
14465 }
14466 return res;
14467 }
14468 #endif
__Pyx_PyErr_GivenExceptionMatchesTuple(PyObject * exc_type,PyObject * tuple)14469 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
14470 Py_ssize_t i, n;
14471 assert(PyExceptionClass_Check(exc_type));
14472 n = PyTuple_GET_SIZE(tuple);
14473 #if PY_MAJOR_VERSION >= 3
14474 for (i=0; i<n; i++) {
14475 if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
14476 }
14477 #endif
14478 for (i=0; i<n; i++) {
14479 PyObject *t = PyTuple_GET_ITEM(tuple, i);
14480 #if PY_MAJOR_VERSION < 3
14481 if (likely(exc_type == t)) return 1;
14482 #endif
14483 if (likely(PyExceptionClass_Check(t))) {
14484 if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
14485 } else {
14486 }
14487 }
14488 return 0;
14489 }
__Pyx_PyErr_GivenExceptionMatches(PyObject * err,PyObject * exc_type)14490 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
14491 if (likely(err == exc_type)) return 1;
14492 if (likely(PyExceptionClass_Check(err))) {
14493 if (likely(PyExceptionClass_Check(exc_type))) {
14494 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
14495 } else if (likely(PyTuple_Check(exc_type))) {
14496 return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
14497 } else {
14498 }
14499 }
14500 return PyErr_GivenExceptionMatches(err, exc_type);
14501 }
__Pyx_PyErr_GivenExceptionMatches2(PyObject * err,PyObject * exc_type1,PyObject * exc_type2)14502 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
14503 assert(PyExceptionClass_Check(exc_type1));
14504 assert(PyExceptionClass_Check(exc_type2));
14505 if (likely(err == exc_type1 || err == exc_type2)) return 1;
14506 if (likely(PyExceptionClass_Check(err))) {
14507 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
14508 }
14509 return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
14510 }
14511 #endif
14512
14513 /* HasAttr */
__Pyx_HasAttr(PyObject * o,PyObject * n)14514 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
14515 PyObject *r;
14516 if (unlikely(!__Pyx_PyBaseString_Check(n))) {
14517 PyErr_SetString(PyExc_TypeError,
14518 "hasattr(): attribute name must be string");
14519 return -1;
14520 }
14521 r = __Pyx_GetAttr(o, n);
14522 if (unlikely(!r)) {
14523 PyErr_Clear();
14524 return 0;
14525 } else {
14526 Py_DECREF(r);
14527 return 1;
14528 }
14529 }
14530
14531 /* GetAttr3 */
__Pyx_GetAttr3Default(PyObject * d)14532 static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
14533 __Pyx_PyThreadState_declare
14534 __Pyx_PyThreadState_assign
14535 if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
14536 return NULL;
14537 __Pyx_PyErr_Clear();
14538 Py_INCREF(d);
14539 return d;
14540 }
__Pyx_GetAttr3(PyObject * o,PyObject * n,PyObject * d)14541 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
14542 PyObject *r = __Pyx_GetAttr(o, n);
14543 return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
14544 }
14545
14546 /* ArgTypeTest */
__Pyx__ArgTypeTest(PyObject * obj,PyTypeObject * type,const char * name,int exact)14547 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
14548 {
14549 if (unlikely(!type)) {
14550 PyErr_SetString(PyExc_SystemError, "Missing type object");
14551 return 0;
14552 }
14553 else if (exact) {
14554 #if PY_MAJOR_VERSION == 2
14555 if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
14556 #endif
14557 }
14558 else {
14559 if (likely(__Pyx_TypeCheck(obj, type))) return 1;
14560 }
14561 PyErr_Format(PyExc_TypeError,
14562 "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
14563 name, type->tp_name, Py_TYPE(obj)->tp_name);
14564 return 0;
14565 }
14566
14567 /* ExtTypeTest */
__Pyx_TypeTest(PyObject * obj,PyTypeObject * type)14568 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
14569 if (unlikely(!type)) {
14570 PyErr_SetString(PyExc_SystemError, "Missing type object");
14571 return 0;
14572 }
14573 if (likely(__Pyx_TypeCheck(obj, type)))
14574 return 1;
14575 PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
14576 Py_TYPE(obj)->tp_name, type->tp_name);
14577 return 0;
14578 }
14579
14580 /* KeywordStringCheck */
__Pyx_CheckKeywordStrings(PyObject * kwdict,const char * function_name,int kw_allowed)14581 static int __Pyx_CheckKeywordStrings(
14582 PyObject *kwdict,
14583 const char* function_name,
14584 int kw_allowed)
14585 {
14586 PyObject* key = 0;
14587 Py_ssize_t pos = 0;
14588 #if CYTHON_COMPILING_IN_PYPY
14589 if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
14590 goto invalid_keyword;
14591 return 1;
14592 #else
14593 while (PyDict_Next(kwdict, &pos, &key, 0)) {
14594 #if PY_MAJOR_VERSION < 3
14595 if (unlikely(!PyString_Check(key)))
14596 #endif
14597 if (unlikely(!PyUnicode_Check(key)))
14598 goto invalid_keyword_type;
14599 }
14600 if ((!kw_allowed) && unlikely(key))
14601 goto invalid_keyword;
14602 return 1;
14603 invalid_keyword_type:
14604 PyErr_Format(PyExc_TypeError,
14605 "%.200s() keywords must be strings", function_name);
14606 return 0;
14607 #endif
14608 invalid_keyword:
14609 PyErr_Format(PyExc_TypeError,
14610 #if PY_MAJOR_VERSION < 3
14611 "%.200s() got an unexpected keyword argument '%.200s'",
14612 function_name, PyString_AsString(key));
14613 #else
14614 "%s() got an unexpected keyword argument '%U'",
14615 function_name, key);
14616 #endif
14617 return 0;
14618 }
14619
14620 /* PyObject_GenericGetAttrNoDict */
14621 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
__Pyx_RaiseGenericGetAttributeError(PyTypeObject * tp,PyObject * attr_name)14622 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
14623 PyErr_Format(PyExc_AttributeError,
14624 #if PY_MAJOR_VERSION >= 3
14625 "'%.50s' object has no attribute '%U'",
14626 tp->tp_name, attr_name);
14627 #else
14628 "'%.50s' object has no attribute '%.400s'",
14629 tp->tp_name, PyString_AS_STRING(attr_name));
14630 #endif
14631 return NULL;
14632 }
__Pyx_PyObject_GenericGetAttrNoDict(PyObject * obj,PyObject * attr_name)14633 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
14634 PyObject *descr;
14635 PyTypeObject *tp = Py_TYPE(obj);
14636 if (unlikely(!PyString_Check(attr_name))) {
14637 return PyObject_GenericGetAttr(obj, attr_name);
14638 }
14639 assert(!tp->tp_dictoffset);
14640 descr = _PyType_Lookup(tp, attr_name);
14641 if (unlikely(!descr)) {
14642 return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
14643 }
14644 Py_INCREF(descr);
14645 #if PY_MAJOR_VERSION < 3
14646 if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
14647 #endif
14648 {
14649 descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
14650 if (unlikely(f)) {
14651 PyObject *res = f(descr, obj, (PyObject *)tp);
14652 Py_DECREF(descr);
14653 return res;
14654 }
14655 }
14656 return descr;
14657 }
14658 #endif
14659
14660 /* PyObject_GenericGetAttr */
14661 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
__Pyx_PyObject_GenericGetAttr(PyObject * obj,PyObject * attr_name)14662 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
14663 if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
14664 return PyObject_GenericGetAttr(obj, attr_name);
14665 }
14666 return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
14667 }
14668 #endif
14669
14670 /* CallNextTpDealloc */
__Pyx_call_next_tp_dealloc(PyObject * obj,destructor current_tp_dealloc)14671 static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc) {
14672 PyTypeObject* type = Py_TYPE(obj);
14673 while (type && type->tp_dealloc != current_tp_dealloc)
14674 type = type->tp_base;
14675 while (type && type->tp_dealloc == current_tp_dealloc)
14676 type = type->tp_base;
14677 if (type)
14678 type->tp_dealloc(obj);
14679 }
14680
14681 /* CallNextTpTraverse */
__Pyx_call_next_tp_traverse(PyObject * obj,visitproc v,void * a,traverseproc current_tp_traverse)14682 static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) {
14683 PyTypeObject* type = Py_TYPE(obj);
14684 while (type && type->tp_traverse != current_tp_traverse)
14685 type = type->tp_base;
14686 while (type && type->tp_traverse == current_tp_traverse)
14687 type = type->tp_base;
14688 if (type && type->tp_traverse)
14689 return type->tp_traverse(obj, v, a);
14690 return 0;
14691 }
14692
14693 /* CallNextTpClear */
__Pyx_call_next_tp_clear(PyObject * obj,inquiry current_tp_clear)14694 static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) {
14695 PyTypeObject* type = Py_TYPE(obj);
14696 while (type && type->tp_clear != current_tp_clear)
14697 type = type->tp_base;
14698 while (type && type->tp_clear == current_tp_clear)
14699 type = type->tp_base;
14700 if (type && type->tp_clear)
14701 type->tp_clear(obj);
14702 }
14703
14704 /* SetVTable */
__Pyx_SetVtable(PyObject * dict,void * vtable)14705 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
14706 #if PY_VERSION_HEX >= 0x02070000
14707 PyObject *ob = PyCapsule_New(vtable, 0, 0);
14708 #else
14709 PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
14710 #endif
14711 if (!ob)
14712 goto bad;
14713 if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
14714 goto bad;
14715 Py_DECREF(ob);
14716 return 0;
14717 bad:
14718 Py_XDECREF(ob);
14719 return -1;
14720 }
14721
14722 /* SetupReduce */
__Pyx_setup_reduce_is_named(PyObject * meth,PyObject * name)14723 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
14724 int ret;
14725 PyObject *name_attr;
14726 name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
14727 if (likely(name_attr)) {
14728 ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
14729 } else {
14730 ret = -1;
14731 }
14732 if (unlikely(ret < 0)) {
14733 PyErr_Clear();
14734 ret = 0;
14735 }
14736 Py_XDECREF(name_attr);
14737 return ret;
14738 }
__Pyx_setup_reduce(PyObject * type_obj)14739 static int __Pyx_setup_reduce(PyObject* type_obj) {
14740 int ret = 0;
14741 PyObject *object_reduce = NULL;
14742 PyObject *object_reduce_ex = NULL;
14743 PyObject *reduce = NULL;
14744 PyObject *reduce_ex = NULL;
14745 PyObject *reduce_cython = NULL;
14746 PyObject *setstate = NULL;
14747 PyObject *setstate_cython = NULL;
14748 #if CYTHON_USE_PYTYPE_LOOKUP
14749 if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
14750 #else
14751 if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
14752 #endif
14753 #if CYTHON_USE_PYTYPE_LOOKUP
14754 object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
14755 #else
14756 object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
14757 #endif
14758 reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
14759 if (reduce_ex == object_reduce_ex) {
14760 #if CYTHON_USE_PYTYPE_LOOKUP
14761 object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
14762 #else
14763 object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
14764 #endif
14765 reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
14766 if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
14767 reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
14768 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
14769 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
14770 setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
14771 if (!setstate) PyErr_Clear();
14772 if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
14773 setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
14774 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
14775 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
14776 }
14777 PyType_Modified((PyTypeObject*)type_obj);
14778 }
14779 }
14780 goto GOOD;
14781 BAD:
14782 if (!PyErr_Occurred())
14783 PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
14784 ret = -1;
14785 GOOD:
14786 #if !CYTHON_USE_PYTYPE_LOOKUP
14787 Py_XDECREF(object_reduce);
14788 Py_XDECREF(object_reduce_ex);
14789 #endif
14790 Py_XDECREF(reduce);
14791 Py_XDECREF(reduce_ex);
14792 Py_XDECREF(reduce_cython);
14793 Py_XDECREF(setstate);
14794 Py_XDECREF(setstate_cython);
14795 return ret;
14796 }
14797
14798 /* TypeImport */
14799 #ifndef __PYX_HAVE_RT_ImportType
14800 #define __PYX_HAVE_RT_ImportType
__Pyx_ImportType(PyObject * module,const char * module_name,const char * class_name,size_t size,enum __Pyx_ImportType_CheckSize check_size)14801 static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
14802 size_t size, enum __Pyx_ImportType_CheckSize check_size)
14803 {
14804 PyObject *result = 0;
14805 char warning[200];
14806 Py_ssize_t basicsize;
14807 #ifdef Py_LIMITED_API
14808 PyObject *py_basicsize;
14809 #endif
14810 result = PyObject_GetAttrString(module, class_name);
14811 if (!result)
14812 goto bad;
14813 if (!PyType_Check(result)) {
14814 PyErr_Format(PyExc_TypeError,
14815 "%.200s.%.200s is not a type object",
14816 module_name, class_name);
14817 goto bad;
14818 }
14819 #ifndef Py_LIMITED_API
14820 basicsize = ((PyTypeObject *)result)->tp_basicsize;
14821 #else
14822 py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
14823 if (!py_basicsize)
14824 goto bad;
14825 basicsize = PyLong_AsSsize_t(py_basicsize);
14826 Py_DECREF(py_basicsize);
14827 py_basicsize = 0;
14828 if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
14829 goto bad;
14830 #endif
14831 if ((size_t)basicsize < size) {
14832 PyErr_Format(PyExc_ValueError,
14833 "%.200s.%.200s size changed, may indicate binary incompatibility. "
14834 "Expected %zd from C header, got %zd from PyObject",
14835 module_name, class_name, size, basicsize);
14836 goto bad;
14837 }
14838 if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
14839 PyErr_Format(PyExc_ValueError,
14840 "%.200s.%.200s size changed, may indicate binary incompatibility. "
14841 "Expected %zd from C header, got %zd from PyObject",
14842 module_name, class_name, size, basicsize);
14843 goto bad;
14844 }
14845 else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
14846 PyOS_snprintf(warning, sizeof(warning),
14847 "%s.%s size changed, may indicate binary incompatibility. "
14848 "Expected %zd from C header, got %zd from PyObject",
14849 module_name, class_name, size, basicsize);
14850 if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
14851 }
14852 return (PyTypeObject *)result;
14853 bad:
14854 Py_XDECREF(result);
14855 return NULL;
14856 }
14857 #endif
14858
14859 /* GetVTable */
__Pyx_GetVtable(PyObject * dict)14860 static void* __Pyx_GetVtable(PyObject *dict) {
14861 void* ptr;
14862 PyObject *ob = PyObject_GetItem(dict, __pyx_n_s_pyx_vtable);
14863 if (!ob)
14864 goto bad;
14865 #if PY_VERSION_HEX >= 0x02070000
14866 ptr = PyCapsule_GetPointer(ob, 0);
14867 #else
14868 ptr = PyCObject_AsVoidPtr(ob);
14869 #endif
14870 if (!ptr && !PyErr_Occurred())
14871 PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
14872 Py_DECREF(ob);
14873 return ptr;
14874 bad:
14875 Py_XDECREF(ob);
14876 return NULL;
14877 }
14878
14879 /* GetNameInClass */
__Pyx_GetGlobalNameAfterAttributeLookup(PyObject * name)14880 static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) {
14881 PyObject *result;
14882 __Pyx_PyThreadState_declare
14883 __Pyx_PyThreadState_assign
14884 if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
14885 return NULL;
14886 __Pyx_PyErr_Clear();
14887 __Pyx_GetModuleGlobalNameUncached(result, name);
14888 return result;
14889 }
__Pyx__GetNameInClass(PyObject * nmspace,PyObject * name)14890 static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) {
14891 PyObject *result;
14892 result = __Pyx_PyObject_GetAttrStr(nmspace, name);
14893 if (!result) {
14894 result = __Pyx_GetGlobalNameAfterAttributeLookup(name);
14895 }
14896 return result;
14897 }
14898
14899 /* CLineInTraceback */
14900 #ifndef CYTHON_CLINE_IN_TRACEBACK
__Pyx_CLineForTraceback(PyThreadState * tstate,int c_line)14901 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
14902 PyObject *use_cline;
14903 PyObject *ptype, *pvalue, *ptraceback;
14904 #if CYTHON_COMPILING_IN_CPYTHON
14905 PyObject **cython_runtime_dict;
14906 #endif
14907 if (unlikely(!__pyx_cython_runtime)) {
14908 return c_line;
14909 }
14910 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
14911 #if CYTHON_COMPILING_IN_CPYTHON
14912 cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
14913 if (likely(cython_runtime_dict)) {
14914 __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
14915 use_cline, *cython_runtime_dict,
14916 __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
14917 } else
14918 #endif
14919 {
14920 PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
14921 if (use_cline_obj) {
14922 use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
14923 Py_DECREF(use_cline_obj);
14924 } else {
14925 PyErr_Clear();
14926 use_cline = NULL;
14927 }
14928 }
14929 if (!use_cline) {
14930 c_line = 0;
14931 PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
14932 }
14933 else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
14934 c_line = 0;
14935 }
14936 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
14937 return c_line;
14938 }
14939 #endif
14940
14941 /* CodeObjectCache */
__pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry * entries,int count,int code_line)14942 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
14943 int start = 0, mid = 0, end = count - 1;
14944 if (end >= 0 && code_line > entries[end].code_line) {
14945 return count;
14946 }
14947 while (start < end) {
14948 mid = start + (end - start) / 2;
14949 if (code_line < entries[mid].code_line) {
14950 end = mid;
14951 } else if (code_line > entries[mid].code_line) {
14952 start = mid + 1;
14953 } else {
14954 return mid;
14955 }
14956 }
14957 if (code_line <= entries[mid].code_line) {
14958 return mid;
14959 } else {
14960 return mid + 1;
14961 }
14962 }
__pyx_find_code_object(int code_line)14963 static PyCodeObject *__pyx_find_code_object(int code_line) {
14964 PyCodeObject* code_object;
14965 int pos;
14966 if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
14967 return NULL;
14968 }
14969 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
14970 if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
14971 return NULL;
14972 }
14973 code_object = __pyx_code_cache.entries[pos].code_object;
14974 Py_INCREF(code_object);
14975 return code_object;
14976 }
__pyx_insert_code_object(int code_line,PyCodeObject * code_object)14977 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
14978 int pos, i;
14979 __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
14980 if (unlikely(!code_line)) {
14981 return;
14982 }
14983 if (unlikely(!entries)) {
14984 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
14985 if (likely(entries)) {
14986 __pyx_code_cache.entries = entries;
14987 __pyx_code_cache.max_count = 64;
14988 __pyx_code_cache.count = 1;
14989 entries[0].code_line = code_line;
14990 entries[0].code_object = code_object;
14991 Py_INCREF(code_object);
14992 }
14993 return;
14994 }
14995 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
14996 if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
14997 PyCodeObject* tmp = entries[pos].code_object;
14998 entries[pos].code_object = code_object;
14999 Py_DECREF(tmp);
15000 return;
15001 }
15002 if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
15003 int new_max = __pyx_code_cache.max_count + 64;
15004 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
15005 __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
15006 if (unlikely(!entries)) {
15007 return;
15008 }
15009 __pyx_code_cache.entries = entries;
15010 __pyx_code_cache.max_count = new_max;
15011 }
15012 for (i=__pyx_code_cache.count; i>pos; i--) {
15013 entries[i] = entries[i-1];
15014 }
15015 entries[pos].code_line = code_line;
15016 entries[pos].code_object = code_object;
15017 __pyx_code_cache.count++;
15018 Py_INCREF(code_object);
15019 }
15020
15021 /* AddTraceback */
15022 #include "compile.h"
15023 #include "frameobject.h"
15024 #include "traceback.h"
__Pyx_CreateCodeObjectForTraceback(const char * funcname,int c_line,int py_line,const char * filename)15025 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
15026 const char *funcname, int c_line,
15027 int py_line, const char *filename) {
15028 PyCodeObject *py_code = 0;
15029 PyObject *py_srcfile = 0;
15030 PyObject *py_funcname = 0;
15031 #if PY_MAJOR_VERSION < 3
15032 py_srcfile = PyString_FromString(filename);
15033 #else
15034 py_srcfile = PyUnicode_FromString(filename);
15035 #endif
15036 if (!py_srcfile) goto bad;
15037 if (c_line) {
15038 #if PY_MAJOR_VERSION < 3
15039 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
15040 #else
15041 py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
15042 #endif
15043 }
15044 else {
15045 #if PY_MAJOR_VERSION < 3
15046 py_funcname = PyString_FromString(funcname);
15047 #else
15048 py_funcname = PyUnicode_FromString(funcname);
15049 #endif
15050 }
15051 if (!py_funcname) goto bad;
15052 py_code = __Pyx_PyCode_New(
15053 0,
15054 0,
15055 0,
15056 0,
15057 0,
15058 __pyx_empty_bytes, /*PyObject *code,*/
15059 __pyx_empty_tuple, /*PyObject *consts,*/
15060 __pyx_empty_tuple, /*PyObject *names,*/
15061 __pyx_empty_tuple, /*PyObject *varnames,*/
15062 __pyx_empty_tuple, /*PyObject *freevars,*/
15063 __pyx_empty_tuple, /*PyObject *cellvars,*/
15064 py_srcfile, /*PyObject *filename,*/
15065 py_funcname, /*PyObject *name,*/
15066 py_line,
15067 __pyx_empty_bytes /*PyObject *lnotab*/
15068 );
15069 Py_DECREF(py_srcfile);
15070 Py_DECREF(py_funcname);
15071 return py_code;
15072 bad:
15073 Py_XDECREF(py_srcfile);
15074 Py_XDECREF(py_funcname);
15075 return NULL;
15076 }
__Pyx_AddTraceback(const char * funcname,int c_line,int py_line,const char * filename)15077 static void __Pyx_AddTraceback(const char *funcname, int c_line,
15078 int py_line, const char *filename) {
15079 PyCodeObject *py_code = 0;
15080 PyFrameObject *py_frame = 0;
15081 PyThreadState *tstate = __Pyx_PyThreadState_Current;
15082 if (c_line) {
15083 c_line = __Pyx_CLineForTraceback(tstate, c_line);
15084 }
15085 py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
15086 if (!py_code) {
15087 py_code = __Pyx_CreateCodeObjectForTraceback(
15088 funcname, c_line, py_line, filename);
15089 if (!py_code) goto bad;
15090 __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
15091 }
15092 py_frame = PyFrame_New(
15093 tstate, /*PyThreadState *tstate,*/
15094 py_code, /*PyCodeObject *code,*/
15095 __pyx_d, /*PyObject *globals,*/
15096 0 /*PyObject *locals*/
15097 );
15098 if (!py_frame) goto bad;
15099 __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
15100 PyTraceBack_Here(py_frame);
15101 bad:
15102 Py_XDECREF(py_code);
15103 Py_XDECREF(py_frame);
15104 }
15105
15106 /* CIntToPy */
__Pyx_PyInt_From_unsigned_int(unsigned int value)15107 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) {
15108 const unsigned int neg_one = (unsigned int) ((unsigned int) 0 - (unsigned int) 1), const_zero = (unsigned int) 0;
15109 const int is_unsigned = neg_one > const_zero;
15110 if (is_unsigned) {
15111 if (sizeof(unsigned int) < sizeof(long)) {
15112 return PyInt_FromLong((long) value);
15113 } else if (sizeof(unsigned int) <= sizeof(unsigned long)) {
15114 return PyLong_FromUnsignedLong((unsigned long) value);
15115 #ifdef HAVE_LONG_LONG
15116 } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) {
15117 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
15118 #endif
15119 }
15120 } else {
15121 if (sizeof(unsigned int) <= sizeof(long)) {
15122 return PyInt_FromLong((long) value);
15123 #ifdef HAVE_LONG_LONG
15124 } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) {
15125 return PyLong_FromLongLong((PY_LONG_LONG) value);
15126 #endif
15127 }
15128 }
15129 {
15130 int one = 1; int little = (int)*(unsigned char *)&one;
15131 unsigned char *bytes = (unsigned char *)&value;
15132 return _PyLong_FromByteArray(bytes, sizeof(unsigned int),
15133 little, !is_unsigned);
15134 }
15135 }
15136
15137 /* CIntFromPyVerify */
15138 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
15139 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
15140 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
15141 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
15142 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
15143 {\
15144 func_type value = func_value;\
15145 if (sizeof(target_type) < sizeof(func_type)) {\
15146 if (unlikely(value != (func_type) (target_type) value)) {\
15147 func_type zero = 0;\
15148 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
15149 return (target_type) -1;\
15150 if (is_unsigned && unlikely(value < zero))\
15151 goto raise_neg_overflow;\
15152 else\
15153 goto raise_overflow;\
15154 }\
15155 }\
15156 return (target_type) value;\
15157 }
15158
15159 /* CIntToPy */
__Pyx_PyInt_From_int(int value)15160 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
15161 const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
15162 const int is_unsigned = neg_one > const_zero;
15163 if (is_unsigned) {
15164 if (sizeof(int) < sizeof(long)) {
15165 return PyInt_FromLong((long) value);
15166 } else if (sizeof(int) <= sizeof(unsigned long)) {
15167 return PyLong_FromUnsignedLong((unsigned long) value);
15168 #ifdef HAVE_LONG_LONG
15169 } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
15170 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
15171 #endif
15172 }
15173 } else {
15174 if (sizeof(int) <= sizeof(long)) {
15175 return PyInt_FromLong((long) value);
15176 #ifdef HAVE_LONG_LONG
15177 } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
15178 return PyLong_FromLongLong((PY_LONG_LONG) value);
15179 #endif
15180 }
15181 }
15182 {
15183 int one = 1; int little = (int)*(unsigned char *)&one;
15184 unsigned char *bytes = (unsigned char *)&value;
15185 return _PyLong_FromByteArray(bytes, sizeof(int),
15186 little, !is_unsigned);
15187 }
15188 }
15189
15190 /* CIntToPy */
__Pyx_PyInt_From_long(long value)15191 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
15192 const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
15193 const int is_unsigned = neg_one > const_zero;
15194 if (is_unsigned) {
15195 if (sizeof(long) < sizeof(long)) {
15196 return PyInt_FromLong((long) value);
15197 } else if (sizeof(long) <= sizeof(unsigned long)) {
15198 return PyLong_FromUnsignedLong((unsigned long) value);
15199 #ifdef HAVE_LONG_LONG
15200 } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
15201 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
15202 #endif
15203 }
15204 } else {
15205 if (sizeof(long) <= sizeof(long)) {
15206 return PyInt_FromLong((long) value);
15207 #ifdef HAVE_LONG_LONG
15208 } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
15209 return PyLong_FromLongLong((PY_LONG_LONG) value);
15210 #endif
15211 }
15212 }
15213 {
15214 int one = 1; int little = (int)*(unsigned char *)&one;
15215 unsigned char *bytes = (unsigned char *)&value;
15216 return _PyLong_FromByteArray(bytes, sizeof(long),
15217 little, !is_unsigned);
15218 }
15219 }
15220
15221 /* CIntFromPy */
__Pyx_PyInt_As_unsigned_int(PyObject * x)15222 static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *x) {
15223 const unsigned int neg_one = (unsigned int) ((unsigned int) 0 - (unsigned int) 1), const_zero = (unsigned int) 0;
15224 const int is_unsigned = neg_one > const_zero;
15225 #if PY_MAJOR_VERSION < 3
15226 if (likely(PyInt_Check(x))) {
15227 if (sizeof(unsigned int) < sizeof(long)) {
15228 __PYX_VERIFY_RETURN_INT(unsigned int, long, PyInt_AS_LONG(x))
15229 } else {
15230 long val = PyInt_AS_LONG(x);
15231 if (is_unsigned && unlikely(val < 0)) {
15232 goto raise_neg_overflow;
15233 }
15234 return (unsigned int) val;
15235 }
15236 } else
15237 #endif
15238 if (likely(PyLong_Check(x))) {
15239 if (is_unsigned) {
15240 #if CYTHON_USE_PYLONG_INTERNALS
15241 const digit* digits = ((PyLongObject*)x)->ob_digit;
15242 switch (Py_SIZE(x)) {
15243 case 0: return (unsigned int) 0;
15244 case 1: __PYX_VERIFY_RETURN_INT(unsigned int, digit, digits[0])
15245 case 2:
15246 if (8 * sizeof(unsigned int) > 1 * PyLong_SHIFT) {
15247 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
15248 __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15249 } else if (8 * sizeof(unsigned int) >= 2 * PyLong_SHIFT) {
15250 return (unsigned int) (((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
15251 }
15252 }
15253 break;
15254 case 3:
15255 if (8 * sizeof(unsigned int) > 2 * PyLong_SHIFT) {
15256 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
15257 __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15258 } else if (8 * sizeof(unsigned int) >= 3 * PyLong_SHIFT) {
15259 return (unsigned int) (((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
15260 }
15261 }
15262 break;
15263 case 4:
15264 if (8 * sizeof(unsigned int) > 3 * PyLong_SHIFT) {
15265 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
15266 __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15267 } else if (8 * sizeof(unsigned int) >= 4 * PyLong_SHIFT) {
15268 return (unsigned int) (((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
15269 }
15270 }
15271 break;
15272 }
15273 #endif
15274 #if CYTHON_COMPILING_IN_CPYTHON
15275 if (unlikely(Py_SIZE(x) < 0)) {
15276 goto raise_neg_overflow;
15277 }
15278 #else
15279 {
15280 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
15281 if (unlikely(result < 0))
15282 return (unsigned int) -1;
15283 if (unlikely(result == 1))
15284 goto raise_neg_overflow;
15285 }
15286 #endif
15287 if (sizeof(unsigned int) <= sizeof(unsigned long)) {
15288 __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned long, PyLong_AsUnsignedLong(x))
15289 #ifdef HAVE_LONG_LONG
15290 } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) {
15291 __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
15292 #endif
15293 }
15294 } else {
15295 #if CYTHON_USE_PYLONG_INTERNALS
15296 const digit* digits = ((PyLongObject*)x)->ob_digit;
15297 switch (Py_SIZE(x)) {
15298 case 0: return (unsigned int) 0;
15299 case -1: __PYX_VERIFY_RETURN_INT(unsigned int, sdigit, (sdigit) (-(sdigit)digits[0]))
15300 case 1: __PYX_VERIFY_RETURN_INT(unsigned int, digit, +digits[0])
15301 case -2:
15302 if (8 * sizeof(unsigned int) - 1 > 1 * PyLong_SHIFT) {
15303 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
15304 __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15305 } else if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) {
15306 return (unsigned int) (((unsigned int)-1)*(((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
15307 }
15308 }
15309 break;
15310 case 2:
15311 if (8 * sizeof(unsigned int) > 1 * PyLong_SHIFT) {
15312 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
15313 __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15314 } else if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) {
15315 return (unsigned int) ((((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
15316 }
15317 }
15318 break;
15319 case -3:
15320 if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) {
15321 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
15322 __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15323 } else if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) {
15324 return (unsigned int) (((unsigned int)-1)*(((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
15325 }
15326 }
15327 break;
15328 case 3:
15329 if (8 * sizeof(unsigned int) > 2 * PyLong_SHIFT) {
15330 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
15331 __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15332 } else if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) {
15333 return (unsigned int) ((((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
15334 }
15335 }
15336 break;
15337 case -4:
15338 if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) {
15339 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
15340 __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15341 } else if (8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT) {
15342 return (unsigned int) (((unsigned int)-1)*(((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
15343 }
15344 }
15345 break;
15346 case 4:
15347 if (8 * sizeof(unsigned int) > 3 * PyLong_SHIFT) {
15348 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
15349 __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15350 } else if (8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT) {
15351 return (unsigned int) ((((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
15352 }
15353 }
15354 break;
15355 }
15356 #endif
15357 if (sizeof(unsigned int) <= sizeof(long)) {
15358 __PYX_VERIFY_RETURN_INT_EXC(unsigned int, long, PyLong_AsLong(x))
15359 #ifdef HAVE_LONG_LONG
15360 } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) {
15361 __PYX_VERIFY_RETURN_INT_EXC(unsigned int, PY_LONG_LONG, PyLong_AsLongLong(x))
15362 #endif
15363 }
15364 }
15365 {
15366 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
15367 PyErr_SetString(PyExc_RuntimeError,
15368 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
15369 #else
15370 unsigned int val;
15371 PyObject *v = __Pyx_PyNumber_IntOrLong(x);
15372 #if PY_MAJOR_VERSION < 3
15373 if (likely(v) && !PyLong_Check(v)) {
15374 PyObject *tmp = v;
15375 v = PyNumber_Long(tmp);
15376 Py_DECREF(tmp);
15377 }
15378 #endif
15379 if (likely(v)) {
15380 int one = 1; int is_little = (int)*(unsigned char *)&one;
15381 unsigned char *bytes = (unsigned char *)&val;
15382 int ret = _PyLong_AsByteArray((PyLongObject *)v,
15383 bytes, sizeof(val),
15384 is_little, !is_unsigned);
15385 Py_DECREF(v);
15386 if (likely(!ret))
15387 return val;
15388 }
15389 #endif
15390 return (unsigned int) -1;
15391 }
15392 } else {
15393 unsigned int val;
15394 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
15395 if (!tmp) return (unsigned int) -1;
15396 val = __Pyx_PyInt_As_unsigned_int(tmp);
15397 Py_DECREF(tmp);
15398 return val;
15399 }
15400 raise_overflow:
15401 PyErr_SetString(PyExc_OverflowError,
15402 "value too large to convert to unsigned int");
15403 return (unsigned int) -1;
15404 raise_neg_overflow:
15405 PyErr_SetString(PyExc_OverflowError,
15406 "can't convert negative value to unsigned int");
15407 return (unsigned int) -1;
15408 }
15409
15410 /* CIntFromPy */
__Pyx_PyInt_As_int(PyObject * x)15411 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
15412 const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
15413 const int is_unsigned = neg_one > const_zero;
15414 #if PY_MAJOR_VERSION < 3
15415 if (likely(PyInt_Check(x))) {
15416 if (sizeof(int) < sizeof(long)) {
15417 __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
15418 } else {
15419 long val = PyInt_AS_LONG(x);
15420 if (is_unsigned && unlikely(val < 0)) {
15421 goto raise_neg_overflow;
15422 }
15423 return (int) val;
15424 }
15425 } else
15426 #endif
15427 if (likely(PyLong_Check(x))) {
15428 if (is_unsigned) {
15429 #if CYTHON_USE_PYLONG_INTERNALS
15430 const digit* digits = ((PyLongObject*)x)->ob_digit;
15431 switch (Py_SIZE(x)) {
15432 case 0: return (int) 0;
15433 case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
15434 case 2:
15435 if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
15436 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
15437 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15438 } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
15439 return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
15440 }
15441 }
15442 break;
15443 case 3:
15444 if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
15445 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
15446 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15447 } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
15448 return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
15449 }
15450 }
15451 break;
15452 case 4:
15453 if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
15454 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
15455 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15456 } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
15457 return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
15458 }
15459 }
15460 break;
15461 }
15462 #endif
15463 #if CYTHON_COMPILING_IN_CPYTHON
15464 if (unlikely(Py_SIZE(x) < 0)) {
15465 goto raise_neg_overflow;
15466 }
15467 #else
15468 {
15469 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
15470 if (unlikely(result < 0))
15471 return (int) -1;
15472 if (unlikely(result == 1))
15473 goto raise_neg_overflow;
15474 }
15475 #endif
15476 if (sizeof(int) <= sizeof(unsigned long)) {
15477 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
15478 #ifdef HAVE_LONG_LONG
15479 } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
15480 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
15481 #endif
15482 }
15483 } else {
15484 #if CYTHON_USE_PYLONG_INTERNALS
15485 const digit* digits = ((PyLongObject*)x)->ob_digit;
15486 switch (Py_SIZE(x)) {
15487 case 0: return (int) 0;
15488 case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
15489 case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
15490 case -2:
15491 if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
15492 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
15493 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15494 } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
15495 return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
15496 }
15497 }
15498 break;
15499 case 2:
15500 if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
15501 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
15502 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15503 } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
15504 return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
15505 }
15506 }
15507 break;
15508 case -3:
15509 if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
15510 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
15511 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15512 } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
15513 return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
15514 }
15515 }
15516 break;
15517 case 3:
15518 if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
15519 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
15520 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15521 } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
15522 return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
15523 }
15524 }
15525 break;
15526 case -4:
15527 if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
15528 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
15529 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15530 } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
15531 return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
15532 }
15533 }
15534 break;
15535 case 4:
15536 if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
15537 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
15538 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15539 } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
15540 return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
15541 }
15542 }
15543 break;
15544 }
15545 #endif
15546 if (sizeof(int) <= sizeof(long)) {
15547 __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
15548 #ifdef HAVE_LONG_LONG
15549 } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
15550 __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
15551 #endif
15552 }
15553 }
15554 {
15555 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
15556 PyErr_SetString(PyExc_RuntimeError,
15557 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
15558 #else
15559 int val;
15560 PyObject *v = __Pyx_PyNumber_IntOrLong(x);
15561 #if PY_MAJOR_VERSION < 3
15562 if (likely(v) && !PyLong_Check(v)) {
15563 PyObject *tmp = v;
15564 v = PyNumber_Long(tmp);
15565 Py_DECREF(tmp);
15566 }
15567 #endif
15568 if (likely(v)) {
15569 int one = 1; int is_little = (int)*(unsigned char *)&one;
15570 unsigned char *bytes = (unsigned char *)&val;
15571 int ret = _PyLong_AsByteArray((PyLongObject *)v,
15572 bytes, sizeof(val),
15573 is_little, !is_unsigned);
15574 Py_DECREF(v);
15575 if (likely(!ret))
15576 return val;
15577 }
15578 #endif
15579 return (int) -1;
15580 }
15581 } else {
15582 int val;
15583 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
15584 if (!tmp) return (int) -1;
15585 val = __Pyx_PyInt_As_int(tmp);
15586 Py_DECREF(tmp);
15587 return val;
15588 }
15589 raise_overflow:
15590 PyErr_SetString(PyExc_OverflowError,
15591 "value too large to convert to int");
15592 return (int) -1;
15593 raise_neg_overflow:
15594 PyErr_SetString(PyExc_OverflowError,
15595 "can't convert negative value to int");
15596 return (int) -1;
15597 }
15598
15599 /* CIntFromPy */
__Pyx_PyInt_As_long(PyObject * x)15600 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
15601 const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
15602 const int is_unsigned = neg_one > const_zero;
15603 #if PY_MAJOR_VERSION < 3
15604 if (likely(PyInt_Check(x))) {
15605 if (sizeof(long) < sizeof(long)) {
15606 __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
15607 } else {
15608 long val = PyInt_AS_LONG(x);
15609 if (is_unsigned && unlikely(val < 0)) {
15610 goto raise_neg_overflow;
15611 }
15612 return (long) val;
15613 }
15614 } else
15615 #endif
15616 if (likely(PyLong_Check(x))) {
15617 if (is_unsigned) {
15618 #if CYTHON_USE_PYLONG_INTERNALS
15619 const digit* digits = ((PyLongObject*)x)->ob_digit;
15620 switch (Py_SIZE(x)) {
15621 case 0: return (long) 0;
15622 case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
15623 case 2:
15624 if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
15625 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
15626 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15627 } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
15628 return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
15629 }
15630 }
15631 break;
15632 case 3:
15633 if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
15634 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
15635 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15636 } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
15637 return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
15638 }
15639 }
15640 break;
15641 case 4:
15642 if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
15643 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
15644 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15645 } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
15646 return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
15647 }
15648 }
15649 break;
15650 }
15651 #endif
15652 #if CYTHON_COMPILING_IN_CPYTHON
15653 if (unlikely(Py_SIZE(x) < 0)) {
15654 goto raise_neg_overflow;
15655 }
15656 #else
15657 {
15658 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
15659 if (unlikely(result < 0))
15660 return (long) -1;
15661 if (unlikely(result == 1))
15662 goto raise_neg_overflow;
15663 }
15664 #endif
15665 if (sizeof(long) <= sizeof(unsigned long)) {
15666 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
15667 #ifdef HAVE_LONG_LONG
15668 } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
15669 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
15670 #endif
15671 }
15672 } else {
15673 #if CYTHON_USE_PYLONG_INTERNALS
15674 const digit* digits = ((PyLongObject*)x)->ob_digit;
15675 switch (Py_SIZE(x)) {
15676 case 0: return (long) 0;
15677 case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
15678 case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
15679 case -2:
15680 if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
15681 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
15682 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15683 } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
15684 return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
15685 }
15686 }
15687 break;
15688 case 2:
15689 if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
15690 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
15691 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15692 } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
15693 return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
15694 }
15695 }
15696 break;
15697 case -3:
15698 if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
15699 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
15700 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15701 } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
15702 return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
15703 }
15704 }
15705 break;
15706 case 3:
15707 if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
15708 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
15709 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15710 } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
15711 return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
15712 }
15713 }
15714 break;
15715 case -4:
15716 if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
15717 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
15718 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15719 } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
15720 return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
15721 }
15722 }
15723 break;
15724 case 4:
15725 if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
15726 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
15727 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15728 } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
15729 return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
15730 }
15731 }
15732 break;
15733 }
15734 #endif
15735 if (sizeof(long) <= sizeof(long)) {
15736 __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
15737 #ifdef HAVE_LONG_LONG
15738 } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
15739 __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
15740 #endif
15741 }
15742 }
15743 {
15744 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
15745 PyErr_SetString(PyExc_RuntimeError,
15746 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
15747 #else
15748 long val;
15749 PyObject *v = __Pyx_PyNumber_IntOrLong(x);
15750 #if PY_MAJOR_VERSION < 3
15751 if (likely(v) && !PyLong_Check(v)) {
15752 PyObject *tmp = v;
15753 v = PyNumber_Long(tmp);
15754 Py_DECREF(tmp);
15755 }
15756 #endif
15757 if (likely(v)) {
15758 int one = 1; int is_little = (int)*(unsigned char *)&one;
15759 unsigned char *bytes = (unsigned char *)&val;
15760 int ret = _PyLong_AsByteArray((PyLongObject *)v,
15761 bytes, sizeof(val),
15762 is_little, !is_unsigned);
15763 Py_DECREF(v);
15764 if (likely(!ret))
15765 return val;
15766 }
15767 #endif
15768 return (long) -1;
15769 }
15770 } else {
15771 long val;
15772 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
15773 if (!tmp) return (long) -1;
15774 val = __Pyx_PyInt_As_long(tmp);
15775 Py_DECREF(tmp);
15776 return val;
15777 }
15778 raise_overflow:
15779 PyErr_SetString(PyExc_OverflowError,
15780 "value too large to convert to long");
15781 return (long) -1;
15782 raise_neg_overflow:
15783 PyErr_SetString(PyExc_OverflowError,
15784 "can't convert negative value to long");
15785 return (long) -1;
15786 }
15787
15788 /* CheckBinaryVersion */
__Pyx_check_binary_version(void)15789 static int __Pyx_check_binary_version(void) {
15790 char ctversion[4], rtversion[4];
15791 PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
15792 PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
15793 if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
15794 char message[200];
15795 PyOS_snprintf(message, sizeof(message),
15796 "compiletime version %s of module '%.100s' "
15797 "does not match runtime version %s",
15798 ctversion, __Pyx_MODULE_NAME, rtversion);
15799 return PyErr_WarnEx(NULL, message, 1);
15800 }
15801 return 0;
15802 }
15803
15804 /* InitStrings */
__Pyx_InitStrings(__Pyx_StringTabEntry * t)15805 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
15806 while (t->p) {
15807 #if PY_MAJOR_VERSION < 3
15808 if (t->is_unicode) {
15809 *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
15810 } else if (t->intern) {
15811 *t->p = PyString_InternFromString(t->s);
15812 } else {
15813 *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
15814 }
15815 #else
15816 if (t->is_unicode | t->is_str) {
15817 if (t->intern) {
15818 *t->p = PyUnicode_InternFromString(t->s);
15819 } else if (t->encoding) {
15820 *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
15821 } else {
15822 *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
15823 }
15824 } else {
15825 *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
15826 }
15827 #endif
15828 if (!*t->p)
15829 return -1;
15830 if (PyObject_Hash(*t->p) == -1)
15831 return -1;
15832 ++t;
15833 }
15834 return 0;
15835 }
15836
__Pyx_PyUnicode_FromString(const char * c_str)15837 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
15838 return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
15839 }
__Pyx_PyObject_AsString(PyObject * o)15840 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
15841 Py_ssize_t ignore;
15842 return __Pyx_PyObject_AsStringAndSize(o, &ignore);
15843 }
15844 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
15845 #if !CYTHON_PEP393_ENABLED
__Pyx_PyUnicode_AsStringAndSize(PyObject * o,Py_ssize_t * length)15846 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
15847 char* defenc_c;
15848 PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
15849 if (!defenc) return NULL;
15850 defenc_c = PyBytes_AS_STRING(defenc);
15851 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
15852 {
15853 char* end = defenc_c + PyBytes_GET_SIZE(defenc);
15854 char* c;
15855 for (c = defenc_c; c < end; c++) {
15856 if ((unsigned char) (*c) >= 128) {
15857 PyUnicode_AsASCIIString(o);
15858 return NULL;
15859 }
15860 }
15861 }
15862 #endif
15863 *length = PyBytes_GET_SIZE(defenc);
15864 return defenc_c;
15865 }
15866 #else
__Pyx_PyUnicode_AsStringAndSize(PyObject * o,Py_ssize_t * length)15867 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
15868 if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
15869 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
15870 if (likely(PyUnicode_IS_ASCII(o))) {
15871 *length = PyUnicode_GET_LENGTH(o);
15872 return PyUnicode_AsUTF8(o);
15873 } else {
15874 PyUnicode_AsASCIIString(o);
15875 return NULL;
15876 }
15877 #else
15878 return PyUnicode_AsUTF8AndSize(o, length);
15879 #endif
15880 }
15881 #endif
15882 #endif
__Pyx_PyObject_AsStringAndSize(PyObject * o,Py_ssize_t * length)15883 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
15884 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
15885 if (
15886 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
15887 __Pyx_sys_getdefaultencoding_not_ascii &&
15888 #endif
15889 PyUnicode_Check(o)) {
15890 return __Pyx_PyUnicode_AsStringAndSize(o, length);
15891 } else
15892 #endif
15893 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
15894 if (PyByteArray_Check(o)) {
15895 *length = PyByteArray_GET_SIZE(o);
15896 return PyByteArray_AS_STRING(o);
15897 } else
15898 #endif
15899 {
15900 char* result;
15901 int r = PyBytes_AsStringAndSize(o, &result, length);
15902 if (unlikely(r < 0)) {
15903 return NULL;
15904 } else {
15905 return result;
15906 }
15907 }
15908 }
__Pyx_PyObject_IsTrue(PyObject * x)15909 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
15910 int is_true = x == Py_True;
15911 if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
15912 else return PyObject_IsTrue(x);
15913 }
__Pyx_PyObject_IsTrueAndDecref(PyObject * x)15914 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
15915 int retval;
15916 if (unlikely(!x)) return -1;
15917 retval = __Pyx_PyObject_IsTrue(x);
15918 Py_DECREF(x);
15919 return retval;
15920 }
__Pyx_PyNumber_IntOrLongWrongResultType(PyObject * result,const char * type_name)15921 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
15922 #if PY_MAJOR_VERSION >= 3
15923 if (PyLong_Check(result)) {
15924 if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
15925 "__int__ returned non-int (type %.200s). "
15926 "The ability to return an instance of a strict subclass of int "
15927 "is deprecated, and may be removed in a future version of Python.",
15928 Py_TYPE(result)->tp_name)) {
15929 Py_DECREF(result);
15930 return NULL;
15931 }
15932 return result;
15933 }
15934 #endif
15935 PyErr_Format(PyExc_TypeError,
15936 "__%.4s__ returned non-%.4s (type %.200s)",
15937 type_name, type_name, Py_TYPE(result)->tp_name);
15938 Py_DECREF(result);
15939 return NULL;
15940 }
__Pyx_PyNumber_IntOrLong(PyObject * x)15941 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
15942 #if CYTHON_USE_TYPE_SLOTS
15943 PyNumberMethods *m;
15944 #endif
15945 const char *name = NULL;
15946 PyObject *res = NULL;
15947 #if PY_MAJOR_VERSION < 3
15948 if (likely(PyInt_Check(x) || PyLong_Check(x)))
15949 #else
15950 if (likely(PyLong_Check(x)))
15951 #endif
15952 return __Pyx_NewRef(x);
15953 #if CYTHON_USE_TYPE_SLOTS
15954 m = Py_TYPE(x)->tp_as_number;
15955 #if PY_MAJOR_VERSION < 3
15956 if (m && m->nb_int) {
15957 name = "int";
15958 res = m->nb_int(x);
15959 }
15960 else if (m && m->nb_long) {
15961 name = "long";
15962 res = m->nb_long(x);
15963 }
15964 #else
15965 if (likely(m && m->nb_int)) {
15966 name = "int";
15967 res = m->nb_int(x);
15968 }
15969 #endif
15970 #else
15971 if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
15972 res = PyNumber_Int(x);
15973 }
15974 #endif
15975 if (likely(res)) {
15976 #if PY_MAJOR_VERSION < 3
15977 if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
15978 #else
15979 if (unlikely(!PyLong_CheckExact(res))) {
15980 #endif
15981 return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
15982 }
15983 }
15984 else if (!PyErr_Occurred()) {
15985 PyErr_SetString(PyExc_TypeError,
15986 "an integer is required");
15987 }
15988 return res;
15989 }
15990 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
15991 Py_ssize_t ival;
15992 PyObject *x;
15993 #if PY_MAJOR_VERSION < 3
15994 if (likely(PyInt_CheckExact(b))) {
15995 if (sizeof(Py_ssize_t) >= sizeof(long))
15996 return PyInt_AS_LONG(b);
15997 else
15998 return PyInt_AsSsize_t(b);
15999 }
16000 #endif
16001 if (likely(PyLong_CheckExact(b))) {
16002 #if CYTHON_USE_PYLONG_INTERNALS
16003 const digit* digits = ((PyLongObject*)b)->ob_digit;
16004 const Py_ssize_t size = Py_SIZE(b);
16005 if (likely(__Pyx_sst_abs(size) <= 1)) {
16006 ival = likely(size) ? digits[0] : 0;
16007 if (size == -1) ival = -ival;
16008 return ival;
16009 } else {
16010 switch (size) {
16011 case 2:
16012 if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
16013 return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
16014 }
16015 break;
16016 case -2:
16017 if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
16018 return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
16019 }
16020 break;
16021 case 3:
16022 if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
16023 return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
16024 }
16025 break;
16026 case -3:
16027 if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
16028 return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
16029 }
16030 break;
16031 case 4:
16032 if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
16033 return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
16034 }
16035 break;
16036 case -4:
16037 if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
16038 return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
16039 }
16040 break;
16041 }
16042 }
16043 #endif
16044 return PyLong_AsSsize_t(b);
16045 }
16046 x = PyNumber_Index(b);
16047 if (!x) return -1;
16048 ival = PyInt_AsSsize_t(x);
16049 Py_DECREF(x);
16050 return ival;
16051 }
16052 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
16053 return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
16054 }
16055 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
16056 return PyInt_FromSize_t(ival);
16057 }
16058
16059
16060 #endif /* Py_PYTHON_H */
16061