/* Generated by Pyrex 0.7.2 on Thu Jul 08 00:06:36 2004 */ #include "Python.h" #include "structmember.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_mdoc[] = "C Speedups for commonly-used operations"; static char *__pyx_f1 = "C:\\cygwin\\home\\pje\\PyProtocols\\src/protocols/_speedups.pyx"; staticforward PyTypeObject __pyx_type_metamethod; struct __pyx_obj_metamethod { PyObject_HEAD PyObject *func; }; static PyObject *__pyx_v__marker; static PyObject *__pyx_v___conform; static PyObject *__pyx_v___adapt; static PyObject *__pyx_v___mro; static PyObject *__pyx_v___ECType; static PyObject *__pyx_k19; static PyObject *__pyx_k20; static PyObject *__pyx_k21; static PyObject *__pyx_k22; static PyObject *__pyx_k23; static PyObject *__pyx_k24; static PyObject *__pyx_k25; static PyObject *__pyx_k26; static PyObject *(__pyx_f__adapt(PyObject *,PyObject *,PyObject *,PyObject *)); /*proto*/ static PyObject *(__pyx_f_buildClassicMRO(PyClassObject (*),PyListObject (*))); /*proto*/ static PyObject *(__pyx_f_buildECMRO(PyObject *,PyListObject (*))); /*proto*/ static PyObject *__pyx_f_NO_ADAPTER_NEEDED(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_NO_ADAPTER_NEEDED[] = "Assume \'obj\' implements \'protocol\' directly"; static PyObject *__pyx_f_NO_ADAPTER_NEEDED(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_obj = 0; PyObject *__pyx_v_protocol = 0; PyObject *__pyx_r; static char *__pyx_argnames[] = {"obj","protocol",0}; __pyx_v_protocol = __pyx_k19; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_obj, &__pyx_v_protocol)) return 0; Py_INCREF(__pyx_v_obj); Py_INCREF(__pyx_v_protocol); /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":87 */ Py_INCREF(__pyx_v_obj); __pyx_r = __pyx_v_obj; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(__pyx_r); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("_speedups.NO_ADAPTER_NEEDED"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_obj); Py_DECREF(__pyx_v_protocol); return __pyx_r; } static PyObject *__pyx_f_DOES_NOT_SUPPORT(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_DOES_NOT_SUPPORT[] = "Prevent \'obj\' from supporting \'protocol\'"; static PyObject *__pyx_f_DOES_NOT_SUPPORT(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_obj = 0; PyObject *__pyx_v_protocol = 0; PyObject *__pyx_r; static char *__pyx_argnames[] = {"obj","protocol",0}; __pyx_v_protocol = __pyx_k20; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_obj, &__pyx_v_protocol)) return 0; Py_INCREF(__pyx_v_obj); Py_INCREF(__pyx_v_protocol); /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":91 */ Py_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(__pyx_r); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("_speedups.DOES_NOT_SUPPORT"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_obj); Py_DECREF(__pyx_v_protocol); return __pyx_r; } static int __pyx_f_10metamethod___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_10metamethod___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_func = 0; int __pyx_r; static char *__pyx_argnames[] = {"func",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_func)) return -1; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_func); /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":100 */ Py_INCREF(__pyx_v_func); Py_DECREF(((struct __pyx_obj_metamethod *)__pyx_v_self)->func); ((struct __pyx_obj_metamethod *)__pyx_v_self)->func = __pyx_v_func; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("_speedups.metamethod.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_func); return __pyx_r; } static PyObject *__pyx_f_10metamethod___get__(PyObject *__pyx_v_self, PyObject *__pyx_v_ob, PyObject *__pyx_v_typ); /*proto*/ static PyObject *__pyx_f_10metamethod___get__(PyObject *__pyx_v_self, PyObject *__pyx_v_ob, PyObject *__pyx_v_typ) { PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_ob); Py_INCREF(__pyx_v_typ); /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":103 */ __pyx_1 = __pyx_v_ob == Py_None; if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":104 */ Py_INCREF(__pyx_v_self); __pyx_r = __pyx_v_self; goto __pyx_L0; goto __pyx_L2; } __pyx_L2:; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":105 */ __pyx_2 = PyMethod_New(((struct __pyx_obj_metamethod *)__pyx_v_self)->func,__pyx_v_ob,__pyx_v_typ); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 105; 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("_speedups.metamethod.__get__"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_ob); Py_DECREF(__pyx_v_typ); return __pyx_r; } static char (__pyx_k27[]) = "Read-only attribute"; static int __pyx_f_10metamethod___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_ob, PyObject *__pyx_v_value); /*proto*/ static int __pyx_f_10metamethod___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_ob, PyObject *__pyx_v_value) { int __pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_ob); Py_INCREF(__pyx_v_value); /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":108 */ __pyx_1 = __Pyx_GetName(__pyx_b, "AttributeError"); if (!__pyx_1) {__pyx_filename = __pyx_f1; __pyx_lineno = 108; goto __pyx_L1;} __pyx_2 = PyString_FromString(__pyx_k27); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 108; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 108; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 108; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __Pyx_Raise(__pyx_2, 0, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f1; __pyx_lineno = 108; goto __pyx_L1;} __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("_speedups.metamethod.__set__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_ob); Py_DECREF(__pyx_v_value); return __pyx_r; } static char (__pyx_k28[]) = "Read-only attribute"; static int __pyx_f_10metamethod___delete__(PyObject *__pyx_v_self, PyObject *__pyx_v_ob); /*proto*/ static int __pyx_f_10metamethod___delete__(PyObject *__pyx_v_self, PyObject *__pyx_v_ob) { int __pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_ob); /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":111 */ __pyx_1 = __Pyx_GetName(__pyx_b, "AttributeError"); if (!__pyx_1) {__pyx_filename = __pyx_f1; __pyx_lineno = 111; goto __pyx_L1;} __pyx_2 = PyString_FromString(__pyx_k28); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 111; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 111; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 111; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __Pyx_Raise(__pyx_2, 0, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f1; __pyx_lineno = 111; goto __pyx_L1;} __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("_speedups.metamethod.__delete__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_ob); return __pyx_r; } static char (__pyx_k29[]) = "warnings"; static char (__pyx_k30[]) = "warn"; static char (__pyx_k31[]) = "The 'factory' argument to 'adapt()' will be removed in 1.0"; static char (__pyx_k32[]) = "Can't adapt"; static PyObject *__pyx_f__adapt(PyObject *__pyx_v_obj,PyObject *__pyx_v_protocol,PyObject *__pyx_v_default,PyObject *__pyx_v_factory) { void (*__pyx_v_tmp); PyObject *__pyx_v_meth; PyObject *__pyx_v_result; PyObject *__pyx_v_err; PyObject *__pyx_v_warn; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; Py_INCREF(__pyx_v_obj); Py_INCREF(__pyx_v_protocol); Py_INCREF(__pyx_v_default); Py_INCREF(__pyx_v_factory); __pyx_v_meth = Py_None; Py_INCREF(__pyx_v_meth); __pyx_v_result = Py_None; Py_INCREF(__pyx_v_result); __pyx_v_err = Py_None; Py_INCREF(__pyx_v_err); __pyx_v_warn = Py_None; Py_INCREF(__pyx_v_warn); /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":129 */ /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":131 */ __pyx_1 = PyType_Check(__pyx_v_protocol); if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":132 */ __pyx_1 = PyObject_TypeCheck(__pyx_v_obj,__pyx_v_protocol); if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":133 */ Py_INCREF(__pyx_v_obj); __pyx_r = __pyx_v_obj; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; goto __pyx_L2; } __pyx_L2:; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":135 */ __pyx_1 = PyClass_Check(__pyx_v_protocol); if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":136 */ __pyx_1 = PyInstance_Check(__pyx_v_obj); if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":137 */ __pyx_1 = PyObject_IsInstance(__pyx_v_obj,__pyx_v_protocol); if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":138 */ Py_INCREF(__pyx_v_obj); __pyx_r = __pyx_v_obj; goto __pyx_L0; goto __pyx_L6; } __pyx_L6:; goto __pyx_L5; } __pyx_L5:; goto __pyx_L4; } __pyx_L4:; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":140 */ __pyx_v_tmp = PyObject_GetAttr(__pyx_v_obj,__pyx_v___conform); /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":141 */ __pyx_1 = (__pyx_v_tmp != 0); if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":142 */ __pyx_2 = (PyObject *)__pyx_v_tmp; Py_INCREF(__pyx_2); Py_DECREF(__pyx_v_meth); __pyx_v_meth = __pyx_2; __pyx_2 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":143 */ Py_DECREF(((PyObject (*))__pyx_v_tmp)); /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":144 */ /*try:*/ { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":145 */ __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 145; goto __pyx_L8;} Py_INCREF(__pyx_v_protocol); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_protocol); __pyx_3 = PyObject_CallObject(__pyx_v_meth, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 145; goto __pyx_L8;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_v_result); __pyx_v_result = __pyx_3; __pyx_3 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":146 */ __pyx_1 = __pyx_v_result != Py_None; if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":147 */ Py_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; goto __pyx_L10; } __pyx_L10:; } goto __pyx_L9; __pyx_L8:; Py_XDECREF(__pyx_2); __pyx_2 = 0; Py_XDECREF(__pyx_3); __pyx_3 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":148 */ __pyx_2 = __Pyx_GetName(__pyx_b, "TypeError"); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 148; goto __pyx_L1;} __pyx_1 = PyErr_ExceptionMatches(__pyx_2); Py_DECREF(__pyx_2); __pyx_2 = 0; if (__pyx_1) { __Pyx_AddTraceback("_speedups._adapt"); __pyx_3 = __Pyx_GetExcValue(); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 148; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":149 */ __pyx_2 = __Pyx_GetName(__pyx_m, "exc_info"); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 149; goto __pyx_L1;} __pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 149; goto __pyx_L1;} __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 149; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_2 = PyInt_FromLong(2); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 149; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_4, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 149; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = PyObject_GetAttrString(__pyx_3, "tb_next"); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 149; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_1 = __pyx_4 != Py_None; Py_DECREF(__pyx_4); __pyx_4 = 0; if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":150 */ __Pyx_ReRaise(); {__pyx_filename = __pyx_f1; __pyx_lineno = 150; goto __pyx_L1;} goto __pyx_L11; } __pyx_L11:; goto __pyx_L9; } goto __pyx_L1; __pyx_L9:; goto __pyx_L7; } __pyx_1 = PyErr_ExceptionMatches(PyExc_AttributeError); if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":152 */ PyErr_Clear(); goto __pyx_L7; } /*else*/ { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":154 */ __pyx_2 = __Pyx_GetExcValue(); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 154; goto __pyx_L1;} Py_DECREF(__pyx_v_err); __pyx_v_err = __pyx_2; __pyx_2 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":155 */ __Pyx_ReRaise(); {__pyx_filename = __pyx_f1; __pyx_lineno = 155; goto __pyx_L1;} } __pyx_L7:; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":165 */ __pyx_v_tmp = PyObject_GetAttr(__pyx_v_protocol,__pyx_v___adapt); /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":166 */ __pyx_1 = (__pyx_v_tmp != 0); if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":167 */ __pyx_3 = (PyObject *)__pyx_v_tmp; Py_INCREF(__pyx_3); Py_DECREF(__pyx_v_meth); __pyx_v_meth = __pyx_3; __pyx_3 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":168 */ Py_DECREF(((PyObject (*))__pyx_v_tmp)); /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":169 */ /*try:*/ { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":170 */ __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 170; goto __pyx_L13;} Py_INCREF(__pyx_v_obj); PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_obj); __pyx_2 = PyObject_CallObject(__pyx_v_meth, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 170; goto __pyx_L13;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_v_result); __pyx_v_result = __pyx_2; __pyx_2 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":171 */ __pyx_1 = __pyx_v_result != Py_None; if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":172 */ Py_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; goto __pyx_L15; } __pyx_L15:; } goto __pyx_L14; __pyx_L13:; Py_XDECREF(__pyx_3); __pyx_3 = 0; Py_XDECREF(__pyx_4); __pyx_4 = 0; Py_XDECREF(__pyx_2); __pyx_2 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":173 */ __pyx_3 = __Pyx_GetName(__pyx_b, "TypeError"); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 173; goto __pyx_L1;} __pyx_1 = PyErr_ExceptionMatches(__pyx_3); Py_DECREF(__pyx_3); __pyx_3 = 0; if (__pyx_1) { __Pyx_AddTraceback("_speedups._adapt"); __pyx_4 = __Pyx_GetExcValue(); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 173; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":174 */ __pyx_2 = __Pyx_GetName(__pyx_m, "exc_info"); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 174; goto __pyx_L1;} __pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 174; goto __pyx_L1;} __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_2 = PyInt_FromLong(2); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 174; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_4, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = PyObject_GetAttrString(__pyx_3, "tb_next"); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_1 = __pyx_4 != Py_None; Py_DECREF(__pyx_4); __pyx_4 = 0; if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":175 */ __Pyx_ReRaise(); {__pyx_filename = __pyx_f1; __pyx_lineno = 175; goto __pyx_L1;} goto __pyx_L16; } __pyx_L16:; goto __pyx_L14; } goto __pyx_L1; __pyx_L14:; goto __pyx_L12; } __pyx_1 = PyErr_ExceptionMatches(PyExc_AttributeError); if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":177 */ PyErr_Clear(); goto __pyx_L12; } /*else*/ { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":179 */ __pyx_2 = __Pyx_GetExcValue(); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 179; goto __pyx_L1;} Py_DECREF(__pyx_v_err); __pyx_v_err = __pyx_2; __pyx_2 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":180 */ __Pyx_ReRaise(); {__pyx_filename = __pyx_f1; __pyx_lineno = 180; goto __pyx_L1;} } __pyx_L12:; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":182 */ __pyx_1 = __pyx_v_default == __pyx_v__marker; if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":183 */ __pyx_1 = __pyx_v_factory != __pyx_v__marker; if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":184 */ __pyx_3 = PyString_FromString(__pyx_k29); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 184; goto __pyx_L1;} __pyx_4 = PyString_FromString(__pyx_k30); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 184; goto __pyx_L1;} __pyx_2 = PyList_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 184; goto __pyx_L1;} PyList_SET_ITEM(__pyx_2, 0, __pyx_4); __pyx_4 = 0; __pyx_4 = __Pyx_Import(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 184; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_3 = PyObject_GetAttrString(__pyx_4, "warn"); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 184; goto __pyx_L1;} Py_DECREF(__pyx_v_warn); __pyx_v_warn = __pyx_3; __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":185 */ __pyx_2 = PyString_FromString(__pyx_k31); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 185; goto __pyx_L1;} __pyx_4 = __Pyx_GetName(__pyx_b, "DeprecationWarning"); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 186; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(1); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 186; goto __pyx_L1;} __pyx_5 = PyTuple_New(3); if (!__pyx_5) {__pyx_filename = __pyx_f1; __pyx_lineno = 185; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_5, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_5, 1, __pyx_4); PyTuple_SET_ITEM(__pyx_5, 2, __pyx_3); __pyx_2 = 0; __pyx_4 = 0; __pyx_3 = 0; __pyx_2 = PyObject_CallObject(__pyx_v_warn, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 185; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":187 */ __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 187; goto __pyx_L1;} Py_INCREF(__pyx_v_obj); PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_obj); Py_INCREF(__pyx_v_protocol); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_protocol); __pyx_3 = PyObject_CallObject(__pyx_v_factory, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 187; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; goto __pyx_L18; } __pyx_L18:; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":188 */ __pyx_5 = __Pyx_GetName(__pyx_m, "AdaptationFailure"); if (!__pyx_5) {__pyx_filename = __pyx_f1; __pyx_lineno = 188; goto __pyx_L1;} __pyx_2 = PyString_FromString(__pyx_k32); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 188; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 188; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2); Py_INCREF(__pyx_v_obj); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_obj); Py_INCREF(__pyx_v_protocol); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_v_protocol); __pyx_2 = 0; __pyx_3 = PyObject_CallObject(__pyx_5, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 188; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; __Pyx_Raise(__pyx_3, 0, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f1; __pyx_lineno = 188; goto __pyx_L1;} goto __pyx_L17; } __pyx_L17:; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":190 */ Py_INCREF(__pyx_v_default); __pyx_r = __pyx_v_default; 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); Py_XDECREF(__pyx_5); __Pyx_AddTraceback("_speedups._adapt"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_meth); Py_DECREF(__pyx_v_result); Py_DECREF(__pyx_v_err); Py_DECREF(__pyx_v_warn); Py_DECREF(__pyx_v_obj); Py_DECREF(__pyx_v_protocol); Py_DECREF(__pyx_v_default); Py_DECREF(__pyx_v_factory); return __pyx_r; } static PyObject *__pyx_f_adapt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_adapt[] = "PEP 246-alike: Adapt \'obj\' to \'protocol\', return \'default\'\n\n If \'default\' is not supplied and no implementation is found,\n raise \'AdaptationFailure\'."; static PyObject *__pyx_f_adapt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_obj = 0; PyObject *__pyx_v_protocol = 0; PyObject *__pyx_v_default = 0; PyObject *__pyx_v_factory = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"obj","protocol","default","factory",0}; __pyx_v_default = __pyx_k21; __pyx_v_factory = __pyx_k22; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|OO", __pyx_argnames, &__pyx_v_obj, &__pyx_v_protocol, &__pyx_v_default, &__pyx_v_factory)) return 0; Py_INCREF(__pyx_v_obj); Py_INCREF(__pyx_v_protocol); Py_INCREF(__pyx_v_default); Py_INCREF(__pyx_v_factory); /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":199 */ __pyx_1 = __pyx_f__adapt(__pyx_v_obj,__pyx_v_protocol,__pyx_v_default,__pyx_v_factory); if (!__pyx_1) {__pyx_filename = __pyx_f1; __pyx_lineno = 199; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(__pyx_r); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("_speedups.adapt"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_obj); Py_DECREF(__pyx_v_protocol); Py_DECREF(__pyx_v_default); Py_DECREF(__pyx_v_factory); return __pyx_r; } static PyObject *__pyx_f_Protocol__call__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_Protocol__call__[] = "Adapt to this protocol"; static PyObject *__pyx_f_Protocol__call__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_ob = 0; PyObject *__pyx_v_default = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"self","ob","default",0}; __pyx_v_default = __pyx_k23; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|O", __pyx_argnames, &__pyx_v_self, &__pyx_v_ob, &__pyx_v_default)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_ob); Py_INCREF(__pyx_v_default); /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":203 */ __pyx_1 = __pyx_f__adapt(__pyx_v_ob,__pyx_v_self,__pyx_v_default,__pyx_v__marker); if (!__pyx_1) {__pyx_filename = __pyx_f1; __pyx_lineno = 203; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(__pyx_r); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("_speedups.Protocol__call__"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_ob); Py_DECREF(__pyx_v_default); return __pyx_r; } static PyObject *__pyx_f_buildClassicMRO(PyClassObject (*__pyx_v_cls),PyListObject (*__pyx_v_list)) { PyTupleObject (*__pyx_v_bases); int __pyx_v_i; PyObject *__pyx_v_tmp; PyObject *__pyx_r; PyObject *__pyx_1 = 0; int __pyx_2; __pyx_v_tmp = Py_None; Py_INCREF(__pyx_v_tmp); /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":208 */ /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":209 */ /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":211 */ __pyx_1 = (PyObject *)__pyx_v_cls; Py_INCREF(__pyx_1); __pyx_2 = PyList_Append(__pyx_v_list,__pyx_1); if (__pyx_2 == -1) {__pyx_filename = __pyx_f1; __pyx_lineno = 211; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":212 */ __pyx_v_bases = __pyx_v_cls->cl_bases; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":214 */ __pyx_2 = (__pyx_v_bases != 0); if (__pyx_2) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":215 */ __pyx_2 = PyTuple_GET_SIZE(__pyx_v_bases); for (__pyx_v_i = 0; __pyx_v_i < __pyx_2; ++__pyx_v_i) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":216 */ __pyx_1 = (PyObject *)PyTuple_GET_ITEM(__pyx_v_bases,__pyx_v_i); Py_INCREF(__pyx_1); Py_DECREF(__pyx_v_tmp); __pyx_v_tmp = __pyx_1; __pyx_1 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":217 */ __pyx_1 = __pyx_f_buildClassicMRO(((PyClassObject (*))__pyx_v_tmp),__pyx_v_list); if (!__pyx_1) {__pyx_filename = __pyx_f1; __pyx_lineno = 217; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_L3:; } __pyx_L4:; goto __pyx_L2; } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(__pyx_r); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("_speedups.buildClassicMRO"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_tmp); return __pyx_r; } static char (__pyx_k33[]) = "Not a classic class"; static PyObject *__pyx_f_classicMRO(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_classicMRO(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_ob = 0; PyObject *__pyx_v_extendedClassic = 0; PyObject *__pyx_v_mro; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"ob","extendedClassic",0}; __pyx_v_extendedClassic = __pyx_k24; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_ob, &__pyx_v_extendedClassic)) return 0; Py_INCREF(__pyx_v_ob); Py_INCREF(__pyx_v_extendedClassic); __pyx_v_mro = Py_None; Py_INCREF(__pyx_v_mro); /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":222 */ __pyx_1 = PyClass_Check(__pyx_v_ob); if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":223 */ __pyx_2 = PyList_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 223; goto __pyx_L1;} Py_DECREF(__pyx_v_mro); __pyx_v_mro = __pyx_2; __pyx_2 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":224 */ __pyx_2 = __pyx_f_buildClassicMRO(((PyClassObject (*))__pyx_v_ob),((PyListObject (*))__pyx_v_mro)); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 224; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":225 */ __pyx_1 = PyObject_IsTrue(__pyx_v_extendedClassic); if (__pyx_1 < 0) {__pyx_filename = __pyx_f1; __pyx_lineno = 225; goto __pyx_L1;} if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":226 */ __pyx_2 = (PyObject *)(&PyInstance_Type); Py_INCREF(__pyx_2); __pyx_1 = PyList_Append(((PyListObject (*))__pyx_v_mro),__pyx_2); if (__pyx_1 == -1) {__pyx_filename = __pyx_f1; __pyx_lineno = 226; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":227 */ __pyx_2 = (PyObject *)(&PyBaseObject_Type); Py_INCREF(__pyx_2); __pyx_1 = PyList_Append(((PyListObject (*))__pyx_v_mro),__pyx_2); if (__pyx_1 == -1) {__pyx_filename = __pyx_f1; __pyx_lineno = 227; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":228 */ Py_INCREF(__pyx_v_mro); __pyx_r = __pyx_v_mro; goto __pyx_L0; goto __pyx_L2; } __pyx_L2:; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":230 */ __pyx_2 = __Pyx_GetName(__pyx_b, "TypeError"); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 230; goto __pyx_L1;} __pyx_3 = PyString_FromString(__pyx_k33); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 230; goto __pyx_L1;} __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 230; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); Py_INCREF(__pyx_v_ob); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_ob); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 230; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; __Pyx_Raise(__pyx_3, 0, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f1; __pyx_lineno = 230; goto __pyx_L1;} __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("_speedups.classicMRO"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_mro); Py_DECREF(__pyx_v_ob); Py_DECREF(__pyx_v_extendedClassic); return __pyx_r; } static PyObject *__pyx_f_buildECMRO(PyObject *__pyx_v_cls,PyListObject (*__pyx_v_list)) { PyObject *__pyx_v_i; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; Py_INCREF(__pyx_v_cls); __pyx_v_i = Py_None; Py_INCREF(__pyx_v_i); /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":248 */ __pyx_1 = PyList_Append(__pyx_v_list,__pyx_v_cls); if (__pyx_1 == -1) {__pyx_filename = __pyx_f1; __pyx_lineno = 248; goto __pyx_L1;} /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":249 */ __pyx_2 = PyObject_GetAttrString(__pyx_v_cls, "__bases__"); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 249; goto __pyx_L1;} __pyx_3 = PyObject_GetIter(__pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 249; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; for (;;) { __pyx_L2:; __pyx_2 = PyIter_Next(__pyx_3); if (!__pyx_2) { if (PyErr_Occurred()) {__pyx_filename = __pyx_f1; __pyx_lineno = 249; goto __pyx_L1;} break; } Py_DECREF(__pyx_v_i); __pyx_v_i = __pyx_2; __pyx_2 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":250 */ __pyx_2 = __pyx_f_buildECMRO(__pyx_v_i,__pyx_v_list); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 250; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; } __pyx_L3:; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = Py_None; Py_INCREF(__pyx_r); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("_speedups.buildECMRO"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_i); Py_DECREF(__pyx_v_cls); return __pyx_r; } static PyObject *__pyx_f_extClassMRO(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_extClassMRO(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_ob = 0; PyObject *__pyx_v_extendedClassic = 0; PyObject *__pyx_v_mro; PyObject *__pyx_r; PyObject *__pyx_1 = 0; int __pyx_2; static char *__pyx_argnames[] = {"ob","extendedClassic",0}; __pyx_v_extendedClassic = __pyx_k25; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_ob, &__pyx_v_extendedClassic)) return 0; Py_INCREF(__pyx_v_ob); Py_INCREF(__pyx_v_extendedClassic); __pyx_v_mro = Py_None; Py_INCREF(__pyx_v_mro); /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":254 */ __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f1; __pyx_lineno = 254; goto __pyx_L1;} Py_DECREF(__pyx_v_mro); __pyx_v_mro = __pyx_1; __pyx_1 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":255 */ __pyx_1 = __pyx_f_buildECMRO(__pyx_v_ob,((PyListObject (*))__pyx_v_mro)); if (!__pyx_1) {__pyx_filename = __pyx_f1; __pyx_lineno = 255; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":256 */ __pyx_2 = PyObject_IsTrue(__pyx_v_extendedClassic); if (__pyx_2 < 0) {__pyx_filename = __pyx_f1; __pyx_lineno = 256; goto __pyx_L1;} if (__pyx_2) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":257 */ __pyx_1 = (PyObject *)(&PyInstance_Type); Py_INCREF(__pyx_1); __pyx_2 = PyList_Append(((PyListObject (*))__pyx_v_mro),__pyx_1); if (__pyx_2 == -1) {__pyx_filename = __pyx_f1; __pyx_lineno = 257; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":258 */ __pyx_1 = (PyObject *)(&PyBaseObject_Type); Py_INCREF(__pyx_1); __pyx_2 = PyList_Append(((PyListObject (*))__pyx_v_mro),__pyx_1); if (__pyx_2 == -1) {__pyx_filename = __pyx_f1; __pyx_lineno = 258; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; goto __pyx_L2; } __pyx_L2:; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":259 */ Py_INCREF(__pyx_v_mro); __pyx_r = __pyx_v_mro; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(__pyx_r); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("_speedups.extClassMRO"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_mro); Py_DECREF(__pyx_v_ob); Py_DECREF(__pyx_v_extendedClassic); return __pyx_r; } static PyObject *__pyx_f_getMRO(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_getMRO(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_ob = 0; PyObject *__pyx_v_extendedClassic = 0; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"ob","extendedClassic",0}; __pyx_v_extendedClassic = __pyx_k26; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_ob, &__pyx_v_extendedClassic)) return 0; Py_INCREF(__pyx_v_ob); Py_INCREF(__pyx_v_extendedClassic); /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":265 */ __pyx_1 = PyClass_Check(__pyx_v_ob); if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":266 */ __pyx_2 = __Pyx_GetName(__pyx_m, "classicMRO"); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 266; goto __pyx_L1;} __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 266; goto __pyx_L1;} Py_INCREF(__pyx_v_ob); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_ob); Py_INCREF(__pyx_v_extendedClassic); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_extendedClassic); __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 266; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; goto __pyx_L2; } __pyx_1 = PyType_Check(__pyx_v_ob); if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":269 */ __pyx_2 = PyObject_GetAttrString(__pyx_v_ob, "__mro__"); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 269; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; goto __pyx_L2; } __pyx_1 = PyObject_TypeCheck(__pyx_v_ob,__pyx_v___ECType); if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":272 */ __pyx_3 = __Pyx_GetName(__pyx_m, "extClassMRO"); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 272; goto __pyx_L1;} __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 272; goto __pyx_L1;} Py_INCREF(__pyx_v_ob); PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_ob); Py_INCREF(__pyx_v_extendedClassic); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_extendedClassic); __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 272; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; goto __pyx_L2; } __pyx_L2:; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":274 */ __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 274; goto __pyx_L1;} Py_INCREF(__pyx_v_ob); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_ob); __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("_speedups.getMRO"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_ob); Py_DECREF(__pyx_v_extendedClassic); return __pyx_r; } static PyObject *__pyx_f_Protocol__adapt__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_Protocol__adapt__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_obj = 0; void (*__pyx_v_tmp); int __pyx_v_i; PyObject *__pyx_v_cls; PyObject *__pyx_v_err; PyObject *__pyx_v_mro; PyObject *__pyx_v_get; PyObject *__pyx_v_factory; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; int __pyx_5; PyObject *__pyx_6 = 0; static char *__pyx_argnames[] = {"self","obj",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_self, &__pyx_v_obj)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_obj); __pyx_v_cls = Py_None; Py_INCREF(__pyx_v_cls); __pyx_v_err = Py_None; Py_INCREF(__pyx_v_err); __pyx_v_mro = Py_None; Py_INCREF(__pyx_v_mro); __pyx_v_get = Py_None; Py_INCREF(__pyx_v_get); __pyx_v_factory = Py_None; Py_INCREF(__pyx_v_factory); /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":290 */ /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":291 */ /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":293 */ __pyx_1 = PyInstance_Check(__pyx_v_obj); if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":294 */ __pyx_2 = (PyObject *)((PyInstanceObject (*))__pyx_v_obj)->in_class; Py_INCREF(__pyx_2); Py_DECREF(__pyx_v_cls); __pyx_v_cls = __pyx_2; __pyx_2 = 0; goto __pyx_L2; } /*else*/ { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":297 */ __pyx_2 = __Pyx_GetName(__pyx_m, "__class"); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 297; goto __pyx_L1;} __pyx_v_tmp = PyObject_GetAttr(__pyx_v_obj,__pyx_2); Py_DECREF(__pyx_2); __pyx_2 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":299 */ __pyx_1 = (__pyx_v_tmp != 0); if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":300 */ __pyx_2 = (PyObject *)__pyx_v_tmp; Py_INCREF(__pyx_2); Py_DECREF(__pyx_v_cls); __pyx_v_cls = __pyx_2; __pyx_2 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":301 */ Py_DECREF(((PyObject (*))__pyx_v_tmp)); goto __pyx_L3; } __pyx_1 = PyErr_ExceptionMatches(PyExc_AttributeError); if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":305 */ PyErr_Clear(); /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":306 */ __pyx_2 = (PyObject *)((PyObject (*))__pyx_v_obj)->ob_type; Py_INCREF(__pyx_2); Py_DECREF(__pyx_v_cls); __pyx_v_cls = __pyx_2; __pyx_2 = 0; goto __pyx_L3; } /*else*/ { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":310 */ __pyx_2 = __Pyx_GetExcValue(); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 310; goto __pyx_L1;} Py_DECREF(__pyx_v_err); __pyx_v_err = __pyx_2; __pyx_2 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":311 */ __Pyx_ReRaise(); {__pyx_filename = __pyx_f1; __pyx_lineno = 311; goto __pyx_L1;} } __pyx_L3:; } __pyx_L2:; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":313 */ __pyx_v_tmp = ((void (*))0); /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":315 */ __pyx_1 = PyType_Check(__pyx_v_cls); if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":317 */ __pyx_v_tmp = ((void (*))((PyTypeObject (*))__pyx_v_cls)->tp_mro); goto __pyx_L4; } __pyx_L4:; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":329 */ __pyx_1 = (__pyx_v_tmp != 0); if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":330 */ __pyx_2 = (PyObject *)__pyx_v_tmp; Py_INCREF(__pyx_2); Py_DECREF(__pyx_v_mro); __pyx_v_mro = __pyx_2; __pyx_2 = 0; goto __pyx_L5; } __pyx_1 = PyClass_Check(__pyx_v_cls); if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":334 */ __pyx_2 = PyList_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 334; goto __pyx_L1;} Py_DECREF(__pyx_v_mro); __pyx_v_mro = __pyx_2; __pyx_2 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":335 */ __pyx_2 = __pyx_f_buildClassicMRO(((PyClassObject (*))__pyx_v_cls),((PyListObject (*))__pyx_v_mro)); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 335; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":336 */ __pyx_2 = (PyObject *)(&PyInstance_Type); Py_INCREF(__pyx_2); __pyx_1 = PyList_Append(((PyListObject (*))__pyx_v_mro),__pyx_2); if (__pyx_1 == -1) {__pyx_filename = __pyx_f1; __pyx_lineno = 336; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":337 */ __pyx_2 = (PyObject *)(&PyBaseObject_Type); Py_INCREF(__pyx_2); __pyx_1 = PyList_Append(((PyListObject (*))__pyx_v_mro),__pyx_2); if (__pyx_1 == -1) {__pyx_filename = __pyx_f1; __pyx_lineno = 337; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; goto __pyx_L5; } /*else*/ { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":341 */ __pyx_v_tmp = PyObject_GetAttr(__pyx_v_cls,__pyx_v___mro); /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":342 */ __pyx_1 = (__pyx_v_tmp != 0); if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":343 */ __pyx_2 = (PyObject *)__pyx_v_tmp; Py_INCREF(__pyx_2); Py_DECREF(__pyx_v_mro); __pyx_v_mro = __pyx_2; __pyx_2 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":344 */ Py_DECREF(((PyObject (*))__pyx_v_tmp)); goto __pyx_L6; } __pyx_1 = PyObject_TypeCheck(__pyx_v_cls,__pyx_v___ECType); if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":349 */ PyErr_Clear(); /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":350 */ __pyx_2 = __Pyx_GetName(__pyx_m, "extClassMRO"); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 350; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(1); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 350; goto __pyx_L1;} __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 350; goto __pyx_L1;} Py_INCREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_cls); 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 = 350; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_v_mro); __pyx_v_mro = __pyx_3; __pyx_3 = 0; goto __pyx_L6; } /*else*/ { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":355 */ __pyx_2 = __Pyx_GetExcValue(); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 355; goto __pyx_L1;} Py_DECREF(__pyx_v_err); __pyx_v_err = __pyx_2; __pyx_2 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":356 */ __Pyx_ReRaise(); {__pyx_filename = __pyx_f1; __pyx_lineno = 356; goto __pyx_L1;} } __pyx_L6:; } __pyx_L5:; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":370 */ __pyx_4 = PyObject_GetAttrString(__pyx_v_self, "_Protocol__adapters"); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 370; goto __pyx_L1;} __pyx_3 = PyObject_GetAttrString(__pyx_4, "get"); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 370; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_v_get); __pyx_v_get = __pyx_3; __pyx_3 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":372 */ __pyx_1 = PyTuple_Check(__pyx_v_mro); if (__pyx_1) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":374 */ __pyx_1 = PyTuple_GET_SIZE(((PyTupleObject (*))__pyx_v_mro)); for (__pyx_v_i = 0; __pyx_v_i < __pyx_1; ++__pyx_v_i) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":375 */ __pyx_2 = (PyObject *)PyTuple_GET_ITEM(((PyTupleObject (*))__pyx_v_mro),__pyx_v_i); Py_INCREF(__pyx_2); Py_DECREF(__pyx_v_cls); __pyx_v_cls = __pyx_2; __pyx_2 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":376 */ __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 376; goto __pyx_L1;} Py_INCREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_cls); __pyx_3 = PyObject_CallObject(__pyx_v_get, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 376; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_v_factory); __pyx_v_factory = __pyx_3; __pyx_3 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":377 */ __pyx_5 = __pyx_v_factory != Py_None; if (__pyx_5) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":378 */ __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 378; goto __pyx_L1;} __pyx_4 = PyObject_GetItem(__pyx_v_factory, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 378; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 378; goto __pyx_L1;} Py_INCREF(__pyx_v_obj); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_obj); __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 378; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; goto __pyx_L10; } __pyx_L10:; __pyx_L8:; } __pyx_L9:; goto __pyx_L7; } __pyx_5 = PyList_Check(__pyx_v_mro); if (__pyx_5) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":382 */ __pyx_1 = PyList_GET_SIZE(((PyListObject (*))__pyx_v_mro)); for (__pyx_v_i = 0; __pyx_v_i < __pyx_1; ++__pyx_v_i) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":383 */ __pyx_4 = (PyObject *)PyList_GET_ITEM(((PyListObject (*))__pyx_v_mro),__pyx_v_i); Py_INCREF(__pyx_4); Py_DECREF(__pyx_v_cls); __pyx_v_cls = __pyx_4; __pyx_4 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":384 */ __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 384; goto __pyx_L1;} Py_INCREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_cls); __pyx_2 = PyObject_CallObject(__pyx_v_get, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 384; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_v_factory); __pyx_v_factory = __pyx_2; __pyx_2 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":385 */ __pyx_5 = __pyx_v_factory != Py_None; if (__pyx_5) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":386 */ __pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 386; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_factory, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 386; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 386; goto __pyx_L1;} Py_INCREF(__pyx_v_obj); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_obj); __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 386; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; goto __pyx_L13; } __pyx_L13:; __pyx_L11:; } __pyx_L12:; goto __pyx_L7; } /*else*/ { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":391 */ __pyx_3 = PyObject_GetIter(__pyx_v_mro); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 391; goto __pyx_L1;} for (;;) { __pyx_L14:; __pyx_2 = PyIter_Next(__pyx_3); if (!__pyx_2) { if (PyErr_Occurred()) {__pyx_filename = __pyx_f1; __pyx_lineno = 391; goto __pyx_L1;} break; } Py_DECREF(__pyx_v_cls); __pyx_v_cls = __pyx_2; __pyx_2 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":392 */ __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 392; goto __pyx_L1;} Py_INCREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_cls); __pyx_2 = PyObject_CallObject(__pyx_v_get, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 392; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_v_factory); __pyx_v_factory = __pyx_2; __pyx_2 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":393 */ __pyx_5 = __pyx_v_factory != Py_None; if (__pyx_5) { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":394 */ __pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 394; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_factory, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 394; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 394; goto __pyx_L1;} Py_INCREF(__pyx_v_obj); PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_obj); __pyx_6 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f1; __pyx_lineno = 394; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_r = __pyx_6; __pyx_6 = 0; goto __pyx_L0; goto __pyx_L16; } __pyx_L16:; } __pyx_L15:; Py_DECREF(__pyx_3); __pyx_3 = 0; } __pyx_L7:; __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); Py_XDECREF(__pyx_6); __Pyx_AddTraceback("_speedups.Protocol__adapt__"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_cls); Py_DECREF(__pyx_v_err); Py_DECREF(__pyx_v_mro); Py_DECREF(__pyx_v_get); Py_DECREF(__pyx_v_factory); Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_obj); return __pyx_r; } static PyObject *__pyx_tp_new_metamethod(struct _typeobject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); struct __pyx_obj_metamethod *p = (struct __pyx_obj_metamethod *)o; p->func = Py_None; Py_INCREF(p->func); return o; } static void __pyx_tp_dealloc_metamethod(PyObject *o) { struct __pyx_obj_metamethod *p = (struct __pyx_obj_metamethod *)o; Py_XDECREF(p->func); (*o->ob_type->tp_free)(o); } static int __pyx_tp_traverse_metamethod(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_metamethod *p = (struct __pyx_obj_metamethod *)o; e = (*v)(p->func, a); if (e) return e; return 0; } static int __pyx_tp_clear_metamethod(PyObject *o) { struct __pyx_obj_metamethod *p = (struct __pyx_obj_metamethod *)o; Py_XDECREF(p->func); p->func = Py_None; Py_INCREF(p->func); return 0; } static PyObject *__pyx_tp_descr_get_metamethod(PyObject *o, PyObject *i, PyObject *c) { PyObject *r = 0; if (!i) i = Py_None; if (!c) c = Py_None; Py_INCREF(i); Py_INCREF(c); r = __pyx_f_10metamethod___get__(o, i, c); Py_DECREF(i); Py_DECREF(c); return r; } static int __pyx_tp_descr_set_metamethod(PyObject *o, PyObject *i, PyObject *v) { if (v) { return __pyx_f_10metamethod___set__(o, i, v); } else { return __pyx_f_10metamethod___delete__(o, i); } } static struct PyMethodDef __pyx_methods_metamethod[] = { {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_metamethod = { 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_metamethod = { 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_metamethod = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_metamethod = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; statichere PyTypeObject __pyx_type_metamethod = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "_speedups.metamethod", /*tp_name*/ sizeof(struct __pyx_obj_metamethod), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_metamethod, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_metamethod, /*tp_as_number*/ &__pyx_tp_as_sequence_metamethod, /*tp_as_sequence*/ &__pyx_tp_as_mapping_metamethod, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_metamethod, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Wrapper for metaclass method that might be confused w/instance method", /*tp_doc*/ __pyx_tp_traverse_metamethod, /*tp_traverse*/ __pyx_tp_clear_metamethod, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_metamethod, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ __pyx_tp_descr_get_metamethod, /*tp_descr_get*/ __pyx_tp_descr_set_metamethod, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_10metamethod___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_metamethod, /*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[] = { {"NO_ADAPTER_NEEDED", (PyCFunction)__pyx_f_NO_ADAPTER_NEEDED, METH_VARARGS|METH_KEYWORDS, __pyx_doc_NO_ADAPTER_NEEDED}, {"DOES_NOT_SUPPORT", (PyCFunction)__pyx_f_DOES_NOT_SUPPORT, METH_VARARGS|METH_KEYWORDS, __pyx_doc_DOES_NOT_SUPPORT}, {"adapt", (PyCFunction)__pyx_f_adapt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_adapt}, {"Protocol__call__", (PyCFunction)__pyx_f_Protocol__call__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_Protocol__call__}, {"classicMRO", (PyCFunction)__pyx_f_classicMRO, METH_VARARGS|METH_KEYWORDS, 0}, {"extClassMRO", (PyCFunction)__pyx_f_extClassMRO, METH_VARARGS|METH_KEYWORDS, 0}, {"getMRO", (PyCFunction)__pyx_f_getMRO, METH_VARARGS|METH_KEYWORDS, 0}, {"Protocol__adapt__", (PyCFunction)__pyx_f_Protocol__adapt__, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static char (__pyx_k1[]) = "NO_ADAPTER_NEEDED"; static char (__pyx_k2[]) = "DOES_NOT_SUPPORT"; static char (__pyx_k3[]) = "adapt"; static char (__pyx_k4[]) = "Protocol__adapt__"; static char (__pyx_k5[]) = "metamethod"; static char (__pyx_k6[]) = "classicMRO"; static char (__pyx_k7[]) = "getMRO"; static char (__pyx_k8[]) = "Protocol__call__"; static char (__pyx_k9[]) = "sys"; static char (__pyx_k10[]) = "exc_info"; static char (__pyx_k11[]) = "protocols.adapters"; static char (__pyx_k12[]) = "AdaptationFailure"; static char (__pyx_k13[]) = "ExtensionClass"; static char (__pyx_k14[]) = "ExtensionClass"; static char (__pyx_k15[]) = "__conform__"; static char (__pyx_k16[]) = "__adapt__"; static char (__pyx_k17[]) = "__class__"; static char (__pyx_k18[]) = "__mro__"; DL_EXPORT(void) init_speedups(void); /*proto*/ DL_EXPORT(void) init_speedups(void) { PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; PyObject *__pyx_6 = 0; PyObject *__pyx_7 = 0; PyObject *__pyx_8 = 0; PyObject *__pyx_9 = 0; int __pyx_10; __pyx_m = Py_InitModule4("_speedups", __pyx_methods, __pyx_mdoc, 0, PYTHON_API_VERSION); __pyx_b = PyImport_AddModule("__builtin__"); PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b); __pyx_v__marker = Py_None; Py_INCREF(__pyx_v__marker); __pyx_v___conform = Py_None; Py_INCREF(__pyx_v___conform); __pyx_v___adapt = Py_None; Py_INCREF(__pyx_v___adapt); __pyx_v___mro = Py_None; Py_INCREF(__pyx_v___mro); __pyx_v___ECType = Py_None; Py_INCREF(__pyx_v___ECType); __pyx_type_metamethod.tp_free = _PyObject_GC_Del; if (PyType_Ready(&__pyx_type_metamethod) < 0) {__pyx_filename = __pyx_f1; __pyx_lineno = 94; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "metamethod", (PyObject *)&__pyx_type_metamethod) < 0) {__pyx_filename = __pyx_f1; __pyx_lineno = 94; goto __pyx_L1;} /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":3 */ __pyx_1 = PyString_FromString(__pyx_k1); if (!__pyx_1) {__pyx_filename = __pyx_f1; __pyx_lineno = 4; goto __pyx_L1;} __pyx_2 = PyString_FromString(__pyx_k2); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 4; goto __pyx_L1;} __pyx_3 = PyString_FromString(__pyx_k3); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 5; goto __pyx_L1;} __pyx_4 = PyString_FromString(__pyx_k4); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 5; goto __pyx_L1;} __pyx_5 = PyString_FromString(__pyx_k5); if (!__pyx_5) {__pyx_filename = __pyx_f1; __pyx_lineno = 5; goto __pyx_L1;} __pyx_6 = PyString_FromString(__pyx_k6); if (!__pyx_6) {__pyx_filename = __pyx_f1; __pyx_lineno = 5; goto __pyx_L1;} __pyx_7 = PyString_FromString(__pyx_k7); if (!__pyx_7) {__pyx_filename = __pyx_f1; __pyx_lineno = 5; goto __pyx_L1;} __pyx_8 = PyString_FromString(__pyx_k8); if (!__pyx_8) {__pyx_filename = __pyx_f1; __pyx_lineno = 6; goto __pyx_L1;} __pyx_9 = PyList_New(8); if (!__pyx_9) {__pyx_filename = __pyx_f1; __pyx_lineno = 3; goto __pyx_L1;} PyList_SET_ITEM(__pyx_9, 0, __pyx_1); PyList_SET_ITEM(__pyx_9, 1, __pyx_2); PyList_SET_ITEM(__pyx_9, 2, __pyx_3); PyList_SET_ITEM(__pyx_9, 3, __pyx_4); PyList_SET_ITEM(__pyx_9, 4, __pyx_5); PyList_SET_ITEM(__pyx_9, 5, __pyx_6); PyList_SET_ITEM(__pyx_9, 6, __pyx_7); PyList_SET_ITEM(__pyx_9, 7, __pyx_8); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_4 = 0; __pyx_5 = 0; __pyx_6 = 0; __pyx_7 = 0; __pyx_8 = 0; if (PyObject_SetAttrString(__pyx_m, "__all__", __pyx_9) < 0) {__pyx_filename = __pyx_f1; __pyx_lineno = 3; goto __pyx_L1;} Py_DECREF(__pyx_9); __pyx_9 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":9 */ /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":60 */ /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":61 */ __pyx_1 = PyString_FromString(__pyx_k9); if (!__pyx_1) {__pyx_filename = __pyx_f1; __pyx_lineno = 61; goto __pyx_L1;} __pyx_2 = PyString_FromString(__pyx_k10); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 61; goto __pyx_L1;} __pyx_3 = PyList_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 61; goto __pyx_L1;} PyList_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; __pyx_4 = __Pyx_Import(__pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 61; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_5 = PyObject_GetAttrString(__pyx_4, "exc_info"); if (!__pyx_5) {__pyx_filename = __pyx_f1; __pyx_lineno = 61; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "exc_info", __pyx_5) < 0) {__pyx_filename = __pyx_f1; __pyx_lineno = 61; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":62 */ __pyx_6 = PyString_FromString(__pyx_k11); if (!__pyx_6) {__pyx_filename = __pyx_f1; __pyx_lineno = 62; goto __pyx_L1;} __pyx_7 = PyString_FromString(__pyx_k12); if (!__pyx_7) {__pyx_filename = __pyx_f1; __pyx_lineno = 62; goto __pyx_L1;} __pyx_8 = PyList_New(1); if (!__pyx_8) {__pyx_filename = __pyx_f1; __pyx_lineno = 62; goto __pyx_L1;} PyList_SET_ITEM(__pyx_8, 0, __pyx_7); __pyx_7 = 0; __pyx_9 = __Pyx_Import(__pyx_6, __pyx_8); if (!__pyx_9) {__pyx_filename = __pyx_f1; __pyx_lineno = 62; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; Py_DECREF(__pyx_8); __pyx_8 = 0; __pyx_2 = PyObject_GetAttrString(__pyx_9, "AdaptationFailure"); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 62; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "AdaptationFailure", __pyx_2) < 0) {__pyx_filename = __pyx_f1; __pyx_lineno = 62; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_9); __pyx_9 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":64 */ /*try:*/ { /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":65 */ __pyx_1 = PyString_FromString(__pyx_k13); if (!__pyx_1) {__pyx_filename = __pyx_f1; __pyx_lineno = 65; goto __pyx_L17;} __pyx_3 = PyString_FromString(__pyx_k14); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 65; goto __pyx_L17;} __pyx_4 = PyList_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 65; goto __pyx_L17;} PyList_SET_ITEM(__pyx_4, 0, __pyx_3); __pyx_3 = 0; __pyx_5 = __Pyx_Import(__pyx_1, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f1; __pyx_lineno = 65; goto __pyx_L17;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_7 = PyObject_GetAttrString(__pyx_5, "ExtensionClass"); if (!__pyx_7) {__pyx_filename = __pyx_f1; __pyx_lineno = 65; goto __pyx_L17;} if (PyObject_SetAttrString(__pyx_m, "ExtensionClass", __pyx_7) < 0) {__pyx_filename = __pyx_f1; __pyx_lineno = 65; goto __pyx_L17;} Py_DECREF(__pyx_7); __pyx_7 = 0; Py_DECREF(__pyx_5); __pyx_5 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":66 */ __pyx_6 = __Pyx_GetName(__pyx_m, "ExtensionClass"); if (!__pyx_6) {__pyx_filename = __pyx_f1; __pyx_lineno = 66; goto __pyx_L17;} Py_DECREF(__pyx_v___ECType); __pyx_v___ECType = __pyx_6; __pyx_6 = 0; } goto __pyx_L18; __pyx_L17:; Py_XDECREF(__pyx_8); __pyx_8 = 0; Py_XDECREF(__pyx_9); __pyx_9 = 0; Py_XDECREF(__pyx_2); __pyx_2 = 0; Py_XDECREF(__pyx_3); __pyx_3 = 0; Py_XDECREF(__pyx_1); __pyx_1 = 0; Py_XDECREF(__pyx_4); __pyx_4 = 0; Py_XDECREF(__pyx_5); __pyx_5 = 0; Py_XDECREF(__pyx_7); __pyx_7 = 0; Py_XDECREF(__pyx_6); __pyx_6 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":67 */ __pyx_8 = __Pyx_GetName(__pyx_b, "ImportError"); if (!__pyx_8) {__pyx_filename = __pyx_f1; __pyx_lineno = 67; goto __pyx_L1;} __pyx_10 = PyErr_ExceptionMatches(__pyx_8); Py_DECREF(__pyx_8); __pyx_8 = 0; if (__pyx_10) { __Pyx_AddTraceback("_speedups"); __pyx_9 = __Pyx_GetExcValue(); if (!__pyx_9) {__pyx_filename = __pyx_f1; __pyx_lineno = 67; goto __pyx_L1;} Py_DECREF(__pyx_9); __pyx_9 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":68 */ __pyx_2 = __Pyx_GetName(__pyx_b, "type"); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 68; goto __pyx_L1;} Py_DECREF(__pyx_v___ECType); __pyx_v___ECType = __pyx_2; __pyx_2 = 0; goto __pyx_L18; } goto __pyx_L1; __pyx_L18:; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":70 */ __pyx_3 = __Pyx_GetName(__pyx_b, "object"); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 70; goto __pyx_L1;} __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f1; __pyx_lineno = 70; goto __pyx_L1;} __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f1; __pyx_lineno = 70; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_v__marker); __pyx_v__marker = __pyx_4; __pyx_4 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":71 */ __pyx_5 = PyString_InternFromString(__pyx_k15); if (!__pyx_5) {__pyx_filename = __pyx_f1; __pyx_lineno = 71; goto __pyx_L1;} Py_DECREF(__pyx_v___conform); __pyx_v___conform = __pyx_5; __pyx_5 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":72 */ __pyx_7 = PyString_InternFromString(__pyx_k16); if (!__pyx_7) {__pyx_filename = __pyx_f1; __pyx_lineno = 72; goto __pyx_L1;} Py_DECREF(__pyx_v___adapt); __pyx_v___adapt = __pyx_7; __pyx_7 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":73 */ __pyx_6 = PyString_InternFromString(__pyx_k17); if (!__pyx_6) {__pyx_filename = __pyx_f1; __pyx_lineno = 73; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "__class", __pyx_6) < 0) {__pyx_filename = __pyx_f1; __pyx_lineno = 73; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":74 */ __pyx_8 = PyString_InternFromString(__pyx_k18); if (!__pyx_8) {__pyx_filename = __pyx_f1; __pyx_lineno = 74; goto __pyx_L1;} Py_DECREF(__pyx_v___mro); __pyx_v___mro = __pyx_8; __pyx_8 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":85 */ Py_INCREF(Py_None); __pyx_k19 = Py_None; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":89 */ Py_INCREF(Py_None); __pyx_k20 = Py_None; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":94 */ /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":97 */ /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":99 */ /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":102 */ /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":107 */ /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":110 */ /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":124 */ /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":193 */ Py_INCREF(__pyx_v__marker); __pyx_k21 = __pyx_v__marker; Py_INCREF(__pyx_v__marker); __pyx_k22 = __pyx_v__marker; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":201 */ Py_INCREF(__pyx_v__marker); __pyx_k23 = __pyx_v__marker; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":206 */ /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":220 */ __pyx_9 = __Pyx_GetName(__pyx_b, "False"); if (!__pyx_9) {__pyx_filename = __pyx_f1; __pyx_lineno = 220; goto __pyx_L1;} __pyx_k24 = __pyx_9; __pyx_9 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":247 */ /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":253 */ __pyx_2 = __Pyx_GetName(__pyx_b, "False"); if (!__pyx_2) {__pyx_filename = __pyx_f1; __pyx_lineno = 253; goto __pyx_L1;} __pyx_k25 = __pyx_2; __pyx_2 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":263 */ __pyx_3 = __Pyx_GetName(__pyx_b, "False"); if (!__pyx_3) {__pyx_filename = __pyx_f1; __pyx_lineno = 263; goto __pyx_L1;} __pyx_k26 = __pyx_3; __pyx_3 = 0; /* "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx":288 */ return; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); Py_XDECREF(__pyx_6); Py_XDECREF(__pyx_7); Py_XDECREF(__pyx_8); Py_XDECREF(__pyx_9); __Pyx_AddTraceback("_speedups"); } /* 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 PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) { PyObject *__import__ = 0; PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; __import__ = PyObject_GetAttrString(__pyx_b, "__import__"); if (!__import__) goto bad; if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; module = PyObject_CallFunction(__import__, "OOOO", name, global_dict, empty_dict, list); bad: Py_XDECREF(empty_list); Py_XDECREF(__import__); Py_XDECREF(empty_dict); return module; } 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 PyObject *__Pyx_GetExcValue(void) { PyObject *type = 0, *value = 0, *tb = 0; PyObject *result = 0; PyThreadState *tstate = PyThreadState_Get(); PyErr_Fetch(&type, &value, &tb); PyErr_NormalizeException(&type, &value, &tb); if (PyErr_Occurred()) goto bad; if (!value) { value = Py_None; Py_INCREF(value); } Py_XDECREF(tstate->exc_type); Py_XDECREF(tstate->exc_value); Py_XDECREF(tstate->exc_traceback); tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; result = value; Py_XINCREF(result); type = 0; value = 0; tb = 0; bad: Py_XDECREF(type); Py_XDECREF(value); Py_XDECREF(tb); 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 , */ 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_ReRaise(void) { PyThreadState *tstate = PyThreadState_Get(); PyObject *type = tstate->exc_type; PyObject *value = tstate->exc_value; PyObject *tb = tstate->exc_traceback; Py_XINCREF(type); Py_XINCREF(value); Py_XINCREF(tb); PyErr_Restore(type, value, tb); }