Generated by Cython 0.21.1
Raw output: internal.c
001: include "utils.pxi"
+002: import inspect
__pyx_t_1 = __Pyx_Import(__pyx_n_s_inspect, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_inspect, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
003: #import traceback
004:
+005: wire_types = {
__pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_int32, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_int64, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_sint32, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_sint64, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_uint32, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_uint64, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_bool, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_enum, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_fixed64, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_sfixed64, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_double, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_string, __pyx_int_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_bytes, __pyx_int_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_fixed32, __pyx_int_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_sfixed32, __pyx_int_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_float, __pyx_int_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_d, __pyx_n_s_wire_types, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
006: 'int32': 0,
007: 'int64': 0,
008: 'sint32': 0,
009: 'sint64': 0,
010: 'uint32': 0,
011: 'uint64': 0,
012: 'bool': 0,
013: 'enum': 0,
014: 'fixed64': 1,
015: 'sfixed64': 1,
016: 'double': 1,
017: 'string': 2,
018: 'bytes': 2,
019: 'fixed32': 5,
020: 'sfixed32': 5,
021: 'float': 5,
022: }
023:
+024: default_objects = {
__pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_int32, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_int64, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_sint32, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_sint64, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_uint32, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_uint64, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
025: 'int32': 0,
026: 'int64': 0,
027: 'sint32': 0,
028: 'sint64': 0,
029: 'uint32': 0,
030: 'uint64': 0,
+031: 'bool': False,
if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_bool, Py_False) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_enum, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_fixed64, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_sfixed64, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_double, __pyx_float_0_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_string, __pyx_kp_u__9) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_bytes, __pyx_kp_s__9) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_fixed32, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_sfixed32, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_float, __pyx_float_0_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_d, __pyx_n_s_default_objects, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
032: 'enum': 0,
033: 'fixed64': 0,
034: 'sfixed64': 0,
035: 'double': 0.0,
036: 'string': u'',
037: 'bytes': '',
038: 'fixed32': 0,
039: 'sfixed32': 0,
040: 'float': 0.0,
041: }
042:
+043: cdef class RepeatedContainer(list):
struct __pyx_obj_9cprotobuf_8internal_RepeatedContainer { PyListObject __pyx_base; PyObject *klass; };
044: cdef object klass
045:
+046: def __init__(self, cls):
/* Python wrapper */ static int __pyx_pw_9cprotobuf_8internal_17RepeatedContainer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_9cprotobuf_8internal_17RepeatedContainer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_cls = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_cls = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cprotobuf.internal.RepeatedContainer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cprotobuf_8internal_17RepeatedContainer___init__(((struct __pyx_obj_9cprotobuf_8internal_RepeatedContainer *)__pyx_v_self), __pyx_v_cls); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9cprotobuf_8internal_17RepeatedContainer___init__(struct __pyx_obj_9cprotobuf_8internal_RepeatedContainer *__pyx_v_self, PyObject *__pyx_v_cls) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); /* … */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; }
+047: self.klass = cls
__Pyx_INCREF(__pyx_v_cls); __Pyx_GIVEREF(__pyx_v_cls); __Pyx_GOTREF(__pyx_v_self->klass); __Pyx_DECREF(__pyx_v_self->klass); __pyx_v_self->klass = __pyx_v_cls;
048:
+049: def add(self, **kwargs):
/* Python wrapper */ static PyObject *__pyx_pw_9cprotobuf_8internal_17RepeatedContainer_3add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_9cprotobuf_8internal_17RepeatedContainer_3add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_kwargs = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("add", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "add", 1))) return NULL; __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); __pyx_r = __pyx_pf_9cprotobuf_8internal_17RepeatedContainer_2add(((struct __pyx_obj_9cprotobuf_8internal_RepeatedContainer *)__pyx_v_self), __pyx_v_kwargs); /* function exit code */ __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cprotobuf_8internal_17RepeatedContainer_2add(struct __pyx_obj_9cprotobuf_8internal_RepeatedContainer *__pyx_v_self, PyObject *__pyx_v_kwargs) { PyObject *__pyx_v_obj = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add", 0); /* … */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cprotobuf.internal.RepeatedContainer.add", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_obj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
+050: obj = self.klass(**kwargs)
__pyx_t_1 = __pyx_v_kwargs; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_self->klass, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_obj = __pyx_t_2; __pyx_t_2 = 0;
+051: self.append(obj)
__pyx_t_3 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self), __pyx_v_obj); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+052: return obj
__Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_obj); __pyx_r = __pyx_v_obj; goto __pyx_L0;
053:
+054: cdef class Field(object):
struct __pyx_obj_9cprotobuf_8internal_Field { PyObject_HEAD struct __pyx_vtabstruct_9cprotobuf_8internal_Field *__pyx_vtab; PyObject *name; PyObject *type; int index; int packed; int required; int repeated; PyObject *klass; PyObject *__pyx_default; unsigned char wire_type; __pyx_t_9cprotobuf_8internal_Encoder encoder; __pyx_t_9cprotobuf_8internal_Decoder decoder; }; struct __pyx_vtabstruct_9cprotobuf_8internal_Field { PyObject *(*instantiate_klass)(struct __pyx_obj_9cprotobuf_8internal_Field *); unsigned char (*get_wire_type)(struct __pyx_obj_9cprotobuf_8internal_Field *); __pyx_t_9cprotobuf_8internal_Encoder (*get_encoder)(struct __pyx_obj_9cprotobuf_8internal_Field *); __pyx_t_9cprotobuf_8internal_Decoder (*get_decoder)(struct __pyx_obj_9cprotobuf_8internal_Field *); }; static struct __pyx_vtabstruct_9cprotobuf_8internal_Field *__pyx_vtabptr_9cprotobuf_8internal_Field;
055:
+056: cdef public bytes name
/* Python wrapper */ static PyObject *__pyx_pw_9cprotobuf_8internal_5Field_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9cprotobuf_8internal_5Field_4name_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9cprotobuf_8internal_5Field_4name___get__(((struct __pyx_obj_9cprotobuf_8internal_Field *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cprotobuf_8internal_5Field_4name___get__(struct __pyx_obj_9cprotobuf_8internal_Field *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->name); __pyx_r = __pyx_v_self->name; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9cprotobuf_8internal_5Field_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9cprotobuf_8internal_5Field_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9cprotobuf_8internal_5Field_4name_2__set__(((struct __pyx_obj_9cprotobuf_8internal_Field *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9cprotobuf_8internal_5Field_4name_2__set__(struct __pyx_obj_9cprotobuf_8internal_Field *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(PyBytes_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cprotobuf.internal.Field.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9cprotobuf_8internal_5Field_4name_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_9cprotobuf_8internal_5Field_4name_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_9cprotobuf_8internal_5Field_4name_4__del__(((struct __pyx_obj_9cprotobuf_8internal_Field *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9cprotobuf_8internal_5Field_4name_4__del__(struct __pyx_obj_9cprotobuf_8internal_Field *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = ((PyObject*)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; }
057: cdef object type
+058: cdef public int index
/* Python wrapper */ static PyObject *__pyx_pw_9cprotobuf_8internal_5Field_5index_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9cprotobuf_8internal_5Field_5index_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9cprotobuf_8internal_5Field_5index___get__(((struct __pyx_obj_9cprotobuf_8internal_Field *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cprotobuf_8internal_5Field_5index___get__(struct __pyx_obj_9cprotobuf_8internal_Field *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cprotobuf.internal.Field.index.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9cprotobuf_8internal_5Field_5index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9cprotobuf_8internal_5Field_5index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9cprotobuf_8internal_5Field_5index_2__set__(((struct __pyx_obj_9cprotobuf_8internal_Field *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9cprotobuf_8internal_5Field_5index_2__set__(struct __pyx_obj_9cprotobuf_8internal_Field *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->index = __pyx_t_1; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("cprotobuf.internal.Field.index.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; }
+059: cdef public bint packed
/* Python wrapper */ static PyObject *__pyx_pw_9cprotobuf_8internal_5Field_6packed_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9cprotobuf_8internal_5Field_6packed_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9cprotobuf_8internal_5Field_6packed___get__(((struct __pyx_obj_9cprotobuf_8internal_Field *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cprotobuf_8internal_5Field_6packed___get__(struct __pyx_obj_9cprotobuf_8internal_Field *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->packed); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cprotobuf.internal.Field.packed.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9cprotobuf_8internal_5Field_6packed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9cprotobuf_8internal_5Field_6packed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9cprotobuf_8internal_5Field_6packed_2__set__(((struct __pyx_obj_9cprotobuf_8internal_Field *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9cprotobuf_8internal_5Field_6packed_2__set__(struct __pyx_obj_9cprotobuf_8internal_Field *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->packed = __pyx_t_1; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("cprotobuf.internal.Field.packed.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; }
+060: cdef public bint required
/* Python wrapper */ static PyObject *__pyx_pw_9cprotobuf_8internal_5Field_8required_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9cprotobuf_8internal_5Field_8required_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9cprotobuf_8internal_5Field_8required___get__(((struct __pyx_obj_9cprotobuf_8internal_Field *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cprotobuf_8internal_5Field_8required___get__(struct __pyx_obj_9cprotobuf_8internal_Field *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->required); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cprotobuf.internal.Field.required.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9cprotobuf_8internal_5Field_8required_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9cprotobuf_8internal_5Field_8required_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9cprotobuf_8internal_5Field_8required_2__set__(((struct __pyx_obj_9cprotobuf_8internal_Field *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9cprotobuf_8internal_5Field_8required_2__set__(struct __pyx_obj_9cprotobuf_8internal_Field *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->required = __pyx_t_1; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("cprotobuf.internal.Field.required.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; }
+061: cdef public bint repeated
/* Python wrapper */ static PyObject *__pyx_pw_9cprotobuf_8internal_5Field_8repeated_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9cprotobuf_8internal_5Field_8repeated_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9cprotobuf_8internal_5Field_8repeated___get__(((struct __pyx_obj_9cprotobuf_8internal_Field *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cprotobuf_8internal_5Field_8repeated___get__(struct __pyx_obj_9cprotobuf_8internal_Field *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->repeated); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cprotobuf.internal.Field.repeated.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9cprotobuf_8internal_5Field_8repeated_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9cprotobuf_8internal_5Field_8repeated_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9cprotobuf_8internal_5Field_8repeated_2__set__(((struct __pyx_obj_9cprotobuf_8internal_Field *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9cprotobuf_8internal_5Field_8repeated_2__set__(struct __pyx_obj_9cprotobuf_8internal_Field *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->repeated = __pyx_t_1; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("cprotobuf.internal.Field.repeated.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; }
062: cdef object klass
063: cdef object default
064:
+065: cdef public unsigned char wire_type
/* Python wrapper */ static PyObject *__pyx_pw_9cprotobuf_8internal_5Field_9wire_type_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_9cprotobuf_8internal_5Field_9wire_type_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9cprotobuf_8internal_5Field_9wire_type___get__(((struct __pyx_obj_9cprotobuf_8internal_Field *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cprotobuf_8internal_5Field_9wire_type___get__(struct __pyx_obj_9cprotobuf_8internal_Field *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_unsigned_char(__pyx_v_self->wire_type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cprotobuf.internal.Field.wire_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_9cprotobuf_8internal_5Field_9wire_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_9cprotobuf_8internal_5Field_9wire_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_9cprotobuf_8internal_5Field_9wire_type_2__set__(((struct __pyx_obj_9cprotobuf_8internal_Field *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9cprotobuf_8internal_5Field_9wire_type_2__set__(struct __pyx_obj_9cprotobuf_8internal_Field *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __pyx_t_1 = __Pyx_PyInt_As_unsigned_char(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->wire_type = __pyx_t_1; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("cprotobuf.internal.Field.wire_type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; }
066: cdef Encoder encoder
067: cdef Decoder decoder
068:
+069: def __init__(self, type, index, required=True, repeated=False, packed=False, default=None):
/* Python wrapper */ static int __pyx_pw_9cprotobuf_8internal_5Field_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_9cprotobuf_8internal_5Field_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_type = 0; PyObject *__pyx_v_index = 0; PyObject *__pyx_v_required = 0; PyObject *__pyx_v_repeated = 0; PyObject *__pyx_v_packed = 0; PyObject *__pyx_v_default = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_type,&__pyx_n_s_index,&__pyx_n_s_required,&__pyx_n_s_repeated,&__pyx_n_s_packed,&__pyx_n_s_default,0}; PyObject* values[6] = {0,0,0,0,0,0}; values[2] = ((PyObject *)Py_True); values[3] = ((PyObject *)Py_False); values[4] = ((PyObject *)Py_False); values[5] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 6, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_required); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_repeated); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_packed); if (value) { values[4] = value; kw_args--; } } case 5: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_default); if (value) { values[5] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_type = values[0]; __pyx_v_index = values[1]; __pyx_v_required = values[2]; __pyx_v_repeated = values[3]; __pyx_v_packed = values[4]; __pyx_v_default = values[5]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cprotobuf.internal.Field.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cprotobuf_8internal_5Field___init__(((struct __pyx_obj_9cprotobuf_8internal_Field *)__pyx_v_self), __pyx_v_type, __pyx_v_index, __pyx_v_required, __pyx_v_repeated, __pyx_v_packed, __pyx_v_default); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_9cprotobuf_8internal_5Field___init__(struct __pyx_obj_9cprotobuf_8internal_Field *__pyx_v_self, PyObject *__pyx_v_type, PyObject *__pyx_v_index, PyObject *__pyx_v_required, PyObject *__pyx_v_repeated, PyObject *__pyx_v_packed, PyObject *__pyx_v_default) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); /* … */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("cprotobuf.internal.Field.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; }
+070: assert type in wire_types or isinstance(type, (str, unicode)) or issubclass(type, ProtoEntity), 'invalid type %s' % type
#ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_wire_types); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_type, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (__pyx_t_3 != 0); if (!__pyx_t_4) { } else { __pyx_t_1 = __pyx_t_4; goto __pyx_L3_bool_binop_done; } __pyx_t_3 = PyString_Check(__pyx_v_type); __pyx_t_5 = (__pyx_t_3 != 0); if (!__pyx_t_5) { } else { __pyx_t_4 = __pyx_t_5; goto __pyx_L6_bool_binop_done; } __pyx_t_5 = PyUnicode_Check(__pyx_v_type); __pyx_t_3 = (__pyx_t_5 != 0); __pyx_t_4 = __pyx_t_3; __pyx_L6_bool_binop_done:; __pyx_t_3 = (__pyx_t_4 != 0); if (!__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L3_bool_binop_done; } __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ProtoEntity); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_IsSubclass(__pyx_v_type, __pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L3_bool_binop_done:; if (unlikely(!__pyx_t_1)) { __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_invalid_type_s, __pyx_v_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyErr_SetObject(PyExc_AssertionError, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif
071:
+072: self.type = type
__Pyx_INCREF(__pyx_v_type); __Pyx_GIVEREF(__pyx_v_type); __Pyx_GOTREF(__pyx_v_self->type); __Pyx_DECREF(__pyx_v_self->type); __pyx_v_self->type = __pyx_v_type;
+073: self.index = index
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_index); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->index = __pyx_t_6;
+074: self.required = required
__pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_required); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->required = __pyx_t_1;
+075: self.repeated = repeated
__pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_repeated); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->repeated = __pyx_t_1;
+076: self.packed = packed
__pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_packed); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->packed = __pyx_t_1;
077:
+078: if inspect.isclass(self.type) and issubclass(self.type, ProtoEntity):
__pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_inspect); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_isclass); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (!__pyx_t_7) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_self->type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); } else { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL; __Pyx_INCREF(__pyx_v_self->type); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_self->type); __Pyx_GIVEREF(__pyx_v_self->type); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { } else { __pyx_t_1 = __pyx_t_4; goto __pyx_L9_bool_binop_done; } __pyx_t_2 = __pyx_v_self->type; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_ProtoEntity); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = PyObject_IsSubclass(__pyx_t_2, __pyx_t_8); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_3 = (__pyx_t_4 != 0); __pyx_t_1 = __pyx_t_3; __pyx_L9_bool_binop_done:; if (__pyx_t_1) {
+079: self.klass = self.type
__pyx_t_8 = __pyx_v_self->type; __Pyx_INCREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __Pyx_GOTREF(__pyx_v_self->klass); __Pyx_DECREF(__pyx_v_self->klass); __pyx_v_self->klass = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L8; }
+080: elif self.type not in default_objects:
__pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_objects); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_self->type, __pyx_t_8, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) {
081: # sub message specified as name
+082: self.klass = self.type
__pyx_t_8 = __pyx_v_self->type; __Pyx_INCREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __Pyx_GOTREF(__pyx_v_self->klass); __Pyx_DECREF(__pyx_v_self->klass); __pyx_v_self->klass = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L8; } /*else*/ {
083: else:
+084: self.klass = None
__Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->klass); __Pyx_DECREF(__pyx_v_self->klass); __pyx_v_self->klass = Py_None; } __pyx_L8:;
085:
+086: self.default = default or default_objects.get(self.type)
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_default); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_3) { } else { __Pyx_INCREF(__pyx_v_default); __pyx_t_8 = __pyx_v_default; goto __pyx_L11_bool_binop_done; } __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_objects); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_get); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (!__pyx_t_9) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_self->type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); } else { __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = NULL; __Pyx_INCREF(__pyx_v_self->type); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_self->type); __Pyx_GIVEREF(__pyx_v_self->type); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_L11_bool_binop_done:; __Pyx_GIVEREF(__pyx_t_8); __Pyx_GOTREF(__pyx_v_self->__pyx_default); __Pyx_DECREF(__pyx_v_self->__pyx_default); __pyx_v_self->__pyx_default = __pyx_t_8; __pyx_t_8 = 0;
087:
+088: self.wire_type = self.get_wire_type()
__pyx_v_self->wire_type = ((struct __pyx_vtabstruct_9cprotobuf_8internal_Field *)__pyx_v_self->__pyx_vtab)->get_wire_type(__pyx_v_self);
+089: self.encoder = self.get_encoder()
__pyx_v_self->encoder = ((struct __pyx_vtabstruct_9cprotobuf_8internal_Field *)__pyx_v_self->__pyx_vtab)->get_encoder(__pyx_v_self);
+090: self.decoder = self.get_decoder()
__pyx_v_self->decoder = ((struct __pyx_vtabstruct_9cprotobuf_8internal_Field *)__pyx_v_self->__pyx_vtab)->get_decoder(__pyx_v_self);
091:
+092: if self.packed:
__pyx_t_3 = (__pyx_v_self->packed != 0); if (__pyx_t_3) {
+093: assert self.repeated, 'packed must be used with repeated'
#ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!(__pyx_v_self->repeated != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_packed_must_be_used_with_repeate); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif goto __pyx_L13; } __pyx_L13:;
094:
+095: cdef instantiate_klass(self):
static PyObject *__pyx_f_9cprotobuf_8internal_5Field_instantiate_klass(struct __pyx_obj_9cprotobuf_8internal_Field *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("instantiate_klass", 0); /* … */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("cprotobuf.internal.Field.instantiate_klass", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
+096: if self.klass and isinstance(self.klass, (str, unicode)):
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->klass); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = __pyx_v_self->klass; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = PyString_Check(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = (__pyx_t_4 != 0); if (!__pyx_t_5) { } else { __pyx_t_2 = __pyx_t_5; goto __pyx_L6_bool_binop_done; } __pyx_t_3 = __pyx_v_self->klass; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = PyUnicode_Check(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = (__pyx_t_5 != 0); __pyx_t_2 = __pyx_t_4; __pyx_L6_bool_binop_done:; __pyx_t_4 = (__pyx_t_2 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_1) {
+097: self.klass = get_proto(self.klass)
__pyx_t_3 = __pyx_v_self->klass; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = __pyx_f_9cprotobuf_8internal_get_proto(__pyx_t_3, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_6); __Pyx_GOTREF(__pyx_v_self->klass); __Pyx_DECREF(__pyx_v_self->klass); __pyx_v_self->klass = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L3; } __pyx_L3:;
098:
+099: def __get__(self, instance, type):
/* Python wrapper */ static PyObject *__pyx_pw_9cprotobuf_8internal_5Field_3__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_instance, PyObject *__pyx_v_type); /*proto*/ static PyObject *__pyx_pw_9cprotobuf_8internal_5Field_3__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_instance, PyObject *__pyx_v_type) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_9cprotobuf_8internal_5Field_2__get__(((struct __pyx_obj_9cprotobuf_8internal_Field *)__pyx_v_self), ((PyObject *)__pyx_v_instance), ((PyObject *)__pyx_v_type)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cprotobuf_8internal_5Field_2__get__(struct __pyx_obj_9cprotobuf_8internal_Field *__pyx_v_self, PyObject *__pyx_v_instance, CYTHON_UNUSED PyObject *__pyx_v_type) { PyObject *__pyx_v_value = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); /* … */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("cprotobuf.internal.Field.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_value); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
+100: if not instance:
__pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_instance); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) {
+101: return self
__Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; }
+102: value = None
__Pyx_INCREF(Py_None);
__pyx_v_value = Py_None;
103:
+104: if self.repeated:
__pyx_t_2 = (__pyx_v_self->repeated != 0); if (__pyx_t_2) {
+105: if self.klass:
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->klass); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) {
+106: self.instantiate_klass()
__pyx_t_3 = ((struct __pyx_vtabstruct_9cprotobuf_8internal_Field *)__pyx_v_self->__pyx_vtab)->instantiate_klass(__pyx_v_self); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+107: value = RepeatedContainer(self.klass)
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_self->klass); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->klass); __Pyx_GIVEREF(__pyx_v_self->klass); __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9cprotobuf_8internal_RepeatedContainer)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L5; } /*else*/ {
108: else:
+109: value = []
__pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4); __pyx_t_4 = 0; } __pyx_L5:;
+110: setattr(instance, self.name, value)
__pyx_t_4 = __pyx_v_self->name; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = PyObject_SetAttr(__pyx_v_instance, __pyx_t_4, __pyx_v_value); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4; }
+111: elif self.klass:
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->klass); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) {
+112: self.instantiate_klass()
__pyx_t_4 = ((struct __pyx_vtabstruct_9cprotobuf_8internal_Field *)__pyx_v_self->__pyx_vtab)->instantiate_klass(__pyx_v_self); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+113: value = self.klass()
__Pyx_INCREF(__pyx_v_self->klass); __pyx_t_3 = __pyx_v_self->klass; __pyx_t_6 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4); __pyx_t_4 = 0;
+114: setattr(instance, self.name, value)
__pyx_t_4 = __pyx_v_self->name; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = PyObject_SetAttr(__pyx_v_instance, __pyx_t_4, __pyx_v_value); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4; } /*else*/ {
115: else:
+116: value = self.default
__pyx_t_4 = __pyx_v_self->__pyx_default; __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4); __pyx_t_4 = 0; } __pyx_L4:;
+117: return value
__Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_value); __pyx_r = __pyx_v_value; goto __pyx_L0;
118:
+119: cdef unsigned char get_wire_type(self):
static unsigned char __pyx_f_9cprotobuf_8internal_5Field_get_wire_type(struct __pyx_obj_9cprotobuf_8internal_Field *__pyx_v_self) { unsigned char __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_wire_type", 0); /* … */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("cprotobuf.internal.Field.get_wire_type", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; }
+120: if self.packed:
__pyx_t_1 = (__pyx_v_self->packed != 0); if (__pyx_t_1) {
+121: return 2
__pyx_r = 2; goto __pyx_L0; }
+122: try:
{ /*try:*/ {
+123: return wire_types[self.type]
__pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_wire_types); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyObject_GetItem(__pyx_t_5, __pyx_v_self->type); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L4_error;}; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyInt_As_unsigned_char(__pyx_t_6); if (unlikely((__pyx_t_7 == (unsigned char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_7; goto __pyx_L8_try_return; } __pyx_L4_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+124: except KeyError:
__pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_8) { __Pyx_AddTraceback("cprotobuf.internal.Field.get_wire_type", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_9);
+125: return 2
__pyx_r = 2; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L7_except_return; } goto __pyx_L6_except_error; __pyx_L6_except_error:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L8_try_return:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L0; __pyx_L7_except_return:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L0; }
126:
+127: cdef Encoder get_encoder(self):
static __pyx_t_9cprotobuf_8internal_Encoder __pyx_f_9cprotobuf_8internal_5Field_get_encoder(struct __pyx_obj_9cprotobuf_8internal_Field *__pyx_v_self) { __pyx_t_9cprotobuf_8internal_Encoder __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_encoder", 0); /* … */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("cprotobuf.internal.Field.get_encoder", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; }
+128: if self.type == 'int32':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_int32, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+129: return encode_int64 # compatible with official protobuf
__pyx_r = __pyx_f_9cprotobuf_8internal_encode_int64; goto __pyx_L0; }
+130: if self.type == 'int64':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_int64, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+131: return encode_int64
__pyx_r = __pyx_f_9cprotobuf_8internal_encode_int64; goto __pyx_L0; }
+132: if self.type == 'sint32':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_sint32, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+133: return encode_sint32
__pyx_r = __pyx_f_9cprotobuf_8internal_encode_sint32; goto __pyx_L0; }
+134: if self.type == 'sint64':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_sint64, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+135: return encode_sint64
__pyx_r = __pyx_f_9cprotobuf_8internal_encode_sint64; goto __pyx_L0; }
+136: if self.type == 'uint32':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_uint32, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+137: return encode_uint32
__pyx_r = __pyx_f_9cprotobuf_8internal_encode_uint32; goto __pyx_L0; }
+138: if self.type == 'uint64':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_uint64, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+139: return encode_uint64
__pyx_r = __pyx_f_9cprotobuf_8internal_encode_uint64; goto __pyx_L0; }
+140: if self.type == 'bool':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_bool, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+141: return encode_bool
__pyx_r = __pyx_f_9cprotobuf_8internal_encode_bool; goto __pyx_L0; }
+142: if self.type == 'enum':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_enum, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+143: return encode_int64 # compatible with official protobuf
__pyx_r = __pyx_f_9cprotobuf_8internal_encode_int64; goto __pyx_L0; }
+144: if self.type == 'fixed64':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_fixed64, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+145: return encode_fixed64
__pyx_r = __pyx_f_9cprotobuf_8internal_encode_fixed64; goto __pyx_L0; }
+146: if self.type == 'sfixed64':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_sfixed64, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+147: return encode_sfixed64
__pyx_r = __pyx_f_9cprotobuf_8internal_encode_sfixed64; goto __pyx_L0; }
+148: if self.type == 'fixed32':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_fixed32, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+149: return encode_fixed32
__pyx_r = __pyx_f_9cprotobuf_8internal_encode_fixed32; goto __pyx_L0; }
+150: if self.type == 'sfixed32':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_sfixed32, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+151: return encode_sfixed32
__pyx_r = __pyx_f_9cprotobuf_8internal_encode_sfixed32; goto __pyx_L0; }
+152: if self.type == 'string':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_string, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+153: return encode_string
__pyx_r = __pyx_f_9cprotobuf_8internal_encode_string; goto __pyx_L0; }
+154: if self.type == 'bytes':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_bytes, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+155: return encode_bytes
__pyx_r = __pyx_f_9cprotobuf_8internal_encode_bytes; goto __pyx_L0; }
+156: if self.type == 'float':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_float, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+157: return encode_float
__pyx_r = __pyx_f_9cprotobuf_8internal_encode_float; goto __pyx_L0; }
+158: if self.type == 'double':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_double, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+159: return encode_double
__pyx_r = __pyx_f_9cprotobuf_8internal_encode_double; goto __pyx_L0; }
+160: return encode_subobject
__pyx_r = __pyx_f_9cprotobuf_8internal_encode_subobject; goto __pyx_L0;
161:
+162: cdef Decoder get_decoder(self):
static __pyx_t_9cprotobuf_8internal_Decoder __pyx_f_9cprotobuf_8internal_5Field_get_decoder(struct __pyx_obj_9cprotobuf_8internal_Field *__pyx_v_self) { __pyx_t_9cprotobuf_8internal_Decoder __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_decoder", 0); /* … */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("cprotobuf.internal.Field.get_decoder", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; }
+163: if self.type == 'int32':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_int32, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+164: return decode_int64 # compatible with official protobuf
__pyx_r = __pyx_f_9cprotobuf_8internal_decode_int64; goto __pyx_L0; }
+165: if self.type == 'int64':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_int64, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+166: return decode_int64
__pyx_r = __pyx_f_9cprotobuf_8internal_decode_int64; goto __pyx_L0; }
+167: if self.type == 'sint32':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_sint32, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+168: return decode_sint32
__pyx_r = __pyx_f_9cprotobuf_8internal_decode_sint32; goto __pyx_L0; }
+169: if self.type == 'sint64':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_sint64, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+170: return decode_sint64
__pyx_r = __pyx_f_9cprotobuf_8internal_decode_sint64; goto __pyx_L0; }
+171: if self.type == 'uint32':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_uint32, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+172: return decode_uint32
__pyx_r = __pyx_f_9cprotobuf_8internal_decode_uint32; goto __pyx_L0; }
+173: if self.type == 'uint64':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_uint64, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+174: return decode_uint64
__pyx_r = __pyx_f_9cprotobuf_8internal_decode_uint64; goto __pyx_L0; }
+175: if self.type == 'bool':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_bool, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+176: return decode_bool
__pyx_r = __pyx_f_9cprotobuf_8internal_decode_bool; goto __pyx_L0; }
+177: if self.type == 'enum':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_enum, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+178: return decode_int64 # compatible with official protobuf
__pyx_r = __pyx_f_9cprotobuf_8internal_decode_int64; goto __pyx_L0; }
+179: if self.type == 'fixed32':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_fixed32, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+180: return decode_fixed32
__pyx_r = __pyx_f_9cprotobuf_8internal_decode_fixed32; goto __pyx_L0; }
+181: if self.type == 'fixed64':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_fixed64, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+182: return decode_fixed64
__pyx_r = __pyx_f_9cprotobuf_8internal_decode_fixed64; goto __pyx_L0; }
+183: if self.type == 'sfixed32':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_sfixed32, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+184: return decode_sfixed32
__pyx_r = __pyx_f_9cprotobuf_8internal_decode_sfixed32; goto __pyx_L0; }
+185: if self.type == 'sfixed64':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_sfixed64, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+186: return decode_sfixed64
__pyx_r = __pyx_f_9cprotobuf_8internal_decode_sfixed64; goto __pyx_L0; }
+187: if self.type == 'string':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_string, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+188: return decode_string
__pyx_r = __pyx_f_9cprotobuf_8internal_decode_string; goto __pyx_L0; }
+189: if self.type == 'bytes':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_bytes, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+190: return decode_bytes
__pyx_r = __pyx_f_9cprotobuf_8internal_decode_bytes; goto __pyx_L0; }
+191: if self.type == 'float':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_float, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+192: return decode_float
__pyx_r = __pyx_f_9cprotobuf_8internal_decode_float; goto __pyx_L0; }
+193: if self.type == 'double':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_double, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+194: return decode_double
__pyx_r = __pyx_f_9cprotobuf_8internal_decode_double; goto __pyx_L0; }
+195: return NULL
__pyx_r = NULL; goto __pyx_L0;
196:
+197: cdef dict _proto_classes = {}
__pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_v_9cprotobuf_8internal__proto_classes); __Pyx_DECREF_SET(__pyx_v_9cprotobuf_8internal__proto_classes, ((PyObject*)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0;
+198: cpdef get_proto(name):
static PyObject *__pyx_pw_9cprotobuf_8internal_1get_proto(PyObject *__pyx_self, PyObject *__pyx_v_name); /*proto*/ static PyObject *__pyx_f_9cprotobuf_8internal_get_proto(PyObject *__pyx_v_name, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_proto", 0); /* … */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cprotobuf.internal.get_proto", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_9cprotobuf_8internal_1get_proto(PyObject *__pyx_self, PyObject *__pyx_v_name); /*proto*/ static PyObject *__pyx_pw_9cprotobuf_8internal_1get_proto(PyObject *__pyx_self, PyObject *__pyx_v_name) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_proto (wrapper)", 0); __pyx_r = __pyx_pf_9cprotobuf_8internal_get_proto(__pyx_self, ((PyObject *)__pyx_v_name)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cprotobuf_8internal_get_proto(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_proto", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_9cprotobuf_8internal_get_proto(__pyx_v_name, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cprotobuf.internal.get_proto", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
+199: return _proto_classes[name]
__Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_9cprotobuf_8internal__proto_classes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_9cprotobuf_8internal__proto_classes, __pyx_v_name); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0;
200:
+201: def register_proto(name, cls):
/* Python wrapper */ static PyObject *__pyx_pw_9cprotobuf_8internal_3register_proto(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9cprotobuf_8internal_3register_proto = {"register_proto", (PyCFunction)__pyx_pw_9cprotobuf_8internal_3register_proto, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cprotobuf_8internal_3register_proto(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyObject *__pyx_v_cls = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("register_proto (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_cls,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("register_proto", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "register_proto") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_name = values[0]; __pyx_v_cls = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("register_proto", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cprotobuf.internal.register_proto", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cprotobuf_8internal_2register_proto(__pyx_self, __pyx_v_name, __pyx_v_cls); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cprotobuf_8internal_2register_proto(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyObject *__pyx_v_cls) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("register_proto", 0); /* … */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("cprotobuf.internal.register_proto", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* … */ __pyx_tuple__10 = PyTuple_Pack(2, __pyx_n_s_name, __pyx_n_s_cls); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); /* … */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_9cprotobuf_8internal_3register_proto, NULL, __pyx_n_s_cprotobuf_internal); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_register_proto, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yihuang_src_cprotobuf_cpro_2, __pyx_n_s_register_proto, 201, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+202: _proto_classes[name] = cls
if (unlikely(__pyx_v_9cprotobuf_8internal__proto_classes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(PyDict_SetItem(__pyx_v_9cprotobuf_8internal__proto_classes, __pyx_v_name, __pyx_v_cls) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
203:
+204: class MetaProtoEntity(type):
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_7cpython_4type_type))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)__pyx_ptype_7cpython_4type_type))); __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_7cpython_4type_type))); __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_MetaProtoEntity, __pyx_n_s_MetaProtoEntity, (PyObject *) NULL, __pyx_n_s_cprotobuf_internal, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); /* … */ __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_MetaProtoEntity, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MetaProtoEntity, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+205: def __new__(cls, clsname, bases, attrs):
/* Python wrapper */ static PyObject *__pyx_pw_9cprotobuf_8internal_15MetaProtoEntity_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9cprotobuf_8internal_15MetaProtoEntity_1__new__ = {"__new__", (PyCFunction)__pyx_pw_9cprotobuf_8internal_15MetaProtoEntity_1__new__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cprotobuf_8internal_15MetaProtoEntity_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_cls = 0; PyObject *__pyx_v_clsname = 0; PyObject *__pyx_v_bases = 0; PyObject *__pyx_v_attrs = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__new__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_clsname,&__pyx_n_s_bases,&__pyx_n_s_attrs,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_clsname)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bases)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, 2); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_attrs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, 3); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__new__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_cls = values[0]; __pyx_v_clsname = values[1]; __pyx_v_bases = values[2]; __pyx_v_attrs = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cprotobuf.internal.MetaProtoEntity.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cprotobuf_8internal_15MetaProtoEntity___new__(__pyx_self, __pyx_v_cls, __pyx_v_clsname, __pyx_v_bases, __pyx_v_attrs); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cprotobuf_8internal_15MetaProtoEntity___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_clsname, PyObject *__pyx_v_bases, PyObject *__pyx_v_attrs) { PyObject *__pyx_v__fields = NULL; PyObject *__pyx_v__fieldsmap = NULL; PyObject *__pyx_v__fieldsmap_by_name = NULL; struct __pyx_obj_9cprotobuf_8internal_Field *__pyx_v_f = 0; PyObject *__pyx_v_name = NULL; PyObject *__pyx_v_v = NULL; PyObject *__pyx_v_newcls = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__new__", 0); /* … */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("cprotobuf.internal.MetaProtoEntity.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v__fields); __Pyx_XDECREF(__pyx_v__fieldsmap); __Pyx_XDECREF(__pyx_v__fieldsmap_by_name); __Pyx_XDECREF((PyObject *)__pyx_v_f); __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_v); __Pyx_XDECREF(__pyx_v_newcls); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* … */ __pyx_tuple__12 = PyTuple_Pack(11, __pyx_n_s_cls, __pyx_n_s_clsname, __pyx_n_s_bases, __pyx_n_s_attrs, __pyx_n_s_fields, __pyx_n_s_fieldsmap, __pyx_n_s_fieldsmap_by_name, __pyx_n_s_f, __pyx_n_s_name, __pyx_n_s_v, __pyx_n_s_newcls); if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); /* … */ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9cprotobuf_8internal_15MetaProtoEntity_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_MetaProtoEntity___new, NULL, __pyx_n_s_cprotobuf_internal, __pyx_d, ((PyObject *)__pyx_codeobj__13)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_new, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yihuang_src_cprotobuf_cpro_2, __pyx_n_s_new, 205, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+206: if clsname == 'ProtoEntity':
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_clsname, __pyx_n_s_ProtoEntity, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) {
+207: return super(MetaProtoEntity, cls).__new__(cls, clsname, bases, attrs)
__Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_MetaProtoEntity); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_cls); __Pyx_GIVEREF(__pyx_v_cls); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_new); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; __pyx_t_5 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_5 = 1; } } __pyx_t_6 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_3) { PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_cls); __Pyx_GIVEREF(__pyx_v_cls); __Pyx_INCREF(__pyx_v_clsname); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_clsname); __Pyx_GIVEREF(__pyx_v_clsname); __Pyx_INCREF(__pyx_v_bases); PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_bases); __Pyx_GIVEREF(__pyx_v_bases); __Pyx_INCREF(__pyx_v_attrs); PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_5, __pyx_v_attrs); __Pyx_GIVEREF(__pyx_v_attrs); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; }
208: # _fields for encode
209: # _fieldsmap for decode
+210: _fields = []
__pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v__fields = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0;
+211: _fieldsmap = {}
__pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v__fieldsmap = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0;
+212: _fieldsmap_by_name = {}
__pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v__fieldsmap_by_name = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0;
213: cdef Field f
+214: for name, v in attrs.items():
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_attrs, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_6) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; __pyx_t_7 = NULL; } else { __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } } else { __pyx_t_2 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_2); } if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_3 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_unpacking_done; __pyx_L6_unpacking_failed:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L7_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_3); __pyx_t_3 = 0; /* … */ __pyx_L4_continue:; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+215: if name.startswith('__'):
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* … */ __pyx_tuple__2 = PyTuple_Pack(1, __pyx_n_s_); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2);
+216: continue
goto __pyx_L4_continue; }
+217: if not isinstance(v, Field):
__pyx_t_1 = __Pyx_TypeCheck(__pyx_v_v, ((PyObject*)__pyx_ptype_9cprotobuf_8internal_Field));
__pyx_t_10 = ((!(__pyx_t_1 != 0)) != 0);
if (__pyx_t_10) {
+218: continue
goto __pyx_L4_continue; }
+219: f = v
if (!(likely(((__pyx_v_v) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_v, __pyx_ptype_9cprotobuf_8internal_Field))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __pyx_v_v; __Pyx_INCREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_f, ((struct __pyx_obj_9cprotobuf_8internal_Field *)__pyx_t_3)); __pyx_t_3 = 0;
+220: f.name = name
if (!(likely(PyBytes_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_name)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __pyx_v_name; __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_f->name); __Pyx_DECREF(__pyx_v_f->name); __pyx_v_f->name = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0;
+221: assert f.index not in _fieldsmap, 'duplicate field index %s' % f.index
#ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_f->index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = (__Pyx_PyDict_Contains(__pyx_t_3, __pyx_v__fieldsmap, Py_NE)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!(__pyx_t_10 != 0))) { __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_f->index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_duplicate_field_index_s, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyErr_SetObject(PyExc_AssertionError, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif
+222: _fieldsmap[f.index] = f
__pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_f->index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (unlikely(PyDict_SetItem(__pyx_v__fieldsmap, __pyx_t_2, ((PyObject *)__pyx_v_f)) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+223: _fields.append(f)
__pyx_t_11 = __Pyx_PyList_Append(__pyx_v__fields, ((PyObject *)__pyx_v_f)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+224: _fieldsmap_by_name[name] = f
if (unlikely(PyDict_SetItem(__pyx_v__fieldsmap_by_name, __pyx_v_name, ((PyObject *)__pyx_v_f)) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+225: newcls = super(MetaProtoEntity, cls).__new__(cls, clsname, bases, attrs)
__pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MetaProtoEntity); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_cls); __Pyx_GIVEREF(__pyx_v_cls); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_new); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; __pyx_t_5 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } __pyx_t_6 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_2) { PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL; } __Pyx_INCREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_cls); __Pyx_GIVEREF(__pyx_v_cls); __Pyx_INCREF(__pyx_v_clsname); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_clsname); __Pyx_GIVEREF(__pyx_v_clsname); __Pyx_INCREF(__pyx_v_bases); PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_bases); __Pyx_GIVEREF(__pyx_v_bases); __Pyx_INCREF(__pyx_v_attrs); PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_5, __pyx_v_attrs); __Pyx_GIVEREF(__pyx_v_attrs); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_newcls = __pyx_t_4; __pyx_t_4 = 0;
+226: newcls._fields = _fields
if (__Pyx_PyObject_SetAttrStr(__pyx_v_newcls, __pyx_n_s_fields, __pyx_v__fields) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+227: newcls._fieldsmap = _fieldsmap
if (__Pyx_PyObject_SetAttrStr(__pyx_v_newcls, __pyx_n_s_fieldsmap, __pyx_v__fieldsmap) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+228: newcls._fieldsmap_by_name = _fieldsmap_by_name
if (__Pyx_PyObject_SetAttrStr(__pyx_v_newcls, __pyx_n_s_fieldsmap_by_name, __pyx_v__fieldsmap_by_name) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+229: register_proto(clsname, newcls)
__pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_register_proto); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; __pyx_t_5 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } __pyx_t_2 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_6) { PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_v_clsname); PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_5, __pyx_v_clsname); __Pyx_GIVEREF(__pyx_v_clsname); __Pyx_INCREF(__pyx_v_newcls); PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_5, __pyx_v_newcls); __Pyx_GIVEREF(__pyx_v_newcls); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+230: return newcls
__Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_newcls); __pyx_r = __pyx_v_newcls; goto __pyx_L0;
231:
+232: class ProtoEntity(object):
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ProtoEntity, __pyx_n_s_ProtoEntity, (PyObject *) NULL, __pyx_n_s_cprotobuf_internal, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); /* … */ __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ProtoEntity, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProtoEntity, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+233: __metaclass__ = MetaProtoEntity
__pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_MetaProtoEntity); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_metaclass, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
234:
+235: def __init__(self, **kwargs):
/* Python wrapper */ static PyObject *__pyx_pw_9cprotobuf_8internal_11ProtoEntity_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9cprotobuf_8internal_11ProtoEntity_1__init__ = {"__init__", (PyCFunction)__pyx_pw_9cprotobuf_8internal_11ProtoEntity_1__init__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cprotobuf_8internal_11ProtoEntity_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_kwargs = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_self = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("cprotobuf.internal.ProtoEntity.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cprotobuf_8internal_11ProtoEntity___init__(__pyx_self, __pyx_v_self, __pyx_v_kwargs); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; /* function exit code */ __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cprotobuf_8internal_11ProtoEntity___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); /* … */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("cprotobuf.internal.ProtoEntity.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* … */ __pyx_tuple__14 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); /* … */ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9cprotobuf_8internal_11ProtoEntity_1__init__, 0, __pyx_n_s_ProtoEntity___init, NULL, __pyx_n_s_cprotobuf_internal, __pyx_d, ((PyObject *)__pyx_codeobj__15)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yihuang_src_cprotobuf_cpro_2, __pyx_n_s_init, 235, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+236: self.__dict__.update(kwargs)
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_update); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_2) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL; __Pyx_INCREF(__pyx_v_kwargs); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
237:
+238: def SerializeToString(self):
/* Python wrapper */ static PyObject *__pyx_pw_9cprotobuf_8internal_11ProtoEntity_3SerializeToString(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_9cprotobuf_8internal_11ProtoEntity_3SerializeToString = {"SerializeToString", (PyCFunction)__pyx_pw_9cprotobuf_8internal_11ProtoEntity_3SerializeToString, METH_O, 0}; static PyObject *__pyx_pw_9cprotobuf_8internal_11ProtoEntity_3SerializeToString(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("SerializeToString (wrapper)", 0); __pyx_r = __pyx_pf_9cprotobuf_8internal_11ProtoEntity_2SerializeToString(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cprotobuf_8internal_11ProtoEntity_2SerializeToString(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyByteArrayObject *__pyx_v_buf = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("SerializeToString", 0); /* … */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("cprotobuf.internal.ProtoEntity.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_buf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* … */ __pyx_tuple__16 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_buf); if (unlikely(!__pyx_tuple__16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); /* … */ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9cprotobuf_8internal_11ProtoEntity_3SerializeToString, 0, __pyx_n_s_ProtoEntity_SerializeToString, NULL, __pyx_n_s_cprotobuf_internal, __pyx_d, ((PyObject *)__pyx_codeobj__17)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_SerializeToString, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yihuang_src_cprotobuf_cpro_2, __pyx_n_s_SerializeToString, 238, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+239: cdef bytearray buf = bytearray()
__pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9cprotobuf_8internal_bytearray)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_buf = ((PyByteArrayObject *)__pyx_t_1); __pyx_t_1 = 0;
+240: encode_data(buf, type(self), self.__dict__)
__pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_encode_data); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7cpython_4type_type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; __pyx_t_6 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_buf)); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_buf)); __Pyx_GIVEREF(((PyObject *)__pyx_v_buf)); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+241: return buf
__Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_buf)); __pyx_r = ((PyObject *)__pyx_v_buf); goto __pyx_L0;
242:
+243: def ParseFromString(self, bytes s):
/* Python wrapper */ static PyObject *__pyx_pw_9cprotobuf_8internal_11ProtoEntity_5ParseFromString(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9cprotobuf_8internal_11ProtoEntity_5ParseFromString = {"ParseFromString", (PyCFunction)__pyx_pw_9cprotobuf_8internal_11ProtoEntity_5ParseFromString, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cprotobuf_8internal_11ProtoEntity_5ParseFromString(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_s = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ParseFromString (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_s,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_s)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("ParseFromString", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromString") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_s = ((PyObject*)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("ParseFromString", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cprotobuf.internal.ProtoEntity.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_s), (&PyBytes_Type), 1, "s", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_9cprotobuf_8internal_11ProtoEntity_4ParseFromString(__pyx_self, __pyx_v_self, __pyx_v_s); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cprotobuf_8internal_11ProtoEntity_4ParseFromString(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_s) { char *__pyx_v_buff; char *__pyx_v_start; char *__pyx_v_end; Py_ssize_t __pyx_v_size; PyObject *__pyx_v_e = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ParseFromString", 0); /* … */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_14); __Pyx_AddTraceback("cprotobuf.internal.ProtoEntity.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_e); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* … */ __pyx_tuple__18 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_s, __pyx_n_s_buff, __pyx_n_s_start, __pyx_n_s_end, __pyx_n_s_size, __pyx_n_s_e); if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); /* … */ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9cprotobuf_8internal_11ProtoEntity_5ParseFromString, 0, __pyx_n_s_ProtoEntity_ParseFromString, NULL, __pyx_n_s_cprotobuf_internal, __pyx_d, ((PyObject *)__pyx_codeobj__19)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_ParseFromString, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yihuang_src_cprotobuf_cpro_2, __pyx_n_s_ParseFromString, 243, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
244: cdef char *buff
245: cdef char *start
246: cdef char *end
247: cdef Py_ssize_t size
+248: PyString_AsStringAndSize(s, &buff, &size)
__pyx_t_1 = PyString_AsStringAndSize(__pyx_v_s, (&__pyx_v_buff), (&__pyx_v_size)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+249: start = buff
__pyx_v_start = __pyx_v_buff;
+250: end = buff + size
__pyx_v_end = (__pyx_v_buff + __pyx_v_size);
251:
+252: try:
{ /*try:*/ {
+253: decode_object(self, &buff, end)
__pyx_t_1 = __pyx_f_9cprotobuf_8internal_decode_object(__pyx_v_self, (&__pyx_v_buff), __pyx_v_end); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L10_try_end; __pyx_L3_error:;
+254: except InternalDecodeError as e:
__pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_InternalDecodeError); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyErr_ExceptionMatches(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { __Pyx_AddTraceback("cprotobuf.internal.ProtoEntity.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_v_e = __pyx_t_6;
255: #traceback.print_exc()
+256: raise DecodeError(e.args[0] - <uint64_t>start, e.args[1])
__pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_DecodeError); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_10, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyInt_From_uint64_t(((uint64_t)__pyx_v_start)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = PyNumber_Subtract(__pyx_t_11, __pyx_t_10); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_10, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = NULL; __pyx_t_13 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); __pyx_t_13 = 1; } } __pyx_t_14 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_14); if (__pyx_t_10) { PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = NULL; } PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_14, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L10_try_end:; }
257:
+258: def __unicode__(self):
/* Python wrapper */ static PyObject *__pyx_pw_9cprotobuf_8internal_11ProtoEntity_7__unicode__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_9cprotobuf_8internal_11ProtoEntity_7__unicode__ = {"__unicode__", (PyCFunction)__pyx_pw_9cprotobuf_8internal_11ProtoEntity_7__unicode__, METH_O, 0}; static PyObject *__pyx_pw_9cprotobuf_8internal_11ProtoEntity_7__unicode__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__unicode__ (wrapper)", 0); __pyx_r = __pyx_pf_9cprotobuf_8internal_11ProtoEntity_6__unicode__(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cprotobuf_8internal_11ProtoEntity_6__unicode__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { struct __pyx_obj_9cprotobuf_8internal_Field *__pyx_v_f = 0; PyObject *__pyx_v_buf = NULL; PyObject *__pyx_v_d = NULL; PyObject *__pyx_v_value = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__unicode__", 0); /* … */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("cprotobuf.internal.ProtoEntity.__unicode__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_f); __Pyx_XDECREF(__pyx_v_buf); __Pyx_XDECREF(__pyx_v_d); __Pyx_XDECREF(__pyx_v_value); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* … */ __pyx_tuple__20 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_f, __pyx_n_s_buf, __pyx_n_s_d, __pyx_n_s_value); if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); /* … */ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9cprotobuf_8internal_11ProtoEntity_7__unicode__, 0, __pyx_n_s_ProtoEntity___unicode, NULL, __pyx_n_s_cprotobuf_internal, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_unicode, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yihuang_src_cprotobuf_cpro_2, __pyx_n_s_unicode, 258, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
259: cdef Field f
+260: buf = []
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_buf = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0;
+261: d = self.__dict__
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_d = __pyx_t_1; __pyx_t_1 = 0;
+262: for f in self._fields:
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } } else { __pyx_t_1 = __pyx_t_4(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_1); } if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9cprotobuf_8internal_Field))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_f, ((struct __pyx_obj_9cprotobuf_8internal_Field *)__pyx_t_1)); __pyx_t_1 = 0; /* … */ __pyx_L3_continue:; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+263: value = d.get(f.name)
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (!__pyx_t_6) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_f->name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_f->name); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_f->name); __Pyx_GIVEREF(__pyx_v_f->name); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0;
+264: if value==None:
__pyx_t_1 = PyObject_RichCompare(__pyx_v_value, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_8) {
+265: continue
goto __pyx_L3_continue; }
+266: if f.repeated:
__pyx_t_8 = (__pyx_v_f->repeated != 0); if (__pyx_t_8) {
+267: buf.append(u'%s = [%s]' % (f.name, u','.join(map(unicode, value))))
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)((PyObject*)(&PyUnicode_Type)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)(&PyUnicode_Type)))); __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyUnicode_Type)))); __Pyx_INCREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyUnicode_Join(__pyx_kp_u__3, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_f->name); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_f->name); __Pyx_GIVEREF(__pyx_v_f->name); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_s_s, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_buf, __pyx_t_1); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L6; } /*else*/ {
268: else:
+269: buf.append(u'%s = %s' % (f.name, unicode(value)))
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_f->name); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_f->name); __Pyx_GIVEREF(__pyx_v_f->name); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_s_s_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_buf, __pyx_t_5); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_L6:;
+270: return u'\n'.join(buf)
__Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__4, __pyx_v_buf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0;
271:
+272: def __str__(self):
/* Python wrapper */ static PyObject *__pyx_pw_9cprotobuf_8internal_11ProtoEntity_9__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_9cprotobuf_8internal_11ProtoEntity_9__str__ = {"__str__", (PyCFunction)__pyx_pw_9cprotobuf_8internal_11ProtoEntity_9__str__, METH_O, 0}; static PyObject *__pyx_pw_9cprotobuf_8internal_11ProtoEntity_9__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); __pyx_r = __pyx_pf_9cprotobuf_8internal_11ProtoEntity_8__str__(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cprotobuf_8internal_11ProtoEntity_8__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__", 0); /* … */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cprotobuf.internal.ProtoEntity.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* … */ __pyx_tuple__22 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__22)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__22); __Pyx_GIVEREF(__pyx_tuple__22); /* … */ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9cprotobuf_8internal_11ProtoEntity_9__str__, 0, __pyx_n_s_ProtoEntity___str, NULL, __pyx_n_s_cprotobuf_internal, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_str, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yihuang_src_cprotobuf_cpro_2, __pyx_n_s_str, 272, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+273: return unicode(self).encode('utf-8')
__Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyUnicode_AsUTF8String(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0;
274:
+275: def encode_data(bytearray buf, cls, dict d):
/* Python wrapper */ static PyObject *__pyx_pw_9cprotobuf_8internal_5encode_data(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9cprotobuf_8internal_5encode_data = {"encode_data", (PyCFunction)__pyx_pw_9cprotobuf_8internal_5encode_data, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cprotobuf_8internal_5encode_data(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyByteArrayObject *__pyx_v_buf = 0; PyObject *__pyx_v_cls = 0; PyObject *__pyx_v_d = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("encode_data (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_cls,&__pyx_n_s_d,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("encode_data", 1, 3, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_d)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("encode_data", 1, 3, 3, 2); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_data") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_buf = ((PyByteArrayObject *)values[0]); __pyx_v_cls = values[1]; __pyx_v_d = ((PyObject*)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("encode_data", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cprotobuf.internal.encode_data", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_buf), __pyx_ptype_9cprotobuf_8internal_bytearray, 1, "buf", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_d), (&PyDict_Type), 1, "d", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_9cprotobuf_8internal_4encode_data(__pyx_self, __pyx_v_buf, __pyx_v_cls, __pyx_v_d); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cprotobuf_8internal_4encode_data(CYTHON_UNUSED PyObject *__pyx_self, PyByteArrayObject *__pyx_v_buf, PyObject *__pyx_v_cls, PyObject *__pyx_v_d) { PyByteArrayObject *__pyx_v_buf1 = 0; struct __pyx_obj_9cprotobuf_8internal_Field *__pyx_v_f = 0; PyObject *__pyx_v_value = NULL; PyObject *__pyx_v_item = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("encode_data", 0); /* … */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("cprotobuf.internal.encode_data", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_buf1); __Pyx_XDECREF((PyObject *)__pyx_v_f); __Pyx_XDECREF(__pyx_v_value); __Pyx_XDECREF(__pyx_v_item); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* … */ __pyx_tuple__24 = PyTuple_Pack(7, __pyx_n_s_buf, __pyx_n_s_cls, __pyx_n_s_d, __pyx_n_s_buf1, __pyx_n_s_f, __pyx_n_s_value, __pyx_n_s_item); if (unlikely(!__pyx_tuple__24)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__24); __Pyx_GIVEREF(__pyx_tuple__24); /* … */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_9cprotobuf_8internal_5encode_data, NULL, __pyx_n_s_cprotobuf_internal); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_encode_data, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
276: cdef bytearray buf1
277: cdef Field f
+278: for f in <list>cls._fields:
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = ((PyObject*)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9cprotobuf_8internal_Field))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_f, ((struct __pyx_obj_9cprotobuf_8internal_Field *)__pyx_t_1)); __pyx_t_1 = 0; /* … */ __pyx_L3_continue:; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+279: value = d.get(f.name)
if (unlikely(__pyx_v_d == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_d, __pyx_v_f->name, Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0;
+280: if value is None:
__pyx_t_4 = (__pyx_v_value == Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) {
+281: continue
goto __pyx_L3_continue; }
+282: if f.packed:
__pyx_t_5 = (__pyx_v_f->packed != 0); if (__pyx_t_5) {
+283: encode_type(buf, f.wire_type, f.index)
__pyx_t_1 = __pyx_f_9cprotobuf_8internal_encode_type(__pyx_v_buf, __pyx_v_f->wire_type, __pyx_v_f->index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+284: buf1 = bytearray()
__pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9cprotobuf_8internal_bytearray)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_buf1, ((PyByteArrayObject *)__pyx_t_1)); __pyx_t_1 = 0;
+285: for item in value:
if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) { __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } } else { __pyx_t_8 = __pyx_t_7(__pyx_t_1); if (unlikely(!__pyx_t_8)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_8); } __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_8); __pyx_t_8 = 0; /* … */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+286: f.encoder(f, buf1, item)
__pyx_t_8 = __pyx_v_f->encoder(__pyx_v_f, __pyx_v_buf1, __pyx_v_item); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+287: encode_bytes(f, buf, buf1)
__pyx_t_1 = __pyx_f_9cprotobuf_8internal_encode_bytes(__pyx_v_f, __pyx_v_buf, ((PyObject *)__pyx_v_buf1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L6; } /*else*/ {
288: else:
+289: if f.repeated:
__pyx_t_5 = (__pyx_v_f->repeated != 0); if (__pyx_t_5) {
+290: for item in value:
if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) { __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } } else { __pyx_t_8 = __pyx_t_7(__pyx_t_1); if (unlikely(!__pyx_t_8)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_8); } __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_8); __pyx_t_8 = 0; /* … */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L9; } /*else*/ {
+291: encode_type(buf, f.wire_type, f.index)
__pyx_t_8 = __pyx_f_9cprotobuf_8internal_encode_type(__pyx_v_buf, __pyx_v_f->wire_type, __pyx_v_f->index); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+292: f.encoder(f, buf, item)
__pyx_t_8 = __pyx_v_f->encoder(__pyx_v_f, __pyx_v_buf, __pyx_v_item); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
293: else:
+294: encode_type(buf, f.wire_type, f.index)
__pyx_t_1 = __pyx_f_9cprotobuf_8internal_encode_type(__pyx_v_buf, __pyx_v_f->wire_type, __pyx_v_f->index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+295: f.encoder(f, buf, value)
__pyx_t_1 = __pyx_v_f->encoder(__pyx_v_f, __pyx_v_buf, __pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L9:; } __pyx_L6:;
296:
+297: cdef inline encode_subobject(Field f, bytearray array, value):
static CYTHON_INLINE PyObject *__pyx_f_9cprotobuf_8internal_encode_subobject(struct __pyx_obj_9cprotobuf_8internal_Field *__pyx_v_f, PyByteArrayObject *__pyx_v_array, PyObject *__pyx_v_value) { PyByteArrayObject *__pyx_v_sub_buf = 0; PyObject *__pyx_v_cls = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("encode_subobject", 0); /* … */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("cprotobuf.internal.encode_subobject", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_sub_buf); __Pyx_XDECREF(__pyx_v_cls); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
+298: cdef bytearray sub_buf = bytearray()
__pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9cprotobuf_8internal_bytearray)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_sub_buf = ((PyByteArrayObject *)__pyx_t_1); __pyx_t_1 = 0;
+299: cdef object cls = f.type
__pyx_t_1 = __pyx_v_f->type;
__Pyx_INCREF(__pyx_t_1);
__pyx_v_cls = __pyx_t_1;
__pyx_t_1 = 0;
+300: if isinstance(cls, (str, unicode)):
__pyx_t_3 = PyString_Check(__pyx_v_cls); __pyx_t_4 = (__pyx_t_3 != 0); if (!__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = PyUnicode_Check(__pyx_v_cls); __pyx_t_3 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_3; __pyx_L4_bool_binop_done:; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) {
+301: cls = get_proto(cls)
__pyx_t_1 = __pyx_f_9cprotobuf_8internal_get_proto(__pyx_v_cls, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_cls, __pyx_t_1); __pyx_t_1 = 0; goto __pyx_L3; } __pyx_L3:;
+302: if isinstance(value, dict):
__pyx_t_3 = PyDict_Check(__pyx_v_value);
__pyx_t_2 = (__pyx_t_3 != 0);
if (__pyx_t_2) {
+303: encode_data(sub_buf, cls, value)
__pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_encode_data); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_sub_buf)); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, ((PyObject *)__pyx_v_sub_buf)); __Pyx_GIVEREF(((PyObject *)__pyx_v_sub_buf)); __Pyx_INCREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_cls); __Pyx_GIVEREF(__pyx_v_cls); __Pyx_INCREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L6; } /*else*/ {
304: else:
+305: encode_data(sub_buf, cls, value.__dict__)
__pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_encode_data); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_dict); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } __pyx_t_9 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_6) { PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_sub_buf)); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_7, ((PyObject *)__pyx_v_sub_buf)); __Pyx_GIVEREF(((PyObject *)__pyx_v_sub_buf)); __Pyx_INCREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_7, __pyx_v_cls); __Pyx_GIVEREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_7, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L6:;
+306: encode_bytes(f, array, sub_buf)
__pyx_t_1 = __pyx_f_9cprotobuf_8internal_encode_bytes(__pyx_v_f, __pyx_v_array, ((PyObject *)__pyx_v_sub_buf)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
307:
+308: cdef inline int decode_object(object self, char **pointer, char *end) except -1:
static CYTHON_INLINE int __pyx_f_9cprotobuf_8internal_decode_object(PyObject *__pyx_v_self, char **__pyx_v_pointer, char *__pyx_v_end) { PyObject *__pyx_v_fieldsmap = 0; uint32_t __pyx_v_tag; uint32_t __pyx_v_wtype; uint32_t __pyx_v_findex; char *__pyx_v_sub_buff; char *__pyx_v_sub_end; uint64_t __pyx_v_sub_size; struct __pyx_obj_9cprotobuf_8internal_Field *__pyx_v_f = 0; PyObject *__pyx_v_d = 0; PyObject *__pyx_v_l = 0; PyObject *__pyx_v_value = NULL; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("decode_object", 0); /* … */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("cprotobuf.internal.decode_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_fieldsmap); __Pyx_XDECREF((PyObject *)__pyx_v_f); __Pyx_XDECREF(__pyx_v_d); __Pyx_XDECREF(__pyx_v_l); __Pyx_XDECREF(__pyx_v_value); __Pyx_RefNannyFinishContext(); return __pyx_r; }
+309: cdef dict fieldsmap = self._fieldsmap
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fieldsmap); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fieldsmap = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0;
310: cdef uint32_t tag, wtype, findex
311:
312: cdef char *sub_buff
313: cdef char *sub_end
314: cdef uint64_t sub_size
315:
316: cdef Field f
+317: cdef dict d = self.__dict__
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_d = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0;
318: cdef list l
319:
+320: while pointer[0] < end:
while (1) { __pyx_t_2 = (((__pyx_v_pointer[0]) < __pyx_v_end) != 0); if (!__pyx_t_2) break;
+321: if raw_decode_uint32(pointer, end, &tag):
__pyx_t_2 = (__pyx_f_9cprotobuf_8internal_raw_decode_uint32(__pyx_v_pointer, __pyx_v_end, (&__pyx_v_tag)) != 0); if (__pyx_t_2) {
+322: raise makeDecodeError(pointer[0], "Can't deserialize type tag at [{0}] for value")
__pyx_t_1 = __pyx_f_9cprotobuf_8internal_makeDecodeError((__pyx_v_pointer[0]), __pyx_kp_s_Can_t_deserialize_type_tag_at_0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+323: findex = tag >> 3
__pyx_v_findex = (__pyx_v_tag >> 3);
+324: f = fieldsmap.get(findex)
if (unlikely(__pyx_v_fieldsmap == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_v_findex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_fieldsmap, __pyx_t_1, Py_None); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_9cprotobuf_8internal_Field))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_f, ((struct __pyx_obj_9cprotobuf_8internal_Field *)__pyx_t_3)); __pyx_t_3 = 0;
+325: if f is None:
__pyx_t_2 = (((PyObject *)__pyx_v_f) == Py_None); __pyx_t_4 = (__pyx_t_2 != 0); if (__pyx_t_4) {
+326: wtype= tag & 0x07
__pyx_v_wtype = (__pyx_v_tag & 0x07);
+327: if skip_unknown_field(pointer, end, wtype):
__pyx_t_4 = (__pyx_f_9cprotobuf_8internal_skip_unknown_field(__pyx_v_pointer, __pyx_v_end, __pyx_v_wtype) != 0); if (__pyx_t_4) {
+328: raise makeDecodeError(pointer[0], "Can't skip enough bytes for wire_type %s at [{0}] for value" % wtype)
__pyx_t_3 = __Pyx_PyInt_From_uint32_t(__pyx_v_wtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Can_t_skip_enough_bytes_for_wire, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_f_9cprotobuf_8internal_makeDecodeError((__pyx_v_pointer[0]), __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } goto __pyx_L6; } /*else*/ {
329: else:
+330: if f.packed:
__pyx_t_4 = (__pyx_v_f->packed != 0); if (__pyx_t_4) {
+331: if raw_decode_delimited(pointer, end, &sub_buff, &sub_size):
__pyx_t_4 = (__pyx_f_9cprotobuf_8internal_raw_decode_delimited(__pyx_v_pointer, __pyx_v_end, (&__pyx_v_sub_buff), (&__pyx_v_sub_size)) != 0); if (__pyx_t_4) {
+332: raise makeDecodeError(pointer[0], "Can't decode value of type `packed` at [{0}]")
__pyx_t_3 = __pyx_f_9cprotobuf_8internal_makeDecodeError((__pyx_v_pointer[0]), __pyx_kp_s_Can_t_decode_value_of_type_packe); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+333: sub_end = sub_buff + sub_size
__pyx_v_sub_end = (__pyx_v_sub_buff + __pyx_v_sub_size);
+334: l = d.setdefault(f.name, [])
if (unlikely(__pyx_v_d == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "setdefault"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyDict_SetDefault(__pyx_v_d, __pyx_v_f->name, __pyx_t_3, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_l, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0;
+335: while sub_buff < sub_end:
while (1) { __pyx_t_4 = ((__pyx_v_sub_buff < __pyx_v_sub_end) != 0); if (!__pyx_t_4) break;
+336: l.append(f.decoder(&sub_buff, sub_end))
if (unlikely(__pyx_v_l == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __pyx_v_f->decoder((&__pyx_v_sub_buff), __pyx_v_sub_end); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_l, __pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } goto __pyx_L8; } /*else*/ {
337: else:
+338: if f.klass is None:
__pyx_t_4 = (__pyx_v_f->klass == Py_None); __pyx_t_2 = (__pyx_t_4 != 0); if (__pyx_t_2) {
+339: value = f.decoder(pointer, end)
__pyx_t_1 = __pyx_v_f->decoder(__pyx_v_pointer, __pyx_v_end); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; goto __pyx_L12; } /*else*/ {
340: else:
+341: if raw_decode_delimited(pointer, end, &sub_buff, &sub_size):
__pyx_t_2 = (__pyx_f_9cprotobuf_8internal_raw_decode_delimited(__pyx_v_pointer, __pyx_v_end, (&__pyx_v_sub_buff), (&__pyx_v_sub_size)) != 0); if (__pyx_t_2) {
+342: raise makeDecodeError(pointer[0], "Can't decode value of sub message at [{0}]")
__pyx_t_1 = __pyx_f_9cprotobuf_8internal_makeDecodeError((__pyx_v_pointer[0]), __pyx_kp_s_Can_t_decode_value_of_sub_messag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+343: value = f.klass()
__Pyx_INCREF(__pyx_v_f->klass); __pyx_t_3 = __pyx_v_f->klass; __pyx_t_6 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0;
+344: decode_object(value, &sub_buff, sub_buff+sub_size)
__pyx_t_7 = __pyx_f_9cprotobuf_8internal_decode_object(__pyx_v_value, (&__pyx_v_sub_buff), (__pyx_v_sub_buff + __pyx_v_sub_size)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L12:;
+345: if f.repeated:
__pyx_t_2 = (__pyx_v_f->repeated != 0); if (__pyx_t_2) {
+346: l = d.setdefault(f.name, [])
if (unlikely(__pyx_v_d == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "setdefault"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyDict_SetDefault(__pyx_v_d, __pyx_v_f->name, __pyx_t_1, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_l, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0;
+347: l.append(value)
if (unlikely(__pyx_v_l == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_l, __pyx_v_value); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L14; } /*else*/ {
348: else:
+349: d[f.name] = value
if (unlikely(__pyx_v_d == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(PyDict_SetItem(__pyx_v_d, __pyx_v_f->name, __pyx_v_value) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L14:; } __pyx_L8:; } __pyx_L6:; }
350:
+351: return 0
__pyx_r = 0; goto __pyx_L0;