1: /* Generated by Cython 0.9.6.8 on Tue Nov 13 22:19:52 2007 */
2:
code3: #define PYcode_SSIZE_T_CLEAN
4: #includecode "Python.h"
5: #include "structmember.h"
6: #ifncodedef PY_LONG_LONG
7: #define PY_LONG_LONG LONG_LONG
8: #endif
9: #if PcodeY_VERSION_HEX < 0x02050000
10: typedef codeint Py_ssize_t;
11: #defincodee PY_SSIZE_T_MAX INT_MAX
12: #define PY_SSIZE_T_MIN INT_MIN
13: code #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
14: #define PyInt_AsSsize_t(o) PyInt_AsLong(o)
15: #define PyNumber_Index(o) PyNumber_Int(o)
16: #define PyIndex_Check(o) PyNumber_Check(o)
17: code#endif
18: #if PY_VERSION_HEX < 0x02040000
19: #define METH_COEXIST 0
20: #endif
21: code#ifndef WIN32
22: #dcodeefine __stdcall
23: #dcodeefine __cdecl
24: #endif
25: #ifdecodef __cplusplus
26: #define __codePYX_EXTERN_C extern "C"
27: #else
code28: #define __PYX_EXTERN_C extern
29: #endif
30: #include
31:
32:
33: #ifdef __GNUC__
34: #define INLINE __inline__
35: #elif _WIN32
36: #define INLINE __inline
37: #else
38: #define INLINE
39: #endif
40:
41: typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/
42: typedef struct {PyObject **p; char *s; long n; int is_unicode;} __Pyx_StringTabEntry; /*proto*/
43:
44: static INLINE Py_ssize_t __pyx_PyIndex_AsSsize_t(PyObject* b) {
45: Py_ssize_t ival;
46: PyObject* x = PyNumber_Index(b);
47: if (!x) return -1;
48: ival = PyInt_AsSsize_t(x);
49: Py_DECREF(x);
50: return ival;
51: }
52:
53: #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
54: static INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
55: if (x == Py_True) return 1;
56: else if (x == Py_False) return 0;
57: else return PyObject_IsTrue(x);
58: }
59:
60:
61:
62: static int __pyx_skip_dispatch = 0;
63:
64:
65: #ifdef __GNUC__
66: /* Test for GCC > 2.95 */
67: #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
68: #define likely(x) __builtin_expect(!!(x), 1)
69: #define unlikely(x) __builtin_expect(!!(x), 0)
70: #else /* __GNUC__ > 2 ... */
71: #define likely(x) (x)
72: #define unlikely(x) (x)
73: #endif /* __GNUC__ > 2 ... */
74: #else /* __GNUC__ */
75: #define likely(x) (x)
76: #define unlikely(x) (x)
77: #endif /* __GNUC__ */
78:
79: static PyObject *__pyx_m;
80: static PyObject *__pyx_b;
81: static int __pyx_lineno;
82: static char *__pyx_filename;
83: static char **__pyx_f;
84:
85: static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, char *modname); /*proto*/
86:
87: static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
88:
89: static int __Pyx_PrintItem(PyObject *); /*proto*/
90: static int __Pyx_PrintNewline(void); /*proto*/
91:
92: static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
93:
94: static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/
95:
96: static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
97:
98: static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
99:
100: static void __Pyx_AddTraceback(char *funcname); /*proto*/
101:
102: static PyObject *__Pyx_ImportModule(char *name); /*proto*/
103:
104: static int __Pyx_RegisterCleanup(); /*proto*/
105: static PyObject* cleanup(PyObject *self, PyObject *unused); /*proto*/
106: static PyMethodDef cleanup_def = {"__cleanup", (PyCFunction)&cleanup, METH_NOARGS, 0};
107:
108: /* Declarations from cpdef */
109:
110: struct __pyx_obj_5cpdef_A {
111: PyObject_HEAD
112: struct __pyx_vtabstruct_5cpdef_A *__pyx_vtab;
113: };
114:
115: struct __pyx_obj_5cpdef_B {
116: struct __pyx_obj_5cpdef_A __pyx_base;
117: };
118:
119: struct __pyx_obj_5cpdef_AA {
120: struct __pyx_obj_5cpdef_A __pyx_base;
121: };
122:
123:
124: struct __pyx_vtabstruct_5cpdef_A {
125: PyObject *(*foo)(struct __pyx_obj_5cpdef_A *,int);
126: };
127: static struct __pyx_vtabstruct_5cpdef_A *__pyx_vtabptr_5cpdef_A;
128:
129:
130: struct __pyx_vtabstruct_5cpdef_B {
131: struct __pyx_vtabstruct_5cpdef_A __pyx_base;
132: };
133: static struct __pyx_vtabstruct_5cpdef_B *__pyx_vtabptr_5cpdef_B;
134:
135:
136: struct __pyx_vtabstruct_5cpdef_AA {
137: struct __pyx_vtabstruct_5cpdef_A __pyx_base;
138: };
139: static struct __pyx_vtabstruct_5cpdef_AA *__pyx_vtabptr_5cpdef_AA;
140:
141: static PyTypeObject *__pyx_ptype_5cpdef_A = 0;
142: static PyTypeObject *__pyx_ptype_5cpdef_B = 0;
143: static PyTypeObject *__pyx_ptype_5cpdef_AA = 0;
144:
145:
146: /* Implementation of cpdef */
147:
148:
149: static PyObject *__pyx_num_5;
150: static PyObject *__pyx_num_10;
151: static PyObject *__pyx_num_4;
152:
153: static PyObject *__pyx_n_foo;
154: static PyObject *__pyx_n_bar;
155: static PyObject *__pyx_n_C;
156: static PyObject *__pyx_n_D;
157: static PyObject *__pyx_n_x;
158:
159: static PyObject *__pyx_k3p;
160:
161: static char __pyx_k3[] = "A %s";
162:
163: static PyObject *__pyx_pf_5cpdef_1A_foo(PyObject *__pyx_v_self, PyObject *__pyx_arg_k); /*proto*/
164: static PyObject *__pyx_f_5cpdef_1A_foo(struct __pyx_obj_5cpdef_A *__pyx_v_self,int __pyx_v_k) {
165: PyObject *__pyx_r;
166: PyObject *__pyx_1 = 0;
167: PyObject *__pyx_2 = 0;
168: PyObject *__pyx_3 = 0;
169: Py_INCREF(__pyx_v_self);
170: /* Check if called by wrapper */
171: if (unlikely(__pyx_skip_dispatch)) __pyx_skip_dispatch = 0;
172: /* Check if overriden in Python */
173: else if (unlikely(((PyObject *)__pyx_v_self)->ob_type->tp_dictoffset != 0)) {
174: __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_foo); if (unlikely(!((PyObject *)__pyx_v_self))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; goto __pyx_L1;}
175: if (!(strcmp(__pyx_1->ob_type->tp_name, "builtin_function_or_method") == 0) || (PyCFunction_GET_FUNCTION(__pyx_1) != &__pyx_pf_5cpdef_1A_foo)) {
176: __pyx_2 = PyInt_FromLong(__pyx_v_k); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; goto __pyx_L1;}
177: __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; goto __pyx_L1;}
178: PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
179: __pyx_2 = 0;
180: __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; goto __pyx_L1;}
181: Py_DECREF(__pyx_1); __pyx_1 = 0;
182: Py_DECREF(__pyx_3); __pyx_3 = 0;
183: __pyx_r = __pyx_2;
184: __pyx_2 = 0;
185: goto __pyx_L0;
186: }
187: }
188: __pyx_1 = PyInt_FromLong(__pyx_v_k); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; goto __pyx_L1;}
189: __pyx_3 = PyNumber_Remainder(__pyx_k3p, __pyx_1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; goto __pyx_L1;}
190: Py_DECREF(__pyx_1); __pyx_1 = 0;
191: __pyx_r = __pyx_3;
192: __pyx_3 = 0;
193: goto __pyx_L0;
194:
195: __pyx_r = Py_None; Py_INCREF(Py_None);
196: goto __pyx_L0;
197: __pyx_L1:;
198: Py_XDECREF(__pyx_1);
199: Py_XDECREF(__pyx_2);
200: Py_XDECREF(__pyx_3);
201: __Pyx_AddTraceback("cpdef.A.foo");
202: __pyx_r = 0;
203: __pyx_L0:;
204: Py_DECREF(__pyx_v_self);
205: return __pyx_r;
206: }
207:
208: static PyObject *__pyx_pf_5cpdef_1A_foo(PyObject *__pyx_v_self, PyObject *__pyx_arg_k); /*proto*/
209: static PyObject *__pyx_pf_5cpdef_1A_foo(PyObject *__pyx_v_self, PyObject *__pyx_arg_k) {
210: int __pyx_v_k;
211: PyObject *__pyx_r;
212: PyObject *__pyx_1 = 0;
213: Py_INCREF(__pyx_v_self);
214: assert(__pyx_arg_k); {
215: __pyx_v_k = PyInt_AsLong(__pyx_arg_k); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; goto __pyx_L1;}
216: }
217: __pyx_1 = (__pyx_skip_dispatch = 1, ((struct __pyx_vtabstruct_5cpdef_A *)((struct __pyx_obj_5cpdef_A *)__pyx_v_self)->__pyx_vtab)->foo(((struct __pyx_obj_5cpdef_A *)__pyx_v_self),__pyx_v_k)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; goto __pyx_L1;}
218: __pyx_r = __pyx_1;
219: __pyx_1 = 0;
220: goto __pyx_L0;
221:
222: __pyx_r = Py_None; Py_INCREF(Py_None);
223: goto __pyx_L0;
224: __pyx_L1:;
225: Py_XDECREF(__pyx_1);
226: __Pyx_AddTraceback("cpdef.A.foo");
227: __pyx_r = NULL;
228: __pyx_L0:;
229: Py_DECREF(__pyx_v_self);
230: return __pyx_r;
231: }
232:
233: static PyObject *__pyx_pf_5cpdef_1A_bar(PyObject *__pyx_v_self, PyObject *__pyx_arg_k); /*proto*/
234: static PyObject *__pyx_pf_5cpdef_1A_bar(PyObject *__pyx_v_self, PyObject *__pyx_arg_k) {
235: int __pyx_v_k;
236: PyObject *__pyx_r;
237: PyObject *__pyx_1 = 0;
238: PyObject *__pyx_2 = 0;
239: PyObject *__pyx_3 = 0;
240: Py_INCREF(__pyx_v_self);
241: assert(__pyx_arg_k); {
242: __pyx_v_k = PyInt_AsLong(__pyx_arg_k); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; goto __pyx_L1;}
243: }
244: __pyx_1 = ((struct __pyx_vtabstruct_5cpdef_A *)((struct __pyx_obj_5cpdef_A *)__pyx_v_self)->__pyx_vtab)->foo(((struct __pyx_obj_5cpdef_A *)__pyx_v_self),__pyx_v_k); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; goto __pyx_L1;}
245: __pyx_2 = (__pyx_skip_dispatch = 1, __pyx_vtabptr_5cpdef_A->foo(((struct __pyx_obj_5cpdef_A *)__pyx_v_self),__pyx_v_k)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; goto __pyx_L1;}
246: __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; goto __pyx_L1;}
247: PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
248: PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2);
249: __pyx_1 = 0;
250: __pyx_2 = 0;
251: __pyx_r = __pyx_3;
252: __pyx_3 = 0;
253: goto __pyx_L0;
254:
255: __pyx_r = Py_None; Py_INCREF(Py_None);
256: goto __pyx_L0;
257: __pyx_L1:;
258: Py_XDECREF(__pyx_1);
259: Py_XDECREF(__pyx_2);
260: Py_XDECREF(__pyx_3);
261: __Pyx_AddTraceback("cpdef.A.bar");
262: __pyx_r = NULL;
263: __pyx_L0:;
264: Py_DECREF(__pyx_v_self);
265: return __pyx_r;
266: }
267:
268: static PyObject *__pyx_k4p;
269:
270: static char __pyx_k4[] = "B %s";
271:
272: static PyObject *__pyx_pf_5cpdef_1B_foo(PyObject *__pyx_v_self, PyObject *__pyx_arg_k); /*proto*/
273: static PyObject *__pyx_f_5cpdef_1B_foo(struct __pyx_obj_5cpdef_B *__pyx_v_self,int __pyx_v_k) {
274: PyObject *__pyx_r;
275: PyObject *__pyx_1 = 0;
276: PyObject *__pyx_2 = 0;
277: PyObject *__pyx_3 = 0;
278: Py_INCREF((PyObject *)__pyx_v_self);
279: /* Check if called by wrapper */
280: if (unlikely(__pyx_skip_dispatch)) __pyx_skip_dispatch = 0;
281: /* Check if overriden in Python */
282: else if (unlikely(((PyObject *)__pyx_v_self)->ob_type->tp_dictoffset != 0)) {
283: __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_foo); if (unlikely(!((PyObject *)__pyx_v_self))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; goto __pyx_L1;}
284: if (!(strcmp(__pyx_1->ob_type->tp_name, "builtin_function_or_method") == 0) || (PyCFunction_GET_FUNCTION(__pyx_1) != &__pyx_pf_5cpdef_1B_foo)) {
285: __pyx_2 = PyInt_FromLong(__pyx_v_k); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; goto __pyx_L1;}
286: __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; goto __pyx_L1;}
287: PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
288: __pyx_2 = 0;
289: __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; goto __pyx_L1;}
290: Py_DECREF(__pyx_1); __pyx_1 = 0;
291: Py_DECREF(__pyx_3); __pyx_3 = 0;
292: __pyx_r = __pyx_2;
293: __pyx_2 = 0;
294: goto __pyx_L0;
295: }
296: }
297: __pyx_1 = PyInt_FromLong(__pyx_v_k); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; goto __pyx_L1;}
298: __pyx_3 = PyNumber_Remainder(__pyx_k4p, __pyx_1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; goto __pyx_L1;}
299: Py_DECREF(__pyx_1); __pyx_1 = 0;
300: __pyx_r = __pyx_3;
301: __pyx_3 = 0;
302: goto __pyx_L0;
303:
304: __pyx_r = Py_None; Py_INCREF(Py_None);
305: goto __pyx_L0;
306: __pyx_L1:;
307: Py_XDECREF(__pyx_1);
308: Py_XDECREF(__pyx_2);
309: Py_XDECREF(__pyx_3);
310: __Pyx_AddTraceback("cpdef.B.foo");
311: __pyx_r = 0;
312: __pyx_L0:;
313: Py_DECREF((PyObject *)__pyx_v_self);
314: return __pyx_r;
315: }
316:
317: static PyObject *__pyx_pf_5cpdef_1B_foo(PyObject *__pyx_v_self, PyObject *__pyx_arg_k); /*proto*/
318: static PyObject *__pyx_pf_5cpdef_1B_foo(PyObject *__pyx_v_self, PyObject *__pyx_arg_k) {
319: int __pyx_v_k;
320: PyObject *__pyx_r;
321: PyObject *__pyx_1 = 0;
322: Py_INCREF((PyObject *)__pyx_v_self);
323: assert(__pyx_arg_k); {
324: __pyx_v_k = PyInt_AsLong(__pyx_arg_k); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; goto __pyx_L1;}
325: }
326: __pyx_1 = (__pyx_skip_dispatch = 1, ((struct __pyx_vtabstruct_5cpdef_B *)((struct __pyx_obj_5cpdef_B *)__pyx_v_self)->__pyx_base.__pyx_vtab)->__pyx_base.foo(((struct __pyx_obj_5cpdef_A *)__pyx_v_self),__pyx_v_k)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; goto __pyx_L1;}
327: __pyx_r = __pyx_1;
328: __pyx_1 = 0;
329: goto __pyx_L0;
330:
331: __pyx_r = Py_None; Py_INCREF(Py_None);
332: goto __pyx_L0;
333: __pyx_L1:;
334: Py_XDECREF(__pyx_1);
335: __Pyx_AddTraceback("cpdef.B.foo");
336: __pyx_r = NULL;
337: __pyx_L0:;
338: Py_DECREF((PyObject *)__pyx_v_self);
339: return __pyx_r;
340: }
341:
342: static PyObject *__pyx_k5p;
343:
344: static char __pyx_k5[] = "C %s";
345:
346: static PyObject *__pyx_pf_5cpdef_1C_foo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
347: static PyMethodDef __pyx_mdef_5cpdef_1C_foo = {"foo", (PyCFunction)__pyx_pf_5cpdef_1C_foo, METH_VARARGS|METH_KEYWORDS, 0};
348: static PyObject *__pyx_pf_5cpdef_1C_foo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
349: PyObject *__pyx_v_self = 0;
350: int __pyx_v_k;
351: PyObject *__pyx_r;
352: PyObject *__pyx_1 = 0;
353: PyObject *__pyx_2 = 0;
354: static char *__pyx_argnames[] = {"self","k",0};
355: if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "Oi", __pyx_argnames, &__pyx_v_self, &__pyx_v_k))) return NULL;
356: Py_INCREF(__pyx_v_self);
357: __pyx_1 = PyInt_FromLong(__pyx_v_k); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; goto __pyx_L1;}
358: __pyx_2 = PyNumber_Remainder(__pyx_k5p, __pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; goto __pyx_L1;}
359: Py_DECREF(__pyx_1); __pyx_1 = 0;
360: __pyx_r = __pyx_2;
361: __pyx_2 = 0;
362: goto __pyx_L0;
363:
364: __pyx_r = Py_None; Py_INCREF(Py_None);
365: goto __pyx_L0;
366: __pyx_L1:;
367: Py_XDECREF(__pyx_1);
368: Py_XDECREF(__pyx_2);
369: __Pyx_AddTraceback("cpdef.C.foo");
370: __pyx_r = NULL;
371: __pyx_L0:;
372: Py_DECREF(__pyx_v_self);
373: return __pyx_r;
374: }
375:
376: static PyObject *__pyx_k6p;
377:
378: static char __pyx_k6[] = "D %s";
379:
380: static PyObject *__pyx_pf_5cpdef_1D_foo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
381: static PyMethodDef __pyx_mdef_5cpdef_1D_foo = {"foo", (PyCFunction)__pyx_pf_5cpdef_1D_foo, METH_VARARGS|METH_KEYWORDS, 0};
382: static PyObject *__pyx_pf_5cpdef_1D_foo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
383: PyObject *__pyx_v_self = 0;
384: int __pyx_v_k;
385: PyObject *__pyx_r;
386: PyObject *__pyx_1 = 0;
387: PyObject *__pyx_2 = 0;
388: PyObject *__pyx_3 = 0;
389: PyObject *__pyx_4 = 0;
390: PyObject *__pyx_5 = 0;
391: static char *__pyx_argnames[] = {"self","k",0};
392: if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "Oi", __pyx_argnames, &__pyx_v_self, &__pyx_v_k))) return NULL;
393: Py_INCREF(__pyx_v_self);
394: __pyx_1 = PyInt_FromLong(__pyx_v_k); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;}
395: __pyx_2 = PyNumber_Remainder(__pyx_k6p, __pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;}
396: Py_DECREF(__pyx_1); __pyx_1 = 0;
397: __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_C); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;}
398: __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_foo); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;}
399: Py_DECREF(__pyx_1); __pyx_1 = 0;
400: __pyx_1 = PyInt_FromLong(__pyx_v_k); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;}
401: __pyx_4 = PyTuple_New(2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;}
402: Py_INCREF(__pyx_v_self);
403: PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_self);
404: PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1);
405: __pyx_1 = 0;
406: __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;}
407: Py_DECREF(__pyx_3); __pyx_3 = 0;
408: Py_DECREF(__pyx_4); __pyx_4 = 0;
409: if (!__Pyx_TypeTest(__pyx_v_self, __pyx_ptype_5cpdef_A)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;}
410: __pyx_3 = (__pyx_skip_dispatch = 1, __pyx_vtabptr_5cpdef_B->__pyx_base.foo(((struct __pyx_obj_5cpdef_A *)__pyx_v_self),__pyx_v_k)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;}
411: if (!__Pyx_TypeTest(__pyx_v_self, __pyx_ptype_5cpdef_A)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;}
412: __pyx_4 = (__pyx_skip_dispatch = 1, __pyx_vtabptr_5cpdef_A->foo(((struct __pyx_obj_5cpdef_A *)__pyx_v_self),__pyx_v_k)); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;}
413: __pyx_5 = PyTuple_New(4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;}
414: PyTuple_SET_ITEM(__pyx_5, 0, __pyx_2);
415: PyTuple_SET_ITEM(__pyx_5, 1, __pyx_1);
416: PyTuple_SET_ITEM(__pyx_5, 2, __pyx_3);
417: PyTuple_SET_ITEM(__pyx_5, 3, __pyx_4);
418: __pyx_2 = 0;
419: __pyx_1 = 0;
420: __pyx_3 = 0;
421: __pyx_4 = 0;
422: __pyx_r = __pyx_5;
423: __pyx_5 = 0;
424: goto __pyx_L0;
425:
426: __pyx_r = Py_None; Py_INCREF(Py_None);
427: goto __pyx_L0;
428: __pyx_L1:;
429: Py_XDECREF(__pyx_1);
430: Py_XDECREF(__pyx_2);
431: Py_XDECREF(__pyx_3);
432: Py_XDECREF(__pyx_4);
433: Py_XDECREF(__pyx_5);
434: __Pyx_AddTraceback("cpdef.D.foo");
435: __pyx_r = NULL;
436: __pyx_L0:;
437: Py_DECREF(__pyx_v_self);
438: return __pyx_r;
439: }
440:
441: static PyObject *__pyx_pf_5cpdef_2AA_foo(PyObject *__pyx_v_self, PyObject *__pyx_arg_k); /*proto*/
442: static PyObject *__pyx_f_5cpdef_2AA_foo(struct __pyx_obj_5cpdef_AA *__pyx_v_self,int __pyx_v_k) {
443: PyObject *__pyx_r;
444: PyObject *__pyx_1 = 0;
445: PyObject *__pyx_2 = 0;
446: PyObject *__pyx_3 = 0;
447: Py_INCREF((PyObject *)__pyx_v_self);
448: /* Check if called by wrapper */
449: if (unlikely(__pyx_skip_dispatch)) __pyx_skip_dispatch = 0;
450: /* Check if overriden in Python */
451: else if (unlikely(((PyObject *)__pyx_v_self)->ob_type->tp_dictoffset != 0)) {
452: __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_foo); if (unlikely(!((PyObject *)__pyx_v_self))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; goto __pyx_L1;}
453: if (!(strcmp(__pyx_1->ob_type->tp_name, "builtin_function_or_method") == 0) || (PyCFunction_GET_FUNCTION(__pyx_1) != &__pyx_pf_5cpdef_2AA_foo)) {
454: __pyx_2 = PyInt_FromLong(__pyx_v_k); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; goto __pyx_L1;}
455: __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; goto __pyx_L1;}
456: PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
457: __pyx_2 = 0;
458: __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; goto __pyx_L1;}
459: Py_DECREF(__pyx_1); __pyx_1 = 0;
460: Py_DECREF(__pyx_3); __pyx_3 = 0;
461: __pyx_r = __pyx_2;
462: __pyx_2 = 0;
463: goto __pyx_L0;
464: }
465: }
466: __pyx_1 = PyInt_FromLong(__pyx_v_k); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; goto __pyx_L1;}
467: __pyx_r = __pyx_1;
468: __pyx_1 = 0;
469: goto __pyx_L0;
470:
471: __pyx_r = Py_None; Py_INCREF(Py_None);
472: goto __pyx_L0;
473: __pyx_L1:;
474: Py_XDECREF(__pyx_1);
475: Py_XDECREF(__pyx_2);
476: Py_XDECREF(__pyx_3);
477: __Pyx_AddTraceback("cpdef.AA.foo");
478: __pyx_r = 0;
479: __pyx_L0:;
480: Py_DECREF((PyObject *)__pyx_v_self);
481: return __pyx_r;
482: }
483:
484: static PyObject *__pyx_pf_5cpdef_2AA_foo(PyObject *__pyx_v_self, PyObject *__pyx_arg_k); /*proto*/
485: static PyObject *__pyx_pf_5cpdef_2AA_foo(PyObject *__pyx_v_self, PyObject *__pyx_arg_k) {
486: int __pyx_v_k;
487: PyObject *__pyx_r;
488: PyObject *__pyx_1 = 0;
489: Py_INCREF((PyObject *)__pyx_v_self);
490: assert(__pyx_arg_k); {
491: __pyx_v_k = PyInt_AsLong(__pyx_arg_k); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; goto __pyx_L1;}
492: }
493: __pyx_1 = (__pyx_skip_dispatch = 1, ((struct __pyx_vtabstruct_5cpdef_AA *)((struct __pyx_obj_5cpdef_AA *)__pyx_v_self)->__pyx_base.__pyx_vtab)->__pyx_base.foo(((struct __pyx_obj_5cpdef_A *)__pyx_v_self),__pyx_v_k)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; goto __pyx_L1;}
494: __pyx_r = __pyx_1;
495: __pyx_1 = 0;
496: goto __pyx_L0;
497:
498: __pyx_r = Py_None; Py_INCREF(Py_None);
499: goto __pyx_L0;
500: __pyx_L1:;
501: Py_XDECREF(__pyx_1);
502: __Pyx_AddTraceback("cpdef.AA.foo");
503: __pyx_r = NULL;
504: __pyx_L0:;
505: Py_DECREF((PyObject *)__pyx_v_self);
506: return __pyx_r;
507: }
508:
509: static __Pyx_InternTabEntry __pyx_intern_tab[] = {
510: {&__pyx_n_C, "C"},
511: {&__pyx_n_D, "D"},
512: {&__pyx_n_bar, "bar"},
513: {&__pyx_n_foo, "foo"},
514: {&__pyx_n_x, "x"},
515: {0, 0}
516: };
517:
518: static __Pyx_StringTabEntry __pyx_string_tab[] = {
519: {&__pyx_k3p, __pyx_k3, sizeof(__pyx_k3), 0},
520: {&__pyx_k4p, __pyx_k4, sizeof(__pyx_k4), 0},
521: {&__pyx_k5p, __pyx_k5, sizeof(__pyx_k5), 0},
522: {&__pyx_k6p, __pyx_k6, sizeof(__pyx_k6), 0},
523: {0, 0, 0, 0}
524: };
525: static struct __pyx_vtabstruct_5cpdef_A __pyx_vtable_5cpdef_A;
526:
527: static PyObject *__pyx_tp_new_5cpdef_A(PyTypeObject *t, PyObject *a, PyObject *k) {
528: struct __pyx_obj_5cpdef_A *p;
529: PyObject *o = (*t->tp_alloc)(t, 0);
530: if (!o) return 0;
531: p = ((struct __pyx_obj_5cpdef_A *)o);
532: *(struct __pyx_vtabstruct_5cpdef_A **)&p->__pyx_vtab = __pyx_vtabptr_5cpdef_A;
533: return o;
534: }
535:
536: static void __pyx_tp_dealloc_5cpdef_A(PyObject *o) {
537: (*o->ob_type->tp_free)(o);
538: }
539:
540: static int __pyx_tp_traverse_5cpdef_A(PyObject *o, visitproc v, void *a) {
541: return 0;
542: }
543:
544: static int __pyx_tp_clear_5cpdef_A(PyObject *o) {
545: return 0;
546: }
547:
548: static struct PyMethodDef __pyx_methods_5cpdef_A[] = {
549: {"foo", (PyCFunction)__pyx_pf_5cpdef_1A_foo, METH_O, 0},
550: {"bar", (PyCFunction)__pyx_pf_5cpdef_1A_bar, METH_O, 0},
551: {0, 0, 0, 0}
552: };
553:
554: static PyNumberMethods __pyx_tp_as_number_A = {
555: 0, /*nb_add*/
556: 0, /*nb_subtract*/
557: 0, /*nb_multiply*/
558: 0, /*nb_divide*/
559: 0, /*nb_remainder*/
560: 0, /*nb_divmod*/
561: 0, /*nb_power*/
562: 0, /*nb_negative*/
563: 0, /*nb_positive*/
564: 0, /*nb_absolute*/
565: 0, /*nb_nonzero*/
566: 0, /*nb_invert*/
567: 0, /*nb_lshift*/
568: 0, /*nb_rshift*/
569: 0, /*nb_and*/
570: 0, /*nb_xor*/
571: 0, /*nb_or*/
572: 0, /*nb_coerce*/
573: 0, /*nb_int*/
574: 0, /*nb_long*/
575: 0, /*nb_float*/
576: 0, /*nb_oct*/
577: 0, /*nb_hex*/
578: 0, /*nb_inplace_add*/
579: 0, /*nb_inplace_subtract*/
580: 0, /*nb_inplace_multiply*/
581: 0, /*nb_inplace_divide*/
582: 0, /*nb_inplace_remainder*/
583: 0, /*nb_inplace_power*/
584: 0, /*nb_inplace_lshift*/
585: 0, /*nb_inplace_rshift*/
586: 0, /*nb_inplace_and*/
587: 0, /*nb_inplace_xor*/
588: 0, /*nb_inplace_or*/
589: 0, /*nb_floor_divide*/
590: 0, /*nb_true_divide*/
591: 0, /*nb_inplace_floor_divide*/
592: 0, /*nb_inplace_true_divide*/
593: #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
594: 0, /*nb_index*/
595: #endif
596: };
597:
598: static PySequenceMethods __pyx_tp_as_sequence_A = {
599: 0, /*sq_length*/
600: 0, /*sq_concat*/
601: 0, /*sq_repeat*/
602: 0, /*sq_item*/
603: 0, /*sq_slice*/
604: 0, /*sq_ass_item*/
605: 0, /*sq_ass_slice*/
606: 0, /*sq_contains*/
607: 0, /*sq_inplace_concat*/
608: 0, /*sq_inplace_repeat*/
609: };
610:
611: static PyMappingMethods __pyx_tp_as_mapping_A = {
612: 0, /*mp_length*/
613: 0, /*mp_subscript*/
614: 0, /*mp_ass_subscript*/
615: };
616:
617: static PyBufferProcs __pyx_tp_as_buffer_A = {
618: 0, /*bf_getreadbuffer*/
619: 0, /*bf_getwritebuffer*/
620: 0, /*bf_getsegcount*/
621: 0, /*bf_getcharbuffer*/
622: };
623:
624: PyTypeObject __pyx_type_5cpdef_A = {
625: PyObject_HEAD_INIT(0)
626: 0, /*ob_size*/
627: "cpdef.A", /*tp_name*/
628: sizeof(struct __pyx_obj_5cpdef_A), /*tp_basicsize*/
629: 0, /*tp_itemsize*/
630: __pyx_tp_dealloc_5cpdef_A, /*tp_dealloc*/
631: 0, /*tp_print*/
632: 0, /*tp_getattr*/
633: 0, /*tp_setattr*/
634: 0, /*tp_compare*/
635: 0, /*tp_repr*/
636: &__pyx_tp_as_number_A, /*tp_as_number*/
637: &__pyx_tp_as_sequence_A, /*tp_as_sequence*/
638: &__pyx_tp_as_mapping_A, /*tp_as_mapping*/
639: 0, /*tp_hash*/
640: 0, /*tp_call*/
641: 0, /*tp_str*/
642: 0, /*tp_getattro*/
643: 0, /*tp_setattro*/
644: &__pyx_tp_as_buffer_A, /*tp_as_buffer*/
645: Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
646: 0, /*tp_doc*/
647: __pyx_tp_traverse_5cpdef_A, /*tp_traverse*/
648: __pyx_tp_clear_5cpdef_A, /*tp_clear*/
649: 0, /*tp_richcompare*/
650: 0, /*tp_weaklistoffset*/
651: 0, /*tp_iter*/
652: 0, /*tp_iternext*/
653: __pyx_methods_5cpdef_A, /*tp_methods*/
654: 0, /*tp_members*/
655: 0, /*tp_getset*/
656: 0, /*tp_base*/
657: 0, /*tp_dict*/
658: 0, /*tp_descr_get*/
659: 0, /*tp_descr_set*/
660: 0, /*tp_dictoffset*/
661: 0, /*tp_init*/
662: 0, /*tp_alloc*/
663: __pyx_tp_new_5cpdef_A, /*tp_new*/
664: 0, /*tp_free*/
665: 0, /*tp_is_gc*/
666: 0, /*tp_bases*/
667: 0, /*tp_mro*/
668: 0, /*tp_cache*/
669: 0, /*tp_subclasses*/
670: 0, /*tp_weaklist*/
671: };
672: static struct __pyx_vtabstruct_5cpdef_B __pyx_vtable_5cpdef_B;
673:
674: static PyObject *__pyx_tp_new_5cpdef_B(PyTypeObject *t, PyObject *a, PyObject *k) {
675: struct __pyx_obj_5cpdef_B *p;
676: PyObject *o = __pyx_ptype_5cpdef_A->tp_new(t, a, k);
677: if (!o) return 0;
678: p = ((struct __pyx_obj_5cpdef_B *)o);
679: *(struct __pyx_vtabstruct_5cpdef_B **)&p->__pyx_base.__pyx_vtab = __pyx_vtabptr_5cpdef_B;
680: return o;
681: }
682:
683: static void __pyx_tp_dealloc_5cpdef_B(PyObject *o) {
684: __pyx_ptype_5cpdef_A->tp_dealloc(o);
685: }
686:
687: static int __pyx_tp_traverse_5cpdef_B(PyObject *o, visitproc v, void *a) {
688: int e;
689: e = __pyx_ptype_5cpdef_A->tp_traverse(o, v, a); if (e) return e;
690: return 0;
691: }
692:
693: static int __pyx_tp_clear_5cpdef_B(PyObject *o) {
694: __pyx_ptype_5cpdef_A->tp_clear(o);
695: return 0;
696: }
697:
698: static struct PyMethodDef __pyx_methods_5cpdef_B[] = {
699: {"foo", (PyCFunction)__pyx_pf_5cpdef_1B_foo, METH_O, 0},
700: {0, 0, 0, 0}
701: };
702:
703: static PyNumberMethods __pyx_tp_as_number_B = {
704: 0, /*nb_add*/
705: 0, /*nb_subtract*/
706: 0, /*nb_multiply*/
707: 0, /*nb_divide*/
708: 0, /*nb_remainder*/
709: 0, /*nb_divmod*/
710: 0, /*nb_power*/
711: 0, /*nb_negative*/
712: 0, /*nb_positive*/
713: 0, /*nb_absolute*/
714: 0, /*nb_nonzero*/
715: 0, /*nb_invert*/
716: 0, /*nb_lshift*/
717: 0, /*nb_rshift*/
718: 0, /*nb_and*/
719: 0, /*nb_xor*/
720: 0, /*nb_or*/
721: 0, /*nb_coerce*/
722: 0, /*nb_int*/
723: 0, /*nb_long*/
724: 0, /*nb_float*/
725: 0, /*nb_oct*/
726: 0, /*nb_hex*/
727: 0, /*nb_inplace_add*/
728: 0, /*nb_inplace_subtract*/
729: 0, /*nb_inplace_multiply*/
730: 0, /*nb_inplace_divide*/
731: 0, /*nb_inplace_remainder*/
732: 0, /*nb_inplace_power*/
733: 0, /*nb_inplace_lshift*/
734: 0, /*nb_inplace_rshift*/
735: 0, /*nb_inplace_and*/
736: 0, /*nb_inplace_xor*/
737: 0, /*nb_inplace_or*/
738: 0, /*nb_floor_divide*/
739: 0, /*nb_true_divide*/
740: 0, /*nb_inplace_floor_divide*/
741: 0, /*nb_inplace_true_divide*/
742: #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
743: 0, /*nb_index*/
744: #endif
745: };
746:
747: static PySequenceMethods __pyx_tp_as_sequence_B = {
748: 0, /*sq_length*/
749: 0, /*sq_concat*/
750: 0, /*sq_repeat*/
751: 0, /*sq_item*/
752: 0, /*sq_slice*/
753: 0, /*sq_ass_item*/
754: 0, /*sq_ass_slice*/
755: 0, /*sq_contains*/
756: 0, /*sq_inplace_concat*/
757: 0, /*sq_inplace_repeat*/
758: };
759:
760: static PyMappingMethods __pyx_tp_as_mapping_B = {
761: 0, /*mp_length*/
762: 0, /*mp_subscript*/
763: 0, /*mp_ass_subscript*/
764: };
765:
766: static PyBufferProcs __pyx_tp_as_buffer_B = {
767: 0, /*bf_getreadbuffer*/
768: 0, /*bf_getwritebuffer*/
769: 0, /*bf_getsegcount*/
770: 0, /*bf_getcharbuffer*/
771: };
772:
773: PyTypeObject __pyx_type_5cpdef_B = {
774: PyObject_HEAD_INIT(0)
775: 0, /*ob_size*/
776: "cpdef.B", /*tp_name*/
777: sizeof(struct __pyx_obj_5cpdef_B), /*tp_basicsize*/
778: 0, /*tp_itemsize*/
779: __pyx_tp_dealloc_5cpdef_B, /*tp_dealloc*/
780: 0, /*tp_print*/
781: 0, /*tp_getattr*/
782: 0, /*tp_setattr*/
783: 0, /*tp_compare*/
784: 0, /*tp_repr*/
785: &__pyx_tp_as_number_B, /*tp_as_number*/
786: &__pyx_tp_as_sequence_B, /*tp_as_sequence*/
787: &__pyx_tp_as_mapping_B, /*tp_as_mapping*/
788: 0, /*tp_hash*/
789: 0, /*tp_call*/
790: 0, /*tp_str*/
791: 0, /*tp_getattro*/
792: 0, /*tp_setattro*/
793: &__pyx_tp_as_buffer_B, /*tp_as_buffer*/
794: Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
795: 0, /*tp_doc*/
796: __pyx_tp_traverse_5cpdef_B, /*tp_traverse*/
797: __pyx_tp_clear_5cpdef_B, /*tp_clear*/
798: 0, /*tp_richcompare*/
799: 0, /*tp_weaklistoffset*/
800: 0, /*tp_iter*/
801: 0, /*tp_iternext*/
802: __pyx_methods_5cpdef_B, /*tp_methods*/
803: 0, /*tp_members*/
804: 0, /*tp_getset*/
805: 0, /*tp_base*/
806: 0, /*tp_dict*/
807: 0, /*tp_descr_get*/
808: 0, /*tp_descr_set*/
809: 0, /*tp_dictoffset*/
810: 0, /*tp_init*/
811: 0, /*tp_alloc*/
812: __pyx_tp_new_5cpdef_B, /*tp_new*/
813: 0, /*tp_free*/
814: 0, /*tp_is_gc*/
815: 0, /*tp_bases*/
816: 0, /*tp_mro*/
817: 0, /*tp_cache*/
818: 0, /*tp_subclasses*/
819: 0, /*tp_weaklist*/
820: };
821: static struct __pyx_vtabstruct_5cpdef_AA __pyx_vtable_5cpdef_AA;
822:
823: static PyObject *__pyx_tp_new_5cpdef_AA(PyTypeObject *t, PyObject *a, PyObject *k) {
824: struct __pyx_obj_5cpdef_AA *p;
825: PyObject *o = __pyx_ptype_5cpdef_A->tp_new(t, a, k);
826: if (!o) return 0;
827: p = ((struct __pyx_obj_5cpdef_AA *)o);
828: *(struct __pyx_vtabstruct_5cpdef_AA **)&p->__pyx_base.__pyx_vtab = __pyx_vtabptr_5cpdef_AA;
829: return o;
830: }
831:
832: static void __pyx_tp_dealloc_5cpdef_AA(PyObject *o) {
833: __pyx_ptype_5cpdef_A->tp_dealloc(o);
834: }
835:
836: static int __pyx_tp_traverse_5cpdef_AA(PyObject *o, visitproc v, void *a) {
837: int e;
838: e = __pyx_ptype_5cpdef_A->tp_traverse(o, v, a); if (e) return e;
839: return 0;
840: }
841:
842: static int __pyx_tp_clear_5cpdef_AA(PyObject *o) {
843: __pyx_ptype_5cpdef_A->tp_clear(o);
844: return 0;
845: }
846:
847: static struct PyMethodDef __pyx_methods_5cpdef_AA[] = {
848: {"foo", (PyCFunction)__pyx_pf_5cpdef_2AA_foo, METH_O, 0},
849: {0, 0, 0, 0}
850: };
851:
852: static PyNumberMethods __pyx_tp_as_number_AA = {
853: 0, /*nb_add*/
854: 0, /*nb_subtract*/
855: 0, /*nb_multiply*/
856: 0, /*nb_divide*/
857: 0, /*nb_remainder*/
858: 0, /*nb_divmod*/
859: 0, /*nb_power*/
860: 0, /*nb_negative*/
861: 0, /*nb_positive*/
862: 0, /*nb_absolute*/
863: 0, /*nb_nonzero*/
864: 0, /*nb_invert*/
865: 0, /*nb_lshift*/
866: 0, /*nb_rshift*/
867: 0, /*nb_and*/
868: 0, /*nb_xor*/
869: 0, /*nb_or*/
870: 0, /*nb_coerce*/
871: 0, /*nb_int*/
872: 0, /*nb_long*/
873: 0, /*nb_float*/
874: 0, /*nb_oct*/
875: 0, /*nb_hex*/
876: 0, /*nb_inplace_add*/
877: 0, /*nb_inplace_subtract*/
878: 0, /*nb_inplace_multiply*/
879: 0, /*nb_inplace_divide*/
880: 0, /*nb_inplace_remainder*/
881: 0, /*nb_inplace_power*/
882: 0, /*nb_inplace_lshift*/
883: 0, /*nb_inplace_rshift*/
884: 0, /*nb_inplace_and*/
885: 0, /*nb_inplace_xor*/
886: 0, /*nb_inplace_or*/
887: 0, /*nb_floor_divide*/
888: 0, /*nb_true_divide*/
889: 0, /*nb_inplace_floor_divide*/
890: 0, /*nb_inplace_true_divide*/
891: #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
892: 0, /*nb_index*/
893: #endif
894: };
895:
896: static PySequenceMethods __pyx_tp_as_sequence_AA = {
897: 0, /*sq_length*/
898: 0, /*sq_concat*/
899: 0, /*sq_repeat*/
900: 0, /*sq_item*/
901: 0, /*sq_slice*/
902: 0, /*sq_ass_item*/
903: 0, /*sq_ass_slice*/
904: 0, /*sq_contains*/
905: 0, /*sq_inplace_concat*/
906: 0, /*sq_inplace_repeat*/
907: };
908:
909: static PyMappingMethods __pyx_tp_as_mapping_AA = {
910: 0, /*mp_length*/
911: 0, /*mp_subscript*/
912: 0, /*mp_ass_subscript*/
913: };
914:
915: static PyBufferProcs __pyx_tp_as_buffer_AA = {
916: 0, /*bf_getreadbuffer*/
917: 0, /*bf_getwritebuffer*/
918: 0, /*bf_getsegcount*/
919: 0, /*bf_getcharbuffer*/
920: };
921:
922: PyTypeObject __pyx_type_5cpdef_AA = {
923: PyObject_HEAD_INIT(0)
924: 0, /*ob_size*/
925: "cpdef.AA", /*tp_name*/
926: sizeof(struct __pyx_obj_5cpdef_AA), /*tp_basicsize*/
927: 0, /*tp_itemsize*/
928: __pyx_tp_dealloc_5cpdef_AA, /*tp_dealloc*/
929: 0, /*tp_print*/
930: 0, /*tp_getattr*/
931: 0, /*tp_setattr*/
932: 0, /*tp_compare*/
933: 0, /*tp_repr*/
934: &__pyx_tp_as_number_AA, /*tp_as_number*/
935: &__pyx_tp_as_sequence_AA, /*tp_as_sequence*/
936: &__pyx_tp_as_mapping_AA, /*tp_as_mapping*/
937: 0, /*tp_hash*/
938: 0, /*tp_call*/
939: 0, /*tp_str*/
940: 0, /*tp_getattro*/
941: 0, /*tp_setattro*/
942: &__pyx_tp_as_buffer_AA, /*tp_as_buffer*/
943: Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
944: 0, /*tp_doc*/
945: __pyx_tp_traverse_5cpdef_AA, /*tp_traverse*/
946: __pyx_tp_clear_5cpdef_AA, /*tp_clear*/
947: 0, /*tp_richcompare*/
948: 0, /*tp_weaklistoffset*/
949: 0, /*tp_iter*/
950: 0, /*tp_iternext*/
951: __pyx_methods_5cpdef_AA, /*tp_methods*/
952: 0, /*tp_members*/
953: 0, /*tp_getset*/
954: 0, /*tp_base*/
955: 0, /*tp_dict*/
956: 0, /*tp_descr_get*/
957: 0, /*tp_descr_set*/
958: 0, /*tp_dictoffset*/
959: 0, /*tp_init*/
960: 0, /*tp_alloc*/
961: __pyx_tp_new_5cpdef_AA, /*tp_new*/
962: 0, /*tp_free*/
963: 0, /*tp_is_gc*/
964: 0, /*tp_bases*/
965: 0, /*tp_mro*/
966: 0, /*tp_cache*/
967: 0, /*tp_subclasses*/
968: 0, /*tp_weaklist*/
969: };
970:
971: static struct PyMethodDef __pyx_methods[] = {
972: {0, 0, 0, 0}
973: };
974:
975: static void __pyx_init_filenames(void); /*proto*/
976:
977: PyMODINIT_FUNC initcpdef(void); /*proto*/
978: PyMODINIT_FUNC initcpdef(void) {
979: PyObject *__pyx_1 = 0;
980: PyObject *__pyx_2 = 0;
981: PyObject *__pyx_3 = 0;
982: PyObject *__pyx_4 = 0;
983: Py_ssize_t __pyx_5;
984: PyObject *__pyx_6 = 0;
985: int __pyx_7;
986: /*--- Libary function declarations ---*/
987: __pyx_init_filenames();
988: /*--- Module creation code ---*/
989: __pyx_m = Py_InitModule4("cpdef", __pyx_methods, 0, 0, PYTHON_API_VERSION);
990: if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
991: __pyx_b = PyImport_AddModule("__builtin__");
992: if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
993: if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
994: /*--- Intern code ---*/
995: __pyx_num_5 = PyInt_FromLong(5); if (unlikely(!__pyx_num_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
996: __pyx_num_10 = PyInt_FromLong(10); if (unlikely(!__pyx_num_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
997: __pyx_num_4 = PyInt_FromLong(4); if (unlikely(!__pyx_num_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
998: if (__Pyx_InternStrings(__pyx_intern_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
999: /*--- String init code ---*/
1000: if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
1001: /*--- Builtin init code ---*/
1002: /*--- Global init code ---*/
1003: /*--- Function export code ---*/
1004: /*--- Function import code ---*/
1005: /*--- Type init code ---*/
1006: __pyx_vtabptr_5cpdef_A = &__pyx_vtable_5cpdef_A;
1007: *(void(**)(void))&__pyx_vtable_5cpdef_A.foo = (void(*)(void))__pyx_f_5cpdef_1A_foo;
1008: if (PyType_Ready(&__pyx_type_5cpdef_A) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;}
1009: if (__Pyx_SetVtable(__pyx_type_5cpdef_A.tp_dict, __pyx_vtabptr_5cpdef_A) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;}
1010: if (PyObject_SetAttrString(__pyx_m, "A", (PyObject *)&__pyx_type_5cpdef_A) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;}
1011: __pyx_ptype_5cpdef_A = &__pyx_type_5cpdef_A;
1012: __pyx_vtabptr_5cpdef_B = &__pyx_vtable_5cpdef_B;
1013: __pyx_vtable_5cpdef_B.__pyx_base = *__pyx_vtabptr_5cpdef_A;
1014: *(void(**)(void))&__pyx_vtable_5cpdef_B.__pyx_base.foo = (void(*)(void))__pyx_f_5cpdef_1B_foo;
1015: __pyx_type_5cpdef_B.tp_base = __pyx_ptype_5cpdef_A;
1016: if (PyType_Ready(&__pyx_type_5cpdef_B) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; goto __pyx_L1;}
1017: if (__Pyx_SetVtable(__pyx_type_5cpdef_B.tp_dict, __pyx_vtabptr_5cpdef_B) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; goto __pyx_L1;}
1018: if (PyObject_SetAttrString(__pyx_m, "B", (PyObject *)&__pyx_type_5cpdef_B) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; goto __pyx_L1;}
1019: __pyx_ptype_5cpdef_B = &__pyx_type_5cpdef_B;
1020: __pyx_vtabptr_5cpdef_AA = &__pyx_vtable_5cpdef_AA;
1021: __pyx_vtable_5cpdef_AA.__pyx_base = *__pyx_vtabptr_5cpdef_A;
1022: *(void(**)(void))&__pyx_vtable_5cpdef_AA.__pyx_base.foo = (void(*)(void))__pyx_f_5cpdef_2AA_foo;
1023: __pyx_type_5cpdef_AA.tp_base = __pyx_ptype_5cpdef_A;
1024: if (PyType_Ready(&__pyx_type_5cpdef_AA) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; goto __pyx_L1;}
1025: if (__Pyx_SetVtable(__pyx_type_5cpdef_AA.tp_dict, __pyx_vtabptr_5cpdef_AA) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; goto __pyx_L1;}
1026: if (PyObject_SetAttrString(__pyx_m, "AA", (PyObject *)&__pyx_type_5cpdef_AA) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; goto __pyx_L1;}
1027: __pyx_ptype_5cpdef_AA = &__pyx_type_5cpdef_AA;
1028: /*--- Type import code ---*/
1029: /*--- Execution code ---*/
1030: __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; goto __pyx_L1;}
1031: __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; goto __pyx_L1;}
1032: Py_INCREF(((PyObject*)__pyx_ptype_5cpdef_B));
1033: PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject*)__pyx_ptype_5cpdef_B));
1034: __pyx_3 = __Pyx_CreateClass(__pyx_2, __pyx_1, __pyx_n_C, "cpdef"); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; goto __pyx_L1;}
1035: Py_DECREF(__pyx_2); __pyx_2 = 0;
1036: __pyx_2 = PyCFunction_New(&__pyx_mdef_5cpdef_1C_foo, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; goto __pyx_L1;}
1037: __pyx_4 = PyMethod_New(__pyx_2, 0, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; goto __pyx_L1;}
1038: Py_DECREF(__pyx_2); __pyx_2 = 0;
1039: if (PyObject_SetAttr(__pyx_3, __pyx_n_foo, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; goto __pyx_L1;}
1040: Py_DECREF(__pyx_4); __pyx_4 = 0;
1041: if (PyObject_SetAttr(__pyx_m, __pyx_n_C, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; goto __pyx_L1;}
1042: Py_DECREF(__pyx_3); __pyx_3 = 0;
1043: Py_DECREF(__pyx_1); __pyx_1 = 0;
1044: __pyx_2 = PyDict_New(); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;}
1045: __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_C); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;}
1046: __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;}
1047: PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4);
1048: __pyx_4 = 0;
1049: __pyx_1 = __Pyx_CreateClass(__pyx_3, __pyx_2, __pyx_n_D, "cpdef"); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;}
1050: Py_DECREF(__pyx_3); __pyx_3 = 0;
1051: __pyx_4 = PyCFunction_New(&__pyx_mdef_5cpdef_1D_foo, 0); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;}
1052: __pyx_3 = PyMethod_New(__pyx_4, 0, __pyx_1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;}
1053: Py_DECREF(__pyx_4); __pyx_4 = 0;
1054: if (PyObject_SetAttr(__pyx_1, __pyx_n_foo, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;}
1055: Py_DECREF(__pyx_3); __pyx_3 = 0;
1056: if (PyObject_SetAttr(__pyx_m, __pyx_n_D, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;}
1057: Py_DECREF(__pyx_1); __pyx_1 = 0;
1058: Py_DECREF(__pyx_2); __pyx_2 = 0;
1059: __pyx_4 = PyObject_CallObject(((PyObject*)__pyx_ptype_5cpdef_A), 0); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; goto __pyx_L1;}
1060: __pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_5cpdef_B), 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; goto __pyx_L1;}
1061: __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_C); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; goto __pyx_L1;}
1062: __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; goto __pyx_L1;}
1063: Py_DECREF(__pyx_1); __pyx_1 = 0;
1064: __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_D); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; goto __pyx_L1;}
1065: __pyx_6 = PyObject_CallObject(__pyx_1, 0); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; goto __pyx_L1;}
1066: Py_DECREF(__pyx_1); __pyx_1 = 0;
1067: __pyx_1 = PyList_New(4); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; goto __pyx_L1;}
1068: PyList_SET_ITEM(__pyx_1, 0, __pyx_4);
1069: PyList_SET_ITEM(__pyx_1, 1, __pyx_3);
1070: PyList_SET_ITEM(__pyx_1, 2, __pyx_2);
1071: PyList_SET_ITEM(__pyx_1, 3, __pyx_6);
1072: __pyx_4 = 0;
1073: __pyx_3 = 0;
1074: __pyx_2 = 0;
1075: __pyx_6 = 0;
1076: if (PyList_CheckExact(__pyx_1)) { __pyx_5 = 0; __pyx_4 = __pyx_1; Py_INCREF(__pyx_4); }
1077: else { __pyx_4 = PyObject_GetIter(__pyx_1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; goto __pyx_L1;} }
1078: Py_DECREF(__pyx_1); __pyx_1 = 0;
1079: for (;;) {
1080: if (PyList_CheckExact(__pyx_4)) { if (__pyx_5 >= PyList_GET_SIZE(__pyx_4)) break; __pyx_3 = PyList_GET_ITEM(__pyx_4, __pyx_5++); Py_INCREF(__pyx_3); }
1081: else {
1082: __pyx_3 = PyIter_Next(__pyx_4);
1083: if (!__pyx_3) {
1084: break;
1085: }
1086: }
1087: if (PyObject_SetAttr(__pyx_m, __pyx_n_x, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; goto __pyx_L1;}
1088: Py_DECREF(__pyx_3); __pyx_3 = 0;
1089: __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_x); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; goto __pyx_L1;}
1090: __pyx_6 = PyObject_GetAttr(__pyx_2, __pyx_n_foo); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; goto __pyx_L1;}
1091: Py_DECREF(__pyx_2); __pyx_2 = 0;
1092: __pyx_1 = PyTuple_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; goto __pyx_L1;}
1093: Py_INCREF(__pyx_num_5);
1094: PyTuple_SET_ITEM(__pyx_1, 0, __pyx_num_5);
1095: __pyx_3 = PyObject_CallObject(__pyx_6, __pyx_1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; goto __pyx_L1;}
1096: Py_DECREF(__pyx_6); __pyx_6 = 0;
1097: Py_DECREF(__pyx_1); __pyx_1 = 0;
1098: if (__Pyx_PrintItem(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; goto __pyx_L1;}
1099: Py_DECREF(__pyx_3); __pyx_3 = 0;
1100: if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; goto __pyx_L1;}
1101: __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_x); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;}
1102: __pyx_6 = PyObject_GetAttr(__pyx_2, __pyx_n_bar); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;}
1103: Py_DECREF(__pyx_2); __pyx_2 = 0;
1104: __pyx_1 = PyTuple_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;}
1105: Py_INCREF(__pyx_num_10);
1106: PyTuple_SET_ITEM(__pyx_1, 0, __pyx_num_10);
1107: __pyx_3 = PyObject_CallObject(__pyx_6, __pyx_1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;}
1108: Py_DECREF(__pyx_6); __pyx_6 = 0;
1109: Py_DECREF(__pyx_1); __pyx_1 = 0;
1110: if (__Pyx_PrintItem(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;}
1111: Py_DECREF(__pyx_3); __pyx_3 = 0;
1112: if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;}
1113: }
1114: Py_DECREF(__pyx_4); __pyx_4 = 0;
1115: #ifndef PYREX_WITHOUT_ASSERTIONS
1116: __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; goto __pyx_L1;}
1117: Py_INCREF(__pyx_num_4);
1118: PyTuple_SET_ITEM(__pyx_2, 0, __pyx_num_4);
1119: __pyx_6 = PyObject_CallObject(((PyObject*)&PyFloat_Type), __pyx_2); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; goto __pyx_L1;}
1120: Py_DECREF(__pyx_2); __pyx_2 = 0;
1121: __pyx_7 = __Pyx_PyObject_IsTrue(__pyx_6); if (unlikely(__pyx_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; goto __pyx_L1;}
1122: Py_DECREF(__pyx_6); __pyx_6 = 0;
1123: if (unlikely(!__pyx_7)) {
1124: __pyx_1 = PyObject_CallObject(((PyObject*)__pyx_ptype_5cpdef_A), 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; goto __pyx_L1;}
1125: __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_foo); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; goto __pyx_L1;}
1126: Py_DECREF(__pyx_1); __pyx_1 = 0;
1127: __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; goto __pyx_L1;}
1128: Py_INCREF(__pyx_num_4);
1129: PyTuple_SET_ITEM(__pyx_4, 0, __pyx_num_4);
1130: __pyx_2 = PyObject_CallObject(((PyObject*)&PyInt_Type), __pyx_4); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; goto __pyx_L1;}
1131: Py_DECREF(__pyx_4); __pyx_4 = 0;
1132: __pyx_6 = PyTuple_New(1); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; goto __pyx_L1;}
1133: PyTuple_SET_ITEM(__pyx_6, 0, __pyx_2);
1134: __pyx_2 = 0;
1135: __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_6); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; goto __pyx_L1;}
1136: Py_DECREF(__pyx_3); __pyx_3 = 0;
1137: Py_DECREF(__pyx_6); __pyx_6 = 0;
1138: PyErr_SetObject(PyExc_AssertionError, __pyx_1);
1139: Py_DECREF(__pyx_1); __pyx_1 = 0;
1140: {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; goto __pyx_L1;}
1141: }
1142: #endif
1143: if (__Pyx_RegisterCleanup()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
1144: return;
1145: __pyx_L1:;
1146: Py_XDECREF(__pyx_1);
1147: Py_XDECREF(__pyx_2);
1148: Py_XDECREF(__pyx_3);
1149: Py_XDECREF(__pyx_4);
1150: Py_XDECREF(__pyx_6);
1151: __Pyx_AddTraceback("cpdef");
1152: }
1153:
1154: static PyObject* cleanup(PyObject *self, PyObject *unused) {
1155: /*--- Builtin cleanup code ---*/
1156: /*--- Intern cleanup code ---*/
1157: Py_DECREF(__pyx_num_5); __pyx_num_5 = 0;
1158: Py_DECREF(__pyx_num_10); __pyx_num_10 = 0;
1159: Py_DECREF(__pyx_num_4); __pyx_num_4 = 0;
1160: Py_DECREF(__pyx_n_x); __pyx_n_x = 0;
1161: Py_DECREF(__pyx_n_C); __pyx_n_C = 0;
1162: Py_DECREF(__pyx_n_foo); __pyx_n_foo = 0;
1163: Py_DECREF(__pyx_n_bar); __pyx_n_bar = 0;
1164: Py_DECREF(__pyx_n_D); __pyx_n_D = 0;
1165: Py_INCREF(Py_None); return Py_None;
1166: }
1167:
1168: static char *__pyx_filenames[] = {
1169: "cpdef.pyx",
1170: };
1171:
1172: /* Runtime support code */
1173:
1174: static void __pyx_init_filenames(void) {
1175: __pyx_f = __pyx_filenames;
1176: }
1177:
1178: static PyObject *__Pyx_CreateClass(
1179: PyObject *bases, PyObject *dict, PyObject *name, char *modname)
1180: {
1181: PyObject *py_modname;
1182: PyObject *result = 0;
1183:
1184: py_modname = PyString_FromString(modname);
1185: if (!py_modname)
1186: goto bad;
1187: if (PyDict_SetItemString(dict, "__module__", py_modname) < 0)
1188: goto bad;
1189: result = PyClass_New(bases, dict, name);
1190: bad:
1191: Py_XDECREF(py_modname);
1192: return result;
1193: }
1194:
1195: static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
1196: PyObject *result;
1197: result = PyObject_GetAttr(dict, name);
1198: if (!result)
1199: PyErr_SetObject(PyExc_NameError, name);
1200: return result;
1201: }
1202:
1203: static PyObject *__Pyx_GetStdout(void) {
1204: PyObject *f = PySys_GetObject("stdout");
1205: if (!f) {
1206: PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
1207: }
1208: return f;
1209: }
1210:
1211: static int __Pyx_PrintItem(PyObject *v) {
1212: PyObject *f;
1213:
1214: if (!(f = __Pyx_GetStdout()))
1215: return -1;
1216: if (PyFile_SoftSpace(f, 1)) {
1217: if (PyFile_WriteString(" ", f) < 0)
1218: return -1;
1219: }
1220: if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)
1221: return -1;
1222: if (PyString_Check(v)) {
1223: char *s = PyString_AsString(v);
1224: Py_ssize_t len = PyString_Size(v);
1225: if (len > 0 &&
1226: isspace(Py_CHARMASK(s[len-1])) &&
1227: s[len-1] != ' ')
1228: PyFile_SoftSpace(f, 0);
1229: }
1230: return 0;
1231: }
1232:
1233: static int __Pyx_PrintNewline(void) {
1234: PyObject *f;
1235:
1236: if (!(f = __Pyx_GetStdout()))
1237: return -1;
1238: if (PyFile_WriteString("\n", f) < 0)
1239: return -1;
1240: PyFile_SoftSpace(f, 0);
1241: return 0;
1242: }
1243:
1244: static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
1245: if (!type) {
1246: PyErr_Format(PyExc_SystemError, "Missing type object");
1247: return 0;
1248: }
1249: if (obj == Py_None || PyObject_TypeCheck(obj, type))
1250: return 1;
1251: PyErr_Format(PyExc_TypeError, "Cannot convert %s to %s",
1252: obj->ob_type->tp_name, type->tp_name);
1253: return 0;
1254: }
1255:
1256: static int __Pyx_InternStrings(__Pyx_InternTabEntry *t) {
1257: while (t->p) {
1258: *t->p = PyString_InternFromString(t->s);
1259: if (!*t->p)
1260: return -1;
1261: ++t;
1262: }
1263: return 0;
1264: }
1265:
1266: static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
1267: while (t->p) {
1268: if (t->is_unicode) {
1269: *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
1270: } else {
1271: *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
1272: }
1273: if (!*t->p)
1274: return -1;
1275: ++t;
1276: }
1277: return 0;
1278: }
1279:
1280: static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
1281: PyObject *pycobj = 0;
1282: int result;
1283:
1284: pycobj = PyCObject_FromVoidPtr(vtable, 0);
1285: if (!pycobj)
1286: goto bad;
1287: if (PyDict_SetItemString(dict, "__pyx_vtable__", pycobj) < 0)
1288: goto bad;
1289: result = 0;
1290: goto done;
1291:
1292: bad:
1293: result = -1;
1294: done:
1295: Py_XDECREF(pycobj);
1296: return result;
1297: }
1298:
1299: #include "compile.h"
1300: #include "frameobject.h"
1301: #include "traceback.h"
1302:
1303: static void __Pyx_AddTraceback(char *funcname) {
1304: PyObject *py_srcfile = 0;
1305: PyObject *py_funcname = 0;
1306: PyObject *py_globals = 0;
1307: PyObject *empty_tuple = 0;
1308: PyObject *empty_string = 0;
1309: PyCodeObject *py_code = 0;
1310: PyFrameObject *py_frame = 0;
1311:
1312: py_srcfile = PyString_FromString(__pyx_filename);
1313: if (!py_srcfile) goto bad;
1314: py_funcname = PyString_FromString(funcname);
1315: if (!py_funcname) goto bad;
1316: py_globals = PyModule_GetDict(__pyx_m);
1317: if (!py_globals) goto bad;
1318: empty_tuple = PyTuple_New(0);
1319: if (!empty_tuple) goto bad;
1320: empty_string = PyString_FromString("");
1321: if (!empty_string) goto bad;
1322: py_code = PyCode_New(
1323: 0, /*int argcount,*/
1324: 0, /*int nlocals,*/
1325: 0, /*int stacksize,*/
1326: 0, /*int flags,*/
1327: empty_string, /*PyObject *code,*/
1328: empty_tuple, /*PyObject *consts,*/
1329: empty_tuple, /*PyObject *names,*/
1330: empty_tuple, /*PyObject *varnames,*/
1331: empty_tuple, /*PyObject *freevars,*/
1332: empty_tuple, /*PyObject *cellvars,*/
1333: py_srcfile, /*PyObject *filename,*/
1334: py_funcname, /*PyObject *name,*/
1335: __pyx_lineno, /*int firstlineno,*/
1336: empty_string /*PyObject *lnotab*/
1337: );
1338: if (!py_code) goto bad;
1339: py_frame = PyFrame_New(
1340: PyThreadState_Get(), /*PyThreadState *tstate,*/
1341: py_code, /*PyCodeObject *code,*/
1342: py_globals, /*PyObject *globals,*/
1343: 0 /*PyObject *locals*/
1344: );
1345: if (!py_frame) goto bad;
1346: py_frame->f_lineno = __pyx_lineno;
1347: PyTraceBack_Here(py_frame);
1348: bad:
1349: Py_XDECREF(py_srcfile);
1350: Py_XDECREF(py_funcname);
1351: Py_XDECREF(empty_tuple);
1352: Py_XDECREF(empty_string);
1353: Py_XDECREF(py_code);
1354: Py_XDECREF(py_frame);
1355: }
1356:
1357: #ifndef __PYX_HAVE_RT_ImportModule
1358: #define __PYX_HAVE_RT_ImportModule
1359: static PyObject *__Pyx_ImportModule(char *name) {
1360: PyObject *py_name = 0;
1361: PyObject *py_module = 0;
1362:
1363: py_name = PyString_FromString(name);
1364: if (!py_name)
1365: goto bad;
1366: py_module = PyImport_Import(py_name);
1367: Py_DECREF(py_name);
1368: return py_module;
1369: bad:
1370: Py_XDECREF(py_name);
1371: return 0;
1372: }
1373: #endif
1374:
1375: static int __Pyx_RegisterCleanup() {
1376: /* Don't use Py_AtExit because that has a 32-call limit
1377: * and is called after python finalization.
1378: */
1379:
1380: PyObject *cleanup_func = 0;
1381: PyObject *atexit = 0;
1382: PyObject *reg = 0;
1383: PyObject *args = 0;
1384: PyObject *res = 0;
1385: int ret = -1;
1386:
1387: cleanup_func = PyCFunction_New(&cleanup_def, 0);
1388: args = PyTuple_New(1);
1389: if (!cleanup_func || !args)
1390: goto bad;
1391: PyTuple_SET_ITEM(args, 0, cleanup_func);
1392: cleanup_func = 0;
1393:
1394: atexit = __Pyx_ImportModule("atexit");
1395: if (!atexit)
1396: goto bad;
1397: reg = PyObject_GetAttrString(atexit, "register");
1398: if (!reg)
1399: goto bad;
1400: res = PyObject_CallObject(reg, args);
1401: if (!res)
1402: goto bad;
1403: ret = 0;
1404: bad:
1405: Py_XDECREF(cleanup_func);
1406: Py_XDECREF(atexit);
1407: Py_XDECREF(reg);
1408: Py_XDECREF(args);
1409: Py_XDECREF(res);
1410: return ret;
1411: }