Upgraded to Pyrex 0.7.2 for code generation. Mostly this means more informative tracebacks, and easier-to-read C in some places. There are some newer features in 0.7.2 that could clean up our .pyx sources a bit, but I'll make use of those later.
/* Generated by Pyrex 0.7.2 on Mon May 05 15:12:38 2003 */ #include "Python.h" #include "structmember.h" #include "opcode.h" static PyObject *__Pyx_UnpackItem(PyObject *, int); /*proto*/ static int __Pyx_EndUnpack(PyObject *, int); /*proto*/ static int __Pyx_PrintItem(PyObject *); /*proto*/ static int __Pyx_PrintNewline(void); /*proto*/ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static void __Pyx_ReRaise(void); /*proto*/ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/ static PyObject *__Pyx_GetExcValue(void); /*proto*/ static PyObject *__Pyx_GetName(PyObject *dict, char *name); /*proto*/ static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name); /*proto*/ static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ static int __Pyx_GetStarArgs(PyObject **args, PyObject **kwds, char *kwd_list[], int nargs, PyObject **args2, PyObject **kwds2); /*proto*/ static void __Pyx_WriteUnraisable(char *name); /*proto*/ static void __Pyx_AddTraceback(char *funcname); /*proto*/ static PyTypeObject *__Pyx_ImportType(char *module_name, char *class_name, long size); /*proto*/ static PyObject *__pyx_m; static PyObject *__pyx_b; static int __pyx_lineno; static char *__pyx_filename; static char *__pyx_f1 = "C:\\cygwin\\home\\pje\\PEAK\\src/peak/util/_Code.pyx"; staticforward PyTypeObject __pyx_type_codeIndex; struct __pyx_obj_codeIndex { PyObject_HEAD PyObject *code; int (*opcodeHeads); int (*operands); int (*offsets); int (*byteLines); int (*opcodeChain); unsigned char (*opcodes); int length; int codelen; }; staticforward PyTypeObject __pyx_type_opIter; struct __pyx_obj_opIter { PyObject_HEAD struct __pyx_obj_codeIndex *cidx; int pos; }; static int __pyx_f_6opIter___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_6opIter___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_codeIndex *__pyx_v_cidx = 0; int __pyx_v_pos; int __pyx_r; static char *__pyx_argnames[] = {"cidx","pos",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "Oi", __pyx_argnames, &__pyx_v_cidx, &__pyx_v_pos)) return -1; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_cidx); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cidx), &__pyx_type_codeIndex, 1, "cidx")) {__pyx_filename = __pyx_f1; __pyx_lineno = 21; goto __pyx_L1;} /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":22 */ Py_INCREF(((PyObject *)__pyx_v_cidx)); Py_DECREF(((PyObject *)((struct __pyx_obj_opIter *)__pyx_v_self)->cidx)); ((PyObject *)((struct __pyx_obj_opIter *)__pyx_v_self)->cidx) = ((PyObject *)__pyx_v_cidx); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":23 */ ((struct __pyx_obj_opIter *)__pyx_v_self)->pos = __pyx_v_pos; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("_Code.opIter.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_cidx); return __pyx_r; } static PyObject *__pyx_f_6opIter___iter__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_f_6opIter___iter__(PyObject *__pyx_v_self) { PyObject *__pyx_r; Py_INCREF(__pyx_v_self); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":26 */ Py_INCREF(__pyx_v_self); __pyx_r = __pyx_v_self; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(__pyx_r); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("_Code.opIter.__iter__"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_6opIter___next__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_f_6opIter___next__(PyObject *__pyx_v_self) { int __pyx_v_pos; struct __pyx_obj_codeIndex *__pyx_v_c; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; Py_INCREF(__pyx_v_self); ((PyObject*)__pyx_v_c) = Py_None; Py_INCREF(((PyObject*)__pyx_v_c)); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":29 */ /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":30 */ /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":32 */ __pyx_v_pos = ((struct __pyx_obj_opIter *)__pyx_v_self)->pos; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":34 */ __pyx_1 = (((struct __pyx_obj_opIter *)__pyx_v_self)->pos == (-1)); if (__pyx_1) { /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":35 */ __pyx_2 = __Pyx_GetName(__pyx_b, "StopIteration"); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 35; goto __pyx_L1;} __Pyx_Raise(__pyx_2, 0, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f1; __pyx_lineno = 35; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":37 */ Py_INCREF(((PyObject *)((struct __pyx_obj_opIter *)__pyx_v_self)->cidx)); Py_DECREF(((PyObject *)__pyx_v_c)); ((PyObject *)__pyx_v_c) = ((PyObject *)((struct __pyx_obj_opIter *)__pyx_v_self)->cidx); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":38 */ ((struct __pyx_obj_opIter *)__pyx_v_self)->pos = (__pyx_v_c->opcodeChain[__pyx_v_pos]); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":39 */ __pyx_2 = PyInt_FromLong(__pyx_v_pos); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 39; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(__pyx_r); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); __Pyx_AddTraceback("_Code.opIter.__next__"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_c); Py_DECREF(__pyx_v_self); return __pyx_r; } static int __pyx_f_9codeIndex___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_9codeIndex___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_codeObject = 0; int __pyx_r; static char *__pyx_argnames[] = {"codeObject",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_codeObject)) return -1; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_codeObject); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":65 */ ((struct __pyx_obj_codeIndex *)__pyx_v_self)->opcodeHeads = 0; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":66 */ ((struct __pyx_obj_codeIndex *)__pyx_v_self)->opcodeChain = 0; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":67 */ ((struct __pyx_obj_codeIndex *)__pyx_v_self)->operands = 0; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":68 */ ((struct __pyx_obj_codeIndex *)__pyx_v_self)->offsets = 0; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":69 */ ((struct __pyx_obj_codeIndex *)__pyx_v_self)->byteLines = 0; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":70 */ ((struct __pyx_obj_codeIndex *)__pyx_v_self)->opcodes = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("_Code.codeIndex.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_codeObject); return __pyx_r; } static void __pyx_f_9codeIndex___dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_f_9codeIndex___dealloc__(PyObject *__pyx_v_self) { int __pyx_1; Py_INCREF(__pyx_v_self); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":73 */ __pyx_1 = (((struct __pyx_obj_codeIndex *)__pyx_v_self)->opcodeHeads != 0); if (__pyx_1) { PyMem_Free(((struct __pyx_obj_codeIndex *)__pyx_v_self)->opcodeHeads); goto __pyx_L2; } __pyx_L2:; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":74 */ __pyx_1 = (((struct __pyx_obj_codeIndex *)__pyx_v_self)->opcodeChain != 0); if (__pyx_1) { PyMem_Free(((struct __pyx_obj_codeIndex *)__pyx_v_self)->opcodeChain); goto __pyx_L3; } __pyx_L3:; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":75 */ __pyx_1 = (((struct __pyx_obj_codeIndex *)__pyx_v_self)->operands != 0); if (__pyx_1) { PyMem_Free(((struct __pyx_obj_codeIndex *)__pyx_v_self)->operands); goto __pyx_L4; } __pyx_L4:; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":76 */ __pyx_1 = (((struct __pyx_obj_codeIndex *)__pyx_v_self)->offsets != 0); if (__pyx_1) { PyMem_Free(((struct __pyx_obj_codeIndex *)__pyx_v_self)->offsets); goto __pyx_L5; } __pyx_L5:; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":77 */ __pyx_1 = (((struct __pyx_obj_codeIndex *)__pyx_v_self)->byteLines != 0); if (__pyx_1) { PyMem_Free(((struct __pyx_obj_codeIndex *)__pyx_v_self)->byteLines); goto __pyx_L6; } __pyx_L6:; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":78 */ __pyx_1 = (((struct __pyx_obj_codeIndex *)__pyx_v_self)->opcodes != 0); if (__pyx_1) { PyMem_Free(((struct __pyx_obj_codeIndex *)__pyx_v_self)->opcodes); goto __pyx_L7; } __pyx_L7:; goto __pyx_L0; __pyx_L1:; __Pyx_WriteUnraisable("_Code.codeIndex.__dealloc__"); __pyx_L0:; Py_DECREF(__pyx_v_self); } static int __pyx_f_9codeIndex___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_9codeIndex___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_codeObject = 0; int __pyx_v_l; int __pyx_v_s; int __pyx_v_arg; int __pyx_v_end; int __pyx_v_start; int __pyx_v_p; unsigned char (*__pyx_v_ca); unsigned char __pyx_v_op; int __pyx_r; PyObject *__pyx_1 = 0; int __pyx_2; void (*__pyx_3); unsigned char __pyx_4; static char *__pyx_argnames[] = {"codeObject",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_codeObject)) return -1; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_codeObject); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":85 */ Py_INCREF(__pyx_v_codeObject); Py_DECREF(((struct __pyx_obj_codeIndex *)__pyx_v_self)->code); ((struct __pyx_obj_codeIndex *)__pyx_v_self)->code = __pyx_v_codeObject; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":86 */ /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":87 */ /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":88 */ /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":89 */ __pyx_1 = PyObject_GetAttrString(__pyx_v_codeObject, "co_code"); if (!__pyx_1) {__pyx_filename = __pyx_f1; __pyx_lineno = 89; goto __pyx_L1;} __pyx_2 = PyObject_AsReadBuffer(__pyx_1,((void (*(*)))(&__pyx_v_ca)),(&__pyx_v_l)); if (__pyx_2 == -1) {__pyx_filename = __pyx_f1; __pyx_lineno = 89; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":91 */ __pyx_v_s = (__pyx_v_l * (sizeof(int ))); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":92 */ __pyx_3 = PyMem_Malloc((256 * (sizeof(int )))); if (__pyx_3 == 0) {__pyx_filename = __pyx_f1; __pyx_lineno = 92; goto __pyx_L1;} ((struct __pyx_obj_codeIndex *)__pyx_v_self)->opcodeHeads = ((int (*))__pyx_3); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":93 */ __pyx_3 = PyMem_Malloc(__pyx_v_s); if (__pyx_3 == 0) {__pyx_filename = __pyx_f1; __pyx_lineno = 93; goto __pyx_L1;} ((struct __pyx_obj_codeIndex *)__pyx_v_self)->opcodeChain = ((int (*))__pyx_3); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":94 */ __pyx_3 = PyMem_Malloc(__pyx_v_s); if (__pyx_3 == 0) {__pyx_filename = __pyx_f1; __pyx_lineno = 94; goto __pyx_L1;} ((struct __pyx_obj_codeIndex *)__pyx_v_self)->operands = ((int (*))__pyx_3); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":95 */ __pyx_3 = PyMem_Malloc(__pyx_v_s); if (__pyx_3 == 0) {__pyx_filename = __pyx_f1; __pyx_lineno = 95; goto __pyx_L1;} ((struct __pyx_obj_codeIndex *)__pyx_v_self)->offsets = ((int (*))__pyx_3); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":96 */ __pyx_3 = PyMem_Malloc(__pyx_v_s); if (__pyx_3 == 0) {__pyx_filename = __pyx_f1; __pyx_lineno = 96; goto __pyx_L1;} ((struct __pyx_obj_codeIndex *)__pyx_v_self)->byteLines = ((int (*))__pyx_3); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":97 */ __pyx_3 = PyMem_Malloc(__pyx_v_l); if (__pyx_3 == 0) {__pyx_filename = __pyx_f1; __pyx_lineno = 97; goto __pyx_L1;} ((struct __pyx_obj_codeIndex *)__pyx_v_self)->opcodes = ((unsigned char (*))__pyx_3); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":99 */ __pyx_v_p = 0; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":100 */ __pyx_v_end = 0; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":101 */ __pyx_v_start = __pyx_v_end; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":103 */ while (1) { __pyx_L2:; __pyx_2 = (__pyx_v_end < __pyx_v_l); if (!__pyx_2) break; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":104 */ __pyx_v_op = (__pyx_v_ca[__pyx_v_start]); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":105 */ __pyx_4 = HAS_ARG(__pyx_v_op); if (__pyx_4) { /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":106 */ __pyx_v_arg = ((__pyx_v_ca[(__pyx_v_start + 1)]) | ((__pyx_v_ca[(__pyx_v_start + 2)]) << 8)); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":107 */ __pyx_2 = (__pyx_v_op == EXTENDED_ARG); if (__pyx_2) { /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":108 */ __pyx_v_op = (__pyx_v_ca[(__pyx_v_start + 3)]); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":109 */ __pyx_v_end = (__pyx_v_start + 6); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":110 */ __pyx_v_arg = (__pyx_v_arg << 16); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":111 */ __pyx_v_arg = (__pyx_v_arg + ((__pyx_v_ca[(__pyx_v_start + 4)]) | ((__pyx_v_ca[(__pyx_v_start + 5)]) << 8))); goto __pyx_L5; } /*else*/ { /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":113 */ __pyx_v_end = (__pyx_v_start + 3); } __pyx_L5:; goto __pyx_L4; } /*else*/ { /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":115 */ __pyx_v_arg = 0; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":116 */ __pyx_v_end = (__pyx_v_start + 1); } __pyx_L4:; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":118 */ (((struct __pyx_obj_codeIndex *)__pyx_v_self)->opcodes[__pyx_v_p]) = __pyx_v_op; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":119 */ (((struct __pyx_obj_codeIndex *)__pyx_v_self)->operands[__pyx_v_p]) = __pyx_v_arg; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":120 */ (((struct __pyx_obj_codeIndex *)__pyx_v_self)->offsets[__pyx_v_p]) = __pyx_v_start; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":121 */ __pyx_v_p = (__pyx_v_p + 1); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":122 */ __pyx_v_start = __pyx_v_end; } __pyx_L3:; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":124 */ ((struct __pyx_obj_codeIndex *)__pyx_v_self)->length = __pyx_v_p; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":125 */ ((struct __pyx_obj_codeIndex *)__pyx_v_self)->codelen = __pyx_v_l; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":127 */ __pyx_1 = PyObject_GetAttrString(__pyx_v_codeObject, "co_lnotab"); if (!__pyx_1) {__pyx_filename = __pyx_f1; __pyx_lineno = 127; goto __pyx_L1;} __pyx_2 = PyObject_AsReadBuffer(__pyx_1,((void (*(*)))(&__pyx_v_ca)),(&__pyx_v_end)); if (__pyx_2 == -1) {__pyx_filename = __pyx_f1; __pyx_lineno = 127; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":129 */ __pyx_v_p = 0; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":130 */ __pyx_1 = PyObject_GetAttrString(__pyx_v_codeObject, "co_firstlineno"); if (!__pyx_1) {__pyx_filename = __pyx_f1; __pyx_lineno = 130; goto __pyx_L1;} __pyx_2 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f1; __pyx_lineno = 130; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_v_arg = __pyx_2; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":131 */ __pyx_v_start = 0; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":133 */ while (1) { __pyx_L6:; __pyx_2 = (__pyx_v_p < __pyx_v_end); if (!__pyx_2) break; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":135 */ __pyx_4 = (__pyx_v_ca[__pyx_v_p]); for (__pyx_v_s = 0; __pyx_v_s < __pyx_4; ++__pyx_v_s) { /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":136 */ (((struct __pyx_obj_codeIndex *)__pyx_v_self)->byteLines[(__pyx_v_start + __pyx_v_s)]) = __pyx_v_arg; __pyx_L8:; } __pyx_L9:; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":138 */ __pyx_v_start = (__pyx_v_start + (__pyx_v_ca[__pyx_v_p])); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":139 */ __pyx_v_arg = (__pyx_v_arg + (__pyx_v_ca[(__pyx_v_p + 1)])); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":140 */ __pyx_v_p = (__pyx_v_p + 2); } __pyx_L7:; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":142 */ while (1) { __pyx_L10:; __pyx_2 = (__pyx_v_start < __pyx_v_l); if (!__pyx_2) break; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":143 */ (((struct __pyx_obj_codeIndex *)__pyx_v_self)->byteLines[__pyx_v_start]) = __pyx_v_arg; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":144 */ __pyx_v_start = (__pyx_v_start + 1); } __pyx_L11:; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":146 */ for (__pyx_v_s = 0; __pyx_v_s < 256; ++__pyx_v_s) { /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":147 */ (((struct __pyx_obj_codeIndex *)__pyx_v_self)->opcodeHeads[__pyx_v_s]) = (-1); __pyx_L12:; } __pyx_L13:; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":149 */ __pyx_v_p = ((struct __pyx_obj_codeIndex *)__pyx_v_self)->length; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":151 */ while (1) { __pyx_L14:; __pyx_2 = __pyx_v_p; if (!__pyx_2) break; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":152 */ __pyx_v_p = (__pyx_v_p - 1); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":153 */ __pyx_v_op = (((struct __pyx_obj_codeIndex *)__pyx_v_self)->opcodes[__pyx_v_p]); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":154 */ (((struct __pyx_obj_codeIndex *)__pyx_v_self)->opcodeChain[__pyx_v_p]) = (((struct __pyx_obj_codeIndex *)__pyx_v_self)->opcodeHeads[__pyx_v_op]); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":155 */ (((struct __pyx_obj_codeIndex *)__pyx_v_self)->opcodeHeads[__pyx_v_op]) = __pyx_v_p; } __pyx_L15:; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("_Code.codeIndex.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_codeObject); return __pyx_r; } static PyObject *__pyx_f_9codeIndex_opcodeLocations(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9codeIndex_opcodeLocations(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_op; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"op",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_op)) return 0; Py_INCREF(__pyx_v_self); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":167 */ __pyx_1 = (__pyx_v_op < 0); if (!__pyx_1) { __pyx_1 = (__pyx_v_op > 255); } if (__pyx_1) { /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":168 */ __pyx_2 = __Pyx_GetName(__pyx_b, "IndexError"); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 168; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(__pyx_v_op); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 168; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_3, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f1; __pyx_lineno = 168; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":170 */ __pyx_2 = __Pyx_GetName(__pyx_m, "opIter"); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 170; goto __pyx_L1;} __pyx_3 = PyInt_FromLong((((struct __pyx_obj_codeIndex *)__pyx_v_self)->opcodeHeads[__pyx_v_op])); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 170; goto __pyx_L1;} __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 170; goto __pyx_L1;} Py_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_self); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_3); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 170; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(__pyx_r); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("_Code.codeIndex.opcodeLocations"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_9codeIndex_operand(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9codeIndex_operand(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_p; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_p)) return 0; Py_INCREF(__pyx_v_self); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":175 */ __pyx_1 = (__pyx_v_p < 0); if (!__pyx_1) { __pyx_1 = (__pyx_v_p >= ((struct __pyx_obj_codeIndex *)__pyx_v_self)->length); } if (__pyx_1) { /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":176 */ __pyx_2 = __Pyx_GetName(__pyx_b, "IndexError"); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 176; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(__pyx_v_p); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 176; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_3, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f1; __pyx_lineno = 176; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":178 */ __pyx_2 = PyInt_FromLong((((struct __pyx_obj_codeIndex *)__pyx_v_self)->operands[__pyx_v_p])); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 178; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(__pyx_r); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("_Code.codeIndex.operand"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_9codeIndex_opcode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9codeIndex_opcode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_p; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_p)) return 0; Py_INCREF(__pyx_v_self); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":183 */ __pyx_1 = (__pyx_v_p < 0); if (!__pyx_1) { __pyx_1 = (__pyx_v_p >= ((struct __pyx_obj_codeIndex *)__pyx_v_self)->length); } if (__pyx_1) { /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":184 */ __pyx_2 = __Pyx_GetName(__pyx_b, "IndexError"); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 184; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(__pyx_v_p); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 184; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_3, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f1; __pyx_lineno = 184; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":186 */ __pyx_2 = PyInt_FromLong((((struct __pyx_obj_codeIndex *)__pyx_v_self)->opcodes[__pyx_v_p])); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 186; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(__pyx_r); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("_Code.codeIndex.opcode"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_9codeIndex_offset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9codeIndex_offset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_p; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_p)) return 0; Py_INCREF(__pyx_v_self); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":191 */ __pyx_1 = (__pyx_v_p < 0); if (!__pyx_1) { __pyx_1 = (__pyx_v_p >= ((struct __pyx_obj_codeIndex *)__pyx_v_self)->length); } if (__pyx_1) { /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":192 */ __pyx_2 = __Pyx_GetName(__pyx_b, "IndexError"); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 192; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(__pyx_v_p); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 192; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_3, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f1; __pyx_lineno = 192; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":194 */ __pyx_2 = PyInt_FromLong((((struct __pyx_obj_codeIndex *)__pyx_v_self)->offsets[__pyx_v_p])); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 194; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(__pyx_r); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("_Code.codeIndex.offset"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_9codeIndex_byteLine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9codeIndex_byteLine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_p; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_p)) return 0; Py_INCREF(__pyx_v_self); /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":199 */ __pyx_1 = (__pyx_v_p < 0); if (!__pyx_1) { __pyx_1 = (__pyx_v_p >= ((struct __pyx_obj_codeIndex *)__pyx_v_self)->codelen); } if (__pyx_1) { /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":200 */ __pyx_2 = __Pyx_GetName(__pyx_b, "IndexError"); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 200; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(__pyx_v_p); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 200; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_3, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f1; __pyx_lineno = 200; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":202 */ __pyx_2 = PyInt_FromLong((((struct __pyx_obj_codeIndex *)__pyx_v_self)->byteLines[__pyx_v_p])); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 202; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(__pyx_r); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("_Code.codeIndex.byteLine"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_tp_new_codeIndex(struct _typeobject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); struct __pyx_obj_codeIndex *p = (struct __pyx_obj_codeIndex *)o; p->code = Py_None; Py_INCREF(p->code); if (__pyx_f_9codeIndex___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_codeIndex(PyObject *o) { struct __pyx_obj_codeIndex *p = (struct __pyx_obj_codeIndex *)o; { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++o->ob_refcnt; __pyx_f_9codeIndex___dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --o->ob_refcnt; PyErr_Restore(etype, eval, etb); } Py_XDECREF(p->code); (*o->ob_type->tp_free)(o); } static int __pyx_tp_traverse_codeIndex(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_codeIndex *p = (struct __pyx_obj_codeIndex *)o; e = (*v)(p->code, a); if (e) return e; return 0; } static int __pyx_tp_clear_codeIndex(PyObject *o) { struct __pyx_obj_codeIndex *p = (struct __pyx_obj_codeIndex *)o; Py_XDECREF(p->code); p->code = Py_None; Py_INCREF(p->code); return 0; } static struct PyMethodDef __pyx_methods_codeIndex[] = { {"opcodeLocations", (PyCFunction)__pyx_f_9codeIndex_opcodeLocations, METH_VARARGS|METH_KEYWORDS, 0}, {"operand", (PyCFunction)__pyx_f_9codeIndex_operand, METH_VARARGS|METH_KEYWORDS, 0}, {"opcode", (PyCFunction)__pyx_f_9codeIndex_opcode, METH_VARARGS|METH_KEYWORDS, 0}, {"offset", (PyCFunction)__pyx_f_9codeIndex_offset, METH_VARARGS|METH_KEYWORDS, 0}, {"byteLine", (PyCFunction)__pyx_f_9codeIndex_byteLine, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_codeIndex = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_codeIndex = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_codeIndex = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_codeIndex = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; statichere PyTypeObject __pyx_type_codeIndex = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "_Code.codeIndex", /*tp_name*/ sizeof(struct __pyx_obj_codeIndex), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_codeIndex, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_codeIndex, /*tp_as_number*/ &__pyx_tp_as_sequence_codeIndex, /*tp_as_sequence*/ &__pyx_tp_as_mapping_codeIndex, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_codeIndex, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Useful indexes over a code object\n\n opcodeLocations[op] -- list of instruction numbers with \'op\' as opcode\n\n opcode[i] -- the i\'th instruction\'s opcode\n\n operand[i] -- the i\'th instruction\'s operand (or None)\n\n offset[i] -- location of the i\'th instruction\n\n byteLine[b] -- source line number that generated byte \'b\'\n ", /*tp_doc*/ __pyx_tp_traverse_codeIndex, /*tp_traverse*/ __pyx_tp_clear_codeIndex, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_codeIndex, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_9codeIndex___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_codeIndex, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_opIter(struct _typeobject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); struct __pyx_obj_opIter *p = (struct __pyx_obj_opIter *)o; ((PyObject*)p->cidx) = Py_None; Py_INCREF(((PyObject*)p->cidx)); return o; } static void __pyx_tp_dealloc_opIter(PyObject *o) { struct __pyx_obj_opIter *p = (struct __pyx_obj_opIter *)o; Py_XDECREF(p->cidx); (*o->ob_type->tp_free)(o); } static int __pyx_tp_traverse_opIter(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_opIter *p = (struct __pyx_obj_opIter *)o; e = (*v)(((PyObject*)p->cidx), a); if (e) return e; return 0; } static int __pyx_tp_clear_opIter(PyObject *o) { struct __pyx_obj_opIter *p = (struct __pyx_obj_opIter *)o; Py_XDECREF(p->cidx); ((PyObject*)p->cidx) = Py_None; Py_INCREF(((PyObject*)p->cidx)); return 0; } static struct PyMethodDef __pyx_methods_opIter[] = { {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_opIter = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_opIter = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_opIter = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_opIter = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; statichere PyTypeObject __pyx_type_opIter = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "_Code.opIter", /*tp_name*/ sizeof(struct __pyx_obj_opIter), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_opIter, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_opIter, /*tp_as_number*/ &__pyx_tp_as_sequence_opIter, /*tp_as_sequence*/ &__pyx_tp_as_mapping_opIter, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_opIter, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_opIter, /*tp_traverse*/ __pyx_tp_clear_opIter, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ __pyx_f_6opIter___iter__, /*tp_iter*/ __pyx_f_6opIter___next__, /*tp_iternext*/ __pyx_methods_opIter, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_6opIter___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_opIter, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static struct PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; DL_EXPORT(void) init_Code(void); /*proto*/ DL_EXPORT(void) init_Code(void) { __pyx_m = Py_InitModule4("_Code", __pyx_methods, 0, 0, PYTHON_API_VERSION); __pyx_b = PyImport_AddModule("__builtin__"); PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b); __pyx_type_codeIndex.tp_free = _PyObject_GC_Del; if (PyType_Ready(&__pyx_type_codeIndex) < 0) {__pyx_filename = __pyx_f1; __pyx_lineno = 14; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "codeIndex", (PyObject *)&__pyx_type_codeIndex) < 0) {__pyx_filename = __pyx_f1; __pyx_lineno = 14; goto __pyx_L1;} __pyx_type_opIter.tp_free = _PyObject_GC_Del; if (PyType_Ready(&__pyx_type_opIter) < 0) {__pyx_filename = __pyx_f1; __pyx_lineno = 16; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "opIter", (PyObject *)&__pyx_type_opIter) < 0) {__pyx_filename = __pyx_f1; __pyx_lineno = 16; goto __pyx_L1;} /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":1 */ /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":7 */ /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":14 */ /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":16 */ /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":18 */ /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":19 */ /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":21 */ /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":25 */ /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":28 */ /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":42 */ /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":58 */ /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":59 */ /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":60 */ /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":61 */ /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":64 */ /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":72 */ /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":83 */ /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":165 */ /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":173 */ /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":181 */ /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":189 */ /* "C:\cygwin\home\pje\PEAK\src/peak/util/_Code.pyx":197 */ return; __pyx_L1:; __Pyx_AddTraceback("_Code"); } /* Runtime support code */ #include "compile.h" #include "frameobject.h" #include "traceback.h" static void __Pyx_AddTraceback(char *funcname) { PyObject *py_srcfile = 0; PyObject *py_funcname = 0; PyObject *py_globals = 0; PyObject *empty_tuple = 0; PyObject *empty_string = 0; PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; py_srcfile = PyString_FromString(__pyx_filename); if (!py_srcfile) goto bad; py_funcname = PyString_FromString(funcname); if (!py_funcname) goto bad; py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; empty_tuple = PyTuple_New(0); if (!empty_tuple) goto bad; empty_string = PyString_FromString(""); if (!empty_string) goto bad; py_code = PyCode_New( 0, /*int argcount,*/ 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ empty_string, /*PyObject *code,*/ empty_tuple, /*PyObject *consts,*/ empty_tuple, /*PyObject *names,*/ empty_tuple, /*PyObject *varnames,*/ empty_tuple, /*PyObject *freevars,*/ empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ __pyx_lineno, /*int firstlineno,*/ empty_string /*PyObject *lnotab*/ ); if (!py_code) goto bad; py_frame = PyFrame_New( PyThreadState_Get(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ py_globals, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = __pyx_lineno; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); Py_XDECREF(empty_tuple); Py_XDECREF(empty_string); Py_XDECREF(py_code); Py_XDECREF(py_frame); } static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name) { if (!type) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } if ((none_allowed && obj == Py_None) || PyObject_TypeCheck(obj, type)) return 1; PyErr_Format(PyExc_TypeError, "Argument '%s' has incorrect type (expected %s, got %s)", name, type->tp_name, obj->ob_type->tp_name); return 0; } static PyObject *__Pyx_GetName(PyObject *dict, char *name) { PyObject *result; result = PyObject_GetAttrString(dict, name); if (!result) PyErr_SetString(PyExc_NameError, name); return result; } static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) { Py_XINCREF(type); Py_XINCREF(value); Py_XINCREF(tb); /* First, check the traceback argument, replacing None with NULL. */ if (tb == Py_None) { Py_DECREF(tb); tb = 0; } else if (tb != NULL && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } /* Next, replace a missing value with None */ if (value == NULL) { value = Py_None; Py_INCREF(value); } /* Next, repeatedly, replace a tuple exception with its first item */ while (PyTuple_Check(type) && PyTuple_Size(type) > 0) { PyObject *tmp = type; type = PyTuple_GET_ITEM(type, 0); Py_INCREF(type); Py_DECREF(tmp); } if (PyString_Check(type)) ; else if (PyClass_Check(type)) ; /*PyErr_NormalizeException(&type, &value, &tb);*/ else if (PyInstance_Check(type)) { /* Raising an instance. The value should be a dummy. */ if (value != Py_None) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } else { /* Normalize to raise <class>, <instance> */ Py_DECREF(value); value = type; type = (PyObject*) ((PyInstanceObject*)type)->in_class; Py_INCREF(type); } } else { /* Not something you can raise. You get an exception anyway, just not what you specified :-) */ PyErr_Format(PyExc_TypeError, "exceptions must be strings, classes, or " "instances, not %s", type->ob_type->tp_name); goto raise_error; } PyErr_Restore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } static void __Pyx_WriteUnraisable(char *name) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; PyErr_Fetch(&old_exc, &old_val, &old_tb); ctx = PyString_FromString(name); PyErr_Restore(old_exc, old_val, old_tb); if (!ctx) ctx = Py_None; PyErr_WriteUnraisable(ctx); }
cvs-admin@eby-sarna.com Powered by ViewCVS 1.0-dev |
ViewCVS and CVS Help |